From 5c1a62171d94d00c3b457dc321c0d14900d4188f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dro=C5=84?= Date: Thu, 17 Nov 2022 13:48:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20Simple=20taxes=20(#2072)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Tax configuration - implement channels view (#2048) * Add channels view * Fix channels view import * Remove legacy stories references * Fix link in configuration * Update snapshots * Remove sample checkboxes props * Disable hover in country exceptions * Update snapshots * Extract country exception rows to seperate component * Extract components to seperate files * Remove duplicated section name * Remove backlink * Add translations to section names * Extract messages * Add ListItemLink component * Replace navigator with link in TaxChannelsMenu * Fix horizontal scroll in TaxChannelsMenu * Change codegen to build from custom schema * Build types * Update fragments * Add fixtures * Change any to proper types * Add story for tax channels page * Replace MUI Skeleton with Saleor Skeleton * Change clsx import to classnames * Fix checkboxes shadows in settings card * Update IDs in fixtures * Fix offset in TaxChannelsMenu * Update snapshots * Remove any from TaxSettings * Fix todos * Change relative marginLeft to before pseudoelement * Extract styles to seperate files * Change folder structure * Extract redirect logic to custom hook * Update snapshots * Fix comment * Add early return in channels view * Tax configuration - implement countries view (#2053) * Add channels view * Remove sample checkboxes props * Disable hover in country exceptions * Extract country exception rows to seperate component * Extract components to seperate files * Remove duplicated section name * Remove backlink * Add translations to section names * Replace navigator with link in TaxChannelsMenu * Fix horizontal scroll in TaxChannelsMenu * Change any to proper types * Add story for tax channels page * Replace MUI Skeleton with Saleor Skeleton * Change clsx import to classnames * Fix checkboxes shadows in settings card * Update IDs in fixtures * Fix offset in TaxChannelsMenu * Remove any from TaxSettings * Add countries list view * Add TaxCountryMenu component * Add CountryList page * Change channels menu rows height * Change countries menu rows height * Add TaxInput component * Add tax classes rates to countries page * Fix search input padding * Add minmax to TaxInput * Add searching through tax class rates * Extract messages * Add better handlers * Add fullWidth to TaxInput * Specify type for TaxInputs * Remove spinboxes on firefox * Remove custom spinboxes * Remove maxHeight from menu rows * Post-rebase fix * Change setter to formchagne * Add TaxConfiguration fragment * Add isDefault field to taxClass * Add fixtures * Shape data * Replace useEffect with useTaxUrlRedirect * Fix country names in menu * Add country page story * Add early return in countries view * Unify loading states between channels and countries pages * Handle special chars and case insensitiveness in local search * Replace navigate function with ListItemLink * Move styles to seperate file * Move styles to seperate file * Migrate to strict null checks * Remove unnecessary optional chaining * Change overflow scroll to Y only * Add useMemo on finding selected country * Add useMemo on local search * Translate labels in page tabs * Change url from /taxes/classes to /taxes/tax-classes * Remove capitalization from strings * Extract messages * Bump macaw to 0.6.2 * Update snapshots * Add spinboxes explanation comment * Handle empty state * Add tax classes view (#2093) * Add TaxClass fragment * Build types * Add tax classes to fixtures * Add tax classes view * wip Add tax classes page * Add tax classes menu * Add TaxRate fragment * Extract logic * Handle loading state & add story * Extract messages * Update snapshots * Change schema building from schema back to introspection * Update schema * Update fragments * Build types * Update fixtures * Reshape data * Move styles to seperate file * Use getById * Add explicit undefined * Comment out unfinished modal stories * Update snapshots * Taxes - add API calls in channels view (#2106) * Build types * Add TaxRate fragment * Update snapshots * Add taxConfigurationList query * Add taxCountriesList query * Add TaxClassesList query * Rename TaxConfigurationsList query * Handle empty state * Fix types post-rebase * Add form to TaxChannelsPage * wip Add dialog for handling country exceptions * wip Fix dialog url * wip Add update exceptions handlers * Add dialog story * Fix type errors * Add mutation support * Fix types in story * Add transition state to submit button * Add notifier * Extract messages * Remove unused import * Add backlink in savebar * Update snapshots * Fix link in navigation * Update snapshots * Remove message from tax config error fragment * Add hook description * Use useStateFromProps * Remove error handling * Improve url & path function names * Use theme.spacing in TaxCountryDialog styles * Remove redundant key modification * Revert "Use useStateFromProps" This reverts commit d3c68b04701cf935e917d7baa3ed1361ca3446d5. * Move initial map to parent & add open dependency to countries state * Use useModalDialogOpen * Fix state update * Remove scrolls & add ellipsis in side menu * Center checkboxes * Update snapshots * Add fake div for list alignment * Trigger deployment * Close modal on submit * Remove divider on last ListItem * Align add country button * Wrap grid child in div to avoid card stretching * Update snapshots * Trigger changes in add/delete exceptions * Trigger change on expcetion checkboxes * Add trailing commas * Connect countries view to API (#2178) * Add empty states * Update countries view urls * Remove unused import * Add country modal to countries view * Update schema * Implement country view mutations & error fragments * Implement tax class update mutation * Add sidebar temporary state for new configs * Remove unused imports * Wrap in form * Add savebar & fix search * Update schema * Add form wrapper * Fix types * Extract messages * Bump macaw * Update snapshots * Fix comma dangles * Update snapshots * Notify about mutation success * Add logic for mixing current and new rates * Workaround for sending null rates * Fix filling form with correct data after submitting * Handle deleting configuration * Fix selected banner * Remove leftover comment * Add handler for country configuration delete * Trigger deployment * Clean up useEffects causing infinite render loops * Sort countries from api by name * Fix card bottom padding * Remove bottom divider & fix padding * Remove scroll wrapper in side menu * Update snapshots * Remove scroll wrapper from tax classes menu * Update snapshots * Refresh form to initial onSubmit * Revert "Refresh form to initial onSubmit" This reverts commit 42414237d35086da63f4aa088c8072411429b1d8. * Allow only 3 decimal characters in tax inputs * Update snapshots * Update schema * Update types * Change logic from default tax class to null class * Fix sorting * Send empty country rates as nulls in mutation * Extract messages * Update lockfile * Update schema * Drop default tax classes * Update snapshots * Post-rebase fixes * Connect tax classes view to API (#2334) * Add mutations * Handle empty state * Wrap page in form * Update stories * Build types * Handle tax class delete * Handle update tax class * Update stories * Handle tax class change name * Add mutation state to savebar * Handle creating new tax classes * Extract messages * Specify type * Update stories * Sort rates * Fix skeleton rendering * Remove placeholders * Fix skeleton rendering on country list * Update snapshots * Change initial pagination to 100 * Disallow creating multiple new tax classes * Disallow creating multiple country configurations * Fix messages * Autofocus on new tax class name * Add country name to header * Temporarily comment out broken code in tax channels * Update snapshots * Update snapshots post-rebase * Add tax strategies & assigning tax classes (#2369) * Update fragments * Add optional merging in useForm * Handle tax strategies * Update snapshots * Update fixtures * Extract messages * Remove unused shop query fields * Fix breaking bug when fetchMore is used in non-searchable SingleAutocompleteSelectFields * Migrate product types to tax classes * Add tax classes to shipping methods * Use encapsulated logic in product types * Fix product type stories * Fix shipping fixtures * Fix product type type mismatch * Fix shipping stories * Fix product type fixtures * Fix mismatching types * Extract messages * Update snapshots * Update snapshots * Fix comment * Drop deprecated graphql fields * Replace tax types with tax classes in product create view * Replace tax types with tax classes in product update view * Fix tests, stories, fixtures * Extract messages * Update snapshots * Move status messages to commonStatusMessages * Handle empty array case in tax class change handler * Reuse messages * Simple taxes bugfixes (#2395) * Fix tax channels menu - dense layout * Change view names to fit convention * Fix per country exceptions in tax channels view * Fix skeleton rendering on tax countries card title * Filter out existing countries from modal * Update snapshots * Fix deleting country configuration * Disallow negative values in tax inputs * Handle empty tax classes view * Allow empty options in shipping & product types views tax class assignment field * Modify undefined rates in tax classes view * Update macaw-ui * Fix UI on channels view * Fix UI on countries view * Fix UI on countries view * Align tax class rate label to the right * Updaste snapshots * Extract messages * Fix adding rates on new tax class * Fix key errors * Update schema * Build types * Allow empty rates in taxClassUpdate mutation * Extract tax channels change country function as a handler * Deprecate useStateFromProps * Change useStateFromProps to useStateUpdate * Fix dividers * Delete delete icon on new tax classes * Update snapshots * Update lockfile * Update macaw to 0.6.6 * Update snapshots * Specify type of input in country change handler * Extract autofocus logic to custom hook * Replace alternative with switch statement * Extract country exclusion logic from JSX * Update lockfile * Update lockfile * Trigger deployment * Fix invisible select markers * Fix linter issue * Fix crashing product details page * Fix e2e error * Update snapshots * Allow view taxes with any staff permissions (#2510) * Update after rebase Co-authored-by: Dawid --- introspection.json | 6027 +++++++++++- locale/defaultMessages.json | 226 +- schema.graphql | 1292 ++- src/components/Form/Form.tsx | 3 + src/components/ListItemLink/ListItemLink.tsx | 45 + src/components/ListItemLink/index.ts | 2 + .../Navigator/modes/default/views.ts | 4 +- src/components/Shop/queries.ts | 2 - .../SingleAutocompleteSelectFieldContent.tsx | 2 +- src/configuration/ConfigurationPage.tsx | 26 +- src/configuration/index.tsx | 8 +- src/configuration/types.ts | 16 + src/configuration/utils.ts | 10 +- src/fragments/errors.ts | 39 + src/fragments/productTypes.ts | 6 +- src/fragments/products.ts | 9 +- src/fragments/shipping.ts | 4 + src/fragments/taxes.ts | 71 +- src/graphql/fragmentTypes.generated.ts | 4 + src/graphql/hooks.generated.ts | 578 +- src/graphql/typePolicies.generated.ts | 294 +- src/graphql/types.generated.ts | 359 +- src/hooks/useForm.ts | 4 +- src/hooks/useLocalSearch.ts | 37 + src/hooks/useStateFromProps.ts | 6 +- src/hooks/useStateUpdate.ts | 14 + src/index.tsx | 6 +- src/intl.ts | 29 +- .../ProductTypeCreatePage.tsx | 47 +- .../ProductTypeDetailsPage.tsx | 49 +- .../ProductTypeList/ProductTypeList.tsx | 12 +- .../ProductTypeTaxes/ProductTypeTaxes.tsx | 52 +- src/productTypes/fixtures.ts | 56 +- src/productTypes/handlers.ts | 16 +- src/productTypes/queries.ts | 8 - src/productTypes/views/ProductTypeCreate.tsx | 8 +- .../views/ProductTypeUpdate/index.tsx | 8 +- .../ProductCreatePage/ProductCreatePage.tsx | 36 +- .../components/ProductCreatePage/form.tsx | 22 +- .../components/ProductTaxes/ProductTaxes.tsx | 126 +- .../ProductUpdatePage.test.tsx | 5 +- .../ProductUpdatePage/ProductUpdatePage.tsx | 34 +- .../components/ProductUpdatePage/form.tsx | 8 +- .../components/ProductUpdatePage/types.ts | 10 +- src/products/fixtures.ts | 16 +- src/products/queries.ts | 8 +- src/products/utils/data.ts | 4 +- .../views/ProductCreate/ProductCreate.tsx | 7 +- src/products/views/ProductCreate/handlers.ts | 3 +- .../views/ProductUpdate/ProductUpdate.tsx | 33 +- .../views/ProductUpdate/handlers/utils.ts | 3 +- src/products/views/ProductUpdate/messages.ts | 25 + .../ShippingMethodTaxes.tsx | 71 + .../components/ShippingMethodTaxes/index.ts | 2 + .../ShippingZoneRatesCreatePage.stories.tsx | 3 + .../ShippingZoneRatesCreatePage.tsx | 27 + .../ShippingZoneRatesPage.stories.tsx | 3 + .../ShippingZoneRatesPage.tsx | 31 +- .../components/ShippingZoneRatesPage/types.ts | 1 + src/shipping/fixtures.ts | 20 + src/shipping/handlers.ts | 2 + src/shipping/views/RateCreate.tsx | 5 + src/shipping/views/RateUpdate.tsx | 5 + .../__snapshots__/Stories.test.ts.snap | 8249 ++++++++++------- src/storybook/config.js | 4 - .../productTypes/ProductTypeCreatePage.tsx | 4 +- .../productTypes/ProductTypeDetailsPage.tsx | 4 +- .../stories/products/ProductCreatePage.tsx | 11 +- .../stories/products/ProductUpdatePage.tsx | 5 +- .../ShippingZoneCountriesAssignDialog.tsx | 10 +- .../stories/taxes/CountryListPage.tsx | 30 - .../stories/taxes/CountryTaxesPage.tsx | 24 - src/storybook/stories/taxes/fixtures.ts | 2795 ------ .../components/CountryList/CountryList.tsx | 97 - src/taxes/components/CountryList/index.ts | 2 - .../CountryListPage/CountryListPage.tsx | 94 - src/taxes/components/CountryListPage/index.ts | 2 - .../CountryTaxesPage/CountryTaxesPage.tsx | 111 - .../components/CountryTaxesPage/index.ts | 2 - .../TaxConfiguration/TaxConfiguration.tsx | 85 - .../components/TaxConfiguration/index.ts | 2 - .../TaxCountryDialog/TaxCountryDialog.tsx | 105 + .../components/TaxCountryDialog/index.ts | 2 + .../components/TaxCountryDialog/styles.ts | 22 + src/taxes/components/TaxInput/TaxInput.tsx | 70 + src/taxes/components/TaxInput/index.ts | 2 + src/taxes/components/TaxInput/styles.ts | 26 + src/taxes/fixtures.ts | 195 + src/taxes/index.tsx | 60 +- src/taxes/messages.ts | 200 + src/taxes/mutations.ts | 84 +- .../TaxChannelsMenu/TaxChannelsMenu.tsx | 57 + .../TaxChannelsPage/TaxChannelsMenu/index.ts | 2 + .../TaxChannelsPage/TaxChannelsMenu/styles.ts | 30 + .../TaxChannelsPage.stories.tsx | 37 + .../pages/TaxChannelsPage/TaxChannelsPage.tsx | 303 + .../TaxCountryExceptionListItem.tsx | 75 + .../TaxCountryExceptionListItem/index.ts | 2 + .../TaxSettingsCard/TaxSettingsCard.tsx | 117 + .../TaxChannelsPage/TaxSettingsCard/index.ts | 2 + .../TaxChannelsPage/TaxSettingsCard/styles.ts | 35 + src/taxes/pages/TaxChannelsPage/index.ts | 2 + src/taxes/pages/TaxChannelsPage/styles.ts | 35 + .../TaxClassesMenu/TaxClassesMenu.tsx | 108 + .../TaxClassesPage/TaxClassesMenu/index.ts | 2 + .../TaxClassesPage/TaxClassesPage.stories.tsx | 23 + .../pages/TaxClassesPage/TaxClassesPage.tsx | 257 + src/taxes/pages/TaxClassesPage/form.tsx | 146 + src/taxes/pages/TaxClassesPage/index.ts | 2 + src/taxes/pages/TaxClassesPage/styles.ts | 27 + .../TaxCountriesMenu/TaxCountriesMenu.tsx | 97 + .../TaxCountriesMenu/index.ts | 2 + .../TaxCountriesMenu/styles.ts | 36 + .../TaxCountriesPage.stories.tsx | 24 + .../TaxCountriesPage/TaxCountriesPage.tsx | 212 + src/taxes/pages/TaxCountriesPage/form.tsx | 112 + src/taxes/pages/TaxCountriesPage/index.ts | 2 + src/taxes/pages/TaxCountriesPage/styles.ts | 22 + src/taxes/queries.ts | 76 +- src/taxes/urls.ts | 37 +- src/taxes/utils/useAutofocus.ts | 22 + src/taxes/utils/useTaxClassFetchMore.ts | 37 + src/taxes/utils/useTaxUrlRedirect.ts | 46 + src/taxes/utils/utils.ts | 105 + src/taxes/views/CountryList.tsx | 86 - src/taxes/views/CountryTaxes.tsx | 24 - src/taxes/views/TaxChannelsList.tsx | 101 + src/taxes/views/TaxClassesList.tsx | 184 + src/taxes/views/TaxCountriesList.tsx | 188 + src/utils/maps.ts | 3 +- .../components/WebhooksList/WebhooksList.tsx | 10 +- 131 files changed, 17441 insertions(+), 7433 deletions(-) create mode 100644 src/components/ListItemLink/ListItemLink.tsx create mode 100644 src/components/ListItemLink/index.ts create mode 100644 src/configuration/types.ts create mode 100644 src/hooks/useLocalSearch.ts create mode 100644 src/hooks/useStateUpdate.ts create mode 100644 src/products/views/ProductUpdate/messages.ts create mode 100644 src/shipping/components/ShippingMethodTaxes/ShippingMethodTaxes.tsx create mode 100644 src/shipping/components/ShippingMethodTaxes/index.ts delete mode 100644 src/storybook/stories/taxes/CountryListPage.tsx delete mode 100644 src/storybook/stories/taxes/CountryTaxesPage.tsx delete mode 100644 src/storybook/stories/taxes/fixtures.ts delete mode 100644 src/taxes/components/CountryList/CountryList.tsx delete mode 100644 src/taxes/components/CountryList/index.ts delete mode 100644 src/taxes/components/CountryListPage/CountryListPage.tsx delete mode 100644 src/taxes/components/CountryListPage/index.ts delete mode 100644 src/taxes/components/CountryTaxesPage/CountryTaxesPage.tsx delete mode 100644 src/taxes/components/CountryTaxesPage/index.ts delete mode 100644 src/taxes/components/TaxConfiguration/TaxConfiguration.tsx delete mode 100644 src/taxes/components/TaxConfiguration/index.ts create mode 100644 src/taxes/components/TaxCountryDialog/TaxCountryDialog.tsx create mode 100644 src/taxes/components/TaxCountryDialog/index.ts create mode 100644 src/taxes/components/TaxCountryDialog/styles.ts create mode 100644 src/taxes/components/TaxInput/TaxInput.tsx create mode 100644 src/taxes/components/TaxInput/index.ts create mode 100644 src/taxes/components/TaxInput/styles.ts create mode 100644 src/taxes/fixtures.ts create mode 100644 src/taxes/messages.ts create mode 100644 src/taxes/pages/TaxChannelsPage/TaxChannelsMenu/TaxChannelsMenu.tsx create mode 100644 src/taxes/pages/TaxChannelsPage/TaxChannelsMenu/index.ts create mode 100644 src/taxes/pages/TaxChannelsPage/TaxChannelsMenu/styles.ts create mode 100644 src/taxes/pages/TaxChannelsPage/TaxChannelsPage.stories.tsx create mode 100644 src/taxes/pages/TaxChannelsPage/TaxChannelsPage.tsx create mode 100644 src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/TaxCountryExceptionListItem.tsx create mode 100644 src/taxes/pages/TaxChannelsPage/TaxCountryExceptionListItem/index.ts create mode 100644 src/taxes/pages/TaxChannelsPage/TaxSettingsCard/TaxSettingsCard.tsx create mode 100644 src/taxes/pages/TaxChannelsPage/TaxSettingsCard/index.ts create mode 100644 src/taxes/pages/TaxChannelsPage/TaxSettingsCard/styles.ts create mode 100644 src/taxes/pages/TaxChannelsPage/index.ts create mode 100644 src/taxes/pages/TaxChannelsPage/styles.ts create mode 100644 src/taxes/pages/TaxClassesPage/TaxClassesMenu/TaxClassesMenu.tsx create mode 100644 src/taxes/pages/TaxClassesPage/TaxClassesMenu/index.ts create mode 100644 src/taxes/pages/TaxClassesPage/TaxClassesPage.stories.tsx create mode 100644 src/taxes/pages/TaxClassesPage/TaxClassesPage.tsx create mode 100644 src/taxes/pages/TaxClassesPage/form.tsx create mode 100644 src/taxes/pages/TaxClassesPage/index.ts create mode 100644 src/taxes/pages/TaxClassesPage/styles.ts create mode 100644 src/taxes/pages/TaxCountriesPage/TaxCountriesMenu/TaxCountriesMenu.tsx create mode 100644 src/taxes/pages/TaxCountriesPage/TaxCountriesMenu/index.ts create mode 100644 src/taxes/pages/TaxCountriesPage/TaxCountriesMenu/styles.ts create mode 100644 src/taxes/pages/TaxCountriesPage/TaxCountriesPage.stories.tsx create mode 100644 src/taxes/pages/TaxCountriesPage/TaxCountriesPage.tsx create mode 100644 src/taxes/pages/TaxCountriesPage/form.tsx create mode 100644 src/taxes/pages/TaxCountriesPage/index.ts create mode 100644 src/taxes/pages/TaxCountriesPage/styles.ts create mode 100644 src/taxes/utils/useAutofocus.ts create mode 100644 src/taxes/utils/useTaxClassFetchMore.ts create mode 100644 src/taxes/utils/useTaxUrlRedirect.ts create mode 100644 src/taxes/utils/utils.ts delete mode 100644 src/taxes/views/CountryList.tsx delete mode 100644 src/taxes/views/CountryTaxes.tsx create mode 100644 src/taxes/views/TaxChannelsList.tsx create mode 100644 src/taxes/views/TaxClassesList.tsx create mode 100644 src/taxes/views/TaxCountriesList.tsx diff --git a/introspection.json b/introspection.json index ad30f825e..e4348c7ac 100644 --- a/introspection.json +++ b/introspection.json @@ -9368,6 +9368,18 @@ }, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Get model fields from the root level queries." + }, + { + "name": "attribute", + "description": "Associated attribute that can be translated.\n\nAdded in Saleor 3.9.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "AttributeTranslatableContent", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -14264,6 +14276,22 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether checkout prices should include taxes when displayed in a storefront.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -15475,6 +15503,12 @@ "description": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "INACTIVE_PAYMENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null @@ -21770,8 +21804,8 @@ "name": "VAT", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `TaxClassCountryRate` type to manage tax rates per country." } ], "inputFields": null, @@ -21802,6 +21836,98 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "CountryRateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "countryCode", + "description": "Country in which this rate applies.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rate", + "description": "Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Float", + "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CountryRateUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "countryCode", + "description": "Country in which this rate applies.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rate", + "description": "Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate. Provide `null` to remove the particular rate.", + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "CreateToken", @@ -26545,16 +26671,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "SCALAR", - "name": "Float", - "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, { "kind": "OBJECT", "name": "EventDeliveryAttemptCountableConnection", @@ -44031,6 +44147,437 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "taxClassCreate", + "description": "Create a tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "input", + "description": "Fields required to create a tax class.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxClassCreateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxClassCreate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassDelete", + "description": "Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "id", + "description": "ID of a tax class to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxClassDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassUpdate", + "description": "Update a tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "id", + "description": "ID of the tax class.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a tax class.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxClassUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxClassUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxConfigurationUpdate", + "description": "Update tax configuration for a channel.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "id", + "description": "ID of the tax configuration.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update the tax configuration.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxConfigurationUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCountryConfigurationUpdate", + "description": "Update tax class rates for a specific country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "countryCode", + "description": "Country in which to update the tax class rates.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateTaxClassRates", + "description": "List of tax rates per tax class to update. When `{taxClass: id, rate: null`} is passed, it deletes the rate object for given taxClass ID. When `{rate: Int}` is passed without a tax class, it updates the default tax class for this country.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxClassRateInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfigurationUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCountryConfigurationDelete", + "description": "Remove all tax class rates for a specific country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "countryCode", + "description": "Country in which to update the tax class rates.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfigurationDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxExemptionManage", + "description": "Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "id", + "description": "ID of a tax class to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxClassDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassUpdate", + "description": "Update a tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "id", + "description": "ID of the tax class.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update a tax class.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxClassUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxClassUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxConfigurationUpdate", + "description": "Update tax configuration for a channel.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "id", + "description": "ID of the tax configuration.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "input", + "description": "Fields required to update the tax configuration.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationUpdateInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxConfigurationUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCountryConfigurationUpdate", + "description": "Update tax class rates for a specific country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "countryCode", + "description": "Country in which to update the tax class rates.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateTaxClassRates", + "description": "List of tax rates per tax class to update. When `{taxClass: id, rate: null`} is passed, it deletes the rate object for given taxClass ID. When `{rate: Int}` is passed without a tax class, it updates the default tax class for this country.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxClassRateInput", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfigurationUpdate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCountryConfigurationDelete", + "description": "Remove all tax class rates for a specific country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "args": [ + { + "name": "countryCode", + "description": "Country in which to update the tax class rates.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfigurationDelete", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "taxExemptionManage", "description": "Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", @@ -44242,8 +44789,8 @@ "name": "ShopFetchTaxRates", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": true, + "deprecationReason": "\n\nDEPRECATED: this mutation will be removed in Saleor 4.0." }, { "name": "shopSettingsTranslate", @@ -55921,6 +56468,16 @@ "name": "Stock", "ofType": null }, + { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "TaxConfiguration", + "ofType": null + }, { "kind": "OBJECT", "name": "Transaction", @@ -56275,6 +56832,16 @@ "name": "ShippingZone", "ofType": null }, + { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "TaxConfiguration", + "ofType": null + }, { "kind": "OBJECT", "name": "TransactionItem", @@ -57044,7 +57611,7 @@ }, { "name": "shippingTaxRate", - "description": null, + "description": "The shipping tax rate value.", "args": [], "type": { "kind": "NON_NULL", @@ -57058,6 +57625,78 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "shippingTaxClass", + "description": "Denormalized tax class assigned to the shipping method.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingTaxClassName", + "description": "Denormalized name of the tax class assigned to the shipping method.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingTaxClassMetadata", + "description": "Denormalized public metadata of the shipping method's tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingTaxClassPrivateMetadata", + "description": "Denormalized private metadata of the shipping method's tax class. Requires staff permissions to access.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "token", "description": null, @@ -57110,22 +57749,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "displayGrossPrices", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "customerNote", "description": null, @@ -57445,6 +58068,22 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether checkout prices should include taxes when displayed in a storefront.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -61662,6 +62301,78 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "taxClass", + "description": "Denormalized tax class of the product in this order line.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassName", + "description": "Denormalized name of the tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassMetadata", + "description": "Denormalized public metadata of the tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassPrivateMetadata", + "description": "Denormalized private metadata of the tax class. Requires staff permissions to access.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -69588,12 +70299,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "MANAGE_PLUGINS", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "MANAGE_GIFT_CARD", "description": null, @@ -69630,6 +70335,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "MANAGE_PLUGINS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "MANAGE_PRODUCTS", "description": null, @@ -71759,8 +72470,8 @@ "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` field to determine whether tax collection is enabled." }, { "name": "weight", @@ -71918,8 +72629,8 @@ "name": "TaxType", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `taxClass` field instead." }, { "name": "attributes", @@ -72159,6 +72870,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "taxClass", + "description": "Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -73409,7 +74132,7 @@ }, { "name": "chargeTaxes", - "description": "Determine if taxes are being charged for the product.", + "description": "Determine if taxes are being charged for the product. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled.", "type": { "kind": "SCALAR", "name": "Boolean", @@ -73475,9 +74198,21 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "taxClass", + "description": "ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "taxCode", - "description": "Tax rate for enabled tax gateway.", + "description": "Tax rate for enabled tax gateway. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product.", "type": { "kind": "SCALAR", "name": "String", @@ -74621,7 +75356,7 @@ }, { "name": "chargeTaxes", - "description": "Determine if taxes are being charged for the product.", + "description": "Determine if taxes are being charged for the product. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled.", "type": { "kind": "SCALAR", "name": "Boolean", @@ -74687,9 +75422,21 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "taxClass", + "description": "ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "taxCode", - "description": "Tax rate for enabled tax gateway.", + "description": "Tax rate for enabled tax gateway. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product.", "type": { "kind": "SCALAR", "name": "String", @@ -75774,6 +76521,22 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether this product's price displayed in a storefront should include taxes.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -76620,6 +77383,30 @@ "name": "TaxType", "ofType": null }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `taxClass` field instead." + }, + { + "name": "taxClass", + "description": "Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": "Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type.\n\nRequires one of the following permissions: MANAGE_TAXES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, @@ -77419,7 +78206,7 @@ }, { "name": "taxCode", - "description": "Tax rate for enabled tax gateway.", + "description": "Tax rate for enabled tax gateway. \n\nDEPRECATED: this field will be removed in Saleor 4.0.. Use tax classes to control the tax calculation for a product type.", "type": { "kind": "SCALAR", "name": "String", @@ -77428,6 +78215,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "taxClass", + "description": "ID of a tax class to assign to this product type. All products of this product type would use this tax class, unless it's overridden in the `Product` type.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -81545,6 +82344,271 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "taxConfiguration", + "description": "Look up a tax configuration.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.", + "args": [ + { + "name": "id", + "description": "ID of a tax configuration.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxConfigurations", + "description": "List of tax configurations.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.", + "args": [ + { + "name": "filter", + "description": "Filtering options for tax configurations.", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxConfigurationCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": "Look up a tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.", + "args": [ + { + "name": "id", + "description": "ID of a tax class.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClasses", + "description": "List of tax classes.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.", + "args": [ + { + "name": "sortBy", + "description": "Sort tax classes.", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxClassSortingInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "filter", + "description": "Filtering options for tax classes.", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxClassFilterInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxClassCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCountryConfiguration", + "description": "Tax class rates grouped by country.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.", + "args": [ + { + "name": "countryCode", + "description": "Country for which to return tax class rates.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCountryConfigurations", + "description": "\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxCountryConfiguration", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stock", "description": "Look up a stock by ID\n\nRequires one of the following permissions: MANAGE_PRODUCTS.", @@ -90031,6 +91095,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "taxClass", + "description": "Tax class assigned to this shipping method.\n\nRequires one of the following permissions: MANAGE_TAXES, MANAGE_SHIPPING.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -90888,6 +91964,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "taxClass", + "description": "ID of a tax class to assign to this shipping method. If not provided, the default tax class will be used.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -93042,22 +94130,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "includeTaxesInPrices", - "description": "Include taxes in prices.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "fulfillmentAutoApprove", "description": "Automatically approve all new fulfillments.\n\nAdded in Saleor 3.1.", @@ -93090,38 +94162,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "displayGrossPrices", - "description": "Display prices with tax in store.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "chargeTaxesOnShipping", - "description": "Charge taxes on shipping.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "trackInventoryByDefault", "description": "Enable inventory tracking.", @@ -93322,6 +94362,54 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "includeTaxesInPrices", + "description": "Include taxes in prices.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration.pricesEnteredWithTax` to determine whether prices are entered with tax." + }, + { + "name": "displayGrossPrices", + "description": "Display prices with tax in store.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to determine whether to display gross or net prices." + }, + { + "name": "chargeTaxesOnShipping", + "description": "Charge taxes on shipping.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "This field will be removed in Saleor 4.0. Use `ShippingMethodType.taxClass` to determine whether taxes are calculated for shipping methods; if a tax class is set, the taxes will be calculated, otherwise no tax rate will be applied." } ], "inputFields": null, @@ -93676,42 +94764,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "includeTaxesInPrices", - "description": "Include taxes in prices.", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "displayGrossPrices", - "description": "Display prices with tax in store.", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "chargeTaxesOnShipping", - "description": "Charge taxes on shipping.", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "trackInventoryByDefault", "description": "Enable inventory tracking.", @@ -93867,6 +94919,42 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "includeTaxesInPrices", + "description": "Include taxes in prices. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Display prices with tax in store. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxesOnShipping", + "description": "Charge taxes on shipping. \n\nDEPRECATED: this field will be removed in Saleor 4.0. To enable taxes for a shipping method, assign a tax class to the shipping method with `shippingPriceCreate` or `shippingPriceUpdate` mutations.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -95953,6 +97041,4685 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "FLAT_RATES", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TAX_APP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClass", + "description": "Tax class is a named object used to define tax rates per country. Tax class can be assigned to product types, products and shipping methods to define their tax rates.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "id", + "description": "The ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items. Requires staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetafield", + "description": "A single key from private metadata. Requires staff permissions to access.\n\nTip: Use GraphQL aliases to fetch multiple keys.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetafields", + "description": "Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "keys", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Metadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metafield", + "description": "A single key from public metadata.\n\nTip: Use GraphQL aliases to fetch multiple keys.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metafields", + "description": "Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "keys", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Metadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the tax class.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "Country-specific tax rates for this tax class.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassCountryRate", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCountryRate", + "description": "Tax rate for a country. When tax class is null, it represents the default tax rate for that country; otherwise it's a country tax rate specific to the given tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "country", + "description": "Country in which this tax rate applies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rate", + "description": "Tax rate value.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": "Related tax class.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCreate", + "description": "Create a tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassCreateError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCreateError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxClassCreateErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryCodes", + "description": "List of country codes for which the configuration is invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxClassCreateErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the tax class.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createCountryRates", + "description": "List of country-specific tax rates to create for this tax class.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CountryRateInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassDelete", + "description": "Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassDeleteError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassDeleteError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxClassDeleteErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxClassDeleteErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassRateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "taxClassId", + "description": "ID of a tax class for which to update the tax rate", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rate", + "description": "Tax rate value.", + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxClassSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort tax classes by name.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort tax classes by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxClassSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassUpdate", + "description": "Update a tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassUpdateError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassUpdateError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxClassUpdateErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryCodes", + "description": "List of country codes for which the configuration is invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxClassUpdateErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the tax class.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateCountryRates", + "description": "List of country-specific tax rates to create or update for this tax class.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CountryRateUpdateInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeCountryRates", + "description": "List of country codes for which to remove the tax class rates. Note: It removes all rates for given country code.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfiguration", + "description": "Channel-specific tax configuration.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "id", + "description": "The ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items. Requires staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetafield", + "description": "A single key from private metadata. Requires staff permissions to access.\n\nTip: Use GraphQL aliases to fetch multiple keys.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetafields", + "description": "Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "keys", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Metadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metafield", + "description": "A single key from public metadata.\n\nTip: Use GraphQL aliases to fetch multiple keys.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metafields", + "description": "Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "keys", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Metadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "A channel to which the tax configuration applies to.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": "Determines whether taxes are charged in the given channel.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCalculationStrategy", + "description": "The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated.", + "args": [], + "type": { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether prices displayed in a storefront should include taxes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pricesEnteredWithTax", + "description": "Determines whether prices are entered with the tax included.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "List of country-specific exceptions in tax configuration.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxConfigurationPerCountry", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxConfigurationCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxConfiguration", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationPerCountry", + "description": "Country-specific exceptions of a channel's tax configuration.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "country", + "description": "Country in which this configuration applies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": "Determines whether taxes are charged in this country.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCalculationStrategy", + "description": "A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration.", + "args": [], + "type": { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether prices displayed in a storefront should include taxes for this country.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationPerCountryInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "countryCode", + "description": "Country in which this configuration applies.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": "Determines whether taxes are charged in this country.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCalculationStrategy", + "description": "A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration.", + "type": { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether prices displayed in a storefront should include taxes for this country.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationUpdate", + "description": "Update tax configuration for a channel.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxConfigurationUpdateError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxConfiguration", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationUpdateError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxConfigurationUpdateErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryCodes", + "description": "List of country codes for which the configuration is invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxConfigurationUpdateErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "chargeTaxes", + "description": "Determines whether taxes are charged in the given channel.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCalculationStrategy", + "description": "The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated.", + "type": { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether prices displayed in a storefront should include taxes.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pricesEnteredWithTax", + "description": "Determines whether prices are entered with the tax included.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateCountriesConfiguration", + "description": "List of tax country configurations to create or update (identified by a country code).", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationPerCountryInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeCountriesConfiguration", + "description": "List of country codes for which to remove the tax configuration.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfiguration", + "description": "Tax class rates grouped by country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "country", + "description": "A country for which tax class rates are grouped.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassCountryRates", + "description": "List of tax class rates.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassCountryRate", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfigurationDelete", + "description": "Remove all tax class rates for a specific country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "taxCountryConfiguration", + "description": "Updated tax class rates grouped by a country.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxCountryConfigurationDeleteError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfigurationDeleteError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxCountryConfigurationDeleteErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxCountryConfigurationDeleteErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfigurationUpdate", + "description": "Update tax class rates for a specific country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "taxCountryConfiguration", + "description": "Updated tax class rates grouped by a country.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxCountryConfigurationUpdateError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfigurationUpdateError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxCountryConfigurationUpdateErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassIds", + "description": "List of tax class IDs for which the update failed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxCountryConfigurationUpdateErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ONLY_ONE_DEFAULT_COUNTRY_RATE_ALLOWED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_CREATE_NEGATIVE_RATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClass", + "description": "Tax class is a named object used to define tax rates per country. Tax class can be assigned to product types, products and shipping methods to define their tax rates.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "id", + "description": "The ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items. Requires staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetafield", + "description": "A single key from private metadata. Requires staff permissions to access.\n\nTip: Use GraphQL aliases to fetch multiple keys.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetafields", + "description": "Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "keys", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Metadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metafield", + "description": "A single key from public metadata.\n\nTip: Use GraphQL aliases to fetch multiple keys.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metafields", + "description": "Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "keys", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Metadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Name of the tax class.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "Country-specific tax rates for this tax class.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassCountryRate", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCountryRate", + "description": "Tax rate for a country. When tax class is null, it represents the default tax rate for that country; otherwise it's a country tax rate specific to the given tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "country", + "description": "Country in which this tax rate applies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rate", + "description": "Tax rate value.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": "Related tax class.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCreate", + "description": "Create a tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassCreateError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassCreateError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxClassCreateErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryCodes", + "description": "List of country codes for which the configuration is invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxClassCreateErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassCreateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the tax class.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createCountryRates", + "description": "List of country-specific tax rates to create for this tax class.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CountryRateInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassDelete", + "description": "Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassDeleteError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassDeleteError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxClassDeleteErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxClassDeleteErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassRateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "taxClassId", + "description": "ID of a tax class for which to update the tax rate", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rate", + "description": "Tax rate value.", + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxClassSortField", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Sort tax classes by name.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassSortingInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "direction", + "description": "Specifies the direction in which to sort products.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "field", + "description": "Sort tax classes by the selected field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxClassSortField", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassUpdate", + "description": "Update a tax class.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassUpdateError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClass", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxClass", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxClassUpdateError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxClassUpdateErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryCodes", + "description": "List of country codes for which the configuration is invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxClassUpdateErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxClassUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "name", + "description": "Name of the tax class.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateCountryRates", + "description": "List of country-specific tax rates to create or update for this tax class.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CountryRateUpdateInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeCountryRates", + "description": "List of country codes for which to remove the tax class rates. Note: It removes all rates for given country code.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfiguration", + "description": "Channel-specific tax configuration.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "id", + "description": "The ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "List of private metadata items. Requires staff permissions to access.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetafield", + "description": "A single key from private metadata. Requires staff permissions to access.\n\nTip: Use GraphQL aliases to fetch multiple keys.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetafields", + "description": "Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "keys", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Metadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metadata", + "description": "List of public metadata items. Can be accessed without permissions.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MetadataItem", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metafield", + "description": "A single key from public metadata.\n\nTip: Use GraphQL aliases to fetch multiple keys.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "key", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metafields", + "description": "Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.\n\nAdded in Saleor 3.3.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "keys", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "SCALAR", + "name": "Metadata", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "A channel to which the tax configuration applies to.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Channel", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": "Determines whether taxes are charged in the given channel.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCalculationStrategy", + "description": "The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated.", + "args": [], + "type": { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether prices displayed in a storefront should include taxes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pricesEnteredWithTax", + "description": "Determines whether prices are entered with the tax included.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countries", + "description": "List of country-specific exceptions in tax configuration.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxConfigurationPerCountry", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ObjectWithMetadata", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationCountableConnection", + "description": null, + "fields": [ + { + "name": "pageInfo", + "description": "Pagination data for this connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxConfigurationCountableEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "A total count of items in the collection.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationCountableEdge", + "description": null, + "fields": [ + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxConfiguration", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationFilterInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "metadata", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataFilter", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationPerCountry", + "description": "Country-specific exceptions of a channel's tax configuration.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "country", + "description": "Country in which this configuration applies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": "Determines whether taxes are charged in this country.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCalculationStrategy", + "description": "A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration.", + "args": [], + "type": { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether prices displayed in a storefront should include taxes for this country.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationPerCountryInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "countryCode", + "description": "Country in which this configuration applies.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chargeTaxes", + "description": "Determines whether taxes are charged in this country.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCalculationStrategy", + "description": "A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration.", + "type": { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether prices displayed in a storefront should include taxes for this country.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationUpdate", + "description": "Update tax configuration for a channel.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxConfigurationUpdateError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxConfiguration", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxConfigurationUpdateError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxConfigurationUpdateErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "countryCodes", + "description": "List of country codes for which the configuration is invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxConfigurationUpdateErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DUPLICATED_INPUT_ITEM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationUpdateInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "chargeTaxes", + "description": "Determines whether taxes are charged in the given channel.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxCalculationStrategy", + "description": "The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated.", + "type": { + "kind": "ENUM", + "name": "TaxCalculationStrategy", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayGrossPrices", + "description": "Determines whether prices displayed in a storefront should include taxes.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pricesEnteredWithTax", + "description": "Determines whether prices are entered with the tax included.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateCountriesConfiguration", + "description": "List of tax country configurations to create or update (identified by a country code).", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxConfigurationPerCountryInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeCountriesConfiguration", + "description": "List of country codes for which to remove the tax configuration.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfiguration", + "description": "Tax class rates grouped by country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "country", + "description": "A country for which tax class rates are grouped.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassCountryRates", + "description": "List of tax class rates.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxClassCountryRate", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfigurationDelete", + "description": "Remove all tax class rates for a specific country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "taxCountryConfiguration", + "description": "Updated tax class rates grouped by a country.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxCountryConfigurationDeleteError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfigurationDeleteError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxCountryConfigurationDeleteErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxCountryConfigurationDeleteErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfigurationUpdate", + "description": "Update tax class rates for a specific country.\n\nAdded in Saleor 3.9.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_TAXES.", + "fields": [ + { + "name": "taxCountryConfiguration", + "description": "Updated tax class rates grouped by a country.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TaxCountryConfiguration", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TaxCountryConfigurationUpdateError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TaxCountryConfigurationUpdateError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TaxCountryConfigurationUpdateErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "taxClassIds", + "description": "List of tax class IDs for which the update failed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TaxCountryConfigurationUpdateErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ONLY_ONE_DEFAULT_COUNTRY_RATE_ALLOWED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CANNOT_CREATE_NEGATIVE_RATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "TaxExemptionManage", diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 4f531fa4a..4e8533c47 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1,4 +1,8 @@ { + "+2VydL": { + "context": "card title", + "string": "Country exceptions" + }, "+2VzH4": { "context": "avatar change button", "string": "Change" @@ -31,14 +35,14 @@ "context": "variant sku", "string": "SKU {sku}" }, + "+Jgot0": { + "context": "tax class for a product type", + "string": "Tax class" + }, "+NUzaQ": { "context": "check to mark this account as active", "string": "User account active" }, - "+OV+Gj": { - "context": "button", - "string": "Fetch taxes" - }, "+PbHKD": { "context": "dialog header", "string": "Capture Payment" @@ -148,6 +152,10 @@ "context": "product type shipping settings, section header", "string": "Shipping" }, + "/5r4he": { + "context": "label for button", + "string": "Add country" + }, "/68iG8": { "context": "product export to csv file, header", "string": "Information exported" @@ -176,8 +184,9 @@ "context": "section description", "string": "Strategy defines the preference of warehouses for stock allocations and reservations." }, - "/JENWS": { - "string": "Reduced Tax Rates" + "/ILyIf": { + "context": "tax classes menu header", + "string": "Tax class label" }, "/KWNJW": { "context": "order discount was updated event title", @@ -269,9 +278,6 @@ "context": "order history message", "string": "Order cancel information was sent to customer" }, - "07KB2d": { - "string": "Country Code" - }, "0AQH0Q": { "string": "Plugin is misconfigured and cannot be activated" }, @@ -286,9 +292,6 @@ "context": "min price in channel", "string": "Min. value" }, - "0GJfWd": { - "string": "Country Name" - }, "0MetrR": { "context": "webhook input help text", "string": "This URL will receive webhook POST requests" @@ -309,6 +312,10 @@ "context": "dialog header", "string": "Unassign Collection From Sale" }, + "0V1q0d": { + "context": "add country dialog header", + "string": "Choose country you want to add" + }, "0VDwAP": { "context": "checkbox label", "string": "Send shipment details to customer" @@ -317,6 +324,10 @@ "context": "menu item name", "string": "Name" }, + "0a0fLZ": { + "context": "countries list menu label when no countries are assigned", + "string": "There are no countries assigned" + }, "0dPP8O": { "string": "Order #{orderId} was placed" }, @@ -658,9 +669,6 @@ "context": "no category set error", "string": "Product category not set" }, - "3BTtL2": { - "string": "No countries found" - }, "3C3Nj5": { "context": "button", "string": "Add variant" @@ -780,9 +788,6 @@ "context": "order status", "string": "Returned" }, - "4EuJKs": { - "string": "All products prices are entered with tax included" - }, "4JW9iJ": { "context": "home section name", "string": "Home" @@ -837,6 +842,10 @@ "context": "variant attribute checkbox", "string": "Variant Selection" }, + "4p3bjX": { + "context": "tax strategy combobox choice", + "string": "Use flat rates" + }, "4prRLv": { "string": "Permission is out of your scope" }, @@ -1034,6 +1043,10 @@ "context": "WarehouseSettings local warehouse description", "string": "If selected customer will be able to choose this warehouse as pickup point. Ordered products will be only fulfilled from this warehouse stock" }, + "6HHPFy": { + "context": "tax strategy combobox hint", + "string": "Select the method of tax calculation" + }, "6JlXeD": { "context": "button", "string": "Create page type" @@ -1118,6 +1131,10 @@ "7+GBlj": { "string": "Error code {errorCode} {fieldError}" }, + "720c51": { + "context": "tax classes name input placeholder", + "string": "Tax rate name" + }, "73RU3R": { "context": "deactivate app", "string": "Are you sure you want to disable this app? Your data will be kept until you reactivate the app. You will be still billed for the app." @@ -1164,6 +1181,10 @@ "context": "navigator section header", "string": "Search in Catalog" }, + "7U/NPm": { + "context": "tax class rates list label when no country is selected", + "string": "Add country to access tax classes" + }, "7U8GRy": { "string": "Shipping method successfully updated" }, @@ -1226,6 +1247,10 @@ "context": "navigator placeholder", "string": "Order Number" }, + "8BBMRj": { + "context": "default tax class name for new tax classes", + "string": "New tax class" + }, "8EGagh": { "context": "search box label", "string": "Filter Countries" @@ -1312,13 +1337,14 @@ "97l2MO": { "string": "Customer Email" }, + "98Nw4g": { + "context": "card subtitle", + "string": "Rendered prices" + }, "98WMlR": { "context": "header", "string": "Translation Product Variant \"{productName}\" - {languageCode}" }, - "98isC5": { - "string": "Show gross prices to customers in the storefront" - }, "9C7PZE": { "context": "navigation section name", "string": "Navigation" @@ -1427,9 +1453,6 @@ "context": "collection label", "string": "Visible" }, - "9xUIAh": { - "string": "Tax group" - }, "9xlPgt": { "context": "used staff users counter", "string": "{count}/{max} members" @@ -1589,6 +1612,10 @@ "context": "number of subcategories", "string": "Subcategories" }, + "BJtUQI": { + "context": "button", + "string": "Add" + }, "BL/Lbk": { "context": "install app permissions", "string": "Installing this app will give it following permissions:" @@ -1721,6 +1748,10 @@ "context": "dialog content", "string": "{counter,plural,one{Are you sure you want to delete this shipping zone?} other{Are you sure you want to delete {displayQuantity} shipping zones?}}" }, + "CFT171": { + "context": "card header title", + "string": "Country list" + }, "CG+awx": { "context": "dialog content", "string": "Which address would you like to use as shipping address for selected customer:" @@ -1777,10 +1808,6 @@ "context": "dialog header", "string": "Delete Page Types" }, - "CdIHMu": { - "context": "select tax ratte", - "string": "Tax Rate" - }, "ChAjJu": { "context": "character limit", "string": "{numberOfCharacters} of {maxCharacters} characters" @@ -1834,6 +1861,10 @@ "context": "checkbox label", "string": "Grant this app full access to the store" }, + "D5Wtf/": { + "context": "table header column", + "string": "Country name" + }, "D8nsBc": { "context": "no warehouses info", "string": "There are no warehouses set up for your store. To add stock quantity to the variant please configure a warehouse" @@ -2004,6 +2035,10 @@ "context": "delete app", "string": "Deleting {name}, you will remove installation of the app. If you are paying for app subscription, remember to unsubscribe from the app in Saleor Marketplace. Are you sure you want to delete the app?" }, + "EYkW1J": { + "context": "checkbox label", + "string": "Charge taxes for this channel" + }, "Eau5AV": { "string": "Manage Products Channel Availability" }, @@ -2097,9 +2132,6 @@ "FNAZoh": { "string": "Last login" }, - "FNKhkx": { - "string": "Charge taxes on shipping rates" - }, "FNT4b+": { "context": "tabel column header", "string": "Product" @@ -2499,9 +2531,6 @@ "context": "create gift card product alert message", "string": "Create a gift card product" }, - "HtQGEH": { - "string": "Successfully fetched tax rates" - }, "HtfL5/": { "context": "button", "string": "Open App" @@ -3242,6 +3271,14 @@ "context": "section header", "string": "All Subcategories" }, + "Nj9iSB": { + "context": "table header column", + "string": "Tax rate" + }, + "NlEVVT": { + "context": "label for button", + "string": "Create class" + }, "NlSJMM": { "context": "channels section name", "string": "Channels" @@ -3604,10 +3641,6 @@ "context": "table header name col label", "string": "Name" }, - "QHB48n": { - "context": "header", - "string": "Tax Rates in {countryName}" - }, "QJG+d/": { "context": "staff added type order discount", "string": "Staff added" @@ -3694,6 +3727,10 @@ "Qox+kb": { "string": "on field {fieldName}" }, + "QpBqa9": { + "context": "label for radio button", + "string": "Product prices are entered without tax" + }, "Qph0GE": { "context": "dialog content", "string": "Add a new address:" @@ -3772,6 +3809,10 @@ "context": "issue card button label", "string": "Issue card" }, + "Rfk+8B": { + "context": "tax classes menu label when there are no tax classes", + "string": "There are no tax classes" + }, "Rj8LxK": { "string": "Add search engine title and description to make this collection easier to find" }, @@ -3793,6 +3834,10 @@ "context": "dialog header", "string": "Unassign Attribute from Page Type" }, + "RqtZQ6": { + "context": "tax classes card header", + "string": "Tax class rates" + }, "RrCui3": { "string": "Summary" }, @@ -3975,6 +4020,10 @@ "context": "product availability available date", "string": "Set available on" }, + "TJ7WHA": { + "context": "tax strategy combobox choice", + "string": "Use tax app" + }, "TKmub+": { "string": "This field is required" }, @@ -4009,13 +4058,9 @@ "context": "orders section name", "string": "Orders" }, - "TalJlD": { - "context": "tax rate for a product type", - "string": "Tax" - }, - "TfY/Pi": { - "context": "checkbox", - "string": "Charge taxes on this product" + "TfzIXS": { + "context": "tax classes card header", + "string": "General information" }, "TjGYna": { "context": "product inventory, checkbox", @@ -4075,6 +4120,10 @@ "context": "no gift card products and types alert message", "string": "{createGiftCardProductType} and {giftCardProduct} to start selling gift cards in your store." }, + "UBuKZ9": { + "context": "searchbar placeholder", + "string": "Country" + }, "UCHtG6": { "context": "button", "string": "About" @@ -4127,9 +4176,6 @@ "UaYJJ8": { "string": "Are you sure you want to delete {name} search tab?" }, - "Ubath+": { - "string": "No reduced tax categories found" - }, "Uf3oHA": { "context": "add new menu item", "string": "Create new item" @@ -4398,6 +4444,10 @@ "context": "order refund amount", "string": "Shipment Cost" }, + "WIxSDm": { + "context": "card header", + "string": "{country} class rates" + }, "WMGoqz": { "context": "used by filter label", "string": "Used by" @@ -4469,6 +4519,10 @@ "context": "title", "string": "There’s a problem with app." }, + "Ww69SE": { + "context": "search input placeholder", + "string": "Search tax classes" + }, "WwNtFn": { "context": "delete product variant", "string": "Are you sure you want to delete {name}?" @@ -4794,6 +4848,10 @@ "context": "stock exceeded dialog description", "string": "Stock for items shown below are not enough to prepare fulfillment:" }, + "ZAaXfz": { + "context": "Taxes section title", + "string": "Countries" + }, "ZDJEat": { "context": "button", "string": "Load More" @@ -4932,6 +4990,10 @@ "aI80kg": { "string": "Properties" }, + "aJm/by": { + "context": "Taxes section title", + "string": "Tax classes" + }, "aMwxYb": { "string": "Countries" }, @@ -5018,6 +5080,10 @@ "b1zuN9": { "string": "Price" }, + "b2DlTO": { + "context": "Taxes section title", + "string": "Channels" + }, "b6L9n7": { "context": "voucher is active until date", "string": "Ends" @@ -5026,6 +5092,10 @@ "context": "product price", "string": "Price" }, + "bDBiac": { + "context": "dropdown or column label", + "string": "Tax class" + }, "bDHiYK": { "context": "gift card export success alert description", "string": "We are currently exporting your gift card codes. As soon as your file is available it will be sent to your email address" @@ -5190,6 +5260,10 @@ "context": "button", "string": "Unassign and save" }, + "cVjewM": { + "context": "label for radio button", + "string": "Product prices are entered with tax" + }, "cW1RIo": { "context": "section header", "string": "Media View" @@ -5802,10 +5876,6 @@ "context": "dialog content", "string": "{counter,plural,one{Are you sure you want to unassign this variant?} other{Are you sure you want to unassign {displayQuantity} variants?}}" }, - "iYH3Y7": { - "context": "checkbox", - "string": "Override the product type's tax rate" - }, "ibnmEd": { "context": "voucher country range", "string": "Countries" @@ -5901,6 +5971,10 @@ "jHJmjf": { "string": "No results" }, + "jMzyU8": { + "context": "tax classes card header", + "string": "Tax classes" + }, "jNSOSu": { "context": "cancelled fulfillment, section header", "string": "Refunded and Returned ({quantity})" @@ -6065,6 +6139,10 @@ "context": "product updated at", "string": "Last updated" }, + "kXqn6A": { + "context": "table header column", + "string": "Charge taxes" + }, "kYYbrv": { "context": "channel publication date", "string": "Published since {date}" @@ -6182,9 +6260,6 @@ "context": "money", "string": "from {money}" }, - "la9cZ4": { - "string": "Tax Rate" - }, "labkPK": { "context": "search gift card placeholder", "string": "Search Gift Cards, e.g {exampleGiftCardCode}" @@ -6215,9 +6290,9 @@ "context": "password reset, button", "string": "Send an email with reset link" }, - "lnQAos": { - "context": "header", - "string": "Taxes" + "lnteBJ": { + "context": "country rates list label for the default rate", + "string": "Country default rate" }, "lqIzC8": { "string": "This field needs to be unique" @@ -6288,10 +6363,6 @@ "context": "NoChannels content", "string": "No channels to assign. Please first assign them for the product." }, - "mUb8Gt": { - "context": "section header", - "string": "Taxes" - }, "mWQt3s": { "string": "No. of Products" }, @@ -6439,6 +6510,10 @@ "context": "attribute internal name", "string": "Slug" }, + "ngAgBy": { + "context": "tax class rates list label when no countries are assigned", + "string": "There are no countries using this tax class yet, use {tab} tab to assign tax rates." + }, "njBulj": { "context": "check to require attribute to have value", "string": "Value Required" @@ -6634,6 +6709,10 @@ "pVFoOk": { "string": "Are you sure you want to delete {collectionName}?" }, + "pWClYm": { + "context": "card title", + "string": "Default settings" + }, "paa4m0": { "string": "Successfully created product type" }, @@ -6673,6 +6752,10 @@ "context": "notes about customer, header", "string": "Notes" }, + "puRlnN": { + "context": "card subtitle", + "string": "Entered prices" + }, "puikeb": { "context": "button", "string": "Delete Address" @@ -6746,6 +6829,10 @@ "context": "stock exceeded dialog title", "string": "Not enough stock" }, + "qbcNjQ": { + "context": "table header column", + "string": "Tax name" + }, "qbmeUI": { "context": "dialog header", "string": "Delete Order Drafts" @@ -7042,6 +7129,10 @@ "context": "button", "string": "Accept" }, + "skklRz": { + "context": "table header column", + "string": "Show gross prices in storefront" + }, "sn2awN": { "context": "ExitFormPrompt cancel button", "string": "Discard changes" @@ -7163,6 +7254,9 @@ "context": "window title", "string": "Create collection" }, + "tthToS": { + "string": "Disabled" + }, "ttk0w7": { "context": "resend code to customer description", "string": "Gift Card Code will be resent to email provided during checkout. You can provide a different email address if you want to:" @@ -7196,6 +7290,10 @@ "u24Ppd": { "string": "This attribute cannot be assigned to this product type" }, + "u34css": { + "context": "label for empty list in channels list", + "string": "There are no exceptions for this channel" + }, "u3sYPH": { "context": "independent of any particular day, eg. 11:35", "string": "Time" @@ -7734,6 +7832,10 @@ "context": "attribute can be searched in dashboard", "string": "Searchable" }, + "yLfbSh": { + "context": "support label", + "string": "Channel name" + }, "yMi8I8": { "context": "dialog header", "string": "Dectivate App" diff --git a/schema.graphql b/schema.graphql index 83bc9a454..e1d2fc144 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1883,6 +1883,13 @@ type AttributeValueTranslatableContent implements Node { """Represents a value of an attribute.""" attributeValue: AttributeValue @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") + + """ + Associated attribute that can be translated. + + Added in Saleor 3.9. + """ + attribute: AttributeTranslatableContent } """ @@ -2705,6 +2712,30 @@ type ChannelCreated implements Event { channel: Channel } +""" +Event sent when new channel is created. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type ChannelCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The channel the event relates to.""" + channel: Channel +} + """ Deactivate a channel. @@ -3063,6 +3094,15 @@ type Checkout implements Node & ObjectWithMetadata { Note: this API is currently in Feature Preview and can be subject to changes at later point. """ transactions: [TransactionItem!] + + """ + Determines whether checkout prices should include taxes when displayed in a storefront. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + displayGrossPrices: Boolean! } """Adds a gift card or a voucher to a checkout.""" @@ -3297,6 +3337,7 @@ enum CheckoutErrorCode { UNAVAILABLE_VARIANT_IN_CHANNEL EMAIL_NOT_SET NO_LINES + INACTIVE_PAYMENT } input CheckoutFilterInput { @@ -3958,6 +3999,33 @@ type CollectionCreated implements Event { ): Collection } +""" +Event sent when new collection is created. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type CollectionCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The collection the event relates to.""" + collection( + """Slug of a channel for which the data should be returned.""" + channel: String + ): Collection +} + """ Deletes a collection. @@ -4608,7 +4676,7 @@ type CountryDisplay { country: String! """Country tax.""" - vat: VAT + vat: VAT @deprecated(reason: "This field will be removed in Saleor 4.0. Use `TaxClassCountryRate` type to manage tax rates per country.") } input CountryFilterInput { @@ -4618,6 +4686,26 @@ input CountryFilterInput { attachedToShippingZones: Boolean } +input CountryRateInput { + """Country in which this rate applies.""" + countryCode: CountryCode! + + """ + Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate. + """ + rate: Float! +} + +input CountryRateUpdateInput { + """Country in which this rate applies.""" + countryCode: CountryCode! + + """ + Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate. Provide `null` to remove the particular rate. + """ + rate: Float +} + """Create JWT token.""" type CreateToken { """JWT token, required to authenticate.""" @@ -5295,6 +5383,30 @@ type DraftOrderCreated implements Event { order: Order } +""" +Event sent when new draft order is created. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type DraftOrderCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + """ Deletes a draft order. @@ -6637,6 +6749,30 @@ type GiftCardCreated implements Event { giftCard: GiftCard } +""" +Event sent when new gift card is created. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type GiftCardCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The gift card the event relates to.""" + giftCard: GiftCard +} + """ Deactivate a gift card. @@ -9098,6 +9234,101 @@ type Mutation { shippingZoneIds: [ID!]! ): WarehouseShippingZoneUnassign + """ + Create a tax class. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_TAXES. + """ + taxClassCreate( + """Fields required to create a tax class.""" + input: TaxClassCreateInput! + ): TaxClassCreate + + """ + Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_TAXES. + """ + taxClassDelete( + """ID of a tax class to delete.""" + id: ID! + ): TaxClassDelete + + """ + Update a tax class. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_TAXES. + """ + taxClassUpdate( + """ID of the tax class.""" + id: ID! + + """Fields required to update a tax class.""" + input: TaxClassUpdateInput! + ): TaxClassUpdate + + """ + Update tax configuration for a channel. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_TAXES. + """ + taxConfigurationUpdate( + """ID of the tax configuration.""" + id: ID! + + """Fields required to update the tax configuration.""" + input: TaxConfigurationUpdateInput! + ): TaxConfigurationUpdate + + """ + Update tax class rates for a specific country. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_TAXES. + """ + taxCountryConfigurationUpdate( + """Country in which to update the tax class rates.""" + countryCode: CountryCode! + + """ + List of tax rates per tax class to update. When `{taxClass: id, rate: null`} is passed, it deletes the rate object for given taxClass ID. When `{rate: Int}` is passed without a tax class, it updates the default tax class for this country. + """ + updateTaxClassRates: [TaxClassRateInput!]! + ): TaxCountryConfigurationUpdate + + """ + Remove all tax class rates for a specific country. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_TAXES. + """ + taxCountryConfigurationDelete( + """Country in which to update the tax class rates.""" + countryCode: CountryCode! + ): TaxCountryConfigurationDelete + """ Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known. @@ -9173,7 +9404,7 @@ type Mutation { Requires one of the following permissions: MANAGE_SETTINGS. """ - shopFetchTaxRates: ShopFetchTaxRates + shopFetchTaxRates: ShopFetchTaxRates @deprecated(reason: "\n\nDEPRECATED: this mutation will be removed in Saleor 4.0.") """ Creates/updates translations for shop settings. @@ -12882,13 +13113,52 @@ type Order implements Node & ObjectWithMetadata { """Total price of shipping.""" shippingPrice: TaxedMoney! + + """The shipping tax rate value.""" shippingTaxRate: Float! + + """ + Denormalized tax class assigned to the shipping method. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + """ + shippingTaxClass: TaxClass + + """ + Denormalized name of the tax class assigned to the shipping method. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + shippingTaxClassName: String + + """ + Denormalized public metadata of the shipping method's tax class. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + shippingTaxClassMetadata: [MetadataItem!]! + + """ + Denormalized private metadata of the shipping method's tax class. Requires staff permissions to access. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + shippingTaxClassPrivateMetadata: [MetadataItem!]! token: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `id` instead.") voucher: Voucher """List of user gift cards.""" giftCards: [GiftCard!]! - displayGrossPrices: Boolean! customerNote: String! weight: Weight! redirectUrl: String @@ -12955,6 +13225,15 @@ type Order implements Node & ObjectWithMetadata { """List of errors that occurred during order validation.""" errors: [OrderError!]! + + """ + Determines whether checkout prices should include taxes when displayed in a storefront. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + displayGrossPrices: Boolean! } enum OrderAction { @@ -13838,6 +14117,44 @@ type OrderLine implements Node & ObjectWithMetadata { """Type of the discount: fixed or percent""" unitDiscountType: DiscountValueTypeEnum + + """ + Denormalized tax class of the product in this order line. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + """ + taxClass: TaxClass + + """ + Denormalized name of the tax class. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + taxClassName: String + + """ + Denormalized public metadata of the tax class. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + taxClassMetadata: [MetadataItem!]! + + """ + Denormalized private metadata of the tax class. Requires staff permissions to access. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + taxClassPrivateMetadata: [MetadataItem!]! } input OrderLineCreateInput { @@ -14242,6 +14559,30 @@ type OrderUpdated implements Event { order: Order } +""" +Event sent when order is updated. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type OrderUpdated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + """ Void an order. @@ -14486,6 +14827,30 @@ type PageCreated implements Event { page: Page } +""" +Event sent when new page is created. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type PageCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The page the event relates to.""" + page: Page +} + """ Deletes a page. @@ -15605,14 +15970,19 @@ enum PermissionEnum { HANDLE_TAXES MANAGE_TAXES MANAGE_CHANNELS + MANAGE_CHECKOUTS + HANDLE_CHECKOUTS + HANDLE_TAXES + MANAGE_TAXES + MANAGE_CHANNELS MANAGE_DISCOUNTS - MANAGE_PLUGINS MANAGE_GIFT_CARD MANAGE_MENUS MANAGE_ORDERS MANAGE_PAGES MANAGE_PAGE_TYPES_AND_ATTRIBUTES HANDLE_PAYMENTS + MANAGE_PLUGINS MANAGE_PRODUCTS MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES MANAGE_SHIPPING @@ -16050,7 +16420,7 @@ type Product implements Node & ObjectWithMetadata { category: Category created: DateTime! updatedAt: DateTime! - chargeTaxes: Boolean! + chargeTaxes: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` field to determine whether tax collection is enabled.") weight: Weight defaultVariant: ProductVariant rating: Float @@ -16101,7 +16471,7 @@ type Product implements Node & ObjectWithMetadata { ): Boolean """A type of tax. Assigned by enabled tax gateway""" - taxType: TaxType + taxType: TaxType @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClass` field instead.") """List of attributes assigned to this product.""" attributes: [SelectedAttribute!]! @@ -16155,6 +16525,13 @@ type Product implements Node & ObjectWithMetadata { """Whether the product is available for purchase.""" isAvailableForPurchase: Boolean + + """ + Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + """ + taxClass: TaxClass } """ @@ -16423,7 +16800,11 @@ input ProductCreateInput { """ID of the product's category.""" category: ID - """Determine if taxes are being charged for the product.""" + """ + Determine if taxes are being charged for the product. + + DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled. + """ chargeTaxes: Boolean """List of IDs of collections that the product belongs to.""" @@ -16442,7 +16823,16 @@ input ProductCreateInput { """Product slug.""" slug: String - """Tax rate for enabled tax gateway.""" + """ + ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type. + """ + taxClass: ID + + """ + Tax rate for enabled tax gateway. + + DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. + """ taxCode: String """Search engine optimization fields.""" @@ -16502,6 +16892,36 @@ type ProductCreated implements Event { category: Category } +""" +Event sent when new product is created. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type ProductCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The product the event relates to.""" + product( + """Slug of a channel for which the data should be returned.""" + channel: String + ): Product + + """The category of the product.""" + category: Category +} + """ Deletes a product. @@ -16699,7 +17119,11 @@ input ProductInput { """ID of the product's category.""" category: ID - """Determine if taxes are being charged for the product.""" + """ + Determine if taxes are being charged for the product. + + DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled. + """ chargeTaxes: Boolean """List of IDs of collections that the product belongs to.""" @@ -16718,7 +17142,16 @@ input ProductInput { """Product slug.""" slug: String - """Tax rate for enabled tax gateway.""" + """ + ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type. + """ + taxClass: ID + + """ + Tax rate for enabled tax gateway. + + DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. + """ taxCode: String """Search engine optimization fields.""" @@ -17000,6 +17433,15 @@ type ProductPricingInfo { The discounted price range of the product variants in the local currency. """ priceRangeLocalCurrency: TaxedMoneyRange + + """ + Determines whether this product's price displayed in a storefront should include taxes. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + displayGrossPrices: Boolean! } """ @@ -17167,7 +17609,21 @@ type ProductType implements Node & ObjectWithMetadata { ): ProductCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter.") """A type of tax. Assigned by enabled tax gateway""" - taxType: TaxType + taxType: TaxType @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClass` field instead.") + + """ + Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + """ + taxClass: TaxClass + + """ + Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type. + + Requires one of the following permissions: MANAGE_TAXES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. + """ + taxClass: TaxClass """Variant attributes of that product type.""" variantAttributes( @@ -17313,8 +17769,17 @@ input ProductTypeInput { """Weight of the ProductType items.""" weight: WeightScalar - """Tax rate for enabled tax gateway.""" + """ + Tax rate for enabled tax gateway. + + DEPRECATED: this field will be removed in Saleor 4.0.. Use tax classes to control the tax calculation for a product type. + """ taxCode: String + + """ + ID of a tax class to assign to this product type. All products of this product type would use this tax class, unless it's overridden in the `Product` type. + """ + taxClass: ID } """An enumeration.""" @@ -17858,6 +18323,33 @@ type ProductVariantCreated implements Event { ): ProductVariant } +""" +Event sent when new product variant is created. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type ProductVariantCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The product variant the event relates to.""" + productVariant( + """Slug of a channel for which the data should be returned.""" + channel: String + ): ProductVariant +} + """ Deletes a product variant. @@ -18297,6 +18789,106 @@ type Query { kind: TranslatableKinds! ): TranslatableItem + """ + Look up a tax configuration. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + """ + taxConfiguration( + """ID of a tax configuration.""" + id: ID! + ): TaxConfiguration + + """ + List of tax configurations. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + """ + taxConfigurations( + """Filtering options for tax configurations.""" + filter: TaxConfigurationFilterInput + + """Return the elements in the list that come before the specified cursor.""" + before: String + + """Return the elements in the list that come after the specified cursor.""" + after: String + + """Return the first n elements from the list.""" + first: Int + + """Return the last n elements from the list.""" + last: Int + ): TaxConfigurationCountableConnection + + """ + Look up a tax class. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + """ + taxClass( + """ID of a tax class.""" + id: ID! + ): TaxClass + + """ + List of tax classes. + + Added in Saleor 3.9. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + """ + taxClasses( + """Sort tax classes.""" + sortBy: TaxClassSortingInput + + """Filtering options for tax classes.""" + filter: TaxClassFilterInput + + """Return the elements in the list that come before the specified cursor.""" + before: String + + """Return the elements in the list that come after the specified cursor.""" + after: String + + """Return the first n elements from the list.""" + first: Int + + """Return the last n elements from the list.""" + last: Int + ): TaxClassCountableConnection + + """ + Tax class rates grouped by country. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + """ + taxCountryConfiguration( + """Country for which to return tax class rates.""" + countryCode: CountryCode! + ): TaxCountryConfiguration + + """ + + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. + """ + taxCountryConfigurations: [TaxCountryConfiguration!] + """ Look up a stock by ID @@ -20464,6 +21056,13 @@ type ShippingMethodType implements Node & ObjectWithMetadata { """Minimal number of days for delivery.""" minimumDeliveryDays: Int + + """ + Tax class assigned to this shipping method. + + Requires one of the following permissions: MANAGE_TAXES, MANAGE_SHIPPING. + """ + taxClass: TaxClass } """An enumeration.""" @@ -20651,6 +21250,11 @@ input ShippingPriceInput { """Inclusion type for currently assigned postal code rules.""" inclusionType: PostalCodeRuleInclusionTypeEnum + + """ + ID of a tax class to assign to this shipping method. If not provided, the default tax class will be used. + """ + taxClass: ID } """ @@ -20897,6 +21501,33 @@ type ShippingZoneCreated implements Event { ): ShippingZone } +""" +Event sent when new shipping zone is created. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type ShippingZoneCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The shipping zone the event relates to.""" + shippingZone( + """Slug of a channel for which the data should be returned.""" + channel: String + ): ShippingZone +} + """ Deletes a shipping zone. @@ -21033,6 +21664,33 @@ type ShippingZoneUpdated implements Event { ): ShippingZone } +""" +Event sent when shipping zone is updated. + +Added in Saleor 3.2. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type ShippingZoneUpdated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The shipping zone the event relates to.""" + shippingZone( + """Slug of a channel for which the data should be returned.""" + channel: String + ): ShippingZone +} + """ Represents a shop resource containing general shop data and configuration. """ @@ -21122,9 +21780,6 @@ type Shop { """Header text.""" headerText: String - """Include taxes in prices.""" - includeTaxesInPrices: Boolean! - """ Automatically approve all new fulfillments. @@ -21139,12 +21794,6 @@ type Shop { """ fulfillmentAllowUnpaid: Boolean! - """Display prices with tax in store.""" - displayGrossPrices: Boolean! - - """Charge taxes on shipping.""" - chargeTaxesOnShipping: Boolean! - """Enable inventory tracking.""" trackInventoryByDefault: Boolean @@ -21233,6 +21882,15 @@ type Shop { Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ version: String! + + """Include taxes in prices.""" + includeTaxesInPrices: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration.pricesEnteredWithTax` to determine whether prices are entered with tax.") + + """Display prices with tax in store.""" + displayGrossPrices: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to determine whether to display gross or net prices.") + + """Charge taxes on shipping.""" + chargeTaxesOnShipping: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `ShippingMethodType.taxClass` to determine whether taxes are calculated for shipping methods; if a tax class is set, the taxes will be calculated, otherwise no tax rate will be applied.") } """ @@ -21302,15 +21960,6 @@ input ShopSettingsInput { """SEO description.""" description: String - """Include taxes in prices.""" - includeTaxesInPrices: Boolean - - """Display prices with tax in store.""" - displayGrossPrices: Boolean - - """Charge taxes on shipping.""" - chargeTaxesOnShipping: Boolean - """Enable inventory tracking.""" trackInventoryByDefault: Boolean @@ -21371,6 +22020,27 @@ input ShopSettingsInput { Note: this API is currently in Feature Preview and can be subject to changes at later point. """ limitQuantityPerCheckout: Int + + """ + Include taxes in prices. + + DEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country. + """ + includeTaxesInPrices: Boolean + + """ + Display prices with tax in store. + + DEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country. + """ + displayGrossPrices: Boolean + + """ + Charge taxes on shipping. + + DEPRECATED: this field will be removed in Saleor 4.0. To enable taxes for a shipping method, assign a tax class to the shipping method with `shippingPriceCreate` or `shippingPriceUpdate` mutations. + """ + chargeTaxesOnShipping: Boolean } """ @@ -21817,6 +22487,568 @@ type Subscription { event: Event } +enum TaxCalculationStrategy { + FLAT_RATES + TAX_APP +} + +""" +Tax class is a named object used to define tax rates per country. Tax class can be assigned to product types, products and shipping methods to define their tax rates. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TaxClass implements Node & ObjectWithMetadata { + """The ID of the object.""" + id: ID! + + """List of private metadata items. Requires staff permissions to access.""" + privateMetadata: [MetadataItem!]! + + """ + A single key from private metadata. Requires staff permissions to access. + + Tip: Use GraphQL aliases to fetch multiple keys. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetafield(key: String!): String + + """ + Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetafields(keys: [String!]): Metadata + + """List of public metadata items. Can be accessed without permissions.""" + metadata: [MetadataItem!]! + + """ + A single key from public metadata. + + Tip: Use GraphQL aliases to fetch multiple keys. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + metafield(key: String!): String + + """ + Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + metafields(keys: [String!]): Metadata + + """Name of the tax class.""" + name: String! + + """Country-specific tax rates for this tax class.""" + countries: [TaxClassCountryRate!]! +} + +type TaxClassCountableConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + edges: [TaxClassCountableEdge!]! + + """A total count of items in the collection.""" + totalCount: Int +} + +type TaxClassCountableEdge { + """The item at the end of the edge.""" + node: TaxClass! + + """A cursor for use in pagination.""" + cursor: String! +} + +""" +Tax rate for a country. When tax class is null, it represents the default tax rate for that country; otherwise it's a country tax rate specific to the given tax class. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TaxClassCountryRate { + """Country in which this tax rate applies.""" + country: CountryDisplay! + + """Tax rate value.""" + rate: Float! + + """Related tax class.""" + taxClass: TaxClass +} + +""" +Create a tax class. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_TAXES. +""" +type TaxClassCreate { + errors: [TaxClassCreateError!]! + taxClass: TaxClass +} + +type TaxClassCreateError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: TaxClassCreateErrorCode! + + """List of country codes for which the configuration is invalid.""" + countryCodes: [String!]! +} + +"""An enumeration.""" +enum TaxClassCreateErrorCode { + GRAPHQL_ERROR + INVALID + NOT_FOUND +} + +input TaxClassCreateInput { + """Name of the tax class.""" + name: String! + + """List of country-specific tax rates to create for this tax class.""" + createCountryRates: [CountryRateInput!] +} + +""" +Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_TAXES. +""" +type TaxClassDelete { + errors: [TaxClassDeleteError!]! + taxClass: TaxClass +} + +type TaxClassDeleteError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: TaxClassDeleteErrorCode! +} + +"""An enumeration.""" +enum TaxClassDeleteErrorCode { + GRAPHQL_ERROR + INVALID + NOT_FOUND +} + +input TaxClassFilterInput { + metadata: [MetadataFilter!] + ids: [ID!] + countries: [CountryCode!] +} + +input TaxClassRateInput { + """ID of a tax class for which to update the tax rate""" + taxClassId: ID + + """Tax rate value.""" + rate: Float +} + +enum TaxClassSortField { + """Sort tax classes by name.""" + NAME +} + +input TaxClassSortingInput { + """Specifies the direction in which to sort products.""" + direction: OrderDirection! + + """Sort tax classes by the selected field.""" + field: TaxClassSortField! +} + +""" +Update a tax class. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_TAXES. +""" +type TaxClassUpdate { + errors: [TaxClassUpdateError!]! + taxClass: TaxClass +} + +type TaxClassUpdateError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: TaxClassUpdateErrorCode! + + """List of country codes for which the configuration is invalid.""" + countryCodes: [String!]! +} + +"""An enumeration.""" +enum TaxClassUpdateErrorCode { + DUPLICATED_INPUT_ITEM + GRAPHQL_ERROR + INVALID + NOT_FOUND +} + +input TaxClassUpdateInput { + """Name of the tax class.""" + name: String + + """ + List of country-specific tax rates to create or update for this tax class. + """ + updateCountryRates: [CountryRateUpdateInput!] + + """ + List of country codes for which to remove the tax class rates. Note: It removes all rates for given country code. + """ + removeCountryRates: [CountryCode!] +} + +""" +Channel-specific tax configuration. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TaxConfiguration implements Node & ObjectWithMetadata { + """The ID of the object.""" + id: ID! + + """List of private metadata items. Requires staff permissions to access.""" + privateMetadata: [MetadataItem!]! + + """ + A single key from private metadata. Requires staff permissions to access. + + Tip: Use GraphQL aliases to fetch multiple keys. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetafield(key: String!): String + + """ + Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetafields(keys: [String!]): Metadata + + """List of public metadata items. Can be accessed without permissions.""" + metadata: [MetadataItem!]! + + """ + A single key from public metadata. + + Tip: Use GraphQL aliases to fetch multiple keys. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + metafield(key: String!): String + + """ + Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + metafields(keys: [String!]): Metadata + + """A channel to which the tax configuration applies to.""" + channel: Channel! + + """Determines whether taxes are charged in the given channel.""" + chargeTaxes: Boolean! + + """ + The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated. + """ + taxCalculationStrategy: TaxCalculationStrategy + + """ + Determines whether prices displayed in a storefront should include taxes. + """ + displayGrossPrices: Boolean! + + """Determines whether prices are entered with the tax included.""" + pricesEnteredWithTax: Boolean! + + """List of country-specific exceptions in tax configuration.""" + countries: [TaxConfigurationPerCountry!]! +} + +type TaxConfigurationCountableConnection { + """Pagination data for this connection.""" + pageInfo: PageInfo! + edges: [TaxConfigurationCountableEdge!]! + + """A total count of items in the collection.""" + totalCount: Int +} + +type TaxConfigurationCountableEdge { + """The item at the end of the edge.""" + node: TaxConfiguration! + + """A cursor for use in pagination.""" + cursor: String! +} + +input TaxConfigurationFilterInput { + metadata: [MetadataFilter!] + ids: [ID!] +} + +""" +Country-specific exceptions of a channel's tax configuration. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TaxConfigurationPerCountry { + """Country in which this configuration applies.""" + country: CountryDisplay! + + """Determines whether taxes are charged in this country.""" + chargeTaxes: Boolean! + + """ + A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration. + """ + taxCalculationStrategy: TaxCalculationStrategy + + """ + Determines whether prices displayed in a storefront should include taxes for this country. + """ + displayGrossPrices: Boolean! +} + +input TaxConfigurationPerCountryInput { + """Country in which this configuration applies.""" + countryCode: CountryCode! + + """Determines whether taxes are charged in this country.""" + chargeTaxes: Boolean! + + """ + A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration. + """ + taxCalculationStrategy: TaxCalculationStrategy + + """ + Determines whether prices displayed in a storefront should include taxes for this country. + """ + displayGrossPrices: Boolean! +} + +""" +Update tax configuration for a channel. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_TAXES. +""" +type TaxConfigurationUpdate { + errors: [TaxConfigurationUpdateError!]! + taxConfiguration: TaxConfiguration +} + +type TaxConfigurationUpdateError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: TaxConfigurationUpdateErrorCode! + + """List of country codes for which the configuration is invalid.""" + countryCodes: [String!]! +} + +"""An enumeration.""" +enum TaxConfigurationUpdateErrorCode { + DUPLICATED_INPUT_ITEM + GRAPHQL_ERROR + INVALID + NOT_FOUND +} + +input TaxConfigurationUpdateInput { + """Determines whether taxes are charged in the given channel.""" + chargeTaxes: Boolean + + """ + The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated. + """ + taxCalculationStrategy: TaxCalculationStrategy + + """ + Determines whether prices displayed in a storefront should include taxes. + """ + displayGrossPrices: Boolean + + """Determines whether prices are entered with the tax included.""" + pricesEnteredWithTax: Boolean + + """ + List of tax country configurations to create or update (identified by a country code). + """ + updateCountriesConfiguration: [TaxConfigurationPerCountryInput!] + + """List of country codes for which to remove the tax configuration.""" + removeCountriesConfiguration: [CountryCode!] +} + +""" +Tax class rates grouped by country. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TaxCountryConfiguration { + """A country for which tax class rates are grouped.""" + country: CountryDisplay! + + """List of tax class rates.""" + taxClassCountryRates: [TaxClassCountryRate!]! +} + +""" +Remove all tax class rates for a specific country. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_TAXES. +""" +type TaxCountryConfigurationDelete { + """Updated tax class rates grouped by a country.""" + taxCountryConfiguration: TaxCountryConfiguration + errors: [TaxCountryConfigurationDeleteError!]! +} + +type TaxCountryConfigurationDeleteError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: TaxCountryConfigurationDeleteErrorCode! +} + +"""An enumeration.""" +enum TaxCountryConfigurationDeleteErrorCode { + GRAPHQL_ERROR + INVALID + NOT_FOUND +} + +""" +Update tax class rates for a specific country. + +Added in Saleor 3.9. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_TAXES. +""" +type TaxCountryConfigurationUpdate { + """Updated tax class rates grouped by a country.""" + taxCountryConfiguration: TaxCountryConfiguration + errors: [TaxCountryConfigurationUpdateError!]! +} + +type TaxCountryConfigurationUpdateError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: TaxCountryConfigurationUpdateErrorCode! + + """List of tax class IDs for which the update failed.""" + taxClassIds: [String!]! +} + +"""An enumeration.""" +enum TaxCountryConfigurationUpdateErrorCode { + GRAPHQL_ERROR + INVALID + NOT_FOUND + ONLY_ONE_DEFAULT_COUNTRY_RATE_ALLOWED + CANNOT_CREATE_NEGATIVE_RATE +} + """ Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known. diff --git a/src/components/Form/Form.tsx b/src/components/Form/Form.tsx index 14b5e36ec..8abaed32b 100644 --- a/src/components/Form/Form.tsx +++ b/src/components/Form/Form.tsx @@ -14,6 +14,7 @@ export interface FormProps onSubmit?: (data: TData) => SubmitPromise | void; formId?: FormId; checkIfSaveIsDisabled?: CheckIfSaveIsDisabledFnType; + mergeData?: boolean; } function Form({ @@ -25,6 +26,7 @@ function Form({ formId, checkIfSaveIsDisabled, disabled, + mergeData, ...rest }: FormProps) { const renderProps = useForm(initial, onSubmit, { @@ -32,6 +34,7 @@ function Form({ formId, checkIfSaveIsDisabled, disabled, + mergeData, }); function handleSubmit(event?: React.FormEvent, cb?: () => void) { diff --git a/src/components/ListItemLink/ListItemLink.tsx b/src/components/ListItemLink/ListItemLink.tsx new file mode 100644 index 000000000..e48d2ad9b --- /dev/null +++ b/src/components/ListItemLink/ListItemLink.tsx @@ -0,0 +1,45 @@ +import { BaseListItemProps, ListItem, makeStyles } from "@saleor/macaw-ui"; +import clsx from "classnames"; +import React from "react"; + +import Link from "../Link"; + +export interface ListItemLinkProps + extends Omit { + href?: string; + className?: string; + linkClassName?: string; +} + +const useStyles = makeStyles( + { + link: { + all: "inherit", + display: "contents", + }, + }, + { name: "ListItemLink" }, +); + +export const ListItemLink: React.FC = ({ + href, + children, + linkClassName, + ...props +}) => { + const classes = useStyles(); + + if (!href) { + return {children}; + } + + return ( + + + {children} + + + ); +}; + +export default ListItemLink; diff --git a/src/components/ListItemLink/index.ts b/src/components/ListItemLink/index.ts new file mode 100644 index 000000000..c4ddc41f9 --- /dev/null +++ b/src/components/ListItemLink/index.ts @@ -0,0 +1,2 @@ +export { default } from "./ListItemLink"; +export * from "./ListItemLink"; diff --git a/src/components/Navigator/modes/default/views.ts b/src/components/Navigator/modes/default/views.ts index 85015024c..1a8ffb7e5 100644 --- a/src/components/Navigator/modes/default/views.ts +++ b/src/components/Navigator/modes/default/views.ts @@ -16,7 +16,7 @@ import { productTypeListUrl } from "@saleor/productTypes/urls"; import { shippingZonesListUrl } from "@saleor/shipping/urls"; import { siteSettingsUrl } from "@saleor/siteSettings/urls"; import { staffListUrl } from "@saleor/staff/urls"; -import { countryListUrl } from "@saleor/taxes/urls"; +import { taxConfigurationListUrl } from "@saleor/taxes/urls"; import { languageListUrl } from "@saleor/translations/urls"; import { warehouseListUrl } from "@saleor/warehouses/urls"; import { score } from "fuzzaldrin"; @@ -108,7 +108,7 @@ function searchInViews( }, { label: intl.formatMessage(sectionNames.taxes), - url: countryListUrl, + url: taxConfigurationListUrl(), }, { label: intl.formatMessage(sectionNames.translations), diff --git a/src/components/Shop/queries.ts b/src/components/Shop/queries.ts index 8cbef1071..1ea481e2a 100644 --- a/src/components/Shop/queries.ts +++ b/src/components/Shop/queries.ts @@ -16,7 +16,6 @@ export const shopInfo = gql` ...CountryWithCode } defaultWeightUnit - displayGrossPrices domain { host url @@ -24,7 +23,6 @@ export const shopInfo = gql` languages { ...Language } - includeTaxesInPrices name trackInventoryByDefault permissions { diff --git a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx index cea8411e3..b34218dcd 100644 --- a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx +++ b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectFieldContent.tsx @@ -167,7 +167,7 @@ const SingleAutocompleteSelectFieldContent: React.FC { - if (!calledForMore && onFetchMore && scrolledToBottom) { + if (!calledForMore && onFetchMore && scrolledToBottom && hasMore) { onFetchMore(); setCalledForMore(true); } else if (scrolledToBottom && !onFetchMore) { diff --git a/src/configuration/ConfigurationPage.tsx b/src/configuration/ConfigurationPage.tsx index d68cfcbf7..dfb89a26e 100644 --- a/src/configuration/ConfigurationPage.tsx +++ b/src/configuration/ConfigurationPage.tsx @@ -1,32 +1,18 @@ import { Typography } from "@material-ui/core"; -import { IconProps } from "@material-ui/core/Icon"; import { useTheme } from "@material-ui/core/styles"; import useMediaQuery from "@material-ui/core/useMediaQuery"; -import { PermissionEnum, UserFragment } from "@saleor/graphql"; +import { UserFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { makeStyles, NavigationCard } from "@saleor/macaw-ui"; import React from "react"; import { useIntl } from "react-intl"; import { Link } from "react-router-dom"; -import { hasAnyPermissions } from "../auth/misc"; import Container from "../components/Container"; import PageHeader from "../components/PageHeader"; import VersionInfo from "../components/VersionInfo"; - -export interface MenuItem { - description: string; - icon: React.ReactElement; - permissions: PermissionEnum[]; - title: string; - url?: string; - testId?: string; -} - -export interface MenuSection { - label: string; - menuItems: MenuItem[]; -} +import { MenuSection } from "./types"; +import { hasUserMenuItemPermissions } from "./utils"; interface VersionInfo { dashboardVersion: string; @@ -115,7 +101,7 @@ export const ConfigurationPage: React.FC = props => { {menus .filter(menu => menu.menuItems.some(menuItem => - hasAnyPermissions(menuItem.permissions, user), + hasUserMenuItemPermissions(menuItem, user), ), ) .map((menu, menuIndex) => ( @@ -125,9 +111,7 @@ export const ConfigurationPage: React.FC = props => {
{menu.menuItems - .filter(menuItem => - hasAnyPermissions(menuItem.permissions, user), - ) + .filter(menuItem => hasUserMenuItemPermissions(menuItem, user)) .map((item, itemIndex) => ( , - permissions: [PermissionEnum.MANAGE_SETTINGS], title: intl.formatMessage(sectionNames.taxes), - url: taxSection, + url: taxConfigurationListUrl(), testId: "configuration-menu-taxes", }, ], diff --git a/src/configuration/types.ts b/src/configuration/types.ts new file mode 100644 index 000000000..74f5ce8b4 --- /dev/null +++ b/src/configuration/types.ts @@ -0,0 +1,16 @@ +import { IconProps } from "@material-ui/core"; +import { PermissionEnum } from "@saleor/graphql"; + +export interface MenuItem { + description: string; + icon: React.ReactElement; + permissions?: PermissionEnum[]; + title: string; + url?: string; + testId?: string; +} + +export interface MenuSection { + label: string; + menuItems: MenuItem[]; +} diff --git a/src/configuration/utils.ts b/src/configuration/utils.ts index b1071ab99..c3232b533 100644 --- a/src/configuration/utils.ts +++ b/src/configuration/utils.ts @@ -1,7 +1,9 @@ -import { PermissionEnum } from "@saleor/graphql"; +import { hasAnyPermissions } from "@saleor/auth/misc"; +import { PermissionEnum, UserFragment } from "@saleor/graphql"; import { IntlShape } from "react-intl"; import { createConfigurationMenu } from "."; +import { MenuItem } from "./types"; export const getConfigMenuItemsPermissions = ( intl: IntlShape, @@ -15,3 +17,9 @@ export const getConfigMenuItemsPermissions = ( [], ) .flat(); + +export const hasUserMenuItemPermissions = ( + menuItem: MenuItem, + user: UserFragment, +): boolean => + menuItem.permissions ? hasAnyPermissions(menuItem.permissions, user) : true; diff --git a/src/fragments/errors.ts b/src/fragments/errors.ts index 85aeb2171..72d9de8a2 100644 --- a/src/fragments/errors.ts +++ b/src/fragments/errors.ts @@ -487,3 +487,42 @@ export const shippingPriceTranslateErrorFragment = gql` message } `; + +export const taxConfigurationUpdateError = gql` + fragment TaxConfigurationUpdateErrorFragment on TaxConfigurationUpdateError { + field + code + } +`; + +export const taxCountryConfigurationUpdateError = gql` + fragment TaxCountryConfigurationUpdateErrorFragment on TaxCountryConfigurationUpdateError { + field + code + } +`; +export const taxCountryConfigurationDeleteError = gql` + fragment TaxCountryConfigurationDeleteErrorFragment on TaxCountryConfigurationDeleteError { + field + code + } +`; + +export const taxClassUpdateError = gql` + fragment TaxClassUpdateErrorFragment on TaxClassUpdateError { + field + code + } +`; +export const taxClassCreateError = gql` + fragment TaxClassCreateErrorFragment on TaxClassCreateError { + field + code + } +`; +export const taxClassDeleteError = gql` + fragment TaxClassDeleteErrorFragment on TaxClassDeleteError { + field + code + } +`; diff --git a/src/fragments/productTypes.ts b/src/fragments/productTypes.ts index e56d1575f..fdc0c8e1b 100644 --- a/src/fragments/productTypes.ts +++ b/src/fragments/productTypes.ts @@ -7,9 +7,9 @@ export const productTypeFragment = gql` kind hasVariants isShippingRequired - taxType { - description - taxCode + taxClass { + id + name } } `; diff --git a/src/fragments/products.ts b/src/fragments/products.ts index 5a28fbde9..7d25e547a 100644 --- a/src/fragments/products.ts +++ b/src/fragments/products.ts @@ -226,7 +226,6 @@ export const productFragmentDetails = gql` id name } - chargeTaxes channelListings { ...ChannelListingProductWithoutPricing } @@ -241,15 +240,13 @@ export const productFragmentDetails = gql` id name hasVariants - taxType { - ...TaxType - } } weight { ...Weight } - taxType { - ...TaxType + taxClass { + id + name } } `; diff --git a/src/fragments/shipping.ts b/src/fragments/shipping.ts index 5fd4dff4a..7cdc6bb60 100644 --- a/src/fragments/shipping.ts +++ b/src/fragments/shipping.ts @@ -28,6 +28,10 @@ export const shippingMethodTypeFragment = gql` fragment ShippingMethodType on ShippingMethodType { ...ShippingMethodWithPostalCodes ...Metadata + taxClass { + name + id + } minimumOrderWeight { unit value diff --git a/src/fragments/taxes.ts b/src/fragments/taxes.ts index 285b59e2e..982d77efe 100644 --- a/src/fragments/taxes.ts +++ b/src/fragments/taxes.ts @@ -16,28 +16,65 @@ export const countryFragment = gql` code } `; -export const countryWithTaxesFragment = gql` - fragment CountryWithTaxes on CountryDisplay { - ...Country - vat { - standardRate - reducedRates { - rateType - rate + +export const taxConfigurationPerCountry = gql` + fragment TaxConfigurationPerCountry on TaxConfigurationPerCountry { + country { + ...CountryWithCode + } + chargeTaxes + taxCalculationStrategy + displayGrossPrices + } +`; + +export const taxConfiguration = gql` + fragment TaxConfiguration on TaxConfiguration { + id + channel { + id + name + } + displayGrossPrices + pricesEnteredWithTax + chargeTaxes + taxCalculationStrategy + countries { + ...TaxConfigurationPerCountry + } + } +`; + +export const taxCountryConfigurationFragment = gql` + fragment TaxCountryConfiguration on TaxCountryConfiguration { + country { + ...CountryWithCode + } + taxClassCountryRates { + rate + taxClass { + id + name } } } `; -export const shopTaxesFragment = gql` - fragment ShopTaxes on Shop { - chargeTaxesOnShipping - includeTaxesInPrices - displayGrossPrices + +export const taxRateFragment = gql` + fragment TaxRate on TaxClassCountryRate { + country { + ...CountryWithCode + } + rate } `; -export const taxTypeFragment = gql` - fragment TaxType on TaxType { - description - taxCode + +export const taxClassFragment = gql` + fragment TaxClass on TaxClass { + id + name + countries { + ...TaxRate + } } `; diff --git a/src/graphql/fragmentTypes.generated.ts b/src/graphql/fragmentTypes.generated.ts index a7ace24ab..00f27b516 100644 --- a/src/graphql/fragmentTypes.generated.ts +++ b/src/graphql/fragmentTypes.generated.ts @@ -210,6 +210,8 @@ "ShopTranslation", "StaffNotificationRecipient", "Stock", + "TaxClass", + "TaxConfiguration", "Transaction", "TransactionEvent", "TransactionItem", @@ -246,6 +248,8 @@ "ShippingMethod", "ShippingMethodType", "ShippingZone", + "TaxClass", + "TaxConfiguration", "TransactionItem", "User", "Voucher", diff --git a/src/graphql/hooks.generated.ts b/src/graphql/hooks.generated.ts index a9965cc86..035ff2f31 100644 --- a/src/graphql/hooks.generated.ts +++ b/src/graphql/hooks.generated.ts @@ -972,6 +972,42 @@ export const ShippingPriceTranslateErrorFragmentFragmentDoc = gql` message } `; +export const TaxConfigurationUpdateErrorFragmentFragmentDoc = gql` + fragment TaxConfigurationUpdateErrorFragment on TaxConfigurationUpdateError { + field + code +} + `; +export const TaxCountryConfigurationUpdateErrorFragmentFragmentDoc = gql` + fragment TaxCountryConfigurationUpdateErrorFragment on TaxCountryConfigurationUpdateError { + field + code +} + `; +export const TaxCountryConfigurationDeleteErrorFragmentFragmentDoc = gql` + fragment TaxCountryConfigurationDeleteErrorFragment on TaxCountryConfigurationDeleteError { + field + code +} + `; +export const TaxClassUpdateErrorFragmentFragmentDoc = gql` + fragment TaxClassUpdateErrorFragment on TaxClassUpdateError { + field + code +} + `; +export const TaxClassCreateErrorFragmentFragmentDoc = gql` + fragment TaxClassCreateErrorFragment on TaxClassCreateError { + field + code +} + `; +export const TaxClassDeleteErrorFragmentFragmentDoc = gql` + fragment TaxClassDeleteErrorFragment on TaxClassDeleteError { + field + code +} + `; export const GiftCardsSettingsFragmentDoc = gql` fragment GiftCardsSettings on GiftCardSettings { expiryType @@ -1796,9 +1832,9 @@ export const ProductTypeFragmentDoc = gql` kind hasVariants isShippingRequired - taxType { - description - taxCode + taxClass { + id + name } } `; @@ -1996,12 +2032,6 @@ export const ProductDetailsVariantFragmentDoc = gql` ${StockFragmentDoc} ${PreorderFragmentDoc} ${ChannelListingProductVariantFragmentDoc}`; -export const TaxTypeFragmentDoc = gql` - fragment TaxType on TaxType { - description - taxCode -} - `; export const WeightFragmentDoc = gql` fragment Weight on Weight { unit @@ -2029,7 +2059,6 @@ export const ProductFragmentDoc = gql` id name } - chargeTaxes channelListings { ...ChannelListingProductWithoutPricing } @@ -2044,15 +2073,13 @@ export const ProductFragmentDoc = gql` id name hasVariants - taxType { - ...TaxType - } } weight { ...Weight } - taxType { - ...TaxType + taxClass { + id + name } } ${ProductVariantAttributesFragmentDoc} @@ -2060,7 +2087,6 @@ ${MetadataFragmentDoc} ${ChannelListingProductWithoutPricingFragmentDoc} ${ProductMediaFragmentDoc} ${ProductDetailsVariantFragmentDoc} -${TaxTypeFragmentDoc} ${WeightFragmentDoc}`; export const VariantAttributeFragmentDoc = gql` fragment VariantAttribute on Attribute { @@ -2201,6 +2227,10 @@ export const ShippingMethodTypeFragmentDoc = gql` fragment ShippingMethodType on ShippingMethodType { ...ShippingMethodWithPostalCodes ...Metadata + taxClass { + name + id + } minimumOrderWeight { unit value @@ -2282,12 +2312,6 @@ export const ShippingZoneDetailsFragmentDoc = gql` } ${ShippingZoneFragmentDoc} ${ShippingMethodTypeFragmentDoc}`; -export const CountryWithCodeFragmentDoc = gql` - fragment CountryWithCode on CountryDisplay { - country - code -} - `; export const LanguageFragmentDoc = gql` fragment Language on LanguageDisplay { code @@ -2370,25 +2394,69 @@ export const CountryFragmentDoc = gql` code } `; -export const CountryWithTaxesFragmentDoc = gql` - fragment CountryWithTaxes on CountryDisplay { - ...Country - vat { - standardRate - reducedRates { - rateType - rate +export const CountryWithCodeFragmentDoc = gql` + fragment CountryWithCode on CountryDisplay { + country + code +} + `; +export const TaxConfigurationPerCountryFragmentDoc = gql` + fragment TaxConfigurationPerCountry on TaxConfigurationPerCountry { + country { + ...CountryWithCode + } + chargeTaxes + taxCalculationStrategy + displayGrossPrices +} + ${CountryWithCodeFragmentDoc}`; +export const TaxConfigurationFragmentDoc = gql` + fragment TaxConfiguration on TaxConfiguration { + id + channel { + id + name + } + displayGrossPrices + pricesEnteredWithTax + chargeTaxes + taxCalculationStrategy + countries { + ...TaxConfigurationPerCountry + } +} + ${TaxConfigurationPerCountryFragmentDoc}`; +export const TaxCountryConfigurationFragmentDoc = gql` + fragment TaxCountryConfiguration on TaxCountryConfiguration { + country { + ...CountryWithCode + } + taxClassCountryRates { + rate + taxClass { + id + name } } } - ${CountryFragmentDoc}`; -export const ShopTaxesFragmentDoc = gql` - fragment ShopTaxes on Shop { - chargeTaxesOnShipping - includeTaxesInPrices - displayGrossPrices + ${CountryWithCodeFragmentDoc}`; +export const TaxRateFragmentDoc = gql` + fragment TaxRate on TaxClassCountryRate { + country { + ...CountryWithCode + } + rate } - `; + ${CountryWithCodeFragmentDoc}`; +export const TaxClassFragmentDoc = gql` + fragment TaxClass on TaxClass { + id + name + countries { + ...TaxRate + } +} + ${TaxRateFragmentDoc}`; export const TimePeriodFragmentDoc = gql` fragment TimePeriod on TimePeriod { amount @@ -5091,7 +5159,6 @@ export const ShopInfoDocument = gql` ...CountryWithCode } defaultWeightUnit - displayGrossPrices domain { host url @@ -5099,7 +5166,6 @@ export const ShopInfoDocument = gql` languages { ...Language } - includeTaxesInPrices name trackInventoryByDefault permissions { @@ -11032,10 +11098,6 @@ export const ProductTypeDetailsDocument = gql` shop { defaultWeightUnit } - taxTypes { - taxCode - description - } } ${ProductTypeDetailsFragmentDoc}`; @@ -11071,10 +11133,6 @@ export const ProductTypeCreateDataDocument = gql` shop { defaultWeightUnit } - taxTypes { - taxCode - description - } } `; @@ -12425,12 +12483,8 @@ export const ProductDetailsDocument = gql` product(id: $id, channel: $channel) { ...Product } - taxTypes { - ...TaxType - } } - ${ProductFragmentDoc} -${TaxTypeFragmentDoc}`; + ${ProductFragmentDoc}`; /** * __useProductDetailsQuery__ @@ -12487,13 +12541,13 @@ export const ProductTypeDocument = gql` ...AttributeValueList } } - taxType { - ...TaxType + taxClass { + id + name } } } - ${AttributeValueListFragmentDoc} -${TaxTypeFragmentDoc}`; + ${AttributeValueListFragmentDoc}`; /** * __useProductTypeQuery__ @@ -14745,157 +14799,421 @@ export function useStaffMemberDetailsLazyQuery(baseOptions?: ApolloReactHooks.La export type StaffMemberDetailsQueryHookResult = ReturnType; export type StaffMemberDetailsLazyQueryHookResult = ReturnType; export type StaffMemberDetailsQueryResult = Apollo.QueryResult; -export const UpdateTaxSettingsDocument = gql` - mutation UpdateTaxSettings($input: ShopSettingsInput!) { - shopSettingsUpdate(input: $input) { +export const TaxConfigurationUpdateDocument = gql` + mutation TaxConfigurationUpdate($id: ID!, $input: TaxConfigurationUpdateInput!) { + taxConfigurationUpdate(id: $id, input: $input) { errors { - ...ShopSettingsUpdateErrorFragment + ...TaxConfigurationUpdateErrorFragment } - shop { - ...ShopTaxes + taxConfiguration { + ...TaxConfiguration } } } - ${ShopSettingsUpdateErrorFragmentFragmentDoc} -${ShopTaxesFragmentDoc}`; -export type UpdateTaxSettingsMutationFn = Apollo.MutationFunction; + ${TaxConfigurationUpdateErrorFragmentFragmentDoc} +${TaxConfigurationFragmentDoc}`; +export type TaxConfigurationUpdateMutationFn = Apollo.MutationFunction; /** - * __useUpdateTaxSettingsMutation__ + * __useTaxConfigurationUpdateMutation__ * - * To run a mutation, you first call `useUpdateTaxSettingsMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateTaxSettingsMutation` returns a tuple that includes: + * To run a mutation, you first call `useTaxConfigurationUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useTaxConfigurationUpdateMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [updateTaxSettingsMutation, { data, loading, error }] = useUpdateTaxSettingsMutation({ + * const [taxConfigurationUpdateMutation, { data, loading, error }] = useTaxConfigurationUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useTaxConfigurationUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(TaxConfigurationUpdateDocument, options); + } +export type TaxConfigurationUpdateMutationHookResult = ReturnType; +export type TaxConfigurationUpdateMutationResult = Apollo.MutationResult; +export type TaxConfigurationUpdateMutationOptions = Apollo.BaseMutationOptions; +export const TaxCountryConfigurationUpdateDocument = gql` + mutation TaxCountryConfigurationUpdate($countryCode: CountryCode!, $updateTaxClassRates: [TaxClassRateInput!]!) { + taxCountryConfigurationUpdate( + countryCode: $countryCode + updateTaxClassRates: $updateTaxClassRates + ) { + errors { + ...TaxCountryConfigurationUpdateErrorFragment + } + taxCountryConfiguration { + ...TaxCountryConfiguration + } + } +} + ${TaxCountryConfigurationUpdateErrorFragmentFragmentDoc} +${TaxCountryConfigurationFragmentDoc}`; +export type TaxCountryConfigurationUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useTaxCountryConfigurationUpdateMutation__ + * + * To run a mutation, you first call `useTaxCountryConfigurationUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useTaxCountryConfigurationUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [taxCountryConfigurationUpdateMutation, { data, loading, error }] = useTaxCountryConfigurationUpdateMutation({ + * variables: { + * countryCode: // value for 'countryCode' + * updateTaxClassRates: // value for 'updateTaxClassRates' + * }, + * }); + */ +export function useTaxCountryConfigurationUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(TaxCountryConfigurationUpdateDocument, options); + } +export type TaxCountryConfigurationUpdateMutationHookResult = ReturnType; +export type TaxCountryConfigurationUpdateMutationResult = Apollo.MutationResult; +export type TaxCountryConfigurationUpdateMutationOptions = Apollo.BaseMutationOptions; +export const TaxCountryConfigurationDeleteDocument = gql` + mutation TaxCountryConfigurationDelete($countryCode: CountryCode!) { + taxCountryConfigurationDelete(countryCode: $countryCode) { + errors { + ...TaxCountryConfigurationDeleteErrorFragment + } + taxCountryConfiguration { + ...TaxCountryConfiguration + } + } +} + ${TaxCountryConfigurationDeleteErrorFragmentFragmentDoc} +${TaxCountryConfigurationFragmentDoc}`; +export type TaxCountryConfigurationDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useTaxCountryConfigurationDeleteMutation__ + * + * To run a mutation, you first call `useTaxCountryConfigurationDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useTaxCountryConfigurationDeleteMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [taxCountryConfigurationDeleteMutation, { data, loading, error }] = useTaxCountryConfigurationDeleteMutation({ + * variables: { + * countryCode: // value for 'countryCode' + * }, + * }); + */ +export function useTaxCountryConfigurationDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(TaxCountryConfigurationDeleteDocument, options); + } +export type TaxCountryConfigurationDeleteMutationHookResult = ReturnType; +export type TaxCountryConfigurationDeleteMutationResult = Apollo.MutationResult; +export type TaxCountryConfigurationDeleteMutationOptions = Apollo.BaseMutationOptions; +export const TaxClassUpdateDocument = gql` + mutation TaxClassUpdate($id: ID!, $input: TaxClassUpdateInput!) { + taxClassUpdate(id: $id, input: $input) { + errors { + ...TaxClassUpdateErrorFragment + } + taxClass { + ...TaxClass + } + } +} + ${TaxClassUpdateErrorFragmentFragmentDoc} +${TaxClassFragmentDoc}`; +export type TaxClassUpdateMutationFn = Apollo.MutationFunction; + +/** + * __useTaxClassUpdateMutation__ + * + * To run a mutation, you first call `useTaxClassUpdateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useTaxClassUpdateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [taxClassUpdateMutation, { data, loading, error }] = useTaxClassUpdateMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useTaxClassUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useMutation(TaxClassUpdateDocument, options); + } +export type TaxClassUpdateMutationHookResult = ReturnType; +export type TaxClassUpdateMutationResult = Apollo.MutationResult; +export type TaxClassUpdateMutationOptions = Apollo.BaseMutationOptions; +export const TaxClassCreateDocument = gql` + mutation TaxClassCreate($input: TaxClassCreateInput!) { + taxClassCreate(input: $input) { + errors { + ...TaxClassCreateErrorFragment + } + taxClass { + ...TaxClass + } + } +} + ${TaxClassCreateErrorFragmentFragmentDoc} +${TaxClassFragmentDoc}`; +export type TaxClassCreateMutationFn = Apollo.MutationFunction; + +/** + * __useTaxClassCreateMutation__ + * + * To run a mutation, you first call `useTaxClassCreateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useTaxClassCreateMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [taxClassCreateMutation, { data, loading, error }] = useTaxClassCreateMutation({ * variables: { * input: // value for 'input' * }, * }); */ -export function useUpdateTaxSettingsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { +export function useTaxClassCreateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return ApolloReactHooks.useMutation(UpdateTaxSettingsDocument, options); + return ApolloReactHooks.useMutation(TaxClassCreateDocument, options); } -export type UpdateTaxSettingsMutationHookResult = ReturnType; -export type UpdateTaxSettingsMutationResult = Apollo.MutationResult; -export type UpdateTaxSettingsMutationOptions = Apollo.BaseMutationOptions; -export const FetchTaxesDocument = gql` - mutation FetchTaxes { - shopFetchTaxRates { +export type TaxClassCreateMutationHookResult = ReturnType; +export type TaxClassCreateMutationResult = Apollo.MutationResult; +export type TaxClassCreateMutationOptions = Apollo.BaseMutationOptions; +export const TaxClassDeleteDocument = gql` + mutation TaxClassDelete($id: ID!) { + taxClassDelete(id: $id) { errors { - ...ShopFetchTaxRatesErrorFragment - } - shop { - countries { - ...Country - } + ...TaxClassDeleteErrorFragment } } } - ${ShopFetchTaxRatesErrorFragmentFragmentDoc} -${CountryFragmentDoc}`; -export type FetchTaxesMutationFn = Apollo.MutationFunction; + ${TaxClassDeleteErrorFragmentFragmentDoc}`; +export type TaxClassDeleteMutationFn = Apollo.MutationFunction; /** - * __useFetchTaxesMutation__ + * __useTaxClassDeleteMutation__ * - * To run a mutation, you first call `useFetchTaxesMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useFetchTaxesMutation` returns a tuple that includes: + * To run a mutation, you first call `useTaxClassDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useTaxClassDeleteMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [fetchTaxesMutation, { data, loading, error }] = useFetchTaxesMutation({ + * const [taxClassDeleteMutation, { data, loading, error }] = useTaxClassDeleteMutation({ * variables: { + * id: // value for 'id' * }, * }); */ -export function useFetchTaxesMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { +export function useTaxClassDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return ApolloReactHooks.useMutation(FetchTaxesDocument, options); + return ApolloReactHooks.useMutation(TaxClassDeleteDocument, options); + } +export type TaxClassDeleteMutationHookResult = ReturnType; +export type TaxClassDeleteMutationResult = Apollo.MutationResult; +export type TaxClassDeleteMutationOptions = Apollo.BaseMutationOptions; +export const TaxConfigurationsListDocument = gql` + query TaxConfigurationsList($before: String, $after: String, $first: Int, $last: Int, $filter: TaxConfigurationFilterInput) { + taxConfigurations( + before: $before + after: $after + first: $first + last: $last + filter: $filter + ) { + edges { + node { + ...TaxConfiguration } -export type FetchTaxesMutationHookResult = ReturnType; -export type FetchTaxesMutationResult = Apollo.MutationResult; -export type FetchTaxesMutationOptions = Apollo.BaseMutationOptions; -export const CountryListDocument = gql` - query CountryList { - shop { - ...ShopTaxes - countries { - ...CountryWithTaxes } } } - ${ShopTaxesFragmentDoc} -${CountryWithTaxesFragmentDoc}`; + ${TaxConfigurationFragmentDoc}`; /** - * __useCountryListQuery__ + * __useTaxConfigurationsListQuery__ * - * To run a query within a React component, call `useCountryListQuery` and pass it any options that fit your needs. - * When your component renders, `useCountryListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useTaxConfigurationsListQuery` and pass it any options that fit your needs. + * When your component renders, `useTaxConfigurationsListQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const { data, loading, error } = useCountryListQuery({ + * const { data, loading, error } = useTaxConfigurationsListQuery({ * variables: { + * before: // value for 'before' + * after: // value for 'after' + * first: // value for 'first' + * last: // value for 'last' + * filter: // value for 'filter' * }, * }); */ -export function useCountryListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { +export function useTaxConfigurationsListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return ApolloReactHooks.useQuery(CountryListDocument, options); + return ApolloReactHooks.useQuery(TaxConfigurationsListDocument, options); } -export function useCountryListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { +export function useTaxConfigurationsListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return ApolloReactHooks.useLazyQuery(CountryListDocument, options); + return ApolloReactHooks.useLazyQuery(TaxConfigurationsListDocument, options); } -export type CountryListQueryHookResult = ReturnType; -export type CountryListLazyQueryHookResult = ReturnType; -export type CountryListQueryResult = Apollo.QueryResult; -export const TaxTypeListDocument = gql` - query TaxTypeList { - taxTypes { - ...TaxType +export type TaxConfigurationsListQueryHookResult = ReturnType; +export type TaxConfigurationsListLazyQueryHookResult = ReturnType; +export type TaxConfigurationsListQueryResult = Apollo.QueryResult; +export const TaxCountriesListDocument = gql` + query TaxCountriesList { + taxCountryConfigurations { + ...TaxCountryConfiguration } } - ${TaxTypeFragmentDoc}`; + ${TaxCountryConfigurationFragmentDoc}`; /** - * __useTaxTypeListQuery__ + * __useTaxCountriesListQuery__ * - * To run a query within a React component, call `useTaxTypeListQuery` and pass it any options that fit your needs. - * When your component renders, `useTaxTypeListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * To run a query within a React component, call `useTaxCountriesListQuery` and pass it any options that fit your needs. + * When your component renders, `useTaxCountriesListQuery` returns an object from Apollo Client that contains loading, error, and data properties * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example - * const { data, loading, error } = useTaxTypeListQuery({ + * const { data, loading, error } = useTaxCountriesListQuery({ * variables: { * }, * }); */ -export function useTaxTypeListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { +export function useTaxCountriesListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return ApolloReactHooks.useQuery(TaxTypeListDocument, options); + return ApolloReactHooks.useQuery(TaxCountriesListDocument, options); } -export function useTaxTypeListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { +export function useTaxCountriesListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} - return ApolloReactHooks.useLazyQuery(TaxTypeListDocument, options); + return ApolloReactHooks.useLazyQuery(TaxCountriesListDocument, options); } -export type TaxTypeListQueryHookResult = ReturnType; -export type TaxTypeListLazyQueryHookResult = ReturnType; -export type TaxTypeListQueryResult = Apollo.QueryResult; +export type TaxCountriesListQueryHookResult = ReturnType; +export type TaxCountriesListLazyQueryHookResult = ReturnType; +export type TaxCountriesListQueryResult = Apollo.QueryResult; +export const TaxClassesListDocument = gql` + query TaxClassesList($before: String, $after: String, $first: Int, $last: Int, $filter: TaxClassFilterInput, $sortBy: TaxClassSortingInput) { + taxClasses( + before: $before + after: $after + first: $first + last: $last + filter: $filter + sortBy: $sortBy + ) { + edges { + node { + ...TaxClass + } + } + } +} + ${TaxClassFragmentDoc}`; + +/** + * __useTaxClassesListQuery__ + * + * To run a query within a React component, call `useTaxClassesListQuery` and pass it any options that fit your needs. + * When your component renders, `useTaxClassesListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useTaxClassesListQuery({ + * variables: { + * before: // value for 'before' + * after: // value for 'after' + * first: // value for 'first' + * last: // value for 'last' + * filter: // value for 'filter' + * sortBy: // value for 'sortBy' + * }, + * }); + */ +export function useTaxClassesListQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(TaxClassesListDocument, options); + } +export function useTaxClassesListLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(TaxClassesListDocument, options); + } +export type TaxClassesListQueryHookResult = ReturnType; +export type TaxClassesListLazyQueryHookResult = ReturnType; +export type TaxClassesListQueryResult = Apollo.QueryResult; +export const TaxClassAssignDocument = gql` + query TaxClassAssign($first: Int, $after: String) { + taxClasses(first: $first, after: $after) { + edges { + node { + id + name + } + } + pageInfo { + hasNextPage + endCursor + } + } +} + `; + +/** + * __useTaxClassAssignQuery__ + * + * To run a query within a React component, call `useTaxClassAssignQuery` and pass it any options that fit your needs. + * When your component renders, `useTaxClassAssignQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useTaxClassAssignQuery({ + * variables: { + * first: // value for 'first' + * after: // value for 'after' + * }, + * }); + */ +export function useTaxClassAssignQuery(baseOptions?: ApolloReactHooks.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useQuery(TaxClassAssignDocument, options); + } +export function useTaxClassAssignLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return ApolloReactHooks.useLazyQuery(TaxClassAssignDocument, options); + } +export type TaxClassAssignQueryHookResult = ReturnType; +export type TaxClassAssignLazyQueryHookResult = ReturnType; +export type TaxClassAssignQueryResult = Apollo.QueryResult; export const UpdateProductTranslationsDocument = gql` mutation UpdateProductTranslations($id: ID!, $input: TranslationInput!, $language: LanguageCodeEnum!) { productTranslate(id: $id, input: $input, languageCode: $language) { diff --git a/src/graphql/typePolicies.generated.ts b/src/graphql/typePolicies.generated.ts index a99063aa4..1ff690cd2 100644 --- a/src/graphql/typePolicies.generated.ts +++ b/src/graphql/typePolicies.generated.ts @@ -549,14 +549,15 @@ export type AttributeValueDeletedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, attributeValue?: FieldPolicy | FieldReadFunction }; -export type AttributeValueTranslatableContentKeySpecifier = ('id' | 'name' | 'richText' | 'plainText' | 'translation' | 'attributeValue' | AttributeValueTranslatableContentKeySpecifier)[]; +export type AttributeValueTranslatableContentKeySpecifier = ('id' | 'name' | 'richText' | 'plainText' | 'translation' | 'attributeValue' | 'attribute' | AttributeValueTranslatableContentKeySpecifier)[]; export type AttributeValueTranslatableContentFieldPolicy = { id?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction, richText?: FieldPolicy | FieldReadFunction, plainText?: FieldPolicy | FieldReadFunction, translation?: FieldPolicy | FieldReadFunction, - attributeValue?: FieldPolicy | FieldReadFunction + attributeValue?: FieldPolicy | FieldReadFunction, + attribute?: FieldPolicy | FieldReadFunction }; export type AttributeValueTranslateKeySpecifier = ('translationErrors' | 'errors' | 'attributeValue' | AttributeValueTranslateKeySpecifier)[]; export type AttributeValueTranslateFieldPolicy = { @@ -813,7 +814,7 @@ export type ChannelUpdatedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, channel?: FieldPolicy | FieldReadFunction }; -export type CheckoutKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'created' | 'lastChange' | 'user' | 'channel' | 'billingAddress' | 'shippingAddress' | 'note' | 'discount' | 'discountName' | 'translatedDiscountName' | 'voucherCode' | 'availableShippingMethods' | 'shippingMethods' | 'availableCollectionPoints' | 'availablePaymentGateways' | 'email' | 'giftCards' | 'isShippingRequired' | 'quantity' | 'stockReservationExpires' | 'lines' | 'shippingPrice' | 'shippingMethod' | 'deliveryMethod' | 'subtotalPrice' | 'taxExemption' | 'token' | 'totalPrice' | 'languageCode' | 'transactions' | CheckoutKeySpecifier)[]; +export type CheckoutKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'created' | 'lastChange' | 'user' | 'channel' | 'billingAddress' | 'shippingAddress' | 'note' | 'discount' | 'discountName' | 'translatedDiscountName' | 'voucherCode' | 'availableShippingMethods' | 'shippingMethods' | 'availableCollectionPoints' | 'availablePaymentGateways' | 'email' | 'giftCards' | 'isShippingRequired' | 'quantity' | 'stockReservationExpires' | 'lines' | 'shippingPrice' | 'shippingMethod' | 'deliveryMethod' | 'subtotalPrice' | 'taxExemption' | 'token' | 'totalPrice' | 'languageCode' | 'transactions' | 'displayGrossPrices' | CheckoutKeySpecifier)[]; export type CheckoutFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -851,7 +852,8 @@ export type CheckoutFieldPolicy = { token?: FieldPolicy | FieldReadFunction, totalPrice?: FieldPolicy | FieldReadFunction, languageCode?: FieldPolicy | FieldReadFunction, - transactions?: FieldPolicy | FieldReadFunction + transactions?: FieldPolicy | FieldReadFunction, + displayGrossPrices?: FieldPolicy | FieldReadFunction }; export type CheckoutAddPromoCodeKeySpecifier = ('checkout' | 'checkoutErrors' | 'errors' | CheckoutAddPromoCodeKeySpecifier)[]; export type CheckoutAddPromoCodeFieldPolicy = { @@ -2298,7 +2300,7 @@ export type MoneyRangeFieldPolicy = { start?: FieldPolicy | FieldReadFunction, stop?: FieldPolicy | FieldReadFunction }; -export type MutationKeySpecifier = ('webhookCreate' | 'webhookDelete' | 'webhookUpdate' | 'eventDeliveryRetry' | 'createWarehouse' | 'updateWarehouse' | 'deleteWarehouse' | 'assignWarehouseShippingZone' | 'unassignWarehouseShippingZone' | 'taxExemptionManage' | 'staffNotificationRecipientCreate' | 'staffNotificationRecipientUpdate' | 'staffNotificationRecipientDelete' | 'shopDomainUpdate' | 'shopSettingsUpdate' | 'shopFetchTaxRates' | 'shopSettingsTranslate' | 'shopAddressUpdate' | 'orderSettingsUpdate' | 'giftCardSettingsUpdate' | 'shippingMethodChannelListingUpdate' | 'shippingPriceCreate' | 'shippingPriceDelete' | 'shippingPriceBulkDelete' | 'shippingPriceUpdate' | 'shippingPriceTranslate' | 'shippingPriceExcludeProducts' | 'shippingPriceRemoveProductFromExclude' | 'shippingZoneCreate' | 'shippingZoneDelete' | 'shippingZoneBulkDelete' | 'shippingZoneUpdate' | 'productAttributeAssign' | 'productAttributeAssignmentUpdate' | 'productAttributeUnassign' | 'categoryCreate' | 'categoryDelete' | 'categoryBulkDelete' | 'categoryUpdate' | 'categoryTranslate' | 'collectionAddProducts' | 'collectionCreate' | 'collectionDelete' | 'collectionReorderProducts' | 'collectionBulkDelete' | 'collectionRemoveProducts' | 'collectionUpdate' | 'collectionTranslate' | 'collectionChannelListingUpdate' | 'productCreate' | 'productDelete' | 'productBulkDelete' | 'productUpdate' | 'productTranslate' | 'productChannelListingUpdate' | 'productMediaCreate' | 'productVariantReorder' | 'productMediaDelete' | 'productMediaBulkDelete' | 'productMediaReorder' | 'productMediaUpdate' | 'productTypeCreate' | 'productTypeDelete' | 'productTypeBulkDelete' | 'productTypeUpdate' | 'productTypeReorderAttributes' | 'productReorderAttributeValues' | 'digitalContentCreate' | 'digitalContentDelete' | 'digitalContentUpdate' | 'digitalContentUrlCreate' | 'productVariantCreate' | 'productVariantDelete' | 'productVariantBulkCreate' | 'productVariantBulkDelete' | 'productVariantStocksCreate' | 'productVariantStocksDelete' | 'productVariantStocksUpdate' | 'productVariantUpdate' | 'productVariantSetDefault' | 'productVariantTranslate' | 'productVariantChannelListingUpdate' | 'productVariantReorderAttributeValues' | 'productVariantPreorderDeactivate' | 'variantMediaAssign' | 'variantMediaUnassign' | 'paymentCapture' | 'paymentRefund' | 'paymentVoid' | 'paymentInitialize' | 'paymentCheckBalance' | 'transactionCreate' | 'transactionUpdate' | 'transactionRequestAction' | 'pageCreate' | 'pageDelete' | 'pageBulkDelete' | 'pageBulkPublish' | 'pageUpdate' | 'pageTranslate' | 'pageTypeCreate' | 'pageTypeUpdate' | 'pageTypeDelete' | 'pageTypeBulkDelete' | 'pageAttributeAssign' | 'pageAttributeUnassign' | 'pageTypeReorderAttributes' | 'pageReorderAttributeValues' | 'draftOrderComplete' | 'draftOrderCreate' | 'draftOrderDelete' | 'draftOrderBulkDelete' | 'draftOrderLinesBulkDelete' | 'draftOrderUpdate' | 'orderAddNote' | 'orderCancel' | 'orderCapture' | 'orderConfirm' | 'orderFulfill' | 'orderFulfillmentCancel' | 'orderFulfillmentApprove' | 'orderFulfillmentUpdateTracking' | 'orderFulfillmentRefundProducts' | 'orderFulfillmentReturnProducts' | 'orderLinesCreate' | 'orderLineDelete' | 'orderLineUpdate' | 'orderDiscountAdd' | 'orderDiscountUpdate' | 'orderDiscountDelete' | 'orderLineDiscountUpdate' | 'orderLineDiscountRemove' | 'orderMarkAsPaid' | 'orderRefund' | 'orderUpdate' | 'orderUpdateShipping' | 'orderVoid' | 'orderBulkCancel' | 'deleteMetadata' | 'deletePrivateMetadata' | 'updateMetadata' | 'updatePrivateMetadata' | 'assignNavigation' | 'menuCreate' | 'menuDelete' | 'menuBulkDelete' | 'menuUpdate' | 'menuItemCreate' | 'menuItemDelete' | 'menuItemBulkDelete' | 'menuItemUpdate' | 'menuItemTranslate' | 'menuItemMove' | 'invoiceRequest' | 'invoiceRequestDelete' | 'invoiceCreate' | 'invoiceDelete' | 'invoiceUpdate' | 'invoiceSendNotification' | 'giftCardActivate' | 'giftCardCreate' | 'giftCardDelete' | 'giftCardDeactivate' | 'giftCardUpdate' | 'giftCardResend' | 'giftCardAddNote' | 'giftCardBulkCreate' | 'giftCardBulkDelete' | 'giftCardBulkActivate' | 'giftCardBulkDeactivate' | 'pluginUpdate' | 'externalNotificationTrigger' | 'saleCreate' | 'saleDelete' | 'saleBulkDelete' | 'saleUpdate' | 'saleCataloguesAdd' | 'saleCataloguesRemove' | 'saleTranslate' | 'saleChannelListingUpdate' | 'voucherCreate' | 'voucherDelete' | 'voucherBulkDelete' | 'voucherUpdate' | 'voucherCataloguesAdd' | 'voucherCataloguesRemove' | 'voucherTranslate' | 'voucherChannelListingUpdate' | 'exportProducts' | 'exportGiftCards' | 'fileUpload' | 'checkoutAddPromoCode' | 'checkoutBillingAddressUpdate' | 'checkoutComplete' | 'checkoutCreate' | 'checkoutCustomerAttach' | 'checkoutCustomerDetach' | 'checkoutEmailUpdate' | 'checkoutLineDelete' | 'checkoutLinesDelete' | 'checkoutLinesAdd' | 'checkoutLinesUpdate' | 'checkoutRemovePromoCode' | 'checkoutPaymentCreate' | 'checkoutShippingAddressUpdate' | 'checkoutShippingMethodUpdate' | 'checkoutDeliveryMethodUpdate' | 'checkoutLanguageCodeUpdate' | 'orderCreateFromCheckout' | 'channelCreate' | 'channelUpdate' | 'channelDelete' | 'channelActivate' | 'channelDeactivate' | 'channelReorderWarehouses' | 'attributeCreate' | 'attributeDelete' | 'attributeUpdate' | 'attributeTranslate' | 'attributeBulkDelete' | 'attributeValueBulkDelete' | 'attributeValueCreate' | 'attributeValueDelete' | 'attributeValueUpdate' | 'attributeValueTranslate' | 'attributeReorderValues' | 'appCreate' | 'appUpdate' | 'appDelete' | 'appTokenCreate' | 'appTokenDelete' | 'appTokenVerify' | 'appInstall' | 'appRetryInstall' | 'appDeleteFailedInstallation' | 'appFetchManifest' | 'appActivate' | 'appDeactivate' | 'tokenCreate' | 'tokenRefresh' | 'tokenVerify' | 'tokensDeactivateAll' | 'externalAuthenticationUrl' | 'externalObtainAccessTokens' | 'externalRefresh' | 'externalLogout' | 'externalVerify' | 'requestPasswordReset' | 'confirmAccount' | 'setPassword' | 'passwordChange' | 'requestEmailChange' | 'confirmEmailChange' | 'accountAddressCreate' | 'accountAddressUpdate' | 'accountAddressDelete' | 'accountSetDefaultAddress' | 'accountRegister' | 'accountUpdate' | 'accountRequestDeletion' | 'accountDelete' | 'addressCreate' | 'addressUpdate' | 'addressDelete' | 'addressSetDefault' | 'customerCreate' | 'customerUpdate' | 'customerDelete' | 'customerBulkDelete' | 'staffCreate' | 'staffUpdate' | 'staffDelete' | 'staffBulkDelete' | 'userAvatarUpdate' | 'userAvatarDelete' | 'userBulkSetActive' | 'permissionGroupCreate' | 'permissionGroupUpdate' | 'permissionGroupDelete' | MutationKeySpecifier)[]; +export type MutationKeySpecifier = ('webhookCreate' | 'webhookDelete' | 'webhookUpdate' | 'eventDeliveryRetry' | 'createWarehouse' | 'updateWarehouse' | 'deleteWarehouse' | 'assignWarehouseShippingZone' | 'unassignWarehouseShippingZone' | 'taxClassCreate' | 'taxClassDelete' | 'taxClassUpdate' | 'taxConfigurationUpdate' | 'taxCountryConfigurationUpdate' | 'taxCountryConfigurationDelete' | 'taxExemptionManage' | 'staffNotificationRecipientCreate' | 'staffNotificationRecipientUpdate' | 'staffNotificationRecipientDelete' | 'shopDomainUpdate' | 'shopSettingsUpdate' | 'shopFetchTaxRates' | 'shopSettingsTranslate' | 'shopAddressUpdate' | 'orderSettingsUpdate' | 'giftCardSettingsUpdate' | 'shippingMethodChannelListingUpdate' | 'shippingPriceCreate' | 'shippingPriceDelete' | 'shippingPriceBulkDelete' | 'shippingPriceUpdate' | 'shippingPriceTranslate' | 'shippingPriceExcludeProducts' | 'shippingPriceRemoveProductFromExclude' | 'shippingZoneCreate' | 'shippingZoneDelete' | 'shippingZoneBulkDelete' | 'shippingZoneUpdate' | 'productAttributeAssign' | 'productAttributeAssignmentUpdate' | 'productAttributeUnassign' | 'categoryCreate' | 'categoryDelete' | 'categoryBulkDelete' | 'categoryUpdate' | 'categoryTranslate' | 'collectionAddProducts' | 'collectionCreate' | 'collectionDelete' | 'collectionReorderProducts' | 'collectionBulkDelete' | 'collectionRemoveProducts' | 'collectionUpdate' | 'collectionTranslate' | 'collectionChannelListingUpdate' | 'productCreate' | 'productDelete' | 'productBulkDelete' | 'productUpdate' | 'productTranslate' | 'productChannelListingUpdate' | 'productMediaCreate' | 'productVariantReorder' | 'productMediaDelete' | 'productMediaBulkDelete' | 'productMediaReorder' | 'productMediaUpdate' | 'productTypeCreate' | 'productTypeDelete' | 'productTypeBulkDelete' | 'productTypeUpdate' | 'productTypeReorderAttributes' | 'productReorderAttributeValues' | 'digitalContentCreate' | 'digitalContentDelete' | 'digitalContentUpdate' | 'digitalContentUrlCreate' | 'productVariantCreate' | 'productVariantDelete' | 'productVariantBulkCreate' | 'productVariantBulkDelete' | 'productVariantStocksCreate' | 'productVariantStocksDelete' | 'productVariantStocksUpdate' | 'productVariantUpdate' | 'productVariantSetDefault' | 'productVariantTranslate' | 'productVariantChannelListingUpdate' | 'productVariantReorderAttributeValues' | 'productVariantPreorderDeactivate' | 'variantMediaAssign' | 'variantMediaUnassign' | 'paymentCapture' | 'paymentRefund' | 'paymentVoid' | 'paymentInitialize' | 'paymentCheckBalance' | 'transactionCreate' | 'transactionUpdate' | 'transactionRequestAction' | 'pageCreate' | 'pageDelete' | 'pageBulkDelete' | 'pageBulkPublish' | 'pageUpdate' | 'pageTranslate' | 'pageTypeCreate' | 'pageTypeUpdate' | 'pageTypeDelete' | 'pageTypeBulkDelete' | 'pageAttributeAssign' | 'pageAttributeUnassign' | 'pageTypeReorderAttributes' | 'pageReorderAttributeValues' | 'draftOrderComplete' | 'draftOrderCreate' | 'draftOrderDelete' | 'draftOrderBulkDelete' | 'draftOrderLinesBulkDelete' | 'draftOrderUpdate' | 'orderAddNote' | 'orderCancel' | 'orderCapture' | 'orderConfirm' | 'orderFulfill' | 'orderFulfillmentCancel' | 'orderFulfillmentApprove' | 'orderFulfillmentUpdateTracking' | 'orderFulfillmentRefundProducts' | 'orderFulfillmentReturnProducts' | 'orderLinesCreate' | 'orderLineDelete' | 'orderLineUpdate' | 'orderDiscountAdd' | 'orderDiscountUpdate' | 'orderDiscountDelete' | 'orderLineDiscountUpdate' | 'orderLineDiscountRemove' | 'orderMarkAsPaid' | 'orderRefund' | 'orderUpdate' | 'orderUpdateShipping' | 'orderVoid' | 'orderBulkCancel' | 'deleteMetadata' | 'deletePrivateMetadata' | 'updateMetadata' | 'updatePrivateMetadata' | 'assignNavigation' | 'menuCreate' | 'menuDelete' | 'menuBulkDelete' | 'menuUpdate' | 'menuItemCreate' | 'menuItemDelete' | 'menuItemBulkDelete' | 'menuItemUpdate' | 'menuItemTranslate' | 'menuItemMove' | 'invoiceRequest' | 'invoiceRequestDelete' | 'invoiceCreate' | 'invoiceDelete' | 'invoiceUpdate' | 'invoiceSendNotification' | 'giftCardActivate' | 'giftCardCreate' | 'giftCardDelete' | 'giftCardDeactivate' | 'giftCardUpdate' | 'giftCardResend' | 'giftCardAddNote' | 'giftCardBulkCreate' | 'giftCardBulkDelete' | 'giftCardBulkActivate' | 'giftCardBulkDeactivate' | 'pluginUpdate' | 'externalNotificationTrigger' | 'saleCreate' | 'saleDelete' | 'saleBulkDelete' | 'saleUpdate' | 'saleCataloguesAdd' | 'saleCataloguesRemove' | 'saleTranslate' | 'saleChannelListingUpdate' | 'voucherCreate' | 'voucherDelete' | 'voucherBulkDelete' | 'voucherUpdate' | 'voucherCataloguesAdd' | 'voucherCataloguesRemove' | 'voucherTranslate' | 'voucherChannelListingUpdate' | 'exportProducts' | 'exportGiftCards' | 'fileUpload' | 'checkoutAddPromoCode' | 'checkoutBillingAddressUpdate' | 'checkoutComplete' | 'checkoutCreate' | 'checkoutCustomerAttach' | 'checkoutCustomerDetach' | 'checkoutEmailUpdate' | 'checkoutLineDelete' | 'checkoutLinesDelete' | 'checkoutLinesAdd' | 'checkoutLinesUpdate' | 'checkoutRemovePromoCode' | 'checkoutPaymentCreate' | 'checkoutShippingAddressUpdate' | 'checkoutShippingMethodUpdate' | 'checkoutDeliveryMethodUpdate' | 'checkoutLanguageCodeUpdate' | 'orderCreateFromCheckout' | 'channelCreate' | 'channelUpdate' | 'channelDelete' | 'channelActivate' | 'channelDeactivate' | 'channelReorderWarehouses' | 'attributeCreate' | 'attributeDelete' | 'attributeUpdate' | 'attributeTranslate' | 'attributeBulkDelete' | 'attributeValueBulkDelete' | 'attributeValueCreate' | 'attributeValueDelete' | 'attributeValueUpdate' | 'attributeValueTranslate' | 'attributeReorderValues' | 'appCreate' | 'appUpdate' | 'appDelete' | 'appTokenCreate' | 'appTokenDelete' | 'appTokenVerify' | 'appInstall' | 'appRetryInstall' | 'appDeleteFailedInstallation' | 'appFetchManifest' | 'appActivate' | 'appDeactivate' | 'tokenCreate' | 'tokenRefresh' | 'tokenVerify' | 'tokensDeactivateAll' | 'externalAuthenticationUrl' | 'externalObtainAccessTokens' | 'externalRefresh' | 'externalLogout' | 'externalVerify' | 'requestPasswordReset' | 'confirmAccount' | 'setPassword' | 'passwordChange' | 'requestEmailChange' | 'confirmEmailChange' | 'accountAddressCreate' | 'accountAddressUpdate' | 'accountAddressDelete' | 'accountSetDefaultAddress' | 'accountRegister' | 'accountUpdate' | 'accountRequestDeletion' | 'accountDelete' | 'addressCreate' | 'addressUpdate' | 'addressDelete' | 'addressSetDefault' | 'customerCreate' | 'customerUpdate' | 'customerDelete' | 'customerBulkDelete' | 'staffCreate' | 'staffUpdate' | 'staffDelete' | 'staffBulkDelete' | 'userAvatarUpdate' | 'userAvatarDelete' | 'userBulkSetActive' | 'permissionGroupCreate' | 'permissionGroupUpdate' | 'permissionGroupDelete' | MutationKeySpecifier)[]; export type MutationFieldPolicy = { webhookCreate?: FieldPolicy | FieldReadFunction, webhookDelete?: FieldPolicy | FieldReadFunction, @@ -2309,6 +2311,12 @@ export type MutationFieldPolicy = { deleteWarehouse?: FieldPolicy | FieldReadFunction, assignWarehouseShippingZone?: FieldPolicy | FieldReadFunction, unassignWarehouseShippingZone?: FieldPolicy | FieldReadFunction, + taxClassCreate?: FieldPolicy | FieldReadFunction, + taxClassDelete?: FieldPolicy | FieldReadFunction, + taxClassUpdate?: FieldPolicy | FieldReadFunction, + taxConfigurationUpdate?: FieldPolicy | FieldReadFunction, + taxCountryConfigurationUpdate?: FieldPolicy | FieldReadFunction, + taxCountryConfigurationDelete?: FieldPolicy | FieldReadFunction, taxExemptionManage?: FieldPolicy | FieldReadFunction, staffNotificationRecipientCreate?: FieldPolicy | FieldReadFunction, staffNotificationRecipientUpdate?: FieldPolicy | FieldReadFunction, @@ -2593,7 +2601,7 @@ export type ObjectWithMetadataFieldPolicy = { metafield?: FieldPolicy | FieldReadFunction, metafields?: FieldPolicy | FieldReadFunction }; -export type OrderKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'created' | 'updatedAt' | 'status' | 'user' | 'trackingClientId' | 'billingAddress' | 'shippingAddress' | 'shippingMethodName' | 'collectionPointName' | 'channel' | 'fulfillments' | 'lines' | 'actions' | 'availableShippingMethods' | 'shippingMethods' | 'availableCollectionPoints' | 'invoices' | 'number' | 'original' | 'origin' | 'isPaid' | 'paymentStatus' | 'paymentStatusDisplay' | 'authorizeStatus' | 'chargeStatus' | 'taxExemption' | 'transactions' | 'payments' | 'total' | 'undiscountedTotal' | 'shippingMethod' | 'shippingPrice' | 'shippingTaxRate' | 'token' | 'voucher' | 'giftCards' | 'displayGrossPrices' | 'customerNote' | 'weight' | 'redirectUrl' | 'subtotal' | 'statusDisplay' | 'canFinalize' | 'totalAuthorized' | 'totalCaptured' | 'events' | 'totalBalance' | 'userEmail' | 'isShippingRequired' | 'deliveryMethod' | 'languageCode' | 'languageCodeEnum' | 'discount' | 'discountName' | 'translatedDiscountName' | 'discounts' | 'errors' | OrderKeySpecifier)[]; +export type OrderKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'created' | 'updatedAt' | 'status' | 'user' | 'trackingClientId' | 'billingAddress' | 'shippingAddress' | 'shippingMethodName' | 'collectionPointName' | 'channel' | 'fulfillments' | 'lines' | 'actions' | 'availableShippingMethods' | 'shippingMethods' | 'availableCollectionPoints' | 'invoices' | 'number' | 'original' | 'origin' | 'isPaid' | 'paymentStatus' | 'paymentStatusDisplay' | 'authorizeStatus' | 'chargeStatus' | 'taxExemption' | 'transactions' | 'payments' | 'total' | 'undiscountedTotal' | 'shippingMethod' | 'shippingPrice' | 'shippingTaxRate' | 'shippingTaxClass' | 'shippingTaxClassName' | 'shippingTaxClassMetadata' | 'shippingTaxClassPrivateMetadata' | 'token' | 'voucher' | 'giftCards' | 'customerNote' | 'weight' | 'redirectUrl' | 'subtotal' | 'statusDisplay' | 'canFinalize' | 'totalAuthorized' | 'totalCaptured' | 'events' | 'totalBalance' | 'userEmail' | 'isShippingRequired' | 'deliveryMethod' | 'languageCode' | 'languageCodeEnum' | 'discount' | 'discountName' | 'translatedDiscountName' | 'discounts' | 'errors' | 'displayGrossPrices' | OrderKeySpecifier)[]; export type OrderFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -2635,10 +2643,13 @@ export type OrderFieldPolicy = { shippingMethod?: FieldPolicy | FieldReadFunction, shippingPrice?: FieldPolicy | FieldReadFunction, shippingTaxRate?: FieldPolicy | FieldReadFunction, + shippingTaxClass?: FieldPolicy | FieldReadFunction, + shippingTaxClassName?: FieldPolicy | FieldReadFunction, + shippingTaxClassMetadata?: FieldPolicy | FieldReadFunction, + shippingTaxClassPrivateMetadata?: FieldPolicy | FieldReadFunction, token?: FieldPolicy | FieldReadFunction, voucher?: FieldPolicy | FieldReadFunction, giftCards?: FieldPolicy | FieldReadFunction, - displayGrossPrices?: FieldPolicy | FieldReadFunction, customerNote?: FieldPolicy | FieldReadFunction, weight?: FieldPolicy | FieldReadFunction, redirectUrl?: FieldPolicy | FieldReadFunction, @@ -2658,7 +2669,8 @@ export type OrderFieldPolicy = { discountName?: FieldPolicy | FieldReadFunction, translatedDiscountName?: FieldPolicy | FieldReadFunction, discounts?: FieldPolicy | FieldReadFunction, - errors?: FieldPolicy | FieldReadFunction + errors?: FieldPolicy | FieldReadFunction, + displayGrossPrices?: FieldPolicy | FieldReadFunction }; export type OrderAddNoteKeySpecifier = ('order' | 'event' | 'orderErrors' | 'errors' | OrderAddNoteKeySpecifier)[]; export type OrderAddNoteFieldPolicy = { @@ -2866,7 +2878,7 @@ export type OrderFullyPaidFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, order?: FieldPolicy | FieldReadFunction }; -export type OrderLineKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'productName' | 'variantName' | 'productSku' | 'productVariantId' | 'isShippingRequired' | 'quantity' | 'quantityFulfilled' | 'unitDiscountReason' | 'taxRate' | 'digitalContentUrl' | 'thumbnail' | 'unitPrice' | 'undiscountedUnitPrice' | 'unitDiscount' | 'unitDiscountValue' | 'totalPrice' | 'variant' | 'translatedProductName' | 'translatedVariantName' | 'allocations' | 'quantityToFulfill' | 'unitDiscountType' | OrderLineKeySpecifier)[]; +export type OrderLineKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'productName' | 'variantName' | 'productSku' | 'productVariantId' | 'isShippingRequired' | 'quantity' | 'quantityFulfilled' | 'unitDiscountReason' | 'taxRate' | 'digitalContentUrl' | 'thumbnail' | 'unitPrice' | 'undiscountedUnitPrice' | 'unitDiscount' | 'unitDiscountValue' | 'totalPrice' | 'variant' | 'translatedProductName' | 'translatedVariantName' | 'allocations' | 'quantityToFulfill' | 'unitDiscountType' | 'taxClass' | 'taxClassName' | 'taxClassMetadata' | 'taxClassPrivateMetadata' | OrderLineKeySpecifier)[]; export type OrderLineFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -2896,7 +2908,11 @@ export type OrderLineFieldPolicy = { translatedVariantName?: FieldPolicy | FieldReadFunction, allocations?: FieldPolicy | FieldReadFunction, quantityToFulfill?: FieldPolicy | FieldReadFunction, - unitDiscountType?: FieldPolicy | FieldReadFunction + unitDiscountType?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction, + taxClassName?: FieldPolicy | FieldReadFunction, + taxClassMetadata?: FieldPolicy | FieldReadFunction, + taxClassPrivateMetadata?: FieldPolicy | FieldReadFunction }; export type OrderLineDeleteKeySpecifier = ('order' | 'orderLine' | 'orderErrors' | 'errors' | OrderLineDeleteKeySpecifier)[]; export type OrderLineDeleteFieldPolicy = { @@ -3485,7 +3501,7 @@ export type PreorderThresholdFieldPolicy = { quantity?: FieldPolicy | FieldReadFunction, soldUnits?: FieldPolicy | FieldReadFunction }; -export type ProductKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'seoTitle' | 'seoDescription' | 'name' | 'description' | 'productType' | 'slug' | 'category' | 'created' | 'updatedAt' | 'chargeTaxes' | 'weight' | 'defaultVariant' | 'rating' | 'channel' | 'descriptionJson' | 'thumbnail' | 'pricing' | 'isAvailable' | 'taxType' | 'attributes' | 'channelListings' | 'mediaById' | 'imageById' | 'variants' | 'media' | 'images' | 'collections' | 'translation' | 'availableForPurchase' | 'availableForPurchaseAt' | 'isAvailableForPurchase' | ProductKeySpecifier)[]; +export type ProductKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'seoTitle' | 'seoDescription' | 'name' | 'description' | 'productType' | 'slug' | 'category' | 'created' | 'updatedAt' | 'chargeTaxes' | 'weight' | 'defaultVariant' | 'rating' | 'channel' | 'descriptionJson' | 'thumbnail' | 'pricing' | 'isAvailable' | 'taxType' | 'attributes' | 'channelListings' | 'mediaById' | 'imageById' | 'variants' | 'media' | 'images' | 'collections' | 'translation' | 'availableForPurchase' | 'availableForPurchaseAt' | 'isAvailableForPurchase' | 'taxClass' | ProductKeySpecifier)[]; export type ProductFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -3524,7 +3540,8 @@ export type ProductFieldPolicy = { translation?: FieldPolicy | FieldReadFunction, availableForPurchase?: FieldPolicy | FieldReadFunction, availableForPurchaseAt?: FieldPolicy | FieldReadFunction, - isAvailableForPurchase?: FieldPolicy | FieldReadFunction + isAvailableForPurchase?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction }; export type ProductAttributeAssignKeySpecifier = ('productType' | 'productErrors' | 'errors' | ProductAttributeAssignKeySpecifier)[]; export type ProductAttributeAssignFieldPolicy = { @@ -3690,14 +3707,15 @@ export type ProductMetadataUpdatedFieldPolicy = { product?: FieldPolicy | FieldReadFunction, category?: FieldPolicy | FieldReadFunction }; -export type ProductPricingInfoKeySpecifier = ('onSale' | 'discount' | 'discountLocalCurrency' | 'priceRange' | 'priceRangeUndiscounted' | 'priceRangeLocalCurrency' | ProductPricingInfoKeySpecifier)[]; +export type ProductPricingInfoKeySpecifier = ('onSale' | 'discount' | 'discountLocalCurrency' | 'priceRange' | 'priceRangeUndiscounted' | 'priceRangeLocalCurrency' | 'displayGrossPrices' | ProductPricingInfoKeySpecifier)[]; export type ProductPricingInfoFieldPolicy = { onSale?: FieldPolicy | FieldReadFunction, discount?: FieldPolicy | FieldReadFunction, discountLocalCurrency?: FieldPolicy | FieldReadFunction, priceRange?: FieldPolicy | FieldReadFunction, priceRangeUndiscounted?: FieldPolicy | FieldReadFunction, - priceRangeLocalCurrency?: FieldPolicy | FieldReadFunction + priceRangeLocalCurrency?: FieldPolicy | FieldReadFunction, + displayGrossPrices?: FieldPolicy | FieldReadFunction }; export type ProductReorderAttributeValuesKeySpecifier = ('product' | 'productErrors' | 'errors' | ProductReorderAttributeValuesKeySpecifier)[]; export type ProductReorderAttributeValuesFieldPolicy = { @@ -3733,7 +3751,7 @@ export type ProductTranslationFieldPolicy = { description?: FieldPolicy | FieldReadFunction, descriptionJson?: FieldPolicy | FieldReadFunction }; -export type ProductTypeKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'name' | 'slug' | 'hasVariants' | 'isShippingRequired' | 'isDigital' | 'weight' | 'kind' | 'products' | 'taxType' | 'variantAttributes' | 'assignedVariantAttributes' | 'productAttributes' | 'availableAttributes' | ProductTypeKeySpecifier)[]; +export type ProductTypeKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'name' | 'slug' | 'hasVariants' | 'isShippingRequired' | 'isDigital' | 'weight' | 'kind' | 'products' | 'taxType' | 'taxClass' | 'variantAttributes' | 'assignedVariantAttributes' | 'productAttributes' | 'availableAttributes' | ProductTypeKeySpecifier)[]; export type ProductTypeFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -3751,6 +3769,7 @@ export type ProductTypeFieldPolicy = { kind?: FieldPolicy | FieldReadFunction, products?: FieldPolicy | FieldReadFunction, taxType?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction, variantAttributes?: FieldPolicy | FieldReadFunction, assignedVariantAttributes?: FieldPolicy | FieldReadFunction, productAttributes?: FieldPolicy | FieldReadFunction, @@ -4012,7 +4031,7 @@ export type ProductVariantUpdatedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, productVariant?: FieldPolicy | FieldReadFunction }; -export type QueryKeySpecifier = ('webhook' | 'webhookEvents' | 'webhookSamplePayload' | 'warehouse' | 'warehouses' | 'translations' | 'translation' | 'stock' | 'stocks' | 'shop' | 'orderSettings' | 'giftCardSettings' | 'shippingZone' | 'shippingZones' | 'digitalContent' | 'digitalContents' | 'categories' | 'category' | 'collection' | 'collections' | 'product' | 'products' | 'productType' | 'productTypes' | 'productVariant' | 'productVariants' | 'reportProductSales' | 'payment' | 'payments' | 'transaction' | 'page' | 'pages' | 'pageType' | 'pageTypes' | 'homepageEvents' | 'order' | 'orders' | 'draftOrders' | 'ordersTotal' | 'orderByToken' | 'menu' | 'menus' | 'menuItem' | 'menuItems' | 'giftCard' | 'giftCards' | 'giftCardCurrencies' | 'giftCardTags' | 'plugin' | 'plugins' | 'sale' | 'sales' | 'voucher' | 'vouchers' | 'exportFile' | 'exportFiles' | 'taxTypes' | 'checkout' | 'checkouts' | 'checkoutLines' | 'channel' | 'channels' | 'attributes' | 'attribute' | 'appsInstallations' | 'apps' | 'app' | 'appExtensions' | 'appExtension' | 'addressValidationRules' | 'address' | 'customers' | 'permissionGroups' | 'permissionGroup' | 'me' | 'staffUsers' | 'user' | '_entities' | '_service' | QueryKeySpecifier)[]; +export type QueryKeySpecifier = ('webhook' | 'webhookEvents' | 'webhookSamplePayload' | 'warehouse' | 'warehouses' | 'translations' | 'translation' | 'taxConfiguration' | 'taxConfigurations' | 'taxClass' | 'taxClasses' | 'taxCountryConfiguration' | 'taxCountryConfigurations' | 'stock' | 'stocks' | 'shop' | 'orderSettings' | 'giftCardSettings' | 'shippingZone' | 'shippingZones' | 'digitalContent' | 'digitalContents' | 'categories' | 'category' | 'collection' | 'collections' | 'product' | 'products' | 'productType' | 'productTypes' | 'productVariant' | 'productVariants' | 'reportProductSales' | 'payment' | 'payments' | 'transaction' | 'page' | 'pages' | 'pageType' | 'pageTypes' | 'homepageEvents' | 'order' | 'orders' | 'draftOrders' | 'ordersTotal' | 'orderByToken' | 'menu' | 'menus' | 'menuItem' | 'menuItems' | 'giftCard' | 'giftCards' | 'giftCardCurrencies' | 'giftCardTags' | 'plugin' | 'plugins' | 'sale' | 'sales' | 'voucher' | 'vouchers' | 'exportFile' | 'exportFiles' | 'taxTypes' | 'checkout' | 'checkouts' | 'checkoutLines' | 'channel' | 'channels' | 'attributes' | 'attribute' | 'appsInstallations' | 'apps' | 'app' | 'appExtensions' | 'appExtension' | 'addressValidationRules' | 'address' | 'customers' | 'permissionGroups' | 'permissionGroup' | 'me' | 'staffUsers' | 'user' | '_entities' | '_service' | QueryKeySpecifier)[]; export type QueryFieldPolicy = { webhook?: FieldPolicy | FieldReadFunction, webhookEvents?: FieldPolicy | FieldReadFunction, @@ -4021,6 +4040,12 @@ export type QueryFieldPolicy = { warehouses?: FieldPolicy | FieldReadFunction, translations?: FieldPolicy | FieldReadFunction, translation?: FieldPolicy | FieldReadFunction, + taxConfiguration?: FieldPolicy | FieldReadFunction, + taxConfigurations?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction, + taxClasses?: FieldPolicy | FieldReadFunction, + taxCountryConfiguration?: FieldPolicy | FieldReadFunction, + taxCountryConfigurations?: FieldPolicy | FieldReadFunction, stock?: FieldPolicy | FieldReadFunction, stocks?: FieldPolicy | FieldReadFunction, shop?: FieldPolicy | FieldReadFunction, @@ -4342,7 +4367,7 @@ export type ShippingMethodTranslationFieldPolicy = { name?: FieldPolicy | FieldReadFunction, description?: FieldPolicy | FieldReadFunction }; -export type ShippingMethodTypeKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'name' | 'description' | 'type' | 'translation' | 'channelListings' | 'maximumOrderPrice' | 'minimumOrderPrice' | 'postalCodeRules' | 'excludedProducts' | 'minimumOrderWeight' | 'maximumOrderWeight' | 'maximumDeliveryDays' | 'minimumDeliveryDays' | ShippingMethodTypeKeySpecifier)[]; +export type ShippingMethodTypeKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'name' | 'description' | 'type' | 'translation' | 'channelListings' | 'maximumOrderPrice' | 'minimumOrderPrice' | 'postalCodeRules' | 'excludedProducts' | 'minimumOrderWeight' | 'maximumOrderWeight' | 'maximumDeliveryDays' | 'minimumDeliveryDays' | 'taxClass' | ShippingMethodTypeKeySpecifier)[]; export type ShippingMethodTypeFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -4363,7 +4388,8 @@ export type ShippingMethodTypeFieldPolicy = { minimumOrderWeight?: FieldPolicy | FieldReadFunction, maximumOrderWeight?: FieldPolicy | FieldReadFunction, maximumDeliveryDays?: FieldPolicy | FieldReadFunction, - minimumDeliveryDays?: FieldPolicy | FieldReadFunction + minimumDeliveryDays?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction }; export type ShippingMethodsPerCountryKeySpecifier = ('countryCode' | 'shippingMethods' | ShippingMethodsPerCountryKeySpecifier)[]; export type ShippingMethodsPerCountryFieldPolicy = { @@ -4527,7 +4553,7 @@ export type ShippingZoneUpdatedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, shippingZone?: FieldPolicy | FieldReadFunction }; -export type ShopKeySpecifier = ('availablePaymentGateways' | 'availableExternalAuthentications' | 'availableShippingMethods' | 'channelCurrencies' | 'countries' | 'defaultCountry' | 'defaultMailSenderName' | 'defaultMailSenderAddress' | 'description' | 'domain' | 'languages' | 'name' | 'permissions' | 'phonePrefixes' | 'headerText' | 'includeTaxesInPrices' | 'fulfillmentAutoApprove' | 'fulfillmentAllowUnpaid' | 'displayGrossPrices' | 'chargeTaxesOnShipping' | 'trackInventoryByDefault' | 'defaultWeightUnit' | 'translation' | 'automaticFulfillmentDigitalProducts' | 'reserveStockDurationAnonymousUser' | 'reserveStockDurationAuthenticatedUser' | 'limitQuantityPerCheckout' | 'defaultDigitalMaxDownloads' | 'defaultDigitalUrlValidDays' | 'companyAddress' | 'customerSetPasswordUrl' | 'staffNotificationRecipients' | 'limits' | 'version' | ShopKeySpecifier)[]; +export type ShopKeySpecifier = ('availablePaymentGateways' | 'availableExternalAuthentications' | 'availableShippingMethods' | 'channelCurrencies' | 'countries' | 'defaultCountry' | 'defaultMailSenderName' | 'defaultMailSenderAddress' | 'description' | 'domain' | 'languages' | 'name' | 'permissions' | 'phonePrefixes' | 'headerText' | 'fulfillmentAutoApprove' | 'fulfillmentAllowUnpaid' | 'trackInventoryByDefault' | 'defaultWeightUnit' | 'translation' | 'automaticFulfillmentDigitalProducts' | 'reserveStockDurationAnonymousUser' | 'reserveStockDurationAuthenticatedUser' | 'limitQuantityPerCheckout' | 'defaultDigitalMaxDownloads' | 'defaultDigitalUrlValidDays' | 'companyAddress' | 'customerSetPasswordUrl' | 'staffNotificationRecipients' | 'limits' | 'version' | 'includeTaxesInPrices' | 'displayGrossPrices' | 'chargeTaxesOnShipping' | ShopKeySpecifier)[]; export type ShopFieldPolicy = { availablePaymentGateways?: FieldPolicy | FieldReadFunction, availableExternalAuthentications?: FieldPolicy | FieldReadFunction, @@ -4544,11 +4570,8 @@ export type ShopFieldPolicy = { permissions?: FieldPolicy | FieldReadFunction, phonePrefixes?: FieldPolicy | FieldReadFunction, headerText?: FieldPolicy | FieldReadFunction, - includeTaxesInPrices?: FieldPolicy | FieldReadFunction, fulfillmentAutoApprove?: FieldPolicy | FieldReadFunction, fulfillmentAllowUnpaid?: FieldPolicy | FieldReadFunction, - displayGrossPrices?: FieldPolicy | FieldReadFunction, - chargeTaxesOnShipping?: FieldPolicy | FieldReadFunction, trackInventoryByDefault?: FieldPolicy | FieldReadFunction, defaultWeightUnit?: FieldPolicy | FieldReadFunction, translation?: FieldPolicy | FieldReadFunction, @@ -4562,7 +4585,10 @@ export type ShopFieldPolicy = { customerSetPasswordUrl?: FieldPolicy | FieldReadFunction, staffNotificationRecipients?: FieldPolicy | FieldReadFunction, limits?: FieldPolicy | FieldReadFunction, - version?: FieldPolicy | FieldReadFunction + version?: FieldPolicy | FieldReadFunction, + includeTaxesInPrices?: FieldPolicy | FieldReadFunction, + displayGrossPrices?: FieldPolicy | FieldReadFunction, + chargeTaxesOnShipping?: FieldPolicy | FieldReadFunction }; export type ShopAddressUpdateKeySpecifier = ('shop' | 'shopErrors' | 'errors' | ShopAddressUpdateKeySpecifier)[]; export type ShopAddressUpdateFieldPolicy = { @@ -4724,6 +4750,144 @@ export type SubscriptionKeySpecifier = ('event' | SubscriptionKeySpecifier)[]; export type SubscriptionFieldPolicy = { event?: FieldPolicy | FieldReadFunction }; +export type TaxClassKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'name' | 'countries' | TaxClassKeySpecifier)[]; +export type TaxClassFieldPolicy = { + id?: FieldPolicy | FieldReadFunction, + privateMetadata?: FieldPolicy | FieldReadFunction, + privateMetafield?: FieldPolicy | FieldReadFunction, + privateMetafields?: FieldPolicy | FieldReadFunction, + metadata?: FieldPolicy | FieldReadFunction, + metafield?: FieldPolicy | FieldReadFunction, + metafields?: FieldPolicy | FieldReadFunction, + name?: FieldPolicy | FieldReadFunction, + countries?: FieldPolicy | FieldReadFunction +}; +export type TaxClassCountableConnectionKeySpecifier = ('pageInfo' | 'edges' | 'totalCount' | TaxClassCountableConnectionKeySpecifier)[]; +export type TaxClassCountableConnectionFieldPolicy = { + pageInfo?: FieldPolicy | FieldReadFunction, + edges?: FieldPolicy | FieldReadFunction, + totalCount?: FieldPolicy | FieldReadFunction +}; +export type TaxClassCountableEdgeKeySpecifier = ('node' | 'cursor' | TaxClassCountableEdgeKeySpecifier)[]; +export type TaxClassCountableEdgeFieldPolicy = { + node?: FieldPolicy | FieldReadFunction, + cursor?: FieldPolicy | FieldReadFunction +}; +export type TaxClassCountryRateKeySpecifier = ('country' | 'rate' | 'taxClass' | TaxClassCountryRateKeySpecifier)[]; +export type TaxClassCountryRateFieldPolicy = { + country?: FieldPolicy | FieldReadFunction, + rate?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction +}; +export type TaxClassCreateKeySpecifier = ('errors' | 'taxClass' | TaxClassCreateKeySpecifier)[]; +export type TaxClassCreateFieldPolicy = { + errors?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction +}; +export type TaxClassCreateErrorKeySpecifier = ('field' | 'message' | 'code' | 'countryCodes' | TaxClassCreateErrorKeySpecifier)[]; +export type TaxClassCreateErrorFieldPolicy = { + field?: FieldPolicy | FieldReadFunction, + message?: FieldPolicy | FieldReadFunction, + code?: FieldPolicy | FieldReadFunction, + countryCodes?: FieldPolicy | FieldReadFunction +}; +export type TaxClassDeleteKeySpecifier = ('errors' | 'taxClass' | TaxClassDeleteKeySpecifier)[]; +export type TaxClassDeleteFieldPolicy = { + errors?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction +}; +export type TaxClassDeleteErrorKeySpecifier = ('field' | 'message' | 'code' | TaxClassDeleteErrorKeySpecifier)[]; +export type TaxClassDeleteErrorFieldPolicy = { + field?: FieldPolicy | FieldReadFunction, + message?: FieldPolicy | FieldReadFunction, + code?: FieldPolicy | FieldReadFunction +}; +export type TaxClassUpdateKeySpecifier = ('errors' | 'taxClass' | TaxClassUpdateKeySpecifier)[]; +export type TaxClassUpdateFieldPolicy = { + errors?: FieldPolicy | FieldReadFunction, + taxClass?: FieldPolicy | FieldReadFunction +}; +export type TaxClassUpdateErrorKeySpecifier = ('field' | 'message' | 'code' | 'countryCodes' | TaxClassUpdateErrorKeySpecifier)[]; +export type TaxClassUpdateErrorFieldPolicy = { + field?: FieldPolicy | FieldReadFunction, + message?: FieldPolicy | FieldReadFunction, + code?: FieldPolicy | FieldReadFunction, + countryCodes?: FieldPolicy | FieldReadFunction +}; +export type TaxConfigurationKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'channel' | 'chargeTaxes' | 'taxCalculationStrategy' | 'displayGrossPrices' | 'pricesEnteredWithTax' | 'countries' | TaxConfigurationKeySpecifier)[]; +export type TaxConfigurationFieldPolicy = { + id?: FieldPolicy | FieldReadFunction, + privateMetadata?: FieldPolicy | FieldReadFunction, + privateMetafield?: FieldPolicy | FieldReadFunction, + privateMetafields?: FieldPolicy | FieldReadFunction, + metadata?: FieldPolicy | FieldReadFunction, + metafield?: FieldPolicy | FieldReadFunction, + metafields?: FieldPolicy | FieldReadFunction, + channel?: FieldPolicy | FieldReadFunction, + chargeTaxes?: FieldPolicy | FieldReadFunction, + taxCalculationStrategy?: FieldPolicy | FieldReadFunction, + displayGrossPrices?: FieldPolicy | FieldReadFunction, + pricesEnteredWithTax?: FieldPolicy | FieldReadFunction, + countries?: FieldPolicy | FieldReadFunction +}; +export type TaxConfigurationCountableConnectionKeySpecifier = ('pageInfo' | 'edges' | 'totalCount' | TaxConfigurationCountableConnectionKeySpecifier)[]; +export type TaxConfigurationCountableConnectionFieldPolicy = { + pageInfo?: FieldPolicy | FieldReadFunction, + edges?: FieldPolicy | FieldReadFunction, + totalCount?: FieldPolicy | FieldReadFunction +}; +export type TaxConfigurationCountableEdgeKeySpecifier = ('node' | 'cursor' | TaxConfigurationCountableEdgeKeySpecifier)[]; +export type TaxConfigurationCountableEdgeFieldPolicy = { + node?: FieldPolicy | FieldReadFunction, + cursor?: FieldPolicy | FieldReadFunction +}; +export type TaxConfigurationPerCountryKeySpecifier = ('country' | 'chargeTaxes' | 'taxCalculationStrategy' | 'displayGrossPrices' | TaxConfigurationPerCountryKeySpecifier)[]; +export type TaxConfigurationPerCountryFieldPolicy = { + country?: FieldPolicy | FieldReadFunction, + chargeTaxes?: FieldPolicy | FieldReadFunction, + taxCalculationStrategy?: FieldPolicy | FieldReadFunction, + displayGrossPrices?: FieldPolicy | FieldReadFunction +}; +export type TaxConfigurationUpdateKeySpecifier = ('errors' | 'taxConfiguration' | TaxConfigurationUpdateKeySpecifier)[]; +export type TaxConfigurationUpdateFieldPolicy = { + errors?: FieldPolicy | FieldReadFunction, + taxConfiguration?: FieldPolicy | FieldReadFunction +}; +export type TaxConfigurationUpdateErrorKeySpecifier = ('field' | 'message' | 'code' | 'countryCodes' | TaxConfigurationUpdateErrorKeySpecifier)[]; +export type TaxConfigurationUpdateErrorFieldPolicy = { + field?: FieldPolicy | FieldReadFunction, + message?: FieldPolicy | FieldReadFunction, + code?: FieldPolicy | FieldReadFunction, + countryCodes?: FieldPolicy | FieldReadFunction +}; +export type TaxCountryConfigurationKeySpecifier = ('country' | 'taxClassCountryRates' | TaxCountryConfigurationKeySpecifier)[]; +export type TaxCountryConfigurationFieldPolicy = { + country?: FieldPolicy | FieldReadFunction, + taxClassCountryRates?: FieldPolicy | FieldReadFunction +}; +export type TaxCountryConfigurationDeleteKeySpecifier = ('taxCountryConfiguration' | 'errors' | TaxCountryConfigurationDeleteKeySpecifier)[]; +export type TaxCountryConfigurationDeleteFieldPolicy = { + taxCountryConfiguration?: FieldPolicy | FieldReadFunction, + errors?: FieldPolicy | FieldReadFunction +}; +export type TaxCountryConfigurationDeleteErrorKeySpecifier = ('field' | 'message' | 'code' | TaxCountryConfigurationDeleteErrorKeySpecifier)[]; +export type TaxCountryConfigurationDeleteErrorFieldPolicy = { + field?: FieldPolicy | FieldReadFunction, + message?: FieldPolicy | FieldReadFunction, + code?: FieldPolicy | FieldReadFunction +}; +export type TaxCountryConfigurationUpdateKeySpecifier = ('taxCountryConfiguration' | 'errors' | TaxCountryConfigurationUpdateKeySpecifier)[]; +export type TaxCountryConfigurationUpdateFieldPolicy = { + taxCountryConfiguration?: FieldPolicy | FieldReadFunction, + errors?: FieldPolicy | FieldReadFunction +}; +export type TaxCountryConfigurationUpdateErrorKeySpecifier = ('field' | 'message' | 'code' | 'taxClassIds' | TaxCountryConfigurationUpdateErrorKeySpecifier)[]; +export type TaxCountryConfigurationUpdateErrorFieldPolicy = { + field?: FieldPolicy | FieldReadFunction, + message?: FieldPolicy | FieldReadFunction, + code?: FieldPolicy | FieldReadFunction, + taxClassIds?: FieldPolicy | FieldReadFunction +}; export type TaxExemptionManageKeySpecifier = ('taxableObject' | 'errors' | TaxExemptionManageKeySpecifier)[]; export type TaxExemptionManageFieldPolicy = { taxableObject?: FieldPolicy | FieldReadFunction, @@ -7596,6 +7760,90 @@ export type StrictTypedTypePolicies = { keyFields?: false | SubscriptionKeySpecifier | (() => undefined | SubscriptionKeySpecifier), fields?: SubscriptionFieldPolicy, }, + TaxClass?: Omit & { + keyFields?: false | TaxClassKeySpecifier | (() => undefined | TaxClassKeySpecifier), + fields?: TaxClassFieldPolicy, + }, + TaxClassCountableConnection?: Omit & { + keyFields?: false | TaxClassCountableConnectionKeySpecifier | (() => undefined | TaxClassCountableConnectionKeySpecifier), + fields?: TaxClassCountableConnectionFieldPolicy, + }, + TaxClassCountableEdge?: Omit & { + keyFields?: false | TaxClassCountableEdgeKeySpecifier | (() => undefined | TaxClassCountableEdgeKeySpecifier), + fields?: TaxClassCountableEdgeFieldPolicy, + }, + TaxClassCountryRate?: Omit & { + keyFields?: false | TaxClassCountryRateKeySpecifier | (() => undefined | TaxClassCountryRateKeySpecifier), + fields?: TaxClassCountryRateFieldPolicy, + }, + TaxClassCreate?: Omit & { + keyFields?: false | TaxClassCreateKeySpecifier | (() => undefined | TaxClassCreateKeySpecifier), + fields?: TaxClassCreateFieldPolicy, + }, + TaxClassCreateError?: Omit & { + keyFields?: false | TaxClassCreateErrorKeySpecifier | (() => undefined | TaxClassCreateErrorKeySpecifier), + fields?: TaxClassCreateErrorFieldPolicy, + }, + TaxClassDelete?: Omit & { + keyFields?: false | TaxClassDeleteKeySpecifier | (() => undefined | TaxClassDeleteKeySpecifier), + fields?: TaxClassDeleteFieldPolicy, + }, + TaxClassDeleteError?: Omit & { + keyFields?: false | TaxClassDeleteErrorKeySpecifier | (() => undefined | TaxClassDeleteErrorKeySpecifier), + fields?: TaxClassDeleteErrorFieldPolicy, + }, + TaxClassUpdate?: Omit & { + keyFields?: false | TaxClassUpdateKeySpecifier | (() => undefined | TaxClassUpdateKeySpecifier), + fields?: TaxClassUpdateFieldPolicy, + }, + TaxClassUpdateError?: Omit & { + keyFields?: false | TaxClassUpdateErrorKeySpecifier | (() => undefined | TaxClassUpdateErrorKeySpecifier), + fields?: TaxClassUpdateErrorFieldPolicy, + }, + TaxConfiguration?: Omit & { + keyFields?: false | TaxConfigurationKeySpecifier | (() => undefined | TaxConfigurationKeySpecifier), + fields?: TaxConfigurationFieldPolicy, + }, + TaxConfigurationCountableConnection?: Omit & { + keyFields?: false | TaxConfigurationCountableConnectionKeySpecifier | (() => undefined | TaxConfigurationCountableConnectionKeySpecifier), + fields?: TaxConfigurationCountableConnectionFieldPolicy, + }, + TaxConfigurationCountableEdge?: Omit & { + keyFields?: false | TaxConfigurationCountableEdgeKeySpecifier | (() => undefined | TaxConfigurationCountableEdgeKeySpecifier), + fields?: TaxConfigurationCountableEdgeFieldPolicy, + }, + TaxConfigurationPerCountry?: Omit & { + keyFields?: false | TaxConfigurationPerCountryKeySpecifier | (() => undefined | TaxConfigurationPerCountryKeySpecifier), + fields?: TaxConfigurationPerCountryFieldPolicy, + }, + TaxConfigurationUpdate?: Omit & { + keyFields?: false | TaxConfigurationUpdateKeySpecifier | (() => undefined | TaxConfigurationUpdateKeySpecifier), + fields?: TaxConfigurationUpdateFieldPolicy, + }, + TaxConfigurationUpdateError?: Omit & { + keyFields?: false | TaxConfigurationUpdateErrorKeySpecifier | (() => undefined | TaxConfigurationUpdateErrorKeySpecifier), + fields?: TaxConfigurationUpdateErrorFieldPolicy, + }, + TaxCountryConfiguration?: Omit & { + keyFields?: false | TaxCountryConfigurationKeySpecifier | (() => undefined | TaxCountryConfigurationKeySpecifier), + fields?: TaxCountryConfigurationFieldPolicy, + }, + TaxCountryConfigurationDelete?: Omit & { + keyFields?: false | TaxCountryConfigurationDeleteKeySpecifier | (() => undefined | TaxCountryConfigurationDeleteKeySpecifier), + fields?: TaxCountryConfigurationDeleteFieldPolicy, + }, + TaxCountryConfigurationDeleteError?: Omit & { + keyFields?: false | TaxCountryConfigurationDeleteErrorKeySpecifier | (() => undefined | TaxCountryConfigurationDeleteErrorKeySpecifier), + fields?: TaxCountryConfigurationDeleteErrorFieldPolicy, + }, + TaxCountryConfigurationUpdate?: Omit & { + keyFields?: false | TaxCountryConfigurationUpdateKeySpecifier | (() => undefined | TaxCountryConfigurationUpdateKeySpecifier), + fields?: TaxCountryConfigurationUpdateFieldPolicy, + }, + TaxCountryConfigurationUpdateError?: Omit & { + keyFields?: false | TaxCountryConfigurationUpdateErrorKeySpecifier | (() => undefined | TaxCountryConfigurationUpdateErrorKeySpecifier), + fields?: TaxCountryConfigurationUpdateErrorFieldPolicy, + }, TaxExemptionManage?: Omit & { keyFields?: false | TaxExemptionManageKeySpecifier | (() => undefined | TaxExemptionManageKeySpecifier), fields?: TaxExemptionManageFieldPolicy, diff --git a/src/graphql/types.generated.ts b/src/graphql/types.generated.ts index 805a134fe..03d0eb777 100644 --- a/src/graphql/types.generated.ts +++ b/src/graphql/types.generated.ts @@ -802,7 +802,8 @@ export enum CheckoutErrorCode { CHANNEL_INACTIVE = 'CHANNEL_INACTIVE', UNAVAILABLE_VARIANT_IN_CHANNEL = 'UNAVAILABLE_VARIANT_IN_CHANNEL', EMAIL_NOT_SET = 'EMAIL_NOT_SET', - NO_LINES = 'NO_LINES' + NO_LINES = 'NO_LINES', + INACTIVE_PAYMENT = 'INACTIVE_PAYMENT' } export type CheckoutFilterInput = { @@ -1322,6 +1323,20 @@ export type CountryFilterInput = { attachedToShippingZones?: InputMaybe; }; +export type CountryRateInput = { + /** Country in which this rate applies. */ + countryCode: CountryCode; + /** Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate. */ + rate: Scalars['Float']; +}; + +export type CountryRateUpdateInput = { + /** Country in which this rate applies. */ + countryCode: CountryCode; + /** Tax rate value provided as percentage. Example: provide `23` to represent `23%` tax rate. Provide `null` to remove the particular rate. */ + rate?: InputMaybe; +}; + /** An enumeration. */ export enum CustomerEventsEnum { ACCOUNT_CREATED = 'ACCOUNT_CREATED', @@ -3607,13 +3622,13 @@ export enum PermissionEnum { MANAGE_TAXES = 'MANAGE_TAXES', MANAGE_CHANNELS = 'MANAGE_CHANNELS', MANAGE_DISCOUNTS = 'MANAGE_DISCOUNTS', - MANAGE_PLUGINS = 'MANAGE_PLUGINS', MANAGE_GIFT_CARD = 'MANAGE_GIFT_CARD', MANAGE_MENUS = 'MANAGE_MENUS', MANAGE_ORDERS = 'MANAGE_ORDERS', MANAGE_PAGES = 'MANAGE_PAGES', MANAGE_PAGE_TYPES_AND_ATTRIBUTES = 'MANAGE_PAGE_TYPES_AND_ATTRIBUTES', HANDLE_PAYMENTS = 'HANDLE_PAYMENTS', + MANAGE_PLUGINS = 'MANAGE_PLUGINS', MANAGE_PRODUCTS = 'MANAGE_PRODUCTS', MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES = 'MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES', MANAGE_SHIPPING = 'MANAGE_SHIPPING', @@ -3824,7 +3839,11 @@ export type ProductCreateInput = { attributes?: InputMaybe>; /** ID of the product's category. */ category?: InputMaybe; - /** Determine if taxes are being charged for the product. */ + /** + * Determine if taxes are being charged for the product. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled. + */ chargeTaxes?: InputMaybe; /** List of IDs of collections that the product belongs to. */ collections?: InputMaybe>; @@ -3838,7 +3857,13 @@ export type ProductCreateInput = { name?: InputMaybe; /** Product slug. */ slug?: InputMaybe; - /** Tax rate for enabled tax gateway. */ + /** ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type. */ + taxClass?: InputMaybe; + /** + * Tax rate for enabled tax gateway. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. + */ taxCode?: InputMaybe; /** Search engine optimization fields. */ seo?: InputMaybe; @@ -3959,7 +3984,11 @@ export type ProductInput = { attributes?: InputMaybe>; /** ID of the product's category. */ category?: InputMaybe; - /** Determine if taxes are being charged for the product. */ + /** + * Determine if taxes are being charged for the product. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled. + */ chargeTaxes?: InputMaybe; /** List of IDs of collections that the product belongs to. */ collections?: InputMaybe>; @@ -3973,7 +4002,13 @@ export type ProductInput = { name?: InputMaybe; /** Product slug. */ slug?: InputMaybe; - /** Tax rate for enabled tax gateway. */ + /** ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type. */ + taxClass?: InputMaybe; + /** + * Tax rate for enabled tax gateway. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. + */ taxCode?: InputMaybe; /** Search engine optimization fields. */ seo?: InputMaybe; @@ -4138,8 +4173,14 @@ export type ProductTypeInput = { isDigital?: InputMaybe; /** Weight of the ProductType items. */ weight?: InputMaybe; - /** Tax rate for enabled tax gateway. */ + /** + * Tax rate for enabled tax gateway. + * + * DEPRECATED: this field will be removed in Saleor 4.0.. Use tax classes to control the tax calculation for a product type. + */ taxCode?: InputMaybe; + /** ID of a tax class to assign to this product type. All products of this product type would use this tax class, unless it's overridden in the `Product` type. */ + taxClass?: InputMaybe; }; /** An enumeration. */ @@ -4523,6 +4564,8 @@ export type ShippingPriceInput = { deletePostalCodeRules?: InputMaybe>; /** Inclusion type for currently assigned postal code rules. */ inclusionType?: InputMaybe; + /** ID of a tax class to assign to this shipping method. If not provided, the default tax class will be used. */ + taxClass?: InputMaybe; }; export type ShippingPriceTranslationInput = { @@ -4590,12 +4633,6 @@ export type ShopSettingsInput = { headerText?: InputMaybe; /** SEO description. */ description?: InputMaybe; - /** Include taxes in prices. */ - includeTaxesInPrices?: InputMaybe; - /** Display prices with tax in store. */ - displayGrossPrices?: InputMaybe; - /** Charge taxes on shipping. */ - chargeTaxesOnShipping?: InputMaybe; /** Enable inventory tracking. */ trackInventoryByDefault?: InputMaybe; /** Default weight unit. */ @@ -4644,6 +4681,24 @@ export type ShopSettingsInput = { * Note: this API is currently in Feature Preview and can be subject to changes at later point. */ limitQuantityPerCheckout?: InputMaybe; + /** + * Include taxes in prices. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country. + */ + includeTaxesInPrices?: InputMaybe; + /** + * Display prices with tax in store. + * + * DEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country. + */ + displayGrossPrices?: InputMaybe; + /** + * Charge taxes on shipping. + * + * DEPRECATED: this field will be removed in Saleor 4.0. To enable taxes for a shipping method, assign a tax class to the shipping method with `shippingPriceCreate` or `shippingPriceUpdate` mutations. + */ + chargeTaxesOnShipping?: InputMaybe; }; export type ShopSettingsTranslationInput = { @@ -4756,6 +4811,129 @@ export enum StorePaymentMethodEnum { NONE = 'NONE' } +export enum TaxCalculationStrategy { + FLAT_RATES = 'FLAT_RATES', + TAX_APP = 'TAX_APP' +} + +/** An enumeration. */ +export enum TaxClassCreateErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND' +} + +export type TaxClassCreateInput = { + /** Name of the tax class. */ + name: Scalars['String']; + /** List of country-specific tax rates to create for this tax class. */ + createCountryRates?: InputMaybe>; +}; + +/** An enumeration. */ +export enum TaxClassDeleteErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND' +} + +export type TaxClassFilterInput = { + metadata?: InputMaybe>; + ids?: InputMaybe>; + countries?: InputMaybe>; +}; + +export type TaxClassRateInput = { + /** ID of a tax class for which to update the tax rate */ + taxClassId?: InputMaybe; + /** Tax rate value. */ + rate?: InputMaybe; +}; + +export enum TaxClassSortField { + /** Sort tax classes by name. */ + NAME = 'NAME' +} + +export type TaxClassSortingInput = { + /** Specifies the direction in which to sort products. */ + direction: OrderDirection; + /** Sort tax classes by the selected field. */ + field: TaxClassSortField; +}; + +/** An enumeration. */ +export enum TaxClassUpdateErrorCode { + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND' +} + +export type TaxClassUpdateInput = { + /** Name of the tax class. */ + name?: InputMaybe; + /** List of country-specific tax rates to create or update for this tax class. */ + updateCountryRates?: InputMaybe>; + /** List of country codes for which to remove the tax class rates. Note: It removes all rates for given country code. */ + removeCountryRates?: InputMaybe>; +}; + +export type TaxConfigurationFilterInput = { + metadata?: InputMaybe>; + ids?: InputMaybe>; +}; + +export type TaxConfigurationPerCountryInput = { + /** Country in which this configuration applies. */ + countryCode: CountryCode; + /** Determines whether taxes are charged in this country. */ + chargeTaxes: Scalars['Boolean']; + /** A country-specific strategy to use for tax calculation. Taxes can be calculated either using user-defined flat rates or with a tax app. If not provided, use the value from the channel's tax configuration. */ + taxCalculationStrategy?: InputMaybe; + /** Determines whether prices displayed in a storefront should include taxes for this country. */ + displayGrossPrices: Scalars['Boolean']; +}; + +/** An enumeration. */ +export enum TaxConfigurationUpdateErrorCode { + DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND' +} + +export type TaxConfigurationUpdateInput = { + /** Determines whether taxes are charged in the given channel. */ + chargeTaxes?: InputMaybe; + /** The default strategy to use for tax calculation in the given channel. Taxes can be calculated either using user-defined flat rates or with a tax app. Empty value means that no method is selected and taxes are not calculated. */ + taxCalculationStrategy?: InputMaybe; + /** Determines whether prices displayed in a storefront should include taxes. */ + displayGrossPrices?: InputMaybe; + /** Determines whether prices are entered with the tax included. */ + pricesEnteredWithTax?: InputMaybe; + /** List of tax country configurations to create or update (identified by a country code). */ + updateCountriesConfiguration?: InputMaybe>; + /** List of country codes for which to remove the tax configuration. */ + removeCountriesConfiguration?: InputMaybe>; +}; + +/** An enumeration. */ +export enum TaxCountryConfigurationDeleteErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND' +} + +/** An enumeration. */ +export enum TaxCountryConfigurationUpdateErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + NOT_FOUND = 'NOT_FOUND', + ONLY_ONE_DEFAULT_COUNTRY_RATE_ALLOWED = 'ONLY_ONE_DEFAULT_COUNTRY_RATE_ALLOWED', + CANNOT_CREATE_NEGATIVE_RATE = 'CANNOT_CREATE_NEGATIVE_RATE' +} + /** An enumeration. */ export enum TaxExemptionManageErrorCode { GRAPHQL_ERROR = 'GRAPHQL_ERROR', @@ -6510,7 +6688,7 @@ export type SearchCatalogQuery = { __typename: 'Query', categories: { __typename export type ShopInfoQueryVariables = Exact<{ [key: string]: never; }>; -export type ShopInfoQuery = { __typename: 'Query', shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null, displayGrossPrices: boolean, includeTaxesInPrices: boolean, name: string, trackInventoryByDefault: boolean | null, version: string, countries: Array<{ __typename: 'CountryDisplay', country: string, code: string }>, defaultCountry: { __typename: 'CountryDisplay', country: string, code: string } | null, domain: { __typename: 'Domain', host: string, url: string }, languages: Array<{ __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string }>, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string }> } }; +export type ShopInfoQuery = { __typename: 'Query', shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null, name: string, trackInventoryByDefault: boolean | null, version: string, countries: Array<{ __typename: 'CountryDisplay', country: string, code: string }>, defaultCountry: { __typename: 'CountryDisplay', country: string, code: string } | null, domain: { __typename: 'Domain', host: string, url: string }, languages: Array<{ __typename: 'LanguageDisplay', code: LanguageCodeEnum, language: string }>, permissions: Array<{ __typename: 'Permission', code: PermissionEnum, name: string }> } }; export type ShopCountriesQueryVariables = Exact<{ filter?: InputMaybe; @@ -7011,6 +7189,18 @@ export type AttributeValueTranslateErrorFragmentFragment = { __typename: 'Transl export type ShippingPriceTranslateErrorFragmentFragment = { __typename: 'TranslationError', code: TranslationErrorCode, field: string | null, message: string | null }; +export type TaxConfigurationUpdateErrorFragmentFragment = { __typename: 'TaxConfigurationUpdateError', field: string | null, code: TaxConfigurationUpdateErrorCode }; + +export type TaxCountryConfigurationUpdateErrorFragmentFragment = { __typename: 'TaxCountryConfigurationUpdateError', field: string | null, code: TaxCountryConfigurationUpdateErrorCode }; + +export type TaxCountryConfigurationDeleteErrorFragmentFragment = { __typename: 'TaxCountryConfigurationDeleteError', field: string | null, code: TaxCountryConfigurationDeleteErrorCode }; + +export type TaxClassUpdateErrorFragmentFragment = { __typename: 'TaxClassUpdateError', field: string | null, code: TaxClassUpdateErrorCode }; + +export type TaxClassCreateErrorFragmentFragment = { __typename: 'TaxClassCreateError', field: string | null, code: TaxClassCreateErrorCode }; + +export type TaxClassDeleteErrorFragmentFragment = { __typename: 'TaxClassDeleteError', field: string | null, code: TaxClassDeleteErrorCode }; + export type FileFragment = { __typename: 'File', url: string, contentType: string | null }; export type GiftCardsSettingsFragment = { __typename: 'GiftCardSettings', expiryType: GiftCardSettingsExpiryTypeEnum, expiryPeriod: { __typename: 'TimePeriod', type: TimePeriodTypeEnum, amount: number } | null }; @@ -7071,6 +7261,10 @@ type Metadata_ShippingMethodType_Fragment = { __typename: 'ShippingMethodType', type Metadata_ShippingZone_Fragment = { __typename: 'ShippingZone', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; +type Metadata_TaxClass_Fragment = { __typename: 'TaxClass', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; + +type Metadata_TaxConfiguration_Fragment = { __typename: 'TaxConfiguration', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; + type Metadata_TransactionItem_Fragment = { __typename: 'TransactionItem', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; type Metadata_User_Fragment = { __typename: 'User', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; @@ -7079,7 +7273,7 @@ type Metadata_Voucher_Fragment = { __typename: 'Voucher', metadata: Array<{ __ty type Metadata_Warehouse_Fragment = { __typename: 'Warehouse', metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; -export type MetadataFragment = Metadata_App_Fragment | Metadata_Attribute_Fragment | Metadata_Category_Fragment | Metadata_Checkout_Fragment | Metadata_CheckoutLine_Fragment | Metadata_Collection_Fragment | Metadata_DigitalContent_Fragment | Metadata_Fulfillment_Fragment | Metadata_GiftCard_Fragment | Metadata_Invoice_Fragment | Metadata_Menu_Fragment | Metadata_MenuItem_Fragment | Metadata_Order_Fragment | Metadata_OrderLine_Fragment | Metadata_Page_Fragment | Metadata_PageType_Fragment | Metadata_Payment_Fragment | Metadata_Product_Fragment | Metadata_ProductType_Fragment | Metadata_ProductVariant_Fragment | Metadata_Sale_Fragment | Metadata_ShippingMethod_Fragment | Metadata_ShippingMethodType_Fragment | Metadata_ShippingZone_Fragment | Metadata_TransactionItem_Fragment | Metadata_User_Fragment | Metadata_Voucher_Fragment | Metadata_Warehouse_Fragment; +export type MetadataFragment = Metadata_App_Fragment | Metadata_Attribute_Fragment | Metadata_Category_Fragment | Metadata_Checkout_Fragment | Metadata_CheckoutLine_Fragment | Metadata_Collection_Fragment | Metadata_DigitalContent_Fragment | Metadata_Fulfillment_Fragment | Metadata_GiftCard_Fragment | Metadata_Invoice_Fragment | Metadata_Menu_Fragment | Metadata_MenuItem_Fragment | Metadata_Order_Fragment | Metadata_OrderLine_Fragment | Metadata_Page_Fragment | Metadata_PageType_Fragment | Metadata_Payment_Fragment | Metadata_Product_Fragment | Metadata_ProductType_Fragment | Metadata_ProductVariant_Fragment | Metadata_Sale_Fragment | Metadata_ShippingMethod_Fragment | Metadata_ShippingMethodType_Fragment | Metadata_ShippingZone_Fragment | Metadata_TaxClass_Fragment | Metadata_TaxConfiguration_Fragment | Metadata_TransactionItem_Fragment | Metadata_User_Fragment | Metadata_Voucher_Fragment | Metadata_Warehouse_Fragment; export type MenuFragment = { __typename: 'Menu', id: string, name: string, items: Array<{ __typename: 'MenuItem', id: string }> | null }; @@ -7141,9 +7335,9 @@ export type PluginBaseFragment = { __typename: 'Plugin', id: string, name: strin export type PluginsDetailsFragment = { __typename: 'Plugin', id: string, name: string, description: string, globalConfiguration: { __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null }> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null } | null, channelConfigurations: Array<{ __typename: 'PluginConfiguration', active: boolean, configuration: Array<{ __typename: 'ConfigurationItem', name: string, value: string | null, type: ConfigurationTypeFieldEnum | null, helpText: string | null, label: string | null }> | null, channel: { __typename: 'Channel', id: string, name: string, slug: string } | null }> }; -export type ProductTypeFragment = { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null }; +export type ProductTypeFragment = { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, taxClass: { __typename: 'TaxClass', id: string, name: string } | null }; -export type ProductTypeDetailsFragment = { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; +export type ProductTypeDetailsFragment = { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; export type StockFragment = { __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } }; @@ -7167,7 +7361,7 @@ export type ProductVariantAttributesFragment = { __typename: 'Product', id: stri export type ProductDetailsVariantFragment = { __typename: 'ProductVariant', id: string, sku: string | null, name: string, trackInventory: boolean, quantityLimitPerCustomer: number | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null }, values: Array<{ __typename: 'AttributeValue', id: string, name: string | null }> }>, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } }> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null }; -export type ProductFragment = { __typename: 'Product', name: string, slug: string, description: any | null, seoTitle: string | null, seoDescription: string | null, rating: number | null, chargeTaxes: boolean, isAvailable: boolean | null, id: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, category: { __typename: 'Category', id: string, name: string } | null, collections: Array<{ __typename: 'Collection', id: string, name: string }> | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, sku: string | null, name: string, trackInventory: boolean, quantityLimitPerCustomer: number | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null }, values: Array<{ __typename: 'AttributeValue', id: string, name: string | null }> }>, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } }> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null }> | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }> | null }, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null }> }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; +export type ProductFragment = { __typename: 'Product', name: string, slug: string, description: any | null, seoTitle: string | null, seoDescription: string | null, rating: number | null, isAvailable: boolean | null, id: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, category: { __typename: 'Category', id: string, name: string } | null, collections: Array<{ __typename: 'Collection', id: string, name: string }> | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, sku: string | null, name: string, trackInventory: boolean, quantityLimitPerCustomer: number | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null }, values: Array<{ __typename: 'AttributeValue', id: string, name: string | null }> }>, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } }> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null }> | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }> | null }, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null }> }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; export type VariantAttributeFragment = { __typename: 'Attribute', id: string, name: string | null, slug: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }; @@ -7183,11 +7377,11 @@ export type ShippingZoneFragment = { __typename: 'ShippingZone', id: string, nam export type ShippingMethodWithPostalCodesFragment = { __typename: 'ShippingMethodType', id: string, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null }; -export type ShippingMethodTypeFragment = { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; +export type ShippingMethodTypeFragment = { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; -export type ShippingMethodWithExcludedProductsFragment = { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, excludedProducts: { __typename: 'ProductCountableConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor: string | null, startCursor: string | null }, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } }> } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; +export type ShippingMethodWithExcludedProductsFragment = { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, excludedProducts: { __typename: 'ProductCountableConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor: string | null, startCursor: string | null }, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } }> } | null, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; -export type ShippingZoneDetailsFragment = { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; +export type ShippingZoneDetailsFragment = { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }; export type CountryWithCodeFragment = { __typename: 'CountryDisplay', country: string, code: string }; @@ -7207,11 +7401,15 @@ export type TaxedMoneyFragment = { __typename: 'TaxedMoney', net: { __typename: export type CountryFragment = { __typename: 'CountryDisplay', country: string, code: string }; -export type CountryWithTaxesFragment = { __typename: 'CountryDisplay', country: string, code: string, vat: { __typename: 'VAT', standardRate: number | null, reducedRates: Array<{ __typename: 'ReducedRate', rateType: string, rate: number }> } | null }; +export type TaxConfigurationPerCountryFragment = { __typename: 'TaxConfigurationPerCountry', chargeTaxes: boolean, taxCalculationStrategy: TaxCalculationStrategy | null, displayGrossPrices: boolean, country: { __typename: 'CountryDisplay', country: string, code: string } }; -export type ShopTaxesFragment = { __typename: 'Shop', chargeTaxesOnShipping: boolean, includeTaxesInPrices: boolean, displayGrossPrices: boolean }; +export type TaxConfigurationFragment = { __typename: 'TaxConfiguration', id: string, displayGrossPrices: boolean, pricesEnteredWithTax: boolean, chargeTaxes: boolean, taxCalculationStrategy: TaxCalculationStrategy | null, channel: { __typename: 'Channel', id: string, name: string }, countries: Array<{ __typename: 'TaxConfigurationPerCountry', chargeTaxes: boolean, taxCalculationStrategy: TaxCalculationStrategy | null, displayGrossPrices: boolean, country: { __typename: 'CountryDisplay', country: string, code: string } }> }; -export type TaxTypeFragment = { __typename: 'TaxType', description: string | null, taxCode: string | null }; +export type TaxCountryConfigurationFragment = { __typename: 'TaxCountryConfiguration', country: { __typename: 'CountryDisplay', country: string, code: string }, taxClassCountryRates: Array<{ __typename: 'TaxClassCountryRate', rate: number, taxClass: { __typename: 'TaxClass', id: string, name: string } | null }> }; + +export type TaxRateFragment = { __typename: 'TaxClassCountryRate', rate: number, country: { __typename: 'CountryDisplay', country: string, code: string } }; + +export type TaxClassFragment = { __typename: 'TaxClass', id: string, name: string, countries: Array<{ __typename: 'TaxClassCountryRate', rate: number, country: { __typename: 'CountryDisplay', country: string, code: string } }> }; export type TimePeriodFragment = { __typename: 'TimePeriod', amount: number, type: TimePeriodTypeEnum }; @@ -8017,7 +8215,7 @@ export type ProductTypeUpdateMutationVariables = Exact<{ }>; -export type ProductTypeUpdateMutation = { __typename: 'Mutation', productTypeUpdate: { __typename: 'ProductTypeUpdate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type ProductTypeUpdateMutation = { __typename: 'Mutation', productTypeUpdate: { __typename: 'ProductTypeUpdate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type AssignProductAttributeMutationVariables = Exact<{ id: Scalars['ID']; @@ -8025,7 +8223,7 @@ export type AssignProductAttributeMutationVariables = Exact<{ }>; -export type AssignProductAttributeMutation = { __typename: 'Mutation', productAttributeAssign: { __typename: 'ProductAttributeAssign', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type AssignProductAttributeMutation = { __typename: 'Mutation', productAttributeAssign: { __typename: 'ProductAttributeAssign', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type UnassignProductAttributeMutationVariables = Exact<{ id: Scalars['ID']; @@ -8033,14 +8231,14 @@ export type UnassignProductAttributeMutationVariables = Exact<{ }>; -export type UnassignProductAttributeMutation = { __typename: 'Mutation', productAttributeUnassign: { __typename: 'ProductAttributeUnassign', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type UnassignProductAttributeMutation = { __typename: 'Mutation', productAttributeUnassign: { __typename: 'ProductAttributeUnassign', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type ProductTypeCreateMutationVariables = Exact<{ input: ProductTypeInput; }>; -export type ProductTypeCreateMutation = { __typename: 'Mutation', productTypeCreate: { __typename: 'ProductTypeCreate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type ProductTypeCreateMutation = { __typename: 'Mutation', productTypeCreate: { __typename: 'ProductTypeCreate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type ProductTypeAttributeReorderMutationVariables = Exact<{ move: ReorderInput; @@ -8049,7 +8247,7 @@ export type ProductTypeAttributeReorderMutationVariables = Exact<{ }>; -export type ProductTypeAttributeReorderMutation = { __typename: 'Mutation', productTypeReorderAttributes: { __typename: 'ProductTypeReorderAttributes', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type ProductTypeAttributeReorderMutation = { __typename: 'Mutation', productTypeReorderAttributes: { __typename: 'ProductTypeReorderAttributes', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type ProductAttributeAssignmentUpdateMutationVariables = Exact<{ operations: Array | ProductAttributeAssignmentUpdateInput; @@ -8057,7 +8255,7 @@ export type ProductAttributeAssignmentUpdateMutationVariables = Exact<{ }>; -export type ProductAttributeAssignmentUpdateMutation = { __typename: 'Mutation', productAttributeAssignmentUpdate: { __typename: 'ProductAttributeAssignmentUpdate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null, attributes: Array | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type ProductAttributeAssignmentUpdateMutation = { __typename: 'Mutation', productAttributeAssignmentUpdate: { __typename: 'ProductAttributeAssignmentUpdate', errors: Array<{ __typename: 'ProductError', code: ProductErrorCode, field: string | null, message: string | null, attributes: Array | null }>, productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type ProductTypeListQueryVariables = Exact<{ after?: InputMaybe; @@ -8069,19 +8267,19 @@ export type ProductTypeListQueryVariables = Exact<{ }>; -export type ProductTypeListQuery = { __typename: 'Query', productTypes: { __typename: 'ProductTypeCountableConnection', edges: Array<{ __typename: 'ProductTypeCountableEdge', node: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; +export type ProductTypeListQuery = { __typename: 'Query', productTypes: { __typename: 'ProductTypeCountableConnection', edges: Array<{ __typename: 'ProductTypeCountableEdge', node: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, taxClass: { __typename: 'TaxClass', id: string, name: string } | null } }>, pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null } } | null }; export type ProductTypeDetailsQueryVariables = Exact<{ id: Scalars['ID']; }>; -export type ProductTypeDetailsQuery = { __typename: 'Query', productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null, shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null }, taxTypes: Array<{ __typename: 'TaxType', taxCode: string | null, description: string | null }> | null }; +export type ProductTypeDetailsQuery = { __typename: 'Query', productType: { __typename: 'ProductType', id: string, name: string, kind: ProductTypeKindEnum, hasVariants: boolean, isShippingRequired: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null }> | null, assignedVariantAttributes: Array<{ __typename: 'AssignedVariantAttribute', variantSelection: boolean, attribute: { __typename: 'Attribute', id: string, name: string | null, slug: string | null, type: AttributeTypeEnum | null, visibleInStorefront: boolean, filterableInDashboard: boolean, filterableInStorefront: boolean, unit: MeasurementUnitsEnum | null, inputType: AttributeInputTypeEnum | null } }> | null, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null, shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null } }; export type ProductTypeCreateDataQueryVariables = Exact<{ [key: string]: never; }>; -export type ProductTypeCreateDataQuery = { __typename: 'Query', shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null }, taxTypes: Array<{ __typename: 'TaxType', taxCode: string | null, description: string | null }> | null }; +export type ProductTypeCreateDataQuery = { __typename: 'Query', shop: { __typename: 'Shop', defaultWeightUnit: WeightUnitsEnum | null } }; export type ProductMediaCreateMutationVariables = Exact<{ product: Scalars['ID']; @@ -8345,7 +8543,7 @@ export type ProductDetailsQueryVariables = Exact<{ }>; -export type ProductDetailsQuery = { __typename: 'Query', product: { __typename: 'Product', name: string, slug: string, description: any | null, seoTitle: string | null, seoDescription: string | null, rating: number | null, chargeTaxes: boolean, isAvailable: boolean | null, id: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, category: { __typename: 'Category', id: string, name: string } | null, collections: Array<{ __typename: 'Collection', id: string, name: string }> | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, sku: string | null, name: string, trackInventory: boolean, quantityLimitPerCustomer: number | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null }, values: Array<{ __typename: 'AttributeValue', id: string, name: string | null }> }>, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } }> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null }> | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }> | null }, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null }> }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null, taxTypes: Array<{ __typename: 'TaxType', description: string | null, taxCode: string | null }> | null }; +export type ProductDetailsQuery = { __typename: 'Query', product: { __typename: 'Product', name: string, slug: string, description: any | null, seoTitle: string | null, seoDescription: string | null, rating: number | null, isAvailable: boolean | null, id: string, defaultVariant: { __typename: 'ProductVariant', id: string } | null, category: { __typename: 'Category', id: string, name: string } | null, collections: Array<{ __typename: 'Collection', id: string, name: string }> | null, channelListings: Array<{ __typename: 'ProductChannelListing', isPublished: boolean, publicationDate: any | null, isAvailableForPurchase: boolean | null, availableForPurchase: any | null, visibleInListings: boolean, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string } }> | null, media: Array<{ __typename: 'ProductMedia', id: string, alt: string, sortOrder: number | null, url: string, type: ProductMediaType, oembedData: any }> | null, variants: Array<{ __typename: 'ProductVariant', id: string, sku: string | null, name: string, trackInventory: boolean, quantityLimitPerCustomer: number | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, name: string | null }, values: Array<{ __typename: 'AttributeValue', id: string, name: string | null }> }>, media: Array<{ __typename: 'ProductMedia', url: string }> | null, stocks: Array<{ __typename: 'Stock', id: string, quantity: number, quantityAllocated: number, warehouse: { __typename: 'Warehouse', id: string, name: string } }> | null, preorder: { __typename: 'PreorderData', globalThreshold: number | null, globalSoldUnits: number, endDate: any | null } | null, channelListings: Array<{ __typename: 'ProductVariantChannelListing', channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, costPrice: { __typename: 'Money', amount: number, currency: string } | null, preorderThreshold: { __typename: 'PreorderThreshold', quantity: number | null, soldUnits: number } | null }> | null }> | null, productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, variantAttributes: Array<{ __typename: 'Attribute', id: string, name: string | null, inputType: AttributeInputTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }> | null }, weight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null, attributes: Array<{ __typename: 'SelectedAttribute', attribute: { __typename: 'Attribute', id: string, slug: string | null, name: string | null, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }, values: Array<{ __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null }> }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null }; export type ProductTypeQueryVariables = Exact<{ id: Scalars['ID']; @@ -8356,7 +8554,7 @@ export type ProductTypeQueryVariables = Exact<{ }>; -export type ProductTypeQuery = { __typename: 'Query', productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, slug: string | null, name: string | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }> | null, taxType: { __typename: 'TaxType', description: string | null, taxCode: string | null } | null } | null }; +export type ProductTypeQuery = { __typename: 'Query', productType: { __typename: 'ProductType', id: string, name: string, hasVariants: boolean, productAttributes: Array<{ __typename: 'Attribute', id: string, inputType: AttributeInputTypeEnum | null, entityType: AttributeEntityTypeEnum | null, slug: string | null, name: string | null, valueRequired: boolean, unit: MeasurementUnitsEnum | null, choices: { __typename: 'AttributeValueCountableConnection', pageInfo: { __typename: 'PageInfo', endCursor: string | null, hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null }, edges: Array<{ __typename: 'AttributeValueCountableEdge', cursor: string, node: { __typename: 'AttributeValue', plainText: string | null, richText: any | null, id: string, name: string | null, slug: string | null, reference: string | null, boolean: boolean | null, date: any | null, dateTime: any | null, value: string | null, file: { __typename: 'File', url: string, contentType: string | null } | null } }> } | null }> | null, taxClass: { __typename: 'TaxClass', id: string, name: string } | null } | null }; export type ProductVariantDetailsQueryVariables = Exact<{ id: Scalars['ID']; @@ -8610,21 +8808,21 @@ export type UpdateShippingRateMutationVariables = Exact<{ }>; -export type UpdateShippingRateMutation = { __typename: 'Mutation', shippingPriceUpdate: { __typename: 'ShippingPriceUpdate', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type UpdateShippingRateMutation = { __typename: 'Mutation', shippingPriceUpdate: { __typename: 'ShippingPriceUpdate', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type CreateShippingRateMutationVariables = Exact<{ input: ShippingPriceInput; }>; -export type CreateShippingRateMutation = { __typename: 'Mutation', shippingPriceCreate: { __typename: 'ShippingPriceCreate', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingZone: { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null, shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type CreateShippingRateMutation = { __typename: 'Mutation', shippingPriceCreate: { __typename: 'ShippingPriceCreate', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingZone: { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null, shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type DeleteShippingRateMutationVariables = Exact<{ id: Scalars['ID']; }>; -export type DeleteShippingRateMutation = { __typename: 'Mutation', shippingPriceDelete: { __typename: 'ShippingPriceDelete', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingZone: { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type DeleteShippingRateMutation = { __typename: 'Mutation', shippingPriceDelete: { __typename: 'ShippingPriceDelete', errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, message: string | null }>, shippingZone: { __typename: 'ShippingZone', id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }> | null, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type BulkDeleteShippingRateMutationVariables = Exact<{ ids: Array | Scalars['ID']; @@ -8639,7 +8837,7 @@ export type ShippingMethodChannelListingUpdateMutationVariables = Exact<{ }>; -export type ShippingMethodChannelListingUpdateMutation = { __typename: 'Mutation', shippingMethodChannelListingUpdate: { __typename: 'ShippingMethodChannelListingUpdate', shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null, errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, channels: Array | null, message: string | null }> } | null }; +export type ShippingMethodChannelListingUpdateMutation = { __typename: 'Mutation', shippingMethodChannelListingUpdate: { __typename: 'ShippingMethodChannelListingUpdate', shippingMethod: { __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null, errors: Array<{ __typename: 'ShippingError', code: ShippingErrorCode, field: string | null, channels: Array | null, message: string | null }> } | null }; export type ShippingPriceExcludeProductMutationVariables = Exact<{ id: Scalars['ID']; @@ -8676,7 +8874,7 @@ export type ShippingZoneQueryVariables = Exact<{ }>; -export type ShippingZoneQuery = { __typename: 'Query', shippingZone: { __typename: 'ShippingZone', default: boolean, id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, excludedProducts: { __typename: 'ProductCountableConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor: string | null, startCursor: string | null }, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } }> } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }> | null, channels: Array<{ __typename: 'Channel', id: string, name: string, currencyCode: string }>, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null }; +export type ShippingZoneQuery = { __typename: 'Query', shippingZone: { __typename: 'ShippingZone', default: boolean, id: string, name: string, description: string | null, shippingMethods: Array<{ __typename: 'ShippingMethodType', minimumDeliveryDays: number | null, maximumDeliveryDays: number | null, name: string, description: any | null, type: ShippingMethodTypeEnum | null, id: string, excludedProducts: { __typename: 'ProductCountableConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor: string | null, startCursor: string | null }, edges: Array<{ __typename: 'ProductCountableEdge', node: { __typename: 'Product', id: string, name: string, thumbnail: { __typename: 'Image', url: string } | null } }> } | null, taxClass: { __typename: 'TaxClass', name: string, id: string } | null, minimumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, maximumOrderWeight: { __typename: 'Weight', unit: WeightUnitsEnum, value: number } | null, channelListings: Array<{ __typename: 'ShippingMethodChannelListing', id: string, channel: { __typename: 'Channel', id: string, name: string, currencyCode: string }, price: { __typename: 'Money', amount: number, currency: string } | null, minimumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null, maximumOrderPrice: { __typename: 'Money', amount: number, currency: string } | null }> | null, postalCodeRules: Array<{ __typename: 'ShippingMethodPostalCodeRule', id: string, inclusionType: PostalCodeRuleInclusionTypeEnum | null, start: string | null, end: string | null }> | null, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> }> | null, channels: Array<{ __typename: 'Channel', id: string, name: string, currencyCode: string }>, warehouses: Array<{ __typename: 'Warehouse', id: string, name: string }>, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null }; export type ShippingZoneChannelsQueryVariables = Exact<{ id: Scalars['ID']; @@ -8771,27 +8969,86 @@ export type StaffMemberDetailsQueryVariables = Exact<{ export type StaffMemberDetailsQuery = { __typename: 'Query', user: { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string, permissionGroups: Array<{ __typename: 'Group', id: string, name: string, userCanManage: boolean }> | null, userPermissions: Array<{ __typename: 'UserPermission', code: PermissionEnum, name: string }> | null, avatar: { __typename: 'Image', url: string } | null } | null }; -export type UpdateTaxSettingsMutationVariables = Exact<{ - input: ShopSettingsInput; +export type TaxConfigurationUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: TaxConfigurationUpdateInput; }>; -export type UpdateTaxSettingsMutation = { __typename: 'Mutation', shopSettingsUpdate: { __typename: 'ShopSettingsUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', chargeTaxesOnShipping: boolean, includeTaxesInPrices: boolean, displayGrossPrices: boolean } | null } | null }; +export type TaxConfigurationUpdateMutation = { __typename: 'Mutation', taxConfigurationUpdate: { __typename: 'TaxConfigurationUpdate', errors: Array<{ __typename: 'TaxConfigurationUpdateError', field: string | null, code: TaxConfigurationUpdateErrorCode }>, taxConfiguration: { __typename: 'TaxConfiguration', id: string, displayGrossPrices: boolean, pricesEnteredWithTax: boolean, chargeTaxes: boolean, taxCalculationStrategy: TaxCalculationStrategy | null, channel: { __typename: 'Channel', id: string, name: string }, countries: Array<{ __typename: 'TaxConfigurationPerCountry', chargeTaxes: boolean, taxCalculationStrategy: TaxCalculationStrategy | null, displayGrossPrices: boolean, country: { __typename: 'CountryDisplay', country: string, code: string } }> } | null } | null }; -export type FetchTaxesMutationVariables = Exact<{ [key: string]: never; }>; +export type TaxCountryConfigurationUpdateMutationVariables = Exact<{ + countryCode: CountryCode; + updateTaxClassRates: Array | TaxClassRateInput; +}>; -export type FetchTaxesMutation = { __typename: 'Mutation', shopFetchTaxRates: { __typename: 'ShopFetchTaxRates', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', countries: Array<{ __typename: 'CountryDisplay', country: string, code: string }> } | null } | null }; +export type TaxCountryConfigurationUpdateMutation = { __typename: 'Mutation', taxCountryConfigurationUpdate: { __typename: 'TaxCountryConfigurationUpdate', errors: Array<{ __typename: 'TaxCountryConfigurationUpdateError', field: string | null, code: TaxCountryConfigurationUpdateErrorCode }>, taxCountryConfiguration: { __typename: 'TaxCountryConfiguration', country: { __typename: 'CountryDisplay', country: string, code: string }, taxClassCountryRates: Array<{ __typename: 'TaxClassCountryRate', rate: number, taxClass: { __typename: 'TaxClass', id: string, name: string } | null }> } | null } | null }; -export type CountryListQueryVariables = Exact<{ [key: string]: never; }>; +export type TaxCountryConfigurationDeleteMutationVariables = Exact<{ + countryCode: CountryCode; +}>; -export type CountryListQuery = { __typename: 'Query', shop: { __typename: 'Shop', chargeTaxesOnShipping: boolean, includeTaxesInPrices: boolean, displayGrossPrices: boolean, countries: Array<{ __typename: 'CountryDisplay', country: string, code: string, vat: { __typename: 'VAT', standardRate: number | null, reducedRates: Array<{ __typename: 'ReducedRate', rateType: string, rate: number }> } | null }> } }; +export type TaxCountryConfigurationDeleteMutation = { __typename: 'Mutation', taxCountryConfigurationDelete: { __typename: 'TaxCountryConfigurationDelete', errors: Array<{ __typename: 'TaxCountryConfigurationDeleteError', field: string | null, code: TaxCountryConfigurationDeleteErrorCode }>, taxCountryConfiguration: { __typename: 'TaxCountryConfiguration', country: { __typename: 'CountryDisplay', country: string, code: string }, taxClassCountryRates: Array<{ __typename: 'TaxClassCountryRate', rate: number, taxClass: { __typename: 'TaxClass', id: string, name: string } | null }> } | null } | null }; -export type TaxTypeListQueryVariables = Exact<{ [key: string]: never; }>; +export type TaxClassUpdateMutationVariables = Exact<{ + id: Scalars['ID']; + input: TaxClassUpdateInput; +}>; -export type TaxTypeListQuery = { __typename: 'Query', taxTypes: Array<{ __typename: 'TaxType', description: string | null, taxCode: string | null }> | null }; +export type TaxClassUpdateMutation = { __typename: 'Mutation', taxClassUpdate: { __typename: 'TaxClassUpdate', errors: Array<{ __typename: 'TaxClassUpdateError', field: string | null, code: TaxClassUpdateErrorCode }>, taxClass: { __typename: 'TaxClass', id: string, name: string, countries: Array<{ __typename: 'TaxClassCountryRate', rate: number, country: { __typename: 'CountryDisplay', country: string, code: string } }> } | null } | null }; + +export type TaxClassCreateMutationVariables = Exact<{ + input: TaxClassCreateInput; +}>; + + +export type TaxClassCreateMutation = { __typename: 'Mutation', taxClassCreate: { __typename: 'TaxClassCreate', errors: Array<{ __typename: 'TaxClassCreateError', field: string | null, code: TaxClassCreateErrorCode }>, taxClass: { __typename: 'TaxClass', id: string, name: string, countries: Array<{ __typename: 'TaxClassCountryRate', rate: number, country: { __typename: 'CountryDisplay', country: string, code: string } }> } | null } | null }; + +export type TaxClassDeleteMutationVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type TaxClassDeleteMutation = { __typename: 'Mutation', taxClassDelete: { __typename: 'TaxClassDelete', errors: Array<{ __typename: 'TaxClassDeleteError', field: string | null, code: TaxClassDeleteErrorCode }> } | null }; + +export type TaxConfigurationsListQueryVariables = Exact<{ + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + filter?: InputMaybe; +}>; + + +export type TaxConfigurationsListQuery = { __typename: 'Query', taxConfigurations: { __typename: 'TaxConfigurationCountableConnection', edges: Array<{ __typename: 'TaxConfigurationCountableEdge', node: { __typename: 'TaxConfiguration', id: string, displayGrossPrices: boolean, pricesEnteredWithTax: boolean, chargeTaxes: boolean, taxCalculationStrategy: TaxCalculationStrategy | null, channel: { __typename: 'Channel', id: string, name: string }, countries: Array<{ __typename: 'TaxConfigurationPerCountry', chargeTaxes: boolean, taxCalculationStrategy: TaxCalculationStrategy | null, displayGrossPrices: boolean, country: { __typename: 'CountryDisplay', country: string, code: string } }> } }> } | null }; + +export type TaxCountriesListQueryVariables = Exact<{ [key: string]: never; }>; + + +export type TaxCountriesListQuery = { __typename: 'Query', taxCountryConfigurations: Array<{ __typename: 'TaxCountryConfiguration', country: { __typename: 'CountryDisplay', country: string, code: string }, taxClassCountryRates: Array<{ __typename: 'TaxClassCountryRate', rate: number, taxClass: { __typename: 'TaxClass', id: string, name: string } | null }> }> | null }; + +export type TaxClassesListQueryVariables = Exact<{ + before?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + filter?: InputMaybe; + sortBy?: InputMaybe; +}>; + + +export type TaxClassesListQuery = { __typename: 'Query', taxClasses: { __typename: 'TaxClassCountableConnection', edges: Array<{ __typename: 'TaxClassCountableEdge', node: { __typename: 'TaxClass', id: string, name: string, countries: Array<{ __typename: 'TaxClassCountryRate', rate: number, country: { __typename: 'CountryDisplay', country: string, code: string } }> } }> } | null }; + +export type TaxClassAssignQueryVariables = Exact<{ + first?: InputMaybe; + after?: InputMaybe; +}>; + + +export type TaxClassAssignQuery = { __typename: 'Query', taxClasses: { __typename: 'TaxClassCountableConnection', edges: Array<{ __typename: 'TaxClassCountableEdge', node: { __typename: 'TaxClass', id: string, name: string } }>, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, endCursor: string | null } } | null }; export type UpdateProductTranslationsMutationVariables = Exact<{ id: Scalars['ID']; @@ -9089,7 +9346,7 @@ export type UpdateMetadataMutationVariables = Exact<{ }>; -export type UpdateMetadataMutation = { __typename: 'Mutation', updateMetadata: { __typename: 'UpdateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'CheckoutLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'OrderLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TransactionItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null, deleteMetadata: { __typename: 'DeleteMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'CheckoutLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'OrderLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TransactionItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type UpdateMetadataMutation = { __typename: 'Mutation', updateMetadata: { __typename: 'UpdateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'CheckoutLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'OrderLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TaxClass', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TaxConfiguration', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TransactionItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null, deleteMetadata: { __typename: 'DeleteMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'CheckoutLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'OrderLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TaxClass', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TaxConfiguration', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TransactionItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type UpdatePrivateMetadataMutationVariables = Exact<{ id: Scalars['ID']; @@ -9098,7 +9355,7 @@ export type UpdatePrivateMetadataMutationVariables = Exact<{ }>; -export type UpdatePrivateMetadataMutation = { __typename: 'Mutation', updatePrivateMetadata: { __typename: 'UpdatePrivateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'CheckoutLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'OrderLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TransactionItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null, deletePrivateMetadata: { __typename: 'DeletePrivateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'CheckoutLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'OrderLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TransactionItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; +export type UpdatePrivateMetadataMutation = { __typename: 'Mutation', updatePrivateMetadata: { __typename: 'UpdatePrivateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'CheckoutLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'OrderLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TaxClass', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TaxConfiguration', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TransactionItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null, deletePrivateMetadata: { __typename: 'DeletePrivateMetadata', errors: Array<{ __typename: 'MetadataError', code: MetadataErrorCode, field: string | null, message: string | null }>, item: { __typename: 'App', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Attribute', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Category', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Checkout', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'CheckoutLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Collection', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'DigitalContent', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Fulfillment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'GiftCard', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Invoice', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Menu', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'MenuItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Order', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'OrderLine', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Page', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'PageType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Payment', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Product', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ProductVariant', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Sale', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethod', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingMethodType', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'ShippingZone', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TaxClass', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TaxConfiguration', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'TransactionItem', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'User', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Voucher', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | { __typename: 'Warehouse', id: string, metadata: Array<{ __typename: 'MetadataItem', key: string, value: string }>, privateMetadata: Array<{ __typename: 'MetadataItem', key: string, value: string }> } | null } | null }; export type WarehouseDeleteMutationVariables = Exact<{ id: Scalars['ID']; diff --git a/src/hooks/useForm.ts b/src/hooks/useForm.ts index e8430582e..32d55bb31 100644 --- a/src/hooks/useForm.ts +++ b/src/hooks/useForm.ts @@ -34,6 +34,7 @@ export interface UseFormOpts { formId?: FormId; checkIfSaveIsDisabled?: CheckIfSaveIsDisabledFnType; disabled?: boolean; + mergeData?: boolean; } export interface UseFormResult @@ -87,10 +88,11 @@ function useForm( formId: propsFormId, checkIfSaveIsDisabled, disabled, + mergeData = true, } = opts; const [errors, setErrors] = useState>({}); const [data, setData] = useStateFromProps(initialData, { - mergeFunc: merge, + mergeFunc: mergeData ? merge : undefined, }); const isSaveDisabled = () => { diff --git a/src/hooks/useLocalSearch.ts b/src/hooks/useLocalSearch.ts new file mode 100644 index 000000000..db4951f8a --- /dev/null +++ b/src/hooks/useLocalSearch.ts @@ -0,0 +1,37 @@ +import React from "react"; + +/** + * This function removes characters which break + * regexps but are rarely useful in searches + */ +const parseQuery = (query: string) => + query.replace(/([.?*+\-=:^$\\[\]<>(){}|])/g, "\\$&"); + +/** + * useLocalSearch is a hook that is useful when client-side + * search is used on particular array of items. + * + * @param array Array to search through + * @param getStringToSearch Function which specifies object + * property (possibly nested) on which search is used, eg: + * (element) => element.name where name is a string + * @returns query, setQuery - useState result + * searchResult - filtered array + */ +export function useLocalSearch( + array: T[] | undefined, + getStringToSearch: (element: T) => string, +) { + const [query, setQuery] = React.useState(""); + const searchResult = React.useMemo( + () => + array?.filter( + element => + getStringToSearch(element).search( + new RegExp(parseQuery(query), "i"), + ) >= 0, + ), + [array, query], + ); + return { query, setQuery, searchResult }; +} diff --git a/src/hooks/useStateFromProps.ts b/src/hooks/useStateFromProps.ts index 66f5e23a6..b977d8374 100644 --- a/src/hooks/useStateFromProps.ts +++ b/src/hooks/useStateFromProps.ts @@ -5,7 +5,11 @@ export interface UseStateFromPropsOpts { mergeFunc?: (prevData: T, state: T, newData: T) => T; onRefresh?: (prevData: T, data: T) => void; } - +/** + * @deprecated This function updates state every time initial + * value changes, but uses deep comparisons to detect changes. + * You're most likely looking for `useStateUpdate` instead. + */ function useStateFromProps( data: T, opts: UseStateFromPropsOpts = {}, diff --git a/src/hooks/useStateUpdate.ts b/src/hooks/useStateUpdate.ts new file mode 100644 index 000000000..d953daad8 --- /dev/null +++ b/src/hooks/useStateUpdate.ts @@ -0,0 +1,14 @@ +import React from "react"; + +/** useState, but updates state every time initial value changes. */ +export function useStateUpdate( + data: T, +): [T, React.Dispatch>] { + const [state, setState] = React.useState(data); + + React.useEffect(() => { + setState(data); + }, [data]); + + return [state, setState]; +} diff --git a/src/index.tsx b/src/index.tsx index 840e7a2dd..c047b2a8e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -229,11 +229,7 @@ const Routes: React.FC = () => { path="/site-settings" component={SiteSettingsSection} /> - + >; kind: ProductTypeKindEnum; onChangeKind: (kind: ProductTypeKindEnum) => void; onSubmit: (data: ProductTypeForm) => SubmitPromise; + onFetchMoreTaxClasses: FetchMoreProps; } const formInitialData: ProductTypeForm = { @@ -53,38 +57,26 @@ const formInitialData: ProductTypeForm = { name: "", kind: ProductTypeKindEnum.NORMAL, privateMetadata: [], - taxType: "", + taxClassId: "", weight: 0, }; -function handleTaxTypeChange( - event: ChangeEvent, - taxTypes: ProductTypeDetailsQuery["taxTypes"], - formChange: FormChange, - displayChange: (name: string) => void, -) { - formChange(event); - displayChange( - taxTypes.find(taxType => taxType.taxCode === event.target.value) - .description, - ); -} - const ProductTypeCreatePage: React.FC = ({ defaultWeightUnit, disabled, errors, pageTitle, saveButtonBarState, - taxTypes, + taxClasses, kind, onChangeKind, onSubmit, + onFetchMoreTaxClasses, }: ProductTypeCreatePageProps) => { const intl = useIntl(); const navigate = useNavigator(); - const [taxTypeDisplayName, setTaxTypeDisplayName] = useStateFromProps(""); + const [taxClassDisplayName, setTaxClassDisplayName] = useStateFromProps(""); const { makeChangeHandler: makeMetadataChangeHandler, } = useMetadataChangeTrigger(); @@ -128,16 +120,17 @@ const ProductTypeCreatePage: React.FC = ({ - handleTaxTypeChange( + handleTaxClassChange( event, - taxTypes, + taxClasses, change, - setTaxTypeDisplayName, + setTaxClassDisplayName, ) } + onFetchMore={onFetchMoreTaxClasses} /> diff --git a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx index e03dc7f1c..e2bb78d2f 100644 --- a/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx +++ b/src/productTypes/components/ProductTypeDetailsPage/ProductTypeDetailsPage.tsx @@ -12,16 +12,23 @@ import { ProductAttributeType, ProductTypeDetailsQuery, ProductTypeKindEnum, + TaxClassFragment, WeightUnitsEnum, } from "@saleor/graphql"; -import { ChangeEvent, FormChange, SubmitPromise } from "@saleor/hooks/useForm"; +import { SubmitPromise } from "@saleor/hooks/useForm"; import useNavigator from "@saleor/hooks/useNavigator"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; import { sectionNames } from "@saleor/intl"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { maybe } from "@saleor/misc"; +import { handleTaxClassChange } from "@saleor/productTypes/handlers"; import { productTypeListUrl } from "@saleor/productTypes/urls"; -import { ListActions, ReorderEvent, UserError } from "@saleor/types"; +import { + FetchMoreProps, + ListActions, + ReorderEvent, + UserError, +} from "@saleor/types"; import { mapMetadataItemToInput } from "@saleor/utils/maps"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import React from "react"; @@ -43,7 +50,7 @@ export interface ProductTypeForm extends MetadataFormData { kind: ProductTypeKindEnum; hasVariants: boolean; isShippingRequired: boolean; - taxType: string; + taxClassId: string; productAttributes: ChoiceType[]; variantAttributes: ChoiceType[]; weight: number; @@ -57,7 +64,7 @@ export interface ProductTypeDetailsPageProps { pageTitle: string; productAttributeList: ListActions; saveButtonBarState: ConfirmButtonTransitionState; - taxTypes: ProductTypeDetailsQuery["taxTypes"]; + taxClasses: Array>; variantAttributeList: ListActions; onAttributeAdd: (type: ProductAttributeType) => void; onAttributeReorder: (event: ReorderEvent, type: ProductAttributeType) => void; @@ -67,19 +74,7 @@ export interface ProductTypeDetailsPageProps { onSubmit: (data: ProductTypeForm) => SubmitPromise; setSelectedVariantAttributes: (data: string[]) => void; selectedVariantAttributes: string[]; -} - -function handleTaxTypeChange( - event: ChangeEvent, - taxTypes: ProductTypeDetailsQuery["taxTypes"], - formChange: FormChange, - displayChange: (name: string) => void, -) { - formChange(event); - displayChange( - taxTypes.find(taxType => taxType.taxCode === event.target.value) - .description, - ); + onFetchMoreTaxClasses: FetchMoreProps; } const ProductTypeDetailsPage: React.FC = ({ @@ -90,7 +85,7 @@ const ProductTypeDetailsPage: React.FC = ({ productType, productAttributeList, saveButtonBarState, - taxTypes, + taxClasses, variantAttributeList, onAttributeAdd, onAttributeUnassign, @@ -100,6 +95,7 @@ const ProductTypeDetailsPage: React.FC = ({ onSubmit, setSelectedVariantAttributes, selectedVariantAttributes, + onFetchMoreTaxClasses, }) => { const intl = useIntl(); const navigate = useNavigator(); @@ -110,8 +106,8 @@ const ProductTypeDetailsPage: React.FC = ({ makeChangeHandler: makeMetadataChangeHandler, } = useMetadataChangeTrigger(); - const [taxTypeDisplayName, setTaxTypeDisplayName] = useStateFromProps( - maybe(() => productType.taxType.description, ""), + const [taxClassDisplayName, setTaxClassDisplayName] = useStateFromProps( + productType?.taxClass?.name ?? "", ); const formInitialData: ProductTypeForm = { hasVariants: @@ -133,7 +129,7 @@ const ProductTypeDetailsPage: React.FC = ({ value: attribute.id, })) : [], - taxType: maybe(() => productType.taxType.taxCode, ""), + taxClassId: productType?.taxClass?.id ?? "", variantAttributes: maybe(() => productType.variantAttributes) !== undefined ? productType.variantAttributes.map(attribute => ({ @@ -186,16 +182,17 @@ const ProductTypeDetailsPage: React.FC = ({ - handleTaxTypeChange( + handleTaxClassChange( event, - taxTypes, + taxClasses, change, - setTaxTypeDisplayName, + setTaxClassDisplayName, ) } + onFetchMore={onFetchMoreTaxClasses} /> = props => { @@ -194,11 +194,7 @@ const ProductTypeList: React.FC = props => { )} - {maybe(() => productType.taxType) ? ( - productType.taxType.description - ) : ( - - )} + {productType?.taxClass?.name ?? "-"} ); diff --git a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx index 2681fcfcc..bbd45eb59 100644 --- a/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx +++ b/src/productTypes/components/ProductTypeTaxes/ProductTypeTaxes.tsx @@ -1,22 +1,25 @@ import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; -import { ProductTypeDetailsQuery } from "@saleor/graphql"; +import { TaxClassFragment } from "@saleor/graphql"; +import { sectionNames } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; +import { taxesMessages } from "@saleor/taxes/messages"; +import { FetchMoreProps } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; -import { maybe } from "../../../misc"; import { ProductTypeForm } from "../ProductTypeDetailsPage/ProductTypeDetailsPage"; interface ProductTypeTaxesProps { data: { - taxType: string; + taxClassId: string; }; - taxTypeDisplayName: string; - taxTypes: ProductTypeDetailsQuery["taxTypes"]; + taxClassDisplayName: string; + taxClasses: Array>; disabled: boolean; onChange: (event: React.ChangeEvent) => void; + onFetchMore: FetchMoreProps; } const useStyles = makeStyles( @@ -29,39 +32,38 @@ const useStyles = makeStyles( ); const ProductTypeTaxes: React.FC = props => { - const { data, disabled, taxTypes, taxTypeDisplayName, onChange } = props; + const { + data, + disabled, + taxClasses, + taxClassDisplayName, + onChange, + onFetchMore, + } = props; const classes = useStyles(props); const intl = useIntl(); return ( - + - taxTypes.map(c => ({ label: c.description, value: c.taxCode })), - [], - )} + value={data.taxClassId} + choices={taxClasses.map(choice => ({ + label: choice.name, + value: choice.id, + }))} InputProps={{ autoComplete: "off", }} + {...onFetchMore} /> diff --git a/src/productTypes/fixtures.ts b/src/productTypes/fixtures.ts index f6995bc6f..f9fdd0a68 100644 --- a/src/productTypes/fixtures.ts +++ b/src/productTypes/fixtures.ts @@ -1007,10 +1007,10 @@ export const productTypeSearch: ProductTypeQuery["productType"] = { id: "UHJvZHVjdFR5cGU6NA==", name: "Candy", productAttributes: [attributes[0]], - taxType: { - __typename: "TaxType" as "TaxType", - description: "PB100000", - taxCode: "Books / Manuals", + taxClass: { + __typename: "TaxClass" as "TaxClass", + name: "PB100000", + id: "Books / Manuals", }, }; @@ -1026,10 +1026,10 @@ export const productTypes: Array>, + formChange: FormChange, + displayChange: (name: string) => void, +) { + formChange(event); + displayChange( + taxClasses.find(taxClass => taxClass.id === event.target.value)?.name ?? "", + ); +} diff --git a/src/productTypes/queries.ts b/src/productTypes/queries.ts index 3679ec48a..a7a256780 100644 --- a/src/productTypes/queries.ts +++ b/src/productTypes/queries.ts @@ -37,10 +37,6 @@ export const productTypeDetailsQuery = gql` shop { defaultWeightUnit } - taxTypes { - taxCode - description - } } `; @@ -49,9 +45,5 @@ export const productTypeCreateDataQuery = gql` shop { defaultWeightUnit } - taxTypes { - taxCode - description - } } `; diff --git a/src/productTypes/views/ProductTypeCreate.tsx b/src/productTypes/views/ProductTypeCreate.tsx index 731b7f55c..b1d7ac051 100644 --- a/src/productTypes/views/ProductTypeCreate.tsx +++ b/src/productTypes/views/ProductTypeCreate.tsx @@ -8,6 +8,7 @@ import { } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useNotifier from "@saleor/hooks/useNotifier"; +import { useTaxClassFetchMore } from "@saleor/taxes/utils/useTaxClassFetchMore"; import createMetadataCreateHandler from "@saleor/utils/handlers/metadataCreateHandler"; import React from "react"; import { useIntl } from "react-intl"; @@ -47,6 +48,8 @@ export const ProductTypeCreate: React.FC = ({ displayLoader: true, }); + const { taxClasses, fetchMoreTaxClasses } = useTaxClassFetchMore(); + const [ createProductType, createProductTypeOpts, @@ -73,7 +76,7 @@ export const ProductTypeCreate: React.FC = ({ isShippingRequired: formData.isShippingRequired, name: formData.name, kind: formData.kind, - taxCode: formData.taxType, + taxClass: formData.taxClassId, weight: formData.weight, }, }, @@ -110,7 +113,8 @@ export const ProductTypeCreate: React.FC = ({ description: "header", })} saveButtonBarState={createProductTypeOpts.status} - taxTypes={data?.taxTypes || []} + taxClasses={taxClasses ?? []} + onFetchMoreTaxClasses={fetchMoreTaxClasses} kind={params.kind} onChangeKind={handleChangeKind} onSubmit={handleSubmit} diff --git a/src/productTypes/views/ProductTypeUpdate/index.tsx b/src/productTypes/views/ProductTypeUpdate/index.tsx index 0cb33c75d..4c9a4c305 100644 --- a/src/productTypes/views/ProductTypeUpdate/index.tsx +++ b/src/productTypes/views/ProductTypeUpdate/index.tsx @@ -26,6 +26,7 @@ import { getStringOrPlaceholder, maybe } from "@saleor/misc"; import useProductTypeDelete from "@saleor/productTypes/hooks/useProductTypeDelete"; import useProductTypeOperations from "@saleor/productTypes/hooks/useProductTypeOperations"; import useAvailableProductAttributeSearch from "@saleor/searches/useAvailableProductAttributeSearch"; +import { useTaxClassFetchMore } from "@saleor/taxes/utils/useTaxClassFetchMore"; import { ReorderEvent } from "@saleor/types"; import createMetadataUpdateHandler from "@saleor/utils/handlers/metadataUpdateHandler"; import { mapEdgesToItems } from "@saleor/utils/maps"; @@ -142,7 +143,7 @@ export const ProductTypeUpdate: React.FC = ({ productAttributes: formData.productAttributes.map( choice => choice.value, ), - taxCode: formData.taxType, + taxClass: formData.taxClassId, variantAttributes: formData.variantAttributes.map( choice => choice.value, ), @@ -168,6 +169,8 @@ export const ProductTypeUpdate: React.FC = ({ variables: { id }, }); + const { taxClasses, fetchMoreTaxClasses } = useTaxClassFetchMore(); + const productType = data?.productType; const closeModal = () => navigate(productTypeUrl(id), { replace: true }); @@ -321,7 +324,7 @@ export const ProductTypeUpdate: React.FC = ({ saveButtonBarState={ updateProductTypeOpts.status || updateProductAttributesOpts.status } - taxTypes={maybe(() => data.taxTypes, [])} + taxClasses={taxClasses ?? []} selectedVariantAttributes={selectedVariantAttributes} setSelectedVariantAttributes={setSelectedVariantAttributes} onAttributeAdd={type => @@ -398,6 +401,7 @@ export const ProductTypeUpdate: React.FC = ({ ), }} + onFetchMoreTaxClasses={fetchMoreTaxClasses} /> {!dataLoading && ( <> diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index 94eeca82a..72cb8a3c0 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -28,7 +28,7 @@ import { SearchProductsQuery, SearchProductTypesQuery, SearchWarehousesQuery, - TaxTypeFragment, + TaxClassFragment, } from "@saleor/graphql"; import useNavigator from "@saleor/hooks/useNavigator"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; @@ -75,7 +75,8 @@ interface ProductCreatePageProps { saveButtonBarState: ConfirmButtonTransitionState; weightUnit: string; warehouses: RelayToFlat; - taxTypes: TaxTypeFragment[]; + taxClasses: Array>; + fetchMoreTaxClasses: FetchMoreProps; selectedProductType?: ProductTypeQuery["productType"]; fetchCategories: (data: string) => void; fetchCollections: (data: string) => void; @@ -117,7 +118,8 @@ export const ProductCreatePage: React.FC = ({ referenceProducts = [], saveButtonBarState, warehouses, - taxTypes, + taxClasses, + fetchMoreTaxClasses, selectedProductType, fetchProductTypes, weightUnit, @@ -149,18 +151,18 @@ export const ProductCreatePage: React.FC = ({ MultiAutocompleteChoiceType[] >([]); - const [selectedTaxType, setSelectedTaxType] = useStateFromProps( - initial?.taxCode || null, + const [selectedTaxClass, setSelectedTaxClass] = useStateFromProps( + initial?.taxClassId ?? "", ); const categories = getChoices(categoryChoiceList); const collections = getChoices(collectionChoiceList); const productTypes = getChoices(productTypeChoiceList); - const taxTypeChoices = - taxTypes?.map(taxType => ({ - label: taxType.description, - value: taxType.taxCode, - })) || []; + const taxClassChoices = + taxClasses?.map(taxClass => ({ + label: taxClass.name, + value: taxClass.id, + })) ?? []; const canOpenAssignReferencesAttributeDialog = !!assignReferencesAttributeId; @@ -194,9 +196,9 @@ export const ProductCreatePage: React.FC = ({ selectedCollections={selectedCollections} setSelectedCategory={setSelectedCategory} setSelectedCollections={setSelectedCollections} - setSelectedTaxType={setSelectedTaxType} + setSelectedTaxClass={setSelectedTaxClass} setChannels={onChannelsChange} - taxTypes={taxTypeChoices} + taxClasses={taxClassChoices} warehouses={warehouses} currentChannels={currentChannels} fetchReferencePages={fetchReferencePages} @@ -362,12 +364,12 @@ export const ProductCreatePage: React.FC = ({ )}
diff --git a/src/products/components/ProductCreatePage/form.tsx b/src/products/components/ProductCreatePage/form.tsx index 5e0a6aed6..c56aaa4be 100644 --- a/src/products/components/ProductCreatePage/form.tsx +++ b/src/products/components/ProductCreatePage/form.tsx @@ -74,9 +74,7 @@ import { ProductStockFormsetData, ProductStockInput } from "../ProductStocks"; export interface ProductCreateFormData extends MetadataFormData { category: string; - changeTaxCode: boolean; channelListings: ChannelData[]; - chargeTaxes: boolean; collections: string[]; description: OutputData; isAvailable: boolean; @@ -88,7 +86,6 @@ export interface ProductCreateFormData extends MetadataFormData { sku: string; slug: string; stockQuantity: number; - taxCode: string; trackInventory: boolean; isPreorder: boolean; globalThreshold: string; @@ -96,6 +93,7 @@ export interface ProductCreateFormData extends MetadataFormData { hasPreorderEndDate: boolean; preorderEndDateTime: string; weight: string; + taxClassId: string; } export interface ProductCreateData extends ProductCreateFormData { attributes: AttributeInput[]; @@ -109,7 +107,7 @@ export interface ProductCreateHandlers | "selectCategory" | "selectCollection" | "selectProductType" - | "selectTaxRate", + | "selectTaxClass", FormChange >, Record< @@ -150,14 +148,14 @@ export type UseProductCreateFormRenderProps = Omit< export interface UseProductCreateFormOpts extends Record< - "categories" | "collections" | "taxTypes", + "categories" | "collections" | "taxClasses", SingleAutocompleteChoiceType[] > { setSelectedCategory: React.Dispatch>; setSelectedCollections: React.Dispatch< React.SetStateAction >; - setSelectedTaxType: React.Dispatch>; + setSelectedTaxClass: React.Dispatch>; setChannels: (channels: ChannelData[]) => void; selectedCollections: MultiAutocompleteChoiceType[]; productTypes: RelayToFlat; @@ -194,9 +192,7 @@ function useProductCreateForm( const defaultInitialFormData: ProductCreateFormData & Record<"productType", string> = { category: "", - changeTaxCode: false, channelListings: opts.currentChannels, - chargeTaxes: false, collections: [], description: null, isAvailable: false, @@ -210,7 +206,7 @@ function useProductCreateForm( sku: "", slug: "", stockQuantity: null, - taxCode: null, + taxClassId: "", trackInventory: false, weight: "", globalSoldUnits: 0, @@ -331,10 +327,10 @@ function useProductCreateForm( triggerChange(); stocks.remove(id); }; - const handleTaxTypeSelect = createSingleAutocompleteSelectHandler( + const handleTaxClassSelect = createSingleAutocompleteSelectHandler( handleChange, - opts.setSelectedTaxType, - opts.taxTypes, + opts.setSelectedTaxClass, + opts.taxClasses, ); const changeMetadata = makeMetadataChangeHandler(handleChange); const handleChannelsChange = createChannelsChangeHandler( @@ -478,7 +474,7 @@ function useProductCreateForm( selectCategory: handleCategorySelect, selectCollection: handleCollectionSelect, selectProductType: handleProductTypeSelect, - selectTaxRate: handleTaxTypeSelect, + selectTaxClass: handleTaxClassSelect, }, submit, isSaveDisabled, diff --git a/src/products/components/ProductTaxes/ProductTaxes.tsx b/src/products/components/ProductTaxes/ProductTaxes.tsx index c260c8574..7ce859dd5 100644 --- a/src/products/components/ProductTaxes/ProductTaxes.tsx +++ b/src/products/components/ProductTaxes/ProductTaxes.tsx @@ -1,114 +1,70 @@ import { Card, CardContent } from "@material-ui/core"; import CardTitle from "@saleor/components/CardTitle"; -import ControlledCheckbox from "@saleor/components/ControlledCheckbox"; -import Hr from "@saleor/components/Hr"; import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; -import { TaxTypeFragment } from "@saleor/graphql"; -import { FormChange } from "@saleor/hooks/useForm"; +import { TaxClassFragment } from "@saleor/graphql"; import { sectionNames } from "@saleor/intl"; import { makeStyles } from "@saleor/macaw-ui"; +import { taxesMessages } from "@saleor/taxes/messages"; +import { FetchMoreProps } from "@saleor/types"; import React from "react"; import { useIntl } from "react-intl"; -export interface ProductTaxesProps { - data: { - changeTaxCode: boolean; - chargeTaxes: boolean; - taxCode: string; - }; +import { ProductCreateFormData } from "../ProductCreatePage"; + +interface ProductTaxesProps { + value: string; + taxClassDisplayName: string; + taxClasses: Array>; disabled: boolean; - selectedTaxTypeDisplayName: string; - taxTypes: TaxTypeFragment[]; - onChange: FormChange; - onTaxTypeChange: FormChange; + onChange: (event: React.ChangeEvent) => void; + onFetchMore: FetchMoreProps; } const useStyles = makeStyles( - theme => ({ - content: { - paddingTop: theme.spacing(2), - }, - hr: { - margin: theme.spacing(2, 0), - }, - select: { - margin: theme.spacing(2, 0), - }, - }), { - name: "ProductTaxes", + root: { + overflow: "visible", + }, }, + { name: "ProductTaxes" }, ); -const ProductTaxes: React.FC = ({ - data, - disabled, - selectedTaxTypeDisplayName, - taxTypes, - onChange, - onTaxTypeChange, -}) => { +const ProductTaxes: React.FC = props => { + const { + value, + disabled, + taxClasses, + taxClassDisplayName, + onChange, + onFetchMore, + } = props; + const classes = useStyles(props); + const intl = useIntl(); - const classes = useStyles({}); return ( - + - - + ({ + label: choice.name, + value: choice.id, + }))} + InputProps={{ + autoComplete: "off", + }} + {...onFetchMore} /> -
- - {data.changeTaxCode && ( - ({ - label: taxType.description, - value: taxType.taxCode, - })) || [] - } - InputProps={{ - autoComplete: "off", - }} - /> - )}
); }; - ProductTaxes.displayName = "ProductTaxes"; export default ProductTaxes; diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.test.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.test.tsx index 3f41d175a..b7819de73 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.test.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.test.tsx @@ -3,7 +3,6 @@ import { channelsList } from "@saleor/channels/fixtures"; import { collections } from "@saleor/collections/fixtures"; import { fetchMoreProps, limits } from "@saleor/fixtures"; import { product as productFixture } from "@saleor/products/fixtures"; -import { taxTypes } from "@saleor/storybook/stories/taxes/fixtures"; import { warehouseList } from "@saleor/warehouses/fixtures"; import Wrapper from "@test/wrapper"; import { configure, mount } from "enzyme"; @@ -14,6 +13,7 @@ import ProductUpdatePage, { ProductUpdatePageProps } from "./ProductUpdatePage"; const product = productFixture(placeholderImage); import * as _useNavigator from "@saleor/hooks/useNavigator"; +import { taxClasses } from "@saleor/taxes/fixtures"; import Adapter from "@wojtekmaj/enzyme-adapter-react-17"; import { act } from "react-dom/test-utils"; import { MemoryRouter } from "react-router-dom"; @@ -82,7 +82,8 @@ const props: ProductUpdatePageProps = { referencePages: [], referenceProducts: [], saveButtonBarState: "default", - taxTypes, + taxClasses, + fetchMoreTaxClasses: undefined, variants: product.variants, warehouses: warehouseList, attributeValues: [], diff --git a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx index b2ec653b1..e41333c77 100644 --- a/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx +++ b/src/products/components/ProductUpdatePage/ProductUpdatePage.tsx @@ -35,7 +35,7 @@ import { SearchCollectionsQuery, SearchPagesQuery, SearchProductsQuery, - TaxTypeFragment, + TaxClassFragment, WarehouseFragment, } from "@saleor/graphql"; import { SubmitPromise } from "@saleor/hooks/useForm"; @@ -89,7 +89,8 @@ export interface ProductUpdatePageProps { header: string; saveButtonBarState: ConfirmButtonTransitionState; warehouses: WarehouseFragment[]; - taxTypes: TaxTypeFragment[]; + taxClasses: Array>; + fetchMoreTaxClasses: FetchMoreProps; referencePages?: RelayToFlat; referenceProducts?: RelayToFlat; assignReferencesAttributeId?: string; @@ -143,7 +144,8 @@ export const ProductUpdatePage: React.FC = ({ saveButtonBarState, variants, warehouses, - taxTypes, + taxClasses, + fetchMoreTaxClasses, referencePages = [], referenceProducts = [], onDelete, @@ -184,17 +186,17 @@ export const ProductUpdatePage: React.FC = ({ getChoices(maybe(() => product.collections, [])), ); - const [selectedTaxType, setSelectedTaxType] = useStateFromProps( - product?.taxType.description, + const [selectedTaxClass, setSelectedTaxClass] = useStateFromProps( + product?.taxClass?.name ?? "", ); const categories = getChoices(categoryChoiceList); const collections = getChoices(collectionChoiceList); const hasVariants = product?.productType?.hasVariants; - const taxTypeChoices = - taxTypes?.map(taxType => ({ - label: taxType.description, - value: taxType.taxCode, + const taxClassesChoices = + taxClasses?.map(taxClass => ({ + label: taxClass.name, + value: taxClass.id, })) || []; const canOpenAssignReferencesAttributeDialog = !!assignReferencesAttributeId; @@ -250,8 +252,8 @@ export const ProductUpdatePage: React.FC = ({ selectedCollections={selectedCollections} setSelectedCategory={setSelectedCategory} setSelectedCollections={setSelectedCollections} - setSelectedTaxType={setSelectedTaxType} - taxTypes={taxTypeChoices} + setSelectedTaxClass={setSelectedTaxClass} + taxClasses={taxClassesChoices} warehouses={warehouses} hasVariants={hasVariants} referencePages={referencePages} @@ -420,12 +422,12 @@ export const ProductUpdatePage: React.FC = ({ /> diff --git a/src/products/components/ProductUpdatePage/form.tsx b/src/products/components/ProductUpdatePage/form.tsx index de8c69985..1a7c4eb29 100644 --- a/src/products/components/ProductUpdatePage/form.tsx +++ b/src/products/components/ProductUpdatePage/form.tsx @@ -163,10 +163,10 @@ function useProductUpdateForm( attributes.data, triggerChange, ); - const handleTaxTypeSelect = createSingleAutocompleteSelectHandler( + const handleTaxClassSelect = createSingleAutocompleteSelectHandler( handleChange, - opts.setSelectedTaxType, - opts.taxTypes, + opts.setSelectedTaxClass, + opts.taxClasses, ); const changeMetadata = makeMetadataChangeHandler(handleChange); @@ -295,7 +295,7 @@ function useProductUpdateForm( selectAttributeReference: handleAttributeReferenceChange, selectCategory: handleCategorySelect, selectCollection: handleCollectionSelect, - selectTaxRate: handleTaxTypeSelect, + selectTaxClass: handleTaxClassSelect, updateChannelList: handleChannelListUpdate, }, submit, diff --git a/src/products/components/ProductUpdatePage/types.ts b/src/products/components/ProductUpdatePage/types.ts index cbe914ee1..fb83d7592 100644 --- a/src/products/components/ProductUpdatePage/types.ts +++ b/src/products/components/ProductUpdatePage/types.ts @@ -35,8 +35,7 @@ import { ProductChannelsListingDialogSubmit } from "./ProductChannelsListingsDia export interface ProductUpdateFormData extends MetadataFormData { category: string | null; - changeTaxCode: boolean; - chargeTaxes: boolean; + taxClassId: string; collections: string[]; isAvailable: boolean; name: string; @@ -45,7 +44,6 @@ export interface ProductUpdateFormData extends MetadataFormData { seoDescription: string; seoTitle: string; sku: string; - taxCode: string; trackInventory: boolean; isPreorder: boolean; globalThreshold: string; @@ -85,7 +83,7 @@ export interface ProductUpdateHandlers | "changeMetadata" | "selectCategory" | "selectCollection" - | "selectTaxRate", + | "selectTaxClass", FormChange >, Record< @@ -119,14 +117,14 @@ export type UseProductUpdateFormRenderProps = Omit< export interface UseProductUpdateFormOpts extends Record< - "categories" | "collections" | "taxTypes", + "categories" | "collections" | "taxClasses", SingleAutocompleteChoiceType[] > { setSelectedCategory: React.Dispatch>; setSelectedCollections: React.Dispatch< React.SetStateAction >; - setSelectedTaxType: React.Dispatch>; + setSelectedTaxClass: React.Dispatch>; selectedCollections: MultiAutocompleteChoiceType[]; warehouses: RelayToFlat; hasVariants: boolean; diff --git a/src/products/fixtures.ts b/src/products/fixtures.ts index 6d8466ded..a0f3d74d0 100644 --- a/src/products/fixtures.ts +++ b/src/products/fixtures.ts @@ -464,10 +464,10 @@ export const product: ( }, }, ], - taxType: { - __typename: "TaxType", - description: "standard", - taxCode: "standard", + taxClass: { + __typename: "TaxClass", + name: "standard", + id: "standard", }, variantAttributes: [ { @@ -591,10 +591,10 @@ export const product: ( seoTitle: "Seo title", sku: "59661-34207", slug: "Borders", - taxType: { - __typename: "TaxType", - description: "standard", - taxCode: "standard", + taxClass: { + __typename: "TaxClass", + name: "standard", + id: "standard", }, thumbnail: { __typename: "Image" as "Image", url: placeholderImage }, url: "/example-url", diff --git a/src/products/queries.ts b/src/products/queries.ts index 902a8b5dd..6ae86fa4d 100644 --- a/src/products/queries.ts +++ b/src/products/queries.ts @@ -114,9 +114,6 @@ export const productDetailsQuery = gql` product(id: $id, channel: $channel) { ...Product } - taxTypes { - ...TaxType - } } `; @@ -149,8 +146,9 @@ export const productTypeQuery = gql` ...AttributeValueList } } - taxType { - ...TaxType + taxClass { + id + name } } } diff --git a/src/products/utils/data.ts b/src/products/utils/data.ts index 745eee71e..232211098 100644 --- a/src/products/utils/data.ts +++ b/src/products/utils/data.ts @@ -201,8 +201,7 @@ export function getProductUpdatePageFormData( return { category: maybe(() => product.category.id, ""), - changeTaxCode: !!product?.taxType.taxCode, - chargeTaxes: maybe(() => product.chargeTaxes, false), + taxClassId: product?.taxClass?.id, collections: maybe( () => product.collections.map(collection => collection.id), [], @@ -224,7 +223,6 @@ export function getProductUpdatePageFormData( "", ), slug: product?.slug || "", - taxCode: product?.taxType.taxCode, trackInventory: !!variant?.trackInventory, weight: product?.weight?.value.toString() || "", isPreorder: !!variant?.preorder || false, diff --git a/src/products/views/ProductCreate/ProductCreate.tsx b/src/products/views/ProductCreate/ProductCreate.tsx index 787f5f7b1..e60fc59e8 100644 --- a/src/products/views/ProductCreate/ProductCreate.tsx +++ b/src/products/views/ProductCreate/ProductCreate.tsx @@ -16,7 +16,6 @@ import { useProductDeleteMutation, useProductTypeQuery, useProductVariantChannelListingUpdateMutation, - useTaxTypeListQuery, useUpdateMetadataMutation, useUpdatePrivateMetadataMutation, useVariantCreateMutation, @@ -41,6 +40,7 @@ import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import usePageSearch from "@saleor/searches/usePageSearch"; import useProductSearch from "@saleor/searches/useProductSearch"; import useProductTypeSearch from "@saleor/searches/useProductTypeSearch"; +import { useTaxClassFetchMore } from "@saleor/taxes/utils/useTaxClassFetchMore"; import { getProductErrorMessage } from "@saleor/utils/errors"; import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValueSearchHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; @@ -123,7 +123,7 @@ export const ProductCreateView: React.FC = ({ params }) => { } = useAttributeValueSearchHandler(DEFAULT_INITIAL_SEARCH_DATA); const [updateMetadata] = useUpdateMetadataMutation({}); const [updatePrivateMetadata] = useUpdatePrivateMetadataMutation({}); - const taxTypes = useTaxTypeListQuery({}); + const { taxClasses, fetchMoreTaxClasses } = useTaxClassFetchMore(); const { data: selectedProductType } = useProductTypeQuery({ variables: { id: selectedProductTypeId, @@ -355,7 +355,8 @@ export const ProductCreateView: React.FC = ({ params }) => { fetchMoreCollections={fetchMoreCollections} fetchMoreProductTypes={fetchMoreProductTypes} warehouses={mapEdgesToItems(warehouses?.data?.warehouses) || []} - taxTypes={taxTypes.data?.taxTypes || []} + taxClasses={taxClasses ?? []} + fetchMoreTaxClasses={fetchMoreTaxClasses} weightUnit={shop?.defaultWeightUnit} openChannelsModal={handleChannelsModalOpen} onChannelsChange={setCurrentChannels} diff --git a/src/products/views/ProductCreate/handlers.ts b/src/products/views/ProductCreate/handlers.ts index 72ce9e655..85e57a639 100644 --- a/src/products/views/ProductCreate/handlers.ts +++ b/src/products/views/ProductCreate/handlers.ts @@ -113,7 +113,6 @@ export function createHandler( updatedFileAttributes, }), category: formData.category, - chargeTaxes: formData.chargeTaxes, collections: formData.collections, description: getParsedDataForJsonStringField(formData.description), name: formData.name, @@ -124,7 +123,7 @@ export function createHandler( title: formData.seoTitle, }, slug: formData.slug, - taxCode: formData.changeTaxCode ? formData.taxCode : undefined, + taxClass: formData.taxClassId, weight: weight(formData.weight), }, }; diff --git a/src/products/views/ProductUpdate/ProductUpdate.tsx b/src/products/views/ProductUpdate/ProductUpdate.tsx index 53559b095..af5f5b391 100644 --- a/src/products/views/ProductUpdate/ProductUpdate.tsx +++ b/src/products/views/ProductUpdate/ProductUpdate.tsx @@ -28,12 +28,13 @@ import useCategorySearch from "@saleor/searches/useCategorySearch"; import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import usePageSearch from "@saleor/searches/usePageSearch"; import useProductSearch from "@saleor/searches/useProductSearch"; +import { useTaxClassFetchMore } from "@saleor/taxes/utils/useTaxClassFetchMore"; import { getProductErrorMessage } from "@saleor/utils/errors"; import useAttributeValueSearchHandler from "@saleor/utils/handlers/attributeValueSearchHandler"; import createDialogActionHandlers from "@saleor/utils/handlers/dialogActionHandlers"; import { mapEdgesToItems } from "@saleor/utils/maps"; import React from "react"; -import { defineMessages, FormattedMessage, useIntl } from "react-intl"; +import { FormattedMessage, useIntl } from "react-intl"; import { getMutationState } from "../../../misc"; import ProductUpdatePage from "../../components/ProductUpdatePage"; @@ -49,30 +50,7 @@ import { createImageUploadHandler, } from "./handlers"; import { useProductUpdateHandler } from "./handlers/useProductUpdateHandler"; - -const messages = defineMessages({ - deleteProductDialogTitle: { - id: "TWVx7O", - defaultMessage: "Delete Product", - description: "delete product dialog title", - }, - deleteProductDialogSubtitle: { - id: "ZHF4Z9", - defaultMessage: "Are you sure you want to delete {name}?", - description: "delete product dialog subtitle", - }, - deleteVariantDialogTitle: { - id: "6iw4VR", - defaultMessage: "Delete Product Variants", - description: "delete variant dialog title", - }, - deleteVariantDialogSubtitle: { - id: "ukdRUv", - defaultMessage: - "{counter,plural,one{Are you sure you want to delete this variant?} other{Are you sure you want to delete {displayQuantity} variants?}}", - description: "delete variant dialog subtitle", - }, -}); +import { productUpdatePageMessages as messages } from "./messages"; interface ProductUpdateProps { id: string; @@ -310,6 +288,8 @@ export const ProductUpdate: React.FC = ({ id, params }) => { onFetchMore: loadMoreAttributeValues, }; + const { taxClasses, fetchMoreTaxClasses } = useTaxClassFetchMore(); + if (product === null) { return ; } @@ -339,7 +319,8 @@ export const ProductUpdate: React.FC = ({ id, params }) => { placeholderImage={placeholderImg} product={product} warehouses={warehouses} - taxTypes={data?.taxTypes} + taxClasses={taxClasses ?? []} + fetchMoreTaxClasses={fetchMoreTaxClasses} variants={product?.variants} onDelete={() => openModal("remove")} onImageReorder={handleImageReorder} diff --git a/src/products/views/ProductUpdate/handlers/utils.ts b/src/products/views/ProductUpdate/handlers/utils.ts index a2cad4420..d5864671f 100644 --- a/src/products/views/ProductUpdate/handlers/utils.ts +++ b/src/products/views/ProductUpdate/handlers/utils.ts @@ -34,7 +34,6 @@ export function getProductUpdateVariables( updatedFileAttributes, }), category: data.category, - chargeTaxes: data.chargeTaxes, collections: data.collections, description: getParsedDataForJsonStringField(data.description), name: data.name, @@ -44,7 +43,7 @@ export function getProductUpdateVariables( title: data.seoTitle, }, slug: data.slug, - taxCode: data.changeTaxCode ? data.taxCode : null, + taxClass: data.taxClassId, }, firstValues: VALUES_PAGINATE_BY, }; diff --git a/src/products/views/ProductUpdate/messages.ts b/src/products/views/ProductUpdate/messages.ts new file mode 100644 index 000000000..403978b35 --- /dev/null +++ b/src/products/views/ProductUpdate/messages.ts @@ -0,0 +1,25 @@ +import { defineMessages } from "react-intl"; + +export const productUpdatePageMessages = defineMessages({ + deleteProductDialogTitle: { + id: "TWVx7O", + defaultMessage: "Delete Product", + description: "delete product dialog title", + }, + deleteProductDialogSubtitle: { + id: "ZHF4Z9", + defaultMessage: "Are you sure you want to delete {name}?", + description: "delete product dialog subtitle", + }, + deleteVariantDialogTitle: { + id: "6iw4VR", + defaultMessage: "Delete Product Variants", + description: "delete variant dialog title", + }, + deleteVariantDialogSubtitle: { + id: "ukdRUv", + defaultMessage: + "{counter,plural,one{Are you sure you want to delete this variant?} other{Are you sure you want to delete {displayQuantity} variants?}}", + description: "delete variant dialog subtitle", + }, +}); diff --git a/src/shipping/components/ShippingMethodTaxes/ShippingMethodTaxes.tsx b/src/shipping/components/ShippingMethodTaxes/ShippingMethodTaxes.tsx new file mode 100644 index 000000000..ecf03953d --- /dev/null +++ b/src/shipping/components/ShippingMethodTaxes/ShippingMethodTaxes.tsx @@ -0,0 +1,71 @@ +import { Card, CardContent } from "@material-ui/core"; +import CardTitle from "@saleor/components/CardTitle"; +import SingleAutocompleteSelectField from "@saleor/components/SingleAutocompleteSelectField"; +import { TaxClassFragment } from "@saleor/graphql"; +import { sectionNames } from "@saleor/intl"; +import { makeStyles } from "@saleor/macaw-ui"; +import { taxesMessages } from "@saleor/taxes/messages"; +import { FetchMoreProps } from "@saleor/types"; +import React from "react"; +import { useIntl } from "react-intl"; + +import { ShippingZoneRateUpdateFormData } from "../ShippingZoneRatesPage/types"; + +interface ShippingMethodTaxesProps { + value: string; + taxClassDisplayName: string; + taxClasses: Array>; + disabled: boolean; + onChange: (event: React.ChangeEvent) => void; + onFetchMore: FetchMoreProps; +} + +const useStyles = makeStyles( + { + root: { + overflow: "visible", + }, + }, + { name: "ShippingMethodTaxes" }, +); + +const ShippingMethodTaxes: React.FC = props => { + const { + value, + disabled, + taxClasses, + taxClassDisplayName, + onChange, + onFetchMore, + } = props; + const classes = useStyles(props); + + const intl = useIntl(); + + return ( + + + + ({ + label: choice.name, + value: choice.id, + }))} + InputProps={{ + autoComplete: "off", + }} + {...onFetchMore} + /> + + + ); +}; +ShippingMethodTaxes.displayName = "ShippingMethodTaxes"; +export default ShippingMethodTaxes; diff --git a/src/shipping/components/ShippingMethodTaxes/index.ts b/src/shipping/components/ShippingMethodTaxes/index.ts new file mode 100644 index 000000000..b1760b52a --- /dev/null +++ b/src/shipping/components/ShippingMethodTaxes/index.ts @@ -0,0 +1,2 @@ +export { default } from "./ShippingMethodTaxes"; +export * from "./ShippingMethodTaxes"; diff --git a/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.stories.tsx b/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.stories.tsx index ec5d61771..bb9c417e8 100644 --- a/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.stories.tsx +++ b/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.stories.tsx @@ -3,6 +3,7 @@ import { ShippingMethodTypeEnum, } from "@saleor/graphql"; import Decorator from "@saleor/storybook//Decorator"; +import { taxClasses } from "@saleor/taxes/fixtures"; import { storiesOf } from "@storybook/react"; import React from "react"; @@ -73,6 +74,8 @@ const props: ShippingZoneRatesCreatePageProps = { saveButtonBarState: "default", shippingChannels: defaultChannels, variant: ShippingMethodTypeEnum.PRICE, + taxClasses, + fetchMoreTaxClasses: undefined, }; storiesOf("Shipping / ShippingZoneRatesCreatePage page", module) diff --git a/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.tsx b/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.tsx index eb87549b5..1b7565826 100644 --- a/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.tsx +++ b/src/shipping/components/ShippingZoneRatesCreatePage/ShippingZoneRatesCreatePage.tsx @@ -14,22 +14,26 @@ import { ShippingErrorFragment, ShippingMethodTypeEnum, ShippingMethodTypeFragment, + TaxClassFragment, } from "@saleor/graphql"; import useForm, { SubmitPromise } from "@saleor/hooks/useForm"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; import useNavigator from "@saleor/hooks/useNavigator"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { validatePrice } from "@saleor/products/utils/validation"; +import { handleTaxClassChange } from "@saleor/productTypes/handlers"; import OrderValue from "@saleor/shipping/components/OrderValue"; import OrderWeight from "@saleor/shipping/components/OrderWeight"; import PricingCard from "@saleor/shipping/components/PricingCard"; import ShippingRateInfo from "@saleor/shipping/components/ShippingRateInfo"; import { createChannelsChangeHandler } from "@saleor/shipping/handlers"; +import { FetchMoreProps } from "@saleor/types"; import { RichTextContext } from "@saleor/utils/richText/context"; import useRichText from "@saleor/utils/richText/useRichText"; import React, { FormEventHandler } from "react"; import { FormattedMessage, useIntl } from "react-intl"; +import ShippingMethodTaxes from "../ShippingMethodTaxes"; import ShippingZonePostalCodes from "../ShippingZonePostalCodes"; import { ShippingZoneRateCommonFormData } from "../ShippingZoneRatesPage/types"; @@ -52,6 +56,8 @@ export interface ShippingZoneRatesCreatePageProps extends WithFormId { onChannelsChange: (data: ChannelShippingData[]) => void; openChannelsModal: () => void; variant: ShippingMethodTypeEnum; + taxClasses: Array>; + fetchMoreTaxClasses: FetchMoreProps; } export const ShippingZoneRatesCreatePage: React.FC = ({ @@ -72,6 +78,8 @@ export const ShippingZoneRatesCreatePage: React.FC { const intl = useIntl(); const navigate = useNavigator(); @@ -87,8 +95,11 @@ export const ShippingZoneRatesCreatePage: React.FC + + + handleTaxClassChange( + event, + taxClasses, + change, + setTaxClassDisplayName, + ) + } + onFetchMore={fetchMoreTaxClasses} + /> undefined, variant: ShippingMethodTypeEnum.PRICE, formId: Symbol(), + taxClasses, + fetchMoreTaxClasses: undefined, }; storiesOf("Views / Shipping / Shipping rate", module) diff --git a/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.tsx b/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.tsx index 4f992b8ef..3e3683542 100644 --- a/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.tsx +++ b/src/shipping/components/ShippingZoneRatesPage/ShippingZoneRatesPage.tsx @@ -16,19 +16,22 @@ import { ShippingMethodTypeEnum, ShippingMethodTypeFragment, ShippingZoneQuery, + TaxClassFragment, } from "@saleor/graphql"; import useForm, { SubmitPromise } from "@saleor/hooks/useForm"; import useHandleFormSubmit from "@saleor/hooks/useHandleFormSubmit"; import useNavigator from "@saleor/hooks/useNavigator"; +import { useStateUpdate } from "@saleor/hooks/useStateUpdate"; import { ConfirmButtonTransitionState } from "@saleor/macaw-ui"; import { validatePrice } from "@saleor/products/utils/validation"; +import { handleTaxClassChange } from "@saleor/productTypes/handlers"; import OrderValue from "@saleor/shipping/components/OrderValue"; import OrderWeight from "@saleor/shipping/components/OrderWeight"; import PricingCard from "@saleor/shipping/components/PricingCard"; import ShippingMethodProducts from "@saleor/shipping/components/ShippingMethodProducts"; import ShippingRateInfo from "@saleor/shipping/components/ShippingRateInfo"; import { createChannelsChangeHandler } from "@saleor/shipping/handlers"; -import { ListActions, ListProps } from "@saleor/types"; +import { FetchMoreProps, ListActions, ListProps } from "@saleor/types"; import { mapEdgesToItems, mapMetadataItemToInput } from "@saleor/utils/maps"; import useMetadataChangeTrigger from "@saleor/utils/metadata/useMetadataChangeTrigger"; import { RichTextContext } from "@saleor/utils/richText/context"; @@ -36,6 +39,7 @@ import useRichText from "@saleor/utils/richText/useRichText"; import React, { FormEventHandler } from "react"; import { FormattedMessage } from "react-intl"; +import ShippingMethodTaxes from "../ShippingMethodTaxes"; import ShippingZonePostalCodes from "../ShippingZonePostalCodes"; import { ShippingZoneRateUpdateFormData } from "./types"; @@ -66,6 +70,8 @@ export interface ShippingZoneRatesPageProps onProductAssign: () => void; onProductUnassign: (ids: string[]) => void; variant: ShippingMethodTypeEnum; + taxClasses: Array>; + fetchMoreTaxClasses: FetchMoreProps; } export const ShippingZoneRatesPage: React.FC = ({ @@ -89,6 +95,8 @@ export const ShippingZoneRatesPage: React.FC = ({ postalCodeRules, variant, formId, + taxClasses, + fetchMoreTaxClasses, ...listProps }) => { const navigate = useNavigator(); @@ -110,6 +118,7 @@ export const ShippingZoneRatesPage: React.FC = ({ orderValueRestricted: !!rate?.channelListings.length, privateMetadata: rate?.privateMetadata.map(mapMetadataItemToInput), type: rate?.type || null, + taxClassId: rate?.taxClass?.id || "", }), [shippingChannels, rate], ); @@ -121,6 +130,10 @@ export const ShippingZoneRatesPage: React.FC = ({ triggerChange, } = useForm(initialForm, undefined, { confirmLeave: true, formId }); + const [taxClassDisplayName, setTaxClassDisplayName] = useStateUpdate( + rate?.taxClass?.name ?? "", + ); + const handleFormSubmit = useHandleFormSubmit({ formId, onSubmit, @@ -239,6 +252,22 @@ export const ShippingZoneRatesPage: React.FC = ({ }))} openModal={openChannelsModal} /> + + + handleTaxClassChange( + event, + taxClasses, + change, + setTaxClassDisplayName, + ) + } + onFetchMore={fetchMoreTaxClasses} + /> = ({ id, params }) => { variables: { id }, }); + const { taxClasses, fetchMoreTaxClasses } = useTaxClassFetchMore(); + const allChannels = createSortedShippingChannels( shippingZoneData?.shippingZone?.channels, ); @@ -164,6 +167,8 @@ export const RateCreate: React.FC = ({ id, params }) => { onPostalCodeUnassign={onPostalCodeUnassign} onPostalCodeInclusionChange={onPostalCodeInclusionChange} variant={params.type} + taxClasses={taxClasses ?? []} + fetchMoreTaxClasses={fetchMoreTaxClasses} /> = ({ { formId: FORM_ID }, ); + const { taxClasses, fetchMoreTaxClasses } = useTaxClassFetchMore(); + const [ updateShippingRate, updateShippingRateOpts, @@ -410,6 +413,8 @@ export const RateUpdate: React.FC = ({ onPostalCodeAssign={() => openModal("add-range")} onPostalCodeUnassign={onPostalCodeUnassign} postalCodeRules={state.postalCodeRules} + taxClasses={taxClasses ?? []} + fetchMoreTaxClasses={fetchMoreTaxClasses} />