From 0f82dfdcbac9c2755d464782cbdf5d128790100f Mon Sep 17 00:00:00 2001 From: gowarezzz Date: Thu, 19 Aug 2021 09:50:38 +0700 Subject: [PATCH] Refractor --- README.md | 2 +- assets/base.css | 1 + components/auth/LoginView.tsx | 1 - components/cart/CartItem/CartItem.tsx | 3 - components/common/Footer/Footer.tsx | 2 +- .../HomeAllProductsGrid.module.css | 18 +- .../HomeAllProductsGrid.tsx | 68 +- components/common/Layout/Layout.tsx | 2 +- components/common/Searchbar/Searchbar.tsx | 51 +- .../product/ProductCard/ProductCard.tsx | 4 +- .../product/ProductOptions/ProductOptions.tsx | 80 +- .../product/ProductSidebar/ProductSidebar.tsx | 2 +- .../product/ProductSlider/ProductSlider.tsx | 14 +- .../ProductSliderControl.tsx | 45 +- .../product/ProductView/ProductView.tsx | 2 +- components/search.tsx | 439 - components/ui/Modal/Modal.tsx | 10 +- components/ui/Rating/Rating.tsx | 34 +- components/ui/Sidebar/Sidebar.tsx | 11 +- components/ui/context.tsx | 2 +- .../WishlistCard/WishlistCard.module.css | 21 - .../wishlist/WishlistCard/WishlistCard.tsx | 106 - components/wishlist/WishlistCard/index.ts | 1 - components/wishlist/index.ts | 1 - framework/bigcommerce/.env.template | 8 - framework/bigcommerce/README.md | 59 - .../bigcommerce/api/definitions/catalog.ts | 2993 --- .../api/definitions/store-content.ts | 329 - .../bigcommerce/api/definitions/wishlist.ts | 142 - .../api/endpoints/cart/add-item.ts | 46 - .../api/endpoints/cart/get-cart.ts | 35 - .../bigcommerce/api/endpoints/cart/index.ts | 26 - .../api/endpoints/cart/remove-item.ts | 34 - .../api/endpoints/cart/update-item.ts | 36 - .../catalog/products/get-products.ts | 79 - .../api/endpoints/catalog/products/index.ts | 18 - .../api/endpoints/checkout/checkout.ts | 90 - .../api/endpoints/checkout/index.ts | 18 - .../customer/get-logged-in-customer.ts | 59 - .../api/endpoints/customer/index.ts | 18 - .../bigcommerce/api/endpoints/login/index.ts | 18 - .../bigcommerce/api/endpoints/login/login.ts | 49 - .../bigcommerce/api/endpoints/logout/index.ts | 18 - .../api/endpoints/logout/logout.ts | 23 - .../bigcommerce/api/endpoints/signup/index.ts | 18 - .../api/endpoints/signup/signup.ts | 62 - .../api/endpoints/wishlist/add-item.ts | 57 - .../api/endpoints/wishlist/get-wishlist.ts | 39 - .../api/endpoints/wishlist/index.ts | 24 - .../api/endpoints/wishlist/remove-item.ts | 39 - .../api/fragments/category-tree.ts | 9 - .../bigcommerce/api/fragments/product.ts | 113 - framework/bigcommerce/api/index.ts | 120 - .../api/operations/get-all-pages.ts | 46 - .../api/operations/get-all-product-paths.ts | 66 - .../api/operations/get-all-products.ts | 135 - .../api/operations/get-customer-wishlist.ts | 81 - .../bigcommerce/api/operations/get-page.ts | 54 - .../bigcommerce/api/operations/get-product.ts | 119 - .../api/operations/get-site-info.ts | 87 - framework/bigcommerce/api/operations/login.ts | 79 - .../bigcommerce/api/utils/concat-cookie.ts | 14 - framework/bigcommerce/api/utils/errors.ts | 25 - .../api/utils/fetch-graphql-api.ts | 36 - .../bigcommerce/api/utils/fetch-store-api.ts | 71 - framework/bigcommerce/api/utils/fetch.ts | 3 - .../bigcommerce/api/utils/filter-edges.ts | 5 - .../bigcommerce/api/utils/get-cart-cookie.ts | 20 - .../bigcommerce/api/utils/get-customer-id.ts | 32 - framework/bigcommerce/api/utils/parse-item.ts | 28 - .../api/utils/set-product-locale-meta.ts | 21 - framework/bigcommerce/api/utils/types.ts | 7 - framework/bigcommerce/auth/index.ts | 3 - framework/bigcommerce/auth/use-login.tsx | 40 - framework/bigcommerce/auth/use-logout.tsx | 26 - framework/bigcommerce/auth/use-signup.tsx | 44 - framework/bigcommerce/cart/index.ts | 4 - framework/bigcommerce/cart/use-add-item.tsx | 44 - framework/bigcommerce/cart/use-cart.tsx | 31 - .../bigcommerce/cart/use-remove-item.tsx | 56 - .../bigcommerce/cart/use-update-item.tsx | 84 - framework/bigcommerce/commerce.config.json | 7 - framework/bigcommerce/customer/index.ts | 1 - .../bigcommerce/customer/use-customer.tsx | 24 - framework/bigcommerce/fetcher.ts | 41 - framework/bigcommerce/index.tsx | 36 - framework/bigcommerce/lib/get-slug.ts | 5 - framework/bigcommerce/lib/immutability.ts | 13 - framework/bigcommerce/lib/normalize.ts | 136 - framework/bigcommerce/next.config.js | 8 - framework/bigcommerce/product/index.ts | 2 - framework/bigcommerce/product/use-price.tsx | 2 - framework/bigcommerce/product/use-search.tsx | 50 - framework/bigcommerce/provider.ts | 34 - framework/bigcommerce/schema.d.ts | 2064 -- framework/bigcommerce/schema.graphql | 2422 -- .../scripts/generate-definitions.js | 49 - framework/bigcommerce/types/cart.ts | 66 - framework/bigcommerce/types/checkout.ts | 1 - framework/bigcommerce/types/common.ts | 1 - framework/bigcommerce/types/customer.ts | 5 - framework/bigcommerce/types/index.ts | 25 - framework/bigcommerce/types/login.ts | 8 - framework/bigcommerce/types/logout.ts | 1 - framework/bigcommerce/types/page.ts | 11 - framework/bigcommerce/types/product.ts | 1 - framework/bigcommerce/types/signup.ts | 1 - framework/bigcommerce/types/site.ts | 19 - framework/bigcommerce/types/wishlist.ts | 23 - framework/bigcommerce/wishlist/index.ts | 3 - .../bigcommerce/wishlist/use-add-item.tsx | 37 - .../bigcommerce/wishlist/use-remove-item.tsx | 38 - .../bigcommerce/wishlist/use-wishlist.tsx | 53 - framework/local/.env.template | 1 - framework/local/README.md | 1 - framework/local/api/endpoints/cart/index.ts | 1 - .../local/api/endpoints/catalog/index.ts | 1 - .../local/api/endpoints/catalog/products.ts | 1 - .../local/api/endpoints/checkout/index.ts | 1 - .../local/api/endpoints/customer/index.ts | 1 - framework/local/api/endpoints/login/index.ts | 1 - framework/local/api/endpoints/logout/index.ts | 1 - framework/local/api/endpoints/signup/index.ts | 1 - .../local/api/endpoints/wishlist/index.tsx | 1 - framework/local/api/index.ts | 42 - .../local/api/operations/get-all-pages.ts | 19 - .../api/operations/get-all-product-paths.ts | 15 - .../local/api/operations/get-all-products.ts | 25 - .../api/operations/get-customer-wishlist.ts | 6 - framework/local/api/operations/get-page.ts | 13 - framework/local/api/operations/get-product.ts | 26 - .../local/api/operations/get-site-info.ts | 43 - framework/local/api/operations/index.ts | 6 - framework/local/api/utils/fetch-local.ts | 34 - framework/local/api/utils/fetch.ts | 3 - framework/local/auth/index.ts | 3 - framework/local/auth/use-login.tsx | 16 - framework/local/auth/use-logout.tsx | 17 - framework/local/auth/use-signup.tsx | 19 - framework/local/cart/index.ts | 4 - framework/local/cart/use-add-item.tsx | 17 - framework/local/cart/use-cart.tsx | 42 - framework/local/cart/use-remove-item.tsx | 18 - framework/local/cart/use-update-item.tsx | 18 - framework/local/commerce.config.json | 9 - framework/local/customer/index.ts | 1 - framework/local/customer/use-customer.tsx | 15 - framework/local/data.json | 235 - framework/local/fetcher.ts | 11 - framework/local/index.tsx | 32 - framework/local/next.config.js | 8 - framework/local/product/index.ts | 2 - framework/local/product/use-price.tsx | 2 - framework/local/product/use-search.tsx | 17 - framework/local/provider.ts | 21 - framework/local/wishlist/use-add-item.tsx | 13 - framework/local/wishlist/use-remove-item.tsx | 17 - framework/local/wishlist/use-wishlist.tsx | 43 - framework/saleor/.env.template | 4 - framework/saleor/README.md | 22 - framework/saleor/api/cart.ts | 1 - framework/saleor/api/catalog/products.ts | 1 - framework/saleor/api/checkout.ts | 1 - framework/saleor/api/customers/index.ts | 1 - framework/saleor/api/customers/login.ts | 1 - framework/saleor/api/customers/logout.ts | 1 - framework/saleor/api/customers/signup.ts | 1 - framework/saleor/api/endpoints/cart.ts | 1 - .../saleor/api/endpoints/catalog/products.ts | 1 - .../saleor/api/endpoints/checkout/index.ts | 57 - framework/saleor/api/endpoints/customer.ts | 1 - framework/saleor/api/endpoints/login.ts | 1 - framework/saleor/api/endpoints/logout.ts | 1 - framework/saleor/api/endpoints/signup.ts | 1 - framework/saleor/api/endpoints/wishlist.ts | 1 - framework/saleor/api/index.ts | 49 - .../saleor/api/operations/get-all-pages.ts | 50 - .../api/operations/get-all-product-paths.ts | 46 - .../saleor/api/operations/get-all-products.ts | 67 - framework/saleor/api/operations/get-page.ts | 51 - .../saleor/api/operations/get-product.ts | 46 - .../saleor/api/operations/get-site-info.ts | 35 - framework/saleor/api/operations/index.ts | 7 - framework/saleor/api/operations/login.ts | 42 - .../saleor/api/utils/fetch-all-products.ts | 41 - .../saleor/api/utils/fetch-graphql-api.ts | 37 - framework/saleor/api/utils/fetch.ts | 2 - .../saleor/api/utils/is-allowed-method.ts | 22 - framework/saleor/api/wishlist.ts | 1 - framework/saleor/auth/use-login.tsx | 63 - framework/saleor/auth/use-logout.tsx | 41 - framework/saleor/auth/use-signup.tsx | 56 - framework/saleor/cart/index.ts | 4 - framework/saleor/cart/use-add-item.tsx | 54 - framework/saleor/cart/use-cart.tsx | 53 - framework/saleor/cart/use-remove-item.tsx | 39 - framework/saleor/cart/use-update-item.tsx | 99 - framework/saleor/commerce.config.json | 7 - framework/saleor/const.ts | 5 - framework/saleor/customer/index.ts | 1 - framework/saleor/customer/use-customer.tsx | 30 - framework/saleor/fetcher.ts | 20 - framework/saleor/index.tsx | 32 - framework/saleor/next.config.js | 8 - framework/saleor/product/use-price.tsx | 2 - framework/saleor/product/use-search.tsx | 74 - framework/saleor/provider.ts | 26 - framework/saleor/schema.d.ts | 11488 ---------- framework/saleor/schema.graphql | 18973 ---------------- framework/saleor/types.ts | 43 - framework/saleor/types/cart.ts | 32 - framework/saleor/utils/checkout-attach.ts | 12 - framework/saleor/utils/checkout-create.ts | 25 - framework/saleor/utils/checkout-to-cart.ts | 35 - framework/saleor/utils/customer-token.ts | 25 - .../utils/fragments/checkout-details.ts | 49 - framework/saleor/utils/fragments/index.ts | 2 - framework/saleor/utils/fragments/product.ts | 29 - framework/saleor/utils/get-categories.ts | 23 - framework/saleor/utils/get-checkout-id.ts | 9 - .../saleor/utils/get-search-variables.ts | 18 - framework/saleor/utils/get-sort-variables.ts | 30 - framework/saleor/utils/get-vendors.ts | 41 - .../saleor/utils/handle-fetch-response.ts | 27 - framework/saleor/utils/handle-login.ts | 35 - framework/saleor/utils/index.ts | 19 - .../saleor/utils/mutations/account-create.ts | 15 - .../saleor/utils/mutations/checkout-attach.ts | 12 - .../saleor/utils/mutations/checkout-create.ts | 17 - .../utils/mutations/checkout-line-add.ts | 17 - .../utils/mutations/checkout-line-remove.ts | 17 - .../utils/mutations/checkout-line-update.ts | 17 - framework/saleor/utils/mutations/index.ts | 8 - .../saleor/utils/mutations/session-create.ts | 14 - .../saleor/utils/mutations/session-destroy.ts | 10 - framework/saleor/utils/normalize.ts | 133 - .../saleor/utils/queries/checkout-one.ts | 12 - .../saleor/utils/queries/collection-many.ts | 13 - .../saleor/utils/queries/collection-one.ts | 13 - .../saleor/utils/queries/customer-current.ts | 11 - .../saleor/utils/queries/customer-one.ts | 7 - .../queries/get-all-product-vendors-query.ts | 16 - .../queries/get-all-products-paths-query.ts | 16 - framework/saleor/utils/queries/index.ts | 14 - framework/saleor/utils/queries/page-many.ts | 13 - framework/saleor/utils/queries/page-one.ts | 9 - .../saleor/utils/queries/product-many.ts | 15 - .../utils/queries/product-one-by-slug.ts | 43 - framework/saleor/utils/throw-user-errors.ts | 20 - framework/saleor/wishlist/use-add-item.tsx | 13 - framework/saleor/wishlist/use-remove-item.tsx | 17 - framework/saleor/wishlist/use-wishlist.tsx | 46 - framework/shopify/.env.template | 4 - framework/shopify/README.md | 135 - framework/shopify/api/endpoints/cart.ts | 1 - .../shopify/api/endpoints/catalog/products.ts | 1 - .../api/endpoints/checkout/checkout.ts | 38 - .../shopify/api/endpoints/checkout/index.ts | 18 - framework/shopify/api/endpoints/customer.ts | 1 - framework/shopify/api/endpoints/login.ts | 1 - framework/shopify/api/endpoints/logout.ts | 1 - framework/shopify/api/endpoints/signup.ts | 1 - framework/shopify/api/endpoints/wishlist.ts | 1 - framework/shopify/api/index.ts | 55 - .../shopify/api/operations/get-all-pages.ts | 69 - .../api/operations/get-all-product-paths.ts | 55 - .../api/operations/get-all-products.ts | 67 - framework/shopify/api/operations/get-page.ts | 64 - .../shopify/api/operations/get-product.ts | 63 - .../shopify/api/operations/get-site-info.ts | 62 - framework/shopify/api/operations/index.ts | 7 - framework/shopify/api/operations/login.ts | 48 - .../shopify/api/utils/fetch-graphql-api.ts | 45 - framework/shopify/api/utils/fetch.ts | 2 - framework/shopify/auth/use-login.tsx | 62 - framework/shopify/auth/use-logout.tsx | 37 - framework/shopify/auth/use-signup.tsx | 65 - framework/shopify/cart/index.ts | 4 - framework/shopify/cart/use-add-item.tsx | 61 - framework/shopify/cart/use-cart.tsx | 57 - framework/shopify/cart/use-remove-item.tsx | 67 - framework/shopify/cart/use-update-item.tsx | 105 - framework/shopify/codegen.json | 32 - framework/shopify/commerce.config.json | 6 - framework/shopify/const.ts | 13 - framework/shopify/customer/index.ts | 1 - framework/shopify/customer/use-customer.tsx | 32 - framework/shopify/fetcher.ts | 27 - framework/shopify/index.tsx | 40 - framework/shopify/next.config.js | 8 - framework/shopify/product/use-price.tsx | 2 - framework/shopify/product/use-search.tsx | 89 - framework/shopify/provider.ts | 27 - framework/shopify/schema.d.ts | 5586 ----- framework/shopify/schema.graphql | 9702 -------- framework/shopify/types/cart.ts | 32 - framework/shopify/types/checkout.ts | 1 - framework/shopify/types/common.ts | 1 - framework/shopify/types/customer.ts | 5 - framework/shopify/types/index.ts | 25 - framework/shopify/types/login.ts | 8 - framework/shopify/types/logout.ts | 1 - framework/shopify/types/page.ts | 11 - framework/shopify/types/product.ts | 1 - framework/shopify/types/signup.ts | 1 - framework/shopify/types/site.ts | 1 - framework/shopify/types/wishlist.ts | 1 - framework/shopify/utils/checkout-create.ts | 33 - framework/shopify/utils/checkout-to-cart.ts | 42 - framework/shopify/utils/customer-token.ts | 21 - framework/shopify/utils/get-brands.ts | 44 - framework/shopify/utils/get-categories.ts | 34 - framework/shopify/utils/get-checkout-id.ts | 8 - .../shopify/utils/get-search-variables.ts | 31 - framework/shopify/utils/get-sort-variables.ts | 32 - .../utils/handle-account-activation.ts | 30 - .../shopify/utils/handle-fetch-response.ts | 27 - framework/shopify/utils/handle-login.ts | 36 - framework/shopify/utils/index.ts | 15 - .../associate-customer-with-checkout.ts | 18 - .../utils/mutations/checkout-create.ts | 19 - .../utils/mutations/checkout-line-item-add.ts | 22 - .../mutations/checkout-line-item-remove.ts | 21 - .../mutations/checkout-line-item-update.ts | 22 - .../mutations/customer-access-token-create.ts | 16 - .../mutations/customer-access-token-delete.ts | 14 - .../mutations/customer-activate-by-url.ts | 19 - .../utils/mutations/customer-activate.ts | 19 - .../utils/mutations/customer-create.ts | 15 - framework/shopify/utils/mutations/index.ts | 9 - framework/shopify/utils/normalize.ts | 197 - .../queries/get-all-collections-query.ts | 14 - .../utils/queries/get-all-pages-query.ts | 14 - .../queries/get-all-product-vendors-query.ts | 17 - .../queries/get-all-products-paths-query.ts | 17 - .../utils/queries/get-all-products-query.ts | 57 - .../utils/queries/get-checkout-query.ts | 70 - .../queries/get-collection-products-query.ts | 21 - .../utils/queries/get-customer-id-query.ts | 8 - .../utils/queries/get-customer-query.ts | 16 - .../shopify/utils/queries/get-page-query.ts | 14 - .../utils/queries/get-product-query.ts | 72 - .../utils/queries/get-site-info-query.ts | 8 - framework/shopify/utils/queries/index.ts | 11 - framework/shopify/utils/throw-user-errors.ts | 38 - framework/shopify/wishlist/use-add-item.tsx | 13 - .../shopify/wishlist/use-remove-item.tsx | 17 - framework/shopify/wishlist/use-wishlist.tsx | 46 - framework/swell/.env.template | 5 - framework/swell/api/cart/index.ts | 1 - framework/swell/api/catalog/index.ts | 1 - framework/swell/api/catalog/products.ts | 1 - framework/swell/api/customer.ts | 1 - framework/swell/api/customers/index.ts | 1 - framework/swell/api/customers/logout.ts | 1 - framework/swell/api/customers/signup.ts | 1 - framework/swell/api/endpoints/cart.ts | 1 - .../swell/api/endpoints/catalog/products.ts | 1 - .../swell/api/endpoints/checkout/index.ts | 30 - framework/swell/api/endpoints/customer.ts | 1 - framework/swell/api/endpoints/login.ts | 1 - framework/swell/api/endpoints/logout.ts | 1 - framework/swell/api/endpoints/signup.ts | 1 - framework/swell/api/endpoints/wishlist.ts | 1 - framework/swell/api/index.ts | 53 - .../swell/api/operations/get-all-pages.ts | 45 - .../api/operations/get-all-product-paths.ts | 48 - .../swell/api/operations/get-all-products.ts | 43 - framework/swell/api/operations/get-page.ts | 54 - framework/swell/api/operations/get-product.ts | 33 - .../swell/api/operations/get-site-info.ts | 37 - framework/swell/api/operations/login.ts | 46 - framework/swell/api/utils/fetch-swell-api.ts | 7 - framework/swell/api/utils/fetch.ts | 2 - .../swell/api/utils/is-allowed-method.ts | 28 - framework/swell/api/wishlist/index.tsx | 2 - framework/swell/auth/use-login.tsx | 74 - framework/swell/auth/use-logout.tsx | 37 - framework/swell/auth/use-signup.tsx | 59 - framework/swell/cart/index.ts | 3 - framework/swell/cart/use-add-item.tsx | 59 - framework/swell/cart/use-cart.tsx | 37 - framework/swell/cart/use-remove-item.tsx | 49 - framework/swell/cart/use-update-item.tsx | 99 - framework/swell/cart/utils/checkout-create.ts | 28 - .../swell/cart/utils/checkout-to-cart.ts | 26 - framework/swell/cart/utils/index.ts | 2 - framework/swell/commerce.config.json | 6 - framework/swell/const.ts | 13 - framework/swell/customer/index.ts | 1 - framework/swell/customer/use-customer.tsx | 27 - framework/swell/fetcher.ts | 28 - framework/swell/index.tsx | 47 - framework/swell/next.config.js | 8 - framework/swell/product/index.ts | 2 - framework/swell/product/use-price.tsx | 2 - framework/swell/product/use-search.tsx | 59 - framework/swell/provider.ts | 30 - framework/swell/schema.d.ts | 5002 ---- framework/swell/schema.graphql | 9631 -------- framework/swell/types.ts | 112 - framework/swell/types/cart.ts | 1 - framework/swell/types/checkout.ts | 1 - framework/swell/types/common.ts | 1 - framework/swell/types/customer.ts | 1 - framework/swell/types/index.ts | 25 - framework/swell/types/login.ts | 11 - framework/swell/types/logout.ts | 1 - framework/swell/types/page.ts | 1 - framework/swell/types/product.ts | 1 - framework/swell/types/signup.ts | 1 - framework/swell/types/site.ts | 1 - framework/swell/types/wishlist.ts | 1 - framework/swell/utils/customer-token.ts | 21 - framework/swell/utils/get-categories.ts | 16 - framework/swell/utils/get-checkout-id.ts | 8 - framework/swell/utils/get-search-variables.ts | 27 - framework/swell/utils/get-sort-variables.ts | 32 - framework/swell/utils/get-vendors.ts | 27 - .../swell/utils/handle-fetch-response.ts | 19 - framework/swell/utils/handle-login.ts | 39 - framework/swell/utils/index.ts | 9 - framework/swell/utils/normalize.ts | 226 - framework/swell/utils/storage.ts | 13 - framework/swell/wishlist/use-add-item.tsx | 13 - framework/swell/wishlist/use-remove-item.tsx | 17 - framework/swell/wishlist/use-wishlist.tsx | 46 - framework/vendure/README.md | 2 - lib/focus-trap.tsx | 15 +- lib/search.tsx | 4 +- package.json | 5 - pages/index.tsx | 47 +- pages/orders.tsx | 42 - pages/profile.tsx | 48 - pages/search.tsx | 9 - pages/search/[category].tsx | 16 - pages/search/designers/[name].tsx | 16 - pages/search/designers/[name]/[category].tsx | 16 - pages/wishlist.tsx | 71 - tsconfig.json | 4 +- yarn.lock | 974 +- 441 files changed, 191 insertions(+), 81002 deletions(-) delete mode 100644 components/search.tsx delete mode 100644 components/wishlist/WishlistCard/WishlistCard.module.css delete mode 100644 components/wishlist/WishlistCard/WishlistCard.tsx delete mode 100644 components/wishlist/WishlistCard/index.ts delete mode 100644 framework/bigcommerce/.env.template delete mode 100644 framework/bigcommerce/README.md delete mode 100644 framework/bigcommerce/api/definitions/catalog.ts delete mode 100644 framework/bigcommerce/api/definitions/store-content.ts delete mode 100644 framework/bigcommerce/api/definitions/wishlist.ts delete mode 100644 framework/bigcommerce/api/endpoints/cart/add-item.ts delete mode 100644 framework/bigcommerce/api/endpoints/cart/get-cart.ts delete mode 100644 framework/bigcommerce/api/endpoints/cart/index.ts delete mode 100644 framework/bigcommerce/api/endpoints/cart/remove-item.ts delete mode 100644 framework/bigcommerce/api/endpoints/cart/update-item.ts delete mode 100644 framework/bigcommerce/api/endpoints/catalog/products/get-products.ts delete mode 100644 framework/bigcommerce/api/endpoints/catalog/products/index.ts delete mode 100644 framework/bigcommerce/api/endpoints/checkout/checkout.ts delete mode 100644 framework/bigcommerce/api/endpoints/checkout/index.ts delete mode 100644 framework/bigcommerce/api/endpoints/customer/get-logged-in-customer.ts delete mode 100644 framework/bigcommerce/api/endpoints/customer/index.ts delete mode 100644 framework/bigcommerce/api/endpoints/login/index.ts delete mode 100644 framework/bigcommerce/api/endpoints/login/login.ts delete mode 100644 framework/bigcommerce/api/endpoints/logout/index.ts delete mode 100644 framework/bigcommerce/api/endpoints/logout/logout.ts delete mode 100644 framework/bigcommerce/api/endpoints/signup/index.ts delete mode 100644 framework/bigcommerce/api/endpoints/signup/signup.ts delete mode 100644 framework/bigcommerce/api/endpoints/wishlist/add-item.ts delete mode 100644 framework/bigcommerce/api/endpoints/wishlist/get-wishlist.ts delete mode 100644 framework/bigcommerce/api/endpoints/wishlist/index.ts delete mode 100644 framework/bigcommerce/api/endpoints/wishlist/remove-item.ts delete mode 100644 framework/bigcommerce/api/fragments/category-tree.ts delete mode 100644 framework/bigcommerce/api/fragments/product.ts delete mode 100644 framework/bigcommerce/api/index.ts delete mode 100644 framework/bigcommerce/api/operations/get-all-pages.ts delete mode 100644 framework/bigcommerce/api/operations/get-all-product-paths.ts delete mode 100644 framework/bigcommerce/api/operations/get-all-products.ts delete mode 100644 framework/bigcommerce/api/operations/get-customer-wishlist.ts delete mode 100644 framework/bigcommerce/api/operations/get-page.ts delete mode 100644 framework/bigcommerce/api/operations/get-product.ts delete mode 100644 framework/bigcommerce/api/operations/get-site-info.ts delete mode 100644 framework/bigcommerce/api/operations/login.ts delete mode 100644 framework/bigcommerce/api/utils/concat-cookie.ts delete mode 100644 framework/bigcommerce/api/utils/errors.ts delete mode 100644 framework/bigcommerce/api/utils/fetch-graphql-api.ts delete mode 100644 framework/bigcommerce/api/utils/fetch-store-api.ts delete mode 100644 framework/bigcommerce/api/utils/fetch.ts delete mode 100644 framework/bigcommerce/api/utils/filter-edges.ts delete mode 100644 framework/bigcommerce/api/utils/get-cart-cookie.ts delete mode 100644 framework/bigcommerce/api/utils/get-customer-id.ts delete mode 100644 framework/bigcommerce/api/utils/parse-item.ts delete mode 100644 framework/bigcommerce/api/utils/set-product-locale-meta.ts delete mode 100644 framework/bigcommerce/api/utils/types.ts delete mode 100644 framework/bigcommerce/auth/index.ts delete mode 100644 framework/bigcommerce/auth/use-login.tsx delete mode 100644 framework/bigcommerce/auth/use-logout.tsx delete mode 100644 framework/bigcommerce/auth/use-signup.tsx delete mode 100644 framework/bigcommerce/cart/index.ts delete mode 100644 framework/bigcommerce/cart/use-add-item.tsx delete mode 100644 framework/bigcommerce/cart/use-cart.tsx delete mode 100644 framework/bigcommerce/cart/use-remove-item.tsx delete mode 100644 framework/bigcommerce/cart/use-update-item.tsx delete mode 100644 framework/bigcommerce/commerce.config.json delete mode 100644 framework/bigcommerce/customer/index.ts delete mode 100644 framework/bigcommerce/customer/use-customer.tsx delete mode 100644 framework/bigcommerce/fetcher.ts delete mode 100644 framework/bigcommerce/index.tsx delete mode 100644 framework/bigcommerce/lib/get-slug.ts delete mode 100644 framework/bigcommerce/lib/immutability.ts delete mode 100644 framework/bigcommerce/lib/normalize.ts delete mode 100644 framework/bigcommerce/next.config.js delete mode 100644 framework/bigcommerce/product/index.ts delete mode 100644 framework/bigcommerce/product/use-price.tsx delete mode 100644 framework/bigcommerce/product/use-search.tsx delete mode 100644 framework/bigcommerce/provider.ts delete mode 100644 framework/bigcommerce/schema.d.ts delete mode 100644 framework/bigcommerce/schema.graphql delete mode 100644 framework/bigcommerce/scripts/generate-definitions.js delete mode 100644 framework/bigcommerce/types/cart.ts delete mode 100644 framework/bigcommerce/types/checkout.ts delete mode 100644 framework/bigcommerce/types/common.ts delete mode 100644 framework/bigcommerce/types/customer.ts delete mode 100644 framework/bigcommerce/types/index.ts delete mode 100644 framework/bigcommerce/types/login.ts delete mode 100644 framework/bigcommerce/types/logout.ts delete mode 100644 framework/bigcommerce/types/page.ts delete mode 100644 framework/bigcommerce/types/product.ts delete mode 100644 framework/bigcommerce/types/signup.ts delete mode 100644 framework/bigcommerce/types/site.ts delete mode 100644 framework/bigcommerce/types/wishlist.ts delete mode 100644 framework/bigcommerce/wishlist/index.ts delete mode 100644 framework/bigcommerce/wishlist/use-add-item.tsx delete mode 100644 framework/bigcommerce/wishlist/use-remove-item.tsx delete mode 100644 framework/bigcommerce/wishlist/use-wishlist.tsx delete mode 100644 framework/local/.env.template delete mode 100644 framework/local/README.md delete mode 100644 framework/local/api/endpoints/cart/index.ts delete mode 100644 framework/local/api/endpoints/catalog/index.ts delete mode 100644 framework/local/api/endpoints/catalog/products.ts delete mode 100644 framework/local/api/endpoints/checkout/index.ts delete mode 100644 framework/local/api/endpoints/customer/index.ts delete mode 100644 framework/local/api/endpoints/login/index.ts delete mode 100644 framework/local/api/endpoints/logout/index.ts delete mode 100644 framework/local/api/endpoints/signup/index.ts delete mode 100644 framework/local/api/endpoints/wishlist/index.tsx delete mode 100644 framework/local/api/index.ts delete mode 100644 framework/local/api/operations/get-all-pages.ts delete mode 100644 framework/local/api/operations/get-all-product-paths.ts delete mode 100644 framework/local/api/operations/get-all-products.ts delete mode 100644 framework/local/api/operations/get-customer-wishlist.ts delete mode 100644 framework/local/api/operations/get-page.ts delete mode 100644 framework/local/api/operations/get-product.ts delete mode 100644 framework/local/api/operations/get-site-info.ts delete mode 100644 framework/local/api/operations/index.ts delete mode 100644 framework/local/api/utils/fetch-local.ts delete mode 100644 framework/local/api/utils/fetch.ts delete mode 100644 framework/local/auth/index.ts delete mode 100644 framework/local/auth/use-login.tsx delete mode 100644 framework/local/auth/use-logout.tsx delete mode 100644 framework/local/auth/use-signup.tsx delete mode 100644 framework/local/cart/index.ts delete mode 100644 framework/local/cart/use-add-item.tsx delete mode 100644 framework/local/cart/use-cart.tsx delete mode 100644 framework/local/cart/use-remove-item.tsx delete mode 100644 framework/local/cart/use-update-item.tsx delete mode 100644 framework/local/commerce.config.json delete mode 100644 framework/local/customer/index.ts delete mode 100644 framework/local/customer/use-customer.tsx delete mode 100644 framework/local/data.json delete mode 100644 framework/local/fetcher.ts delete mode 100644 framework/local/index.tsx delete mode 100644 framework/local/next.config.js delete mode 100644 framework/local/product/index.ts delete mode 100644 framework/local/product/use-price.tsx delete mode 100644 framework/local/product/use-search.tsx delete mode 100644 framework/local/provider.ts delete mode 100644 framework/local/wishlist/use-add-item.tsx delete mode 100644 framework/local/wishlist/use-remove-item.tsx delete mode 100644 framework/local/wishlist/use-wishlist.tsx delete mode 100644 framework/saleor/.env.template delete mode 100644 framework/saleor/README.md delete mode 100644 framework/saleor/api/cart.ts delete mode 100644 framework/saleor/api/catalog/products.ts delete mode 100644 framework/saleor/api/checkout.ts delete mode 100644 framework/saleor/api/customers/index.ts delete mode 100644 framework/saleor/api/customers/login.ts delete mode 100644 framework/saleor/api/customers/logout.ts delete mode 100644 framework/saleor/api/customers/signup.ts delete mode 100644 framework/saleor/api/endpoints/cart.ts delete mode 100644 framework/saleor/api/endpoints/catalog/products.ts delete mode 100644 framework/saleor/api/endpoints/checkout/index.ts delete mode 100644 framework/saleor/api/endpoints/customer.ts delete mode 100644 framework/saleor/api/endpoints/login.ts delete mode 100644 framework/saleor/api/endpoints/logout.ts delete mode 100644 framework/saleor/api/endpoints/signup.ts delete mode 100644 framework/saleor/api/endpoints/wishlist.ts delete mode 100644 framework/saleor/api/index.ts delete mode 100644 framework/saleor/api/operations/get-all-pages.ts delete mode 100644 framework/saleor/api/operations/get-all-product-paths.ts delete mode 100644 framework/saleor/api/operations/get-all-products.ts delete mode 100644 framework/saleor/api/operations/get-page.ts delete mode 100644 framework/saleor/api/operations/get-product.ts delete mode 100644 framework/saleor/api/operations/get-site-info.ts delete mode 100644 framework/saleor/api/operations/index.ts delete mode 100644 framework/saleor/api/operations/login.ts delete mode 100644 framework/saleor/api/utils/fetch-all-products.ts delete mode 100644 framework/saleor/api/utils/fetch-graphql-api.ts delete mode 100644 framework/saleor/api/utils/fetch.ts delete mode 100644 framework/saleor/api/utils/is-allowed-method.ts delete mode 100644 framework/saleor/api/wishlist.ts delete mode 100644 framework/saleor/auth/use-login.tsx delete mode 100644 framework/saleor/auth/use-logout.tsx delete mode 100644 framework/saleor/auth/use-signup.tsx delete mode 100644 framework/saleor/cart/index.ts delete mode 100644 framework/saleor/cart/use-add-item.tsx delete mode 100644 framework/saleor/cart/use-cart.tsx delete mode 100644 framework/saleor/cart/use-remove-item.tsx delete mode 100644 framework/saleor/cart/use-update-item.tsx delete mode 100644 framework/saleor/commerce.config.json delete mode 100644 framework/saleor/const.ts delete mode 100644 framework/saleor/customer/index.ts delete mode 100644 framework/saleor/customer/use-customer.tsx delete mode 100644 framework/saleor/fetcher.ts delete mode 100644 framework/saleor/index.tsx delete mode 100644 framework/saleor/next.config.js delete mode 100644 framework/saleor/product/use-price.tsx delete mode 100644 framework/saleor/product/use-search.tsx delete mode 100644 framework/saleor/provider.ts delete mode 100644 framework/saleor/schema.d.ts delete mode 100644 framework/saleor/schema.graphql delete mode 100644 framework/saleor/types.ts delete mode 100644 framework/saleor/types/cart.ts delete mode 100644 framework/saleor/utils/checkout-attach.ts delete mode 100644 framework/saleor/utils/checkout-create.ts delete mode 100644 framework/saleor/utils/checkout-to-cart.ts delete mode 100644 framework/saleor/utils/customer-token.ts delete mode 100644 framework/saleor/utils/fragments/checkout-details.ts delete mode 100644 framework/saleor/utils/fragments/index.ts delete mode 100644 framework/saleor/utils/fragments/product.ts delete mode 100644 framework/saleor/utils/get-categories.ts delete mode 100644 framework/saleor/utils/get-checkout-id.ts delete mode 100644 framework/saleor/utils/get-search-variables.ts delete mode 100644 framework/saleor/utils/get-sort-variables.ts delete mode 100644 framework/saleor/utils/get-vendors.ts delete mode 100644 framework/saleor/utils/handle-fetch-response.ts delete mode 100644 framework/saleor/utils/handle-login.ts delete mode 100644 framework/saleor/utils/index.ts delete mode 100644 framework/saleor/utils/mutations/account-create.ts delete mode 100644 framework/saleor/utils/mutations/checkout-attach.ts delete mode 100644 framework/saleor/utils/mutations/checkout-create.ts delete mode 100644 framework/saleor/utils/mutations/checkout-line-add.ts delete mode 100644 framework/saleor/utils/mutations/checkout-line-remove.ts delete mode 100644 framework/saleor/utils/mutations/checkout-line-update.ts delete mode 100644 framework/saleor/utils/mutations/index.ts delete mode 100644 framework/saleor/utils/mutations/session-create.ts delete mode 100644 framework/saleor/utils/mutations/session-destroy.ts delete mode 100644 framework/saleor/utils/normalize.ts delete mode 100644 framework/saleor/utils/queries/checkout-one.ts delete mode 100644 framework/saleor/utils/queries/collection-many.ts delete mode 100644 framework/saleor/utils/queries/collection-one.ts delete mode 100644 framework/saleor/utils/queries/customer-current.ts delete mode 100644 framework/saleor/utils/queries/customer-one.ts delete mode 100644 framework/saleor/utils/queries/get-all-product-vendors-query.ts delete mode 100644 framework/saleor/utils/queries/get-all-products-paths-query.ts delete mode 100644 framework/saleor/utils/queries/index.ts delete mode 100644 framework/saleor/utils/queries/page-many.ts delete mode 100644 framework/saleor/utils/queries/page-one.ts delete mode 100644 framework/saleor/utils/queries/product-many.ts delete mode 100644 framework/saleor/utils/queries/product-one-by-slug.ts delete mode 100644 framework/saleor/utils/throw-user-errors.ts delete mode 100644 framework/saleor/wishlist/use-add-item.tsx delete mode 100644 framework/saleor/wishlist/use-remove-item.tsx delete mode 100644 framework/saleor/wishlist/use-wishlist.tsx delete mode 100644 framework/shopify/.env.template delete mode 100644 framework/shopify/README.md delete mode 100644 framework/shopify/api/endpoints/cart.ts delete mode 100644 framework/shopify/api/endpoints/catalog/products.ts delete mode 100644 framework/shopify/api/endpoints/checkout/checkout.ts delete mode 100644 framework/shopify/api/endpoints/checkout/index.ts delete mode 100644 framework/shopify/api/endpoints/customer.ts delete mode 100644 framework/shopify/api/endpoints/login.ts delete mode 100644 framework/shopify/api/endpoints/logout.ts delete mode 100644 framework/shopify/api/endpoints/signup.ts delete mode 100644 framework/shopify/api/endpoints/wishlist.ts delete mode 100644 framework/shopify/api/index.ts delete mode 100644 framework/shopify/api/operations/get-all-pages.ts delete mode 100644 framework/shopify/api/operations/get-all-product-paths.ts delete mode 100644 framework/shopify/api/operations/get-all-products.ts delete mode 100644 framework/shopify/api/operations/get-page.ts delete mode 100644 framework/shopify/api/operations/get-product.ts delete mode 100644 framework/shopify/api/operations/get-site-info.ts delete mode 100644 framework/shopify/api/operations/index.ts delete mode 100644 framework/shopify/api/operations/login.ts delete mode 100644 framework/shopify/api/utils/fetch-graphql-api.ts delete mode 100644 framework/shopify/api/utils/fetch.ts delete mode 100644 framework/shopify/auth/use-login.tsx delete mode 100644 framework/shopify/auth/use-logout.tsx delete mode 100644 framework/shopify/auth/use-signup.tsx delete mode 100644 framework/shopify/cart/index.ts delete mode 100644 framework/shopify/cart/use-add-item.tsx delete mode 100644 framework/shopify/cart/use-cart.tsx delete mode 100644 framework/shopify/cart/use-remove-item.tsx delete mode 100644 framework/shopify/cart/use-update-item.tsx delete mode 100644 framework/shopify/codegen.json delete mode 100644 framework/shopify/commerce.config.json delete mode 100644 framework/shopify/const.ts delete mode 100644 framework/shopify/customer/index.ts delete mode 100644 framework/shopify/customer/use-customer.tsx delete mode 100644 framework/shopify/fetcher.ts delete mode 100644 framework/shopify/index.tsx delete mode 100644 framework/shopify/next.config.js delete mode 100644 framework/shopify/product/use-price.tsx delete mode 100644 framework/shopify/product/use-search.tsx delete mode 100644 framework/shopify/provider.ts delete mode 100644 framework/shopify/schema.d.ts delete mode 100644 framework/shopify/schema.graphql delete mode 100644 framework/shopify/types/cart.ts delete mode 100644 framework/shopify/types/checkout.ts delete mode 100644 framework/shopify/types/common.ts delete mode 100644 framework/shopify/types/customer.ts delete mode 100644 framework/shopify/types/index.ts delete mode 100644 framework/shopify/types/login.ts delete mode 100644 framework/shopify/types/logout.ts delete mode 100644 framework/shopify/types/page.ts delete mode 100644 framework/shopify/types/product.ts delete mode 100644 framework/shopify/types/signup.ts delete mode 100644 framework/shopify/types/site.ts delete mode 100644 framework/shopify/types/wishlist.ts delete mode 100644 framework/shopify/utils/checkout-create.ts delete mode 100644 framework/shopify/utils/checkout-to-cart.ts delete mode 100644 framework/shopify/utils/customer-token.ts delete mode 100644 framework/shopify/utils/get-brands.ts delete mode 100644 framework/shopify/utils/get-categories.ts delete mode 100644 framework/shopify/utils/get-checkout-id.ts delete mode 100644 framework/shopify/utils/get-search-variables.ts delete mode 100644 framework/shopify/utils/get-sort-variables.ts delete mode 100644 framework/shopify/utils/handle-account-activation.ts delete mode 100644 framework/shopify/utils/handle-fetch-response.ts delete mode 100644 framework/shopify/utils/handle-login.ts delete mode 100644 framework/shopify/utils/index.ts delete mode 100644 framework/shopify/utils/mutations/associate-customer-with-checkout.ts delete mode 100644 framework/shopify/utils/mutations/checkout-create.ts delete mode 100644 framework/shopify/utils/mutations/checkout-line-item-add.ts delete mode 100644 framework/shopify/utils/mutations/checkout-line-item-remove.ts delete mode 100644 framework/shopify/utils/mutations/checkout-line-item-update.ts delete mode 100644 framework/shopify/utils/mutations/customer-access-token-create.ts delete mode 100644 framework/shopify/utils/mutations/customer-access-token-delete.ts delete mode 100644 framework/shopify/utils/mutations/customer-activate-by-url.ts delete mode 100644 framework/shopify/utils/mutations/customer-activate.ts delete mode 100644 framework/shopify/utils/mutations/customer-create.ts delete mode 100644 framework/shopify/utils/mutations/index.ts delete mode 100644 framework/shopify/utils/normalize.ts delete mode 100644 framework/shopify/utils/queries/get-all-collections-query.ts delete mode 100644 framework/shopify/utils/queries/get-all-pages-query.ts delete mode 100644 framework/shopify/utils/queries/get-all-product-vendors-query.ts delete mode 100644 framework/shopify/utils/queries/get-all-products-paths-query.ts delete mode 100644 framework/shopify/utils/queries/get-all-products-query.ts delete mode 100644 framework/shopify/utils/queries/get-checkout-query.ts delete mode 100644 framework/shopify/utils/queries/get-collection-products-query.ts delete mode 100644 framework/shopify/utils/queries/get-customer-id-query.ts delete mode 100644 framework/shopify/utils/queries/get-customer-query.ts delete mode 100644 framework/shopify/utils/queries/get-page-query.ts delete mode 100644 framework/shopify/utils/queries/get-product-query.ts delete mode 100644 framework/shopify/utils/queries/get-site-info-query.ts delete mode 100644 framework/shopify/utils/queries/index.ts delete mode 100644 framework/shopify/utils/throw-user-errors.ts delete mode 100644 framework/shopify/wishlist/use-add-item.tsx delete mode 100644 framework/shopify/wishlist/use-remove-item.tsx delete mode 100644 framework/shopify/wishlist/use-wishlist.tsx delete mode 100644 framework/swell/.env.template delete mode 100644 framework/swell/api/cart/index.ts delete mode 100644 framework/swell/api/catalog/index.ts delete mode 100644 framework/swell/api/catalog/products.ts delete mode 100644 framework/swell/api/customer.ts delete mode 100644 framework/swell/api/customers/index.ts delete mode 100644 framework/swell/api/customers/logout.ts delete mode 100644 framework/swell/api/customers/signup.ts delete mode 100644 framework/swell/api/endpoints/cart.ts delete mode 100644 framework/swell/api/endpoints/catalog/products.ts delete mode 100644 framework/swell/api/endpoints/checkout/index.ts delete mode 100644 framework/swell/api/endpoints/customer.ts delete mode 100644 framework/swell/api/endpoints/login.ts delete mode 100644 framework/swell/api/endpoints/logout.ts delete mode 100644 framework/swell/api/endpoints/signup.ts delete mode 100644 framework/swell/api/endpoints/wishlist.ts delete mode 100644 framework/swell/api/index.ts delete mode 100644 framework/swell/api/operations/get-all-pages.ts delete mode 100644 framework/swell/api/operations/get-all-product-paths.ts delete mode 100644 framework/swell/api/operations/get-all-products.ts delete mode 100644 framework/swell/api/operations/get-page.ts delete mode 100644 framework/swell/api/operations/get-product.ts delete mode 100644 framework/swell/api/operations/get-site-info.ts delete mode 100644 framework/swell/api/operations/login.ts delete mode 100644 framework/swell/api/utils/fetch-swell-api.ts delete mode 100644 framework/swell/api/utils/fetch.ts delete mode 100644 framework/swell/api/utils/is-allowed-method.ts delete mode 100644 framework/swell/api/wishlist/index.tsx delete mode 100644 framework/swell/auth/use-login.tsx delete mode 100644 framework/swell/auth/use-logout.tsx delete mode 100644 framework/swell/auth/use-signup.tsx delete mode 100644 framework/swell/cart/index.ts delete mode 100644 framework/swell/cart/use-add-item.tsx delete mode 100644 framework/swell/cart/use-cart.tsx delete mode 100644 framework/swell/cart/use-remove-item.tsx delete mode 100644 framework/swell/cart/use-update-item.tsx delete mode 100644 framework/swell/cart/utils/checkout-create.ts delete mode 100644 framework/swell/cart/utils/checkout-to-cart.ts delete mode 100644 framework/swell/cart/utils/index.ts delete mode 100644 framework/swell/commerce.config.json delete mode 100644 framework/swell/const.ts delete mode 100644 framework/swell/customer/index.ts delete mode 100644 framework/swell/customer/use-customer.tsx delete mode 100644 framework/swell/fetcher.ts delete mode 100644 framework/swell/index.tsx delete mode 100644 framework/swell/next.config.js delete mode 100644 framework/swell/product/index.ts delete mode 100644 framework/swell/product/use-price.tsx delete mode 100644 framework/swell/product/use-search.tsx delete mode 100644 framework/swell/provider.ts delete mode 100644 framework/swell/schema.d.ts delete mode 100644 framework/swell/schema.graphql delete mode 100644 framework/swell/types.ts delete mode 100644 framework/swell/types/cart.ts delete mode 100644 framework/swell/types/checkout.ts delete mode 100644 framework/swell/types/common.ts delete mode 100644 framework/swell/types/customer.ts delete mode 100644 framework/swell/types/index.ts delete mode 100644 framework/swell/types/login.ts delete mode 100644 framework/swell/types/logout.ts delete mode 100644 framework/swell/types/page.ts delete mode 100644 framework/swell/types/product.ts delete mode 100644 framework/swell/types/signup.ts delete mode 100644 framework/swell/types/site.ts delete mode 100644 framework/swell/types/wishlist.ts delete mode 100644 framework/swell/utils/customer-token.ts delete mode 100644 framework/swell/utils/get-categories.ts delete mode 100644 framework/swell/utils/get-checkout-id.ts delete mode 100644 framework/swell/utils/get-search-variables.ts delete mode 100644 framework/swell/utils/get-sort-variables.ts delete mode 100644 framework/swell/utils/get-vendors.ts delete mode 100644 framework/swell/utils/handle-fetch-response.ts delete mode 100644 framework/swell/utils/handle-login.ts delete mode 100644 framework/swell/utils/index.ts delete mode 100644 framework/swell/utils/normalize.ts delete mode 100644 framework/swell/utils/storage.ts delete mode 100644 framework/swell/wishlist/use-add-item.tsx delete mode 100644 framework/swell/wishlist/use-remove-item.tsx delete mode 100644 framework/swell/wishlist/use-wishlist.tsx delete mode 100644 pages/orders.tsx delete mode 100644 pages/profile.tsx delete mode 100644 pages/search.tsx delete mode 100644 pages/search/[category].tsx delete mode 100644 pages/search/designers/[name].tsx delete mode 100644 pages/search/designers/[name]/[category].tsx delete mode 100644 pages/wishlist.tsx diff --git a/README.md b/README.md index d53c5ed86..8204b3445 100644 --- a/README.md +++ b/README.md @@ -151,5 +151,5 @@ Next, you're free to customize the starter. More updates coming soon. Stay tuned After Email confirmation, Checkout should be manually enabled through BigCommerce platform. Look for "Review & test your store" section through BigCommerce's dashboard.

-BigCommerce team has been notified and they plan to add more details about this subject. +BigCommerce team has been notified and they plan to add more detailed about this subject. diff --git a/assets/base.css b/assets/base.css index 05a234a73..00081f459 100644 --- a/assets/base.css +++ b/assets/base.css @@ -77,6 +77,7 @@ html { height: 100%; box-sizing: border-box; touch-action: manipulation; + font-feature-settings: 'case' 1, 'rlig' 1, 'calt' 0; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; diff --git a/components/auth/LoginView.tsx b/components/auth/LoginView.tsx index 5e513deb9..35ff98f66 100644 --- a/components/auth/LoginView.tsx +++ b/components/auth/LoginView.tsx @@ -38,7 +38,6 @@ const LoginView: FC = () => { } catch ({ errors }) { setMessage(errors[0].message) setLoading(false) - setDisabled(false) } } diff --git a/components/cart/CartItem/CartItem.tsx b/components/cart/CartItem/CartItem.tsx index 4453e0c08..a59024e06 100644 --- a/components/cart/CartItem/CartItem.tsx +++ b/components/cart/CartItem/CartItem.tsx @@ -70,9 +70,6 @@ const CartItem = ({ if (item.quantity !== Number(quantity)) { setQuantity(item.quantity) } - // TODO: currently not including quantity in deps is intended, but we should - // do this differently as it could break easily - // eslint-disable-next-line react-hooks/exhaustive-deps }, [item.quantity]) return ( diff --git a/components/common/Footer/Footer.tsx b/components/common/Footer/Footer.tsx index 8cfcc9666..04b80404e 100644 --- a/components/common/Footer/Footer.tsx +++ b/components/common/Footer/Footer.tsx @@ -73,7 +73,7 @@ const Footer: FC = ({ className, pages }) => {
Created by = ({ - categories, + categories = [], brands, products = [], }) => { return (
-
-
- - -
-
- - {products.map((product) => ( - - ))} - + {categories.map((category) => ( +
+
{category.name}
+
+ {products.slice(0, 4).map((product) => ( + + ))} +
+
+ ))}
) diff --git a/components/common/Layout/Layout.tsx b/components/common/Layout/Layout.tsx index 2e53bed62..ff6d72aaf 100644 --- a/components/common/Layout/Layout.tsx +++ b/components/common/Layout/Layout.tsx @@ -24,7 +24,7 @@ const Loading = () => ( ) const dynamicProps = { - loading: Loading, + loading: () => , } const SignUpView = dynamic( diff --git a/components/common/Searchbar/Searchbar.tsx b/components/common/Searchbar/Searchbar.tsx index ee20a3ade..0fc276d02 100644 --- a/components/common/Searchbar/Searchbar.tsx +++ b/components/common/Searchbar/Searchbar.tsx @@ -1,4 +1,4 @@ -import { FC, memo, useEffect } from 'react' +import { FC, InputHTMLAttributes, useEffect, useMemo } from 'react' import cn from 'classnames' import s from './Searchbar.module.css' import { useRouter } from 'next/router' @@ -13,7 +13,7 @@ const Searchbar: FC = ({ className, id = 'search' }) => { useEffect(() => { router.prefetch('/search') - }, [router]) + }, []) const handleKeyUp = (e: React.KeyboardEvent) => { e.preventDefault() @@ -32,29 +32,32 @@ const Searchbar: FC = ({ className, id = 'search' }) => { } } - return ( -
- - -
- - - + return useMemo( + () => ( +
+ + +
+ + + +
-
+ ), + [] ) } -export default memo(Searchbar) +export default Searchbar diff --git a/components/product/ProductCard/ProductCard.tsx b/components/product/ProductCard/ProductCard.tsx index 95f2f3f07..39c19db00 100644 --- a/components/product/ProductCard/ProductCard.tsx +++ b/components/product/ProductCard/ProductCard.tsx @@ -7,7 +7,6 @@ import Image, { ImageProps } from 'next/image' import WishlistButton from '@components/wishlist/WishlistButton' import usePrice from '@framework/product/use-price' import ProductTag from '../ProductTag' - interface Props { className?: string product: Product @@ -24,6 +23,7 @@ const ProductCard: FC = ({ className, noNameTag = false, variant = 'default', + ...props }) => { const { price } = usePrice({ amount: product.price.value, @@ -38,7 +38,7 @@ const ProductCard: FC = ({ ) return ( - + {variant === 'slim' && ( <> diff --git a/components/product/ProductOptions/ProductOptions.tsx b/components/product/ProductOptions/ProductOptions.tsx index 456df4bfc..9261406bc 100644 --- a/components/product/ProductOptions/ProductOptions.tsx +++ b/components/product/ProductOptions/ProductOptions.tsx @@ -1,52 +1,50 @@ -import { memo } from 'react' import { Swatch } from '@components/product' import type { ProductOption } from '@commerce/types/product' import { SelectedOptions } from '../helpers' - +import React from 'react' interface ProductOptionsProps { options: ProductOption[] selectedOptions: SelectedOptions setSelectedOptions: React.Dispatch> } -const ProductOptions: React.FC = ({ - options, - selectedOptions, - setSelectedOptions, -}) => { - return ( -
- {options.map((opt) => ( -
-

- {opt.displayName} -

-
- {opt.values.map((v, i: number) => { - const active = selectedOptions[opt.displayName.toLowerCase()] - return ( - { - setSelectedOptions((selectedOptions) => { - return { - ...selectedOptions, - [opt.displayName.toLowerCase()]: v.label.toLowerCase(), - } - }) - }} - /> - ) - })} +const ProductOptions: React.FC = React.memo( + ({ options, selectedOptions, setSelectedOptions }) => { + return ( +
+ {options.map((opt) => ( +
+

+ {opt.displayName} +

+
+ {opt.values.map((v, i: number) => { + const active = selectedOptions[opt.displayName.toLowerCase()] + return ( + { + setSelectedOptions((selectedOptions) => { + return { + ...selectedOptions, + [opt.displayName.toLowerCase()]: + v.label.toLowerCase(), + } + }) + }} + /> + ) + })} +
-
- ))} -
- ) -} + ))} +
+ ) + } +) -export default memo(ProductOptions) +export default ProductOptions diff --git a/components/product/ProductSidebar/ProductSidebar.tsx b/components/product/ProductSidebar/ProductSidebar.tsx index fd1ef1e0a..fe8a71aa5 100644 --- a/components/product/ProductSidebar/ProductSidebar.tsx +++ b/components/product/ProductSidebar/ProductSidebar.tsx @@ -23,7 +23,7 @@ const ProductSidebar: FC = ({ product, className }) => { useEffect(() => { selectDefaultOptionFromProduct(product, setSelectedOptions) - }, [product]) + }, []) const variant = getProductVariant(product, selectedOptions) const addToCart = async () => { diff --git a/components/product/ProductSlider/ProductSlider.tsx b/components/product/ProductSlider/ProductSlider.tsx index 537a12a46..8c3441906 100644 --- a/components/product/ProductSlider/ProductSlider.tsx +++ b/components/product/ProductSlider/ProductSlider.tsx @@ -66,13 +66,17 @@ const ProductSlider: React.FC = ({ event.preventDefault() } - const slider = sliderContainerRef.current! - - slider.addEventListener('touchstart', preventNavigation) + sliderContainerRef.current!.addEventListener( + 'touchstart', + preventNavigation + ) return () => { - if (slider) { - slider.removeEventListener('touchstart', preventNavigation) + if (sliderContainerRef.current) { + sliderContainerRef.current!.removeEventListener( + 'touchstart', + preventNavigation + ) } } }, []) diff --git a/components/product/ProductSliderControl/ProductSliderControl.tsx b/components/product/ProductSliderControl/ProductSliderControl.tsx index 5525c58de..4e767b5db 100644 --- a/components/product/ProductSliderControl/ProductSliderControl.tsx +++ b/components/product/ProductSliderControl/ProductSliderControl.tsx @@ -1,30 +1,31 @@ -import { FC, MouseEventHandler, memo } from 'react' import cn from 'classnames' +import React from 'react' import s from './ProductSliderControl.module.css' import { ArrowLeft, ArrowRight } from '@components/icons' interface ProductSliderControl { - onPrev: MouseEventHandler - onNext: MouseEventHandler + onPrev: React.MouseEventHandler + onNext: React.MouseEventHandler } -const ProductSliderControl: FC = ({ onPrev, onNext }) => ( -
- - -
+const ProductSliderControl: React.FC = React.memo( + ({ onPrev, onNext }) => ( +
+ + +
+ ) ) - -export default memo(ProductSliderControl) +export default ProductSliderControl diff --git a/components/product/ProductView/ProductView.tsx b/components/product/ProductView/ProductView.tsx index f689030d6..cfe26983a 100644 --- a/components/product/ProductView/ProductView.tsx +++ b/components/product/ProductView/ProductView.tsx @@ -5,11 +5,11 @@ import s from './ProductView.module.css' import { FC } from 'react' import type { Product } from '@commerce/types/product' import usePrice from '@framework/product/use-price' -import { WishlistButton } from '@components/wishlist' import { ProductSlider, ProductCard } from '@components/product' import { Container, Text } from '@components/ui' import ProductSidebar from '../ProductSidebar' import ProductTag from '../ProductTag' +import { WishlistButton } from '@components/wishlist' interface ProductViewProps { product: Product relatedProducts: Product[] diff --git a/components/search.tsx b/components/search.tsx deleted file mode 100644 index 0a653c6cd..000000000 --- a/components/search.tsx +++ /dev/null @@ -1,439 +0,0 @@ -import cn from 'classnames' -import type { SearchPropsType } from '@lib/search-props' -import Link from 'next/link' -import { useState } from 'react' -import { useRouter } from 'next/router' - -import { Layout } from '@components/common' -import { ProductCard } from '@components/product' -import type { Product } from '@commerce/types/product' -import { Container, Skeleton } from '@components/ui' - -import useSearch from '@framework/product/use-search' - -import getSlug from '@lib/get-slug' -import rangeMap from '@lib/range-map' - -const SORT = { - 'trending-desc': 'Trending', - 'latest-desc': 'Latest arrivals', - 'price-asc': 'Price: Low to high', - 'price-desc': 'Price: High to low', -} - -import { - filterQuery, - getCategoryPath, - getDesignerPath, - useSearchMeta, -} from '@lib/search' - -export default function Search({ categories, brands }: SearchPropsType) { - const [activeFilter, setActiveFilter] = useState('') - const [toggleFilter, setToggleFilter] = useState(false) - - const router = useRouter() - const { asPath, locale } = router - const { q, sort } = router.query - // `q` can be included but because categories and designers can't be searched - // in the same way of products, it's better to ignore the search input if one - // of those is selected - const query = filterQuery({ sort }) - - const { pathname, category, brand } = useSearchMeta(asPath) - const activeCategory = categories.find((cat: any) => cat.slug === category) - const activeBrand = brands.find( - (b: any) => getSlug(b.node.path) === `brands/${brand}` - )?.node - - const { data } = useSearch({ - search: typeof q === 'string' ? q : '', - categoryId: activeCategory?.id, - brandId: (activeBrand as any)?.entityId, - sort: typeof sort === 'string' ? sort : '', - locale, - }) - - const handleClick = (event: any, filter: string) => { - if (filter !== activeFilter) { - setToggleFilter(true) - } else { - setToggleFilter(!toggleFilter) - } - setActiveFilter(filter) - } - - return ( - -
-
- {/* Categories */} -
-
- - - -
-
-
- - {/* Designs */} -
-
- - - -
- -
-
- {/* Products */} -
- {(q || activeCategory || activeBrand) && ( -
- {data ? ( - <> - - Showing {data.products.length} results{' '} - {q && ( - <> - for "{q}" - - )} - - - {q ? ( - <> - There are no products that match "{q}" - - ) : ( - <> - There are no products that match the selected category. - - )} - - - ) : q ? ( - <> - Searching for: "{q}" - - ) : ( - <>Searching... - )} -
- )} - {data ? ( -
- {data.products.map((product: Product) => ( - - ))} -
- ) : ( -
- {rangeMap(12, (i) => ( - -
- - ))} -
- )}{' '} -
- - {/* Sort */} -
-
-
- - - -
- -
-
-
- - ) -} - -Search.Layout = Layout diff --git a/components/ui/Modal/Modal.tsx b/components/ui/Modal/Modal.tsx index de45c2814..bb42b3d1b 100644 --- a/components/ui/Modal/Modal.tsx +++ b/components/ui/Modal/Modal.tsx @@ -27,15 +27,13 @@ const Modal: FC = ({ children, onClose }) => { ) useEffect(() => { - const modal = ref.current - - if (modal) { - disableBodyScroll(modal, { reserveScrollBarGap: true }) + if (ref.current) { + disableBodyScroll(ref.current, { reserveScrollBarGap: true }) window.addEventListener('keydown', handleKey) } return () => { - if (modal) { - enableBodyScroll(modal) + if (ref && ref.current) { + enableBodyScroll(ref.current) } clearAllBodyScrollLocks() window.removeEventListener('keydown', handleKey) diff --git a/components/ui/Rating/Rating.tsx b/components/ui/Rating/Rating.tsx index e3a9c6d12..259e642ea 100644 --- a/components/ui/Rating/Rating.tsx +++ b/components/ui/Rating/Rating.tsx @@ -1,4 +1,4 @@ -import { FC, memo } from 'react' +import React, { FC } from 'react' import rangeMap from '@lib/range-map' import { Star } from '@components/icons' import cn from 'classnames' @@ -7,19 +7,21 @@ export interface RatingProps { value: number } -const Quantity: FC = ({ value = 5 }) => ( -
- {rangeMap(5, (i) => ( - = Math.floor(value), - })} - > - - - ))} -
-) +const Quantity: React.FC = React.memo(({ value = 5 }) => { + return ( +
+ {rangeMap(5, (i) => ( + = Math.floor(value), + })} + > + + + ))} +
+ ) +}) -export default memo(Quantity) +export default Quantity diff --git a/components/ui/Sidebar/Sidebar.tsx b/components/ui/Sidebar/Sidebar.tsx index 700bb681a..ce0eeefe2 100644 --- a/components/ui/Sidebar/Sidebar.tsx +++ b/components/ui/Sidebar/Sidebar.tsx @@ -16,14 +16,13 @@ const Sidebar: FC = ({ children, onClose }) => { const ref = useRef() as React.MutableRefObject useEffect(() => { - const sidebar = ref.current - - if (sidebar) { - disableBodyScroll(sidebar, { reserveScrollBarGap: true }) + if (ref.current) { + disableBodyScroll(ref.current, { reserveScrollBarGap: true }) } - return () => { - if (sidebar) enableBodyScroll(sidebar) + if (ref && ref.current) { + enableBodyScroll(ref.current) + } clearAllBodyScrollLocks() } }, []) diff --git a/components/ui/context.tsx b/components/ui/context.tsx index ca2bfd7ed..d2f5aebfd 100644 --- a/components/ui/context.tsx +++ b/components/ui/context.tsx @@ -15,7 +15,7 @@ const initialState = { displayDropdown: false, displayModal: false, modalView: 'LOGIN_VIEW', - sidebarView: 'CART_VIEW', + sidebarView: 'CHECKOUT_VIEW', userAvatar: '', } diff --git a/components/wishlist/WishlistCard/WishlistCard.module.css b/components/wishlist/WishlistCard/WishlistCard.module.css deleted file mode 100644 index cd0237d3b..000000000 --- a/components/wishlist/WishlistCard/WishlistCard.module.css +++ /dev/null @@ -1,21 +0,0 @@ -.root { - @apply grid grid-cols-12 w-full gap-6 px-3 py-6 border-b border-accent-2 transition duration-100 ease-in-out; - - &:nth-child(3n + 1) { - & .productBg { - @apply bg-violet; - } - } - - &:nth-child(3n + 2) { - & .productBg { - @apply bg-pink; - } - } - - &:nth-child(3n + 3) { - & .productBg { - @apply bg-blue; - } - } -} diff --git a/components/wishlist/WishlistCard/WishlistCard.tsx b/components/wishlist/WishlistCard/WishlistCard.tsx deleted file mode 100644 index dfc1165c2..000000000 --- a/components/wishlist/WishlistCard/WishlistCard.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { FC, useState } from 'react' -import cn from 'classnames' -import Link from 'next/link' -import Image from 'next/image' -import s from './WishlistCard.module.css' -import { Trash } from '@components/icons' -import { Button, Text } from '@components/ui' - -import { useUI } from '@components/ui/context' -import type { Product } from '@commerce/types/product' -import usePrice from '@framework/product/use-price' -import useAddItem from '@framework/cart/use-add-item' -import useRemoveItem from '@framework/wishlist/use-remove-item' - -interface Props { - product: Product -} - -const placeholderImg = '/product-img-placeholder.svg' - -const WishlistCard: FC = ({ product }) => { - const { price } = usePrice({ - amount: product.price?.value, - baseAmount: product.price?.retailPrice, - currencyCode: product.price?.currencyCode!, - }) - // @ts-ignore Wishlist is not always enabled - const removeItem = useRemoveItem({ wishlist: { includeProducts: true } }) - const [loading, setLoading] = useState(false) - const [removing, setRemoving] = useState(false) - - // TODO: fix this missing argument issue - /* @ts-ignore */ - const addItem = useAddItem() - const { openSidebar } = useUI() - - const handleRemove = async () => { - setRemoving(true) - - try { - // If this action succeeds then there's no need to do `setRemoving(true)` - // because the component will be removed from the view - await removeItem({ id: product.id! }) - } catch (error) { - setRemoving(false) - } - } - const addToCart = async () => { - setLoading(true) - try { - await addItem({ - productId: String(product.id), - variantId: String(product.variants[0].id), - }) - openSidebar() - setLoading(false) - } catch (err) { - setLoading(false) - } - } - - return ( -
-
- {product.images[0]?.alt -
- -
-

- - {product.name} - -

-
- -
- -
-
-
{price}
-
- -
-
-
- ) -} - -export default WishlistCard diff --git a/components/wishlist/WishlistCard/index.ts b/components/wishlist/WishlistCard/index.ts deleted file mode 100644 index ef572805f..000000000 --- a/components/wishlist/WishlistCard/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './WishlistCard' diff --git a/components/wishlist/index.ts b/components/wishlist/index.ts index 8aee9f816..9fe0a3541 100644 --- a/components/wishlist/index.ts +++ b/components/wishlist/index.ts @@ -1,2 +1 @@ -export { default as WishlistCard } from './WishlistCard' export { default as WishlistButton } from './WishlistButton' diff --git a/framework/bigcommerce/.env.template b/framework/bigcommerce/.env.template deleted file mode 100644 index 2b91bc095..000000000 --- a/framework/bigcommerce/.env.template +++ /dev/null @@ -1,8 +0,0 @@ -COMMERCE_PROVIDER=bigcommerce - -BIGCOMMERCE_STOREFRONT_API_URL= -BIGCOMMERCE_STOREFRONT_API_TOKEN= -BIGCOMMERCE_STORE_API_URL= -BIGCOMMERCE_STORE_API_TOKEN= -BIGCOMMERCE_STORE_API_CLIENT_ID= -BIGCOMMERCE_CHANNEL_ID= diff --git a/framework/bigcommerce/README.md b/framework/bigcommerce/README.md deleted file mode 100644 index 7f62a5f3f..000000000 --- a/framework/bigcommerce/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Bigcommerce Provider - -**Demo:** https://bigcommerce.demo.vercel.store/ - -With the deploy button below you'll be able to have a [BigCommerce](https://www.bigcommerce.com/) account and a store that works with this starter: - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fcommerce&project-name=commerce&repo-name=commerce&demo-title=Next.js%20Commerce&demo-description=An%20all-in-one%20starter%20kit%20for%20high-performance%20e-commerce%20sites.&demo-url=https%3A%2F%2Fdemo.vercel.store&demo-image=https%3A%2F%2Fbigcommerce-demo-asset-ksvtgfvnd.vercel.app%2Fbigcommerce.png&integration-ids=oac_MuWZiE4jtmQ2ejZQaQ7ncuDT) - -If you already have a BigCommerce account and want to use your current store, then copy the `.env.template` file in this directory to `.env.local` in the main directory (which will be ignored by Git): - -```bash -cp framework/bigcommerce/.env.template .env.local -``` - -Then, set the environment variables in `.env.local` to match the ones from your store. - -## Contribute - -Our commitment to Open Source can be found [here](https://vercel.com/oss). - -If you find an issue with the provider or want a new feature, feel free to open a PR or [create a new issue](https://github.com/vercel/commerce/issues). - -## Troubleshoot - -
-I already own a BigCommerce store. What should I do? -
-First thing you do is: set your environment variables -
-
-.env.local - -```sh -BIGCOMMERCE_STOREFRONT_API_URL=<> -BIGCOMMERCE_STOREFRONT_API_TOKEN=<> -BIGCOMMERCE_STORE_API_URL=<> -BIGCOMMERCE_STORE_API_TOKEN=<> -BIGCOMMERCE_STORE_API_CLIENT_ID=<> -BIGCOMMERCE_CHANNEL_ID=<> -``` - -If your project was started with a "Deploy with Vercel" button, you can use Vercel's CLI to retrieve these credentials. - -1. Install Vercel CLI: `npm i -g vercel` -2. Link local instance with Vercel and Github accounts (creates .vercel file): `vercel link` -3. Download your environment variables: `vercel env pull .env.local` - -Next, you're free to customize the starter. More updates coming soon. Stay tuned. - -
- -
-BigCommerce shows a Coming Soon page and requests a Preview Code -
-After Email confirmation, Checkout should be manually enabled through BigCommerce platform. Look for "Review & test your store" section through BigCommerce's dashboard. -
-
-BigCommerce team has been notified and they plan to add more detailed about this subject. -
diff --git a/framework/bigcommerce/api/definitions/catalog.ts b/framework/bigcommerce/api/definitions/catalog.ts deleted file mode 100644 index 2c483f781..000000000 --- a/framework/bigcommerce/api/definitions/catalog.ts +++ /dev/null @@ -1,2993 +0,0 @@ -/** - * This file was auto-generated by swagger-to-ts. - * Do not make direct changes to the file. - */ - -export interface definitions { - /** - * Common Modifier properties. - */ - productModifier_Base: { - /** - * BigCommerce API, which determines how it will display on the storefront. Acceptable values: `date`, `checkbox`, `file`, `text`, `multi_line_text`, `numbers_only_text`, `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. Required in a /POST. - */ - type: - | 'date' - | 'checkbox' - | 'file' - | 'text' - | 'multi_line_text' - | 'numbers_only_text' - | 'radio_buttons' - | 'rectangles' - | 'dropdown' - | 'product_list' - | 'product_list_with_images' - | 'swatch' - /** - * Whether or not this modifer is required or not at checkout. Required in a /POST. - */ - required: boolean - /** - * The order the modifiers display on the product detail page. - */ - sort_order?: number - config?: definitions['config_Full'] - /** - * The name of the option shown on the storefront. - */ - display_name?: string - } - /** - * Product Modifier - */ - productModifier_Full: definitions['productModifier_Base'] & { - /** - * The unique numeric ID of the modifier; increments sequentially. - */ - id?: number - /** - * The unique numeric ID of the product to which the option belongs. - */ - product_id?: number - /** - * The unique option name. Auto-generated from the display name, a timestamp, and the product ID. - */ - name?: string - option_values?: definitions['productModifierOptionValue_Full'][] - } - /** - * The model for a POST to create a modifier on a product. - */ - productModifier_Post: { - /** - * BigCommerce API, which determines how it will display on the storefront. Acceptable values: `date`, `checkbox`, `file`, `text`, `multi_line_text`, `numbers_only_text`, `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. Required in a /POST. - */ - type: - | 'date' - | 'checkbox' - | 'file' - | 'text' - | 'multi_line_text' - | 'numbers_only_text' - | 'radio_buttons' - | 'rectangles' - | 'dropdown' - | 'product_list' - | 'product_list_with_images' - | 'swatch' - /** - * Whether or not this modifer is required or not at checkout. Required in a /POST. - */ - required: boolean - /** - * The order the modifiers display on the product detail page. - */ - sort_order?: number - /** - * The values for option config can vary based on the Modifier created. - */ - config?: { - /** - * (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. - */ - default_value?: string - /** - * (checkbox) Flag for setting the checkbox to be checked by default. - */ - checked_by_default?: boolean - /** - * (checkbox) Label displayed for the checkbox option. - */ - checkbox_label?: string - /** - * (date) Flag to limit the dates allowed to be entered on a date option. - */ - date_limited?: boolean - /** - * (date) The type of limit that is allowed to be entered on a date option. - */ - date_limit_mode?: 'earliest' | 'range' | 'latest' - /** - * (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_earliest_value?: string - /** - * (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_latest_value?: string - /** - * (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types. - */ - file_types_mode?: 'specific' | 'all' - /** - * (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: - * `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). - * `other` - Allows file types defined in the `file_types_other` array. - */ - file_types_supported?: string[] - /** - * (file) A list of other file types allowed with the file upload option. - */ - file_types_other?: string[] - /** - * (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server. - */ - file_max_size?: number - /** - * (text, multi_line_text) Flag to validate the length of a text or multi-line text input. - */ - text_characters_limited?: boolean - /** - * (text, multi_line_text) The minimum length allowed for a text or multi-line text option. - */ - text_min_length?: number - /** - * (text, multi_line_text) The maximum length allowed for a text or multi line text option. - */ - text_max_length?: number - /** - * (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input. - */ - text_lines_limited?: boolean - /** - * (multi_line_text) The maximum number of lines allowed on a multi-line text input. - */ - text_max_lines?: number - /** - * (numbers_only_text) Flag to limit the value of a number option. - */ - number_limited?: boolean - /** - * (numbers_only_text) The type of limit on values entered for a number option. - */ - number_limit_mode?: 'lowest' | 'highest' | 'range' - /** - * (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true. - */ - number_lowest_value?: number - /** - * (numbers_only_text) The highest allowed value for a number option if `number_limited` is true. - */ - number_highest_value?: number - /** - * (numbers_only_text) Flag to limit the input on a number option to whole numbers only. - */ - number_integers_only?: boolean - /** - * (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list. - */ - product_list_adjusts_inventory?: boolean - /** - * (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price. - */ - product_list_adjusts_pricing?: boolean - /** - * (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions. - */ - product_list_shipping_calc?: 'none' | 'weight' | 'package' - } - option_values?: (({ - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. - */ - value_data?: { [key: string]: any } - } & { - adjusters?: { - /** - * Adjuster for Complex Rules. - */ - price?: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * Adjuster for Complex Rules. - */ - weight?: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * The URL for an image displayed on the storefront when the modifier value is selected.Limit of 8MB per file. - */ - image_url?: string - purchasing_disabled?: { - /** - * Flag for whether the modifier value disables purchasing when selected on the storefront. This can be used for temporarily disabling a particular modifier value. - */ - status?: boolean - /** - * The message displayed on the storefront when the purchasing disabled status is `true`. - */ - message?: string - } - } - }) & { - /** - * The unique numeric ID of the value; increments sequentially. - */ - id?: number - })[] - } & { - /** - * The name of the option shown on the storefront. - */ - display_name: string - } - /** - * The model for a PUT to update a modifier on a product. - */ - productModifier_Put: { - /** - * BigCommerce API, which determines how it will display on the storefront. Acceptable values: `date`, `checkbox`, `file`, `text`, `multi_line_text`, `numbers_only_text`, `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. Required in a /POST. - */ - type: - | 'date' - | 'checkbox' - | 'file' - | 'text' - | 'multi_line_text' - | 'numbers_only_text' - | 'radio_buttons' - | 'rectangles' - | 'dropdown' - | 'product_list' - | 'product_list_with_images' - | 'swatch' - /** - * Whether or not this modifer is required or not at checkout. Required in a /POST. - */ - required: boolean - /** - * The order the modifiers display on the product detail page. - */ - sort_order?: number - /** - * The values for option config can vary based on the Modifier created. - */ - config?: { - /** - * (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. - */ - default_value?: string - /** - * (checkbox) Flag for setting the checkbox to be checked by default. - */ - checked_by_default?: boolean - /** - * (checkbox) Label displayed for the checkbox option. - */ - checkbox_label?: string - /** - * (date) Flag to limit the dates allowed to be entered on a date option. - */ - date_limited?: boolean - /** - * (date) The type of limit that is allowed to be entered on a date option. - */ - date_limit_mode?: 'earliest' | 'range' | 'latest' - /** - * (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_earliest_value?: string - /** - * (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_latest_value?: string - /** - * (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types. - */ - file_types_mode?: 'specific' | 'all' - /** - * (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: - * `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). - * `other` - Allows file types defined in the `file_types_other` array. - */ - file_types_supported?: string[] - /** - * (file) A list of other file types allowed with the file upload option. - */ - file_types_other?: string[] - /** - * (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server. - */ - file_max_size?: number - /** - * (text, multi_line_text) Flag to validate the length of a text or multi-line text input. - */ - text_characters_limited?: boolean - /** - * (text, multi_line_text) The minimum length allowed for a text or multi-line text option. - */ - text_min_length?: number - /** - * (text, multi_line_text) The maximum length allowed for a text or multi line text option. - */ - text_max_length?: number - /** - * (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input. - */ - text_lines_limited?: boolean - /** - * (multi_line_text) The maximum number of lines allowed on a multi-line text input. - */ - text_max_lines?: number - /** - * (numbers_only_text) Flag to limit the value of a number option. - */ - number_limited?: boolean - /** - * (numbers_only_text) The type of limit on values entered for a number option. - */ - number_limit_mode?: 'lowest' | 'highest' | 'range' - /** - * (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true. - */ - number_lowest_value?: number - /** - * (numbers_only_text) The highest allowed value for a number option if `number_limited` is true. - */ - number_highest_value?: number - /** - * (numbers_only_text) Flag to limit the input on a number option to whole numbers only. - */ - number_integers_only?: boolean - /** - * (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list. - */ - product_list_adjusts_inventory?: boolean - /** - * (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price. - */ - product_list_adjusts_pricing?: boolean - /** - * (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions. - */ - product_list_shipping_calc?: 'none' | 'weight' | 'package' - } - option_values?: (({ - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. - */ - value_data?: { [key: string]: any } - } & { - adjusters?: { - /** - * Adjuster for Complex Rules. - */ - price?: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * Adjuster for Complex Rules. - */ - weight?: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * The URL for an image displayed on the storefront when the modifier value is selected.Limit of 8MB per file. - */ - image_url?: string - purchasing_disabled?: { - /** - * Flag for whether the modifier value disables purchasing when selected on the storefront. This can be used for temporarily disabling a particular modifier value. - */ - status?: boolean - /** - * The message displayed on the storefront when the purchasing disabled status is `true`. - */ - message?: string - } - } - }) & { - /** - * The unique numeric ID of the value; increments sequentially. - */ - id?: number - })[] - } - /** - * Common Product Modifer `option_value` properties. - */ - productModifierOptionValue_Base: { - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. If no data is available, returns `null`. - */ - value_data?: { [key: string]: any } - adjusters?: definitions['adjusters_Full'] - } - /** - * Product Modifer `option_value`. - */ - productModifierOptionValue_Full: definitions['productModifierOptionValue_Base'] & { - /** - * The unique numeric ID of the value; increments sequentially. - */ - id?: number - option_id?: number - } - /** - * The model for a POST to create a modifier value on a product. - */ - productModifierOptionValue_Post: { - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. - */ - value_data?: { [key: string]: any } - } & { - adjusters?: { - /** - * Adjuster for Complex Rules. - */ - price?: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * Adjuster for Complex Rules. - */ - weight?: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * The URL for an image displayed on the storefront when the modifier value is selected.Limit of 8MB per file. - */ - image_url?: string - purchasing_disabled?: { - /** - * Flag for whether the modifier value disables purchasing when selected on the storefront. This can be used for temporarily disabling a particular modifier value. - */ - status?: boolean - /** - * The message displayed on the storefront when the purchasing disabled status is `true`. - */ - message?: string - } - } - } - /** - * The model for a PUT to update a modifier value on a product. - */ - productModifierOptionValue_Put: ({ - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. - */ - value_data?: { [key: string]: any } - } & { - adjusters?: { - /** - * Adjuster for Complex Rules. - */ - price?: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * Adjuster for Complex Rules. - */ - weight?: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * The URL for an image displayed on the storefront when the modifier value is selected.Limit of 8MB per file. - */ - image_url?: string - purchasing_disabled?: { - /** - * Flag for whether the modifier value disables purchasing when selected on the storefront. This can be used for temporarily disabling a particular modifier value. - */ - status?: boolean - /** - * The message displayed on the storefront when the purchasing disabled status is `true`. - */ - message?: string - } - } - }) & { - /** - * The unique numeric ID of the value; increments sequentially. - */ - id?: number - } - resp_productionOption: { - data?: definitions['productOption_Full'] - /** - * Empty meta object; may be used later. - */ - meta?: { ''?: string } - } - /** - * Common Option properties. - */ - productOption_Base: { - /** - * The unique numerical ID of the option, increments sequentially. - */ - id?: number - /** - * The unique numerical ID of the product to which the option belongs. - */ - product_id?: number - /** - * The name of the option shown on the storefront. - */ - display_name?: string - /** - * The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch. - */ - type?: - | 'radio_buttons' - | 'rectangles' - | 'dropdown' - | 'product_list' - | 'product_list_with_images' - | 'swatch' - config?: definitions['productOptionConfig_Full'] - /** - * Order in which the option is displayed on the storefront. - */ - sort_order?: number - option_values?: definitions['productOptionOptionValue_Full'] - } - productOption_Full: definitions['productOption_Base'] & { - /** - * The unique option name, auto-generated from the display name, a timestamp, and the product ID. - */ - name?: string - } - /** - * The model for a POST to create options on a product. - */ - productOption_Post: { - /** - * The unique numerical ID of the option, increments sequentially. - */ - id?: number - /** - * The unique numerical ID of the product to which the option belongs. - */ - product_id?: number - /** - * The name of the option shown on the storefront. - */ - display_name?: string - /** - * The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch. - */ - type?: - | 'radio_buttons' - | 'rectangles' - | 'dropdown' - | 'product_list' - | 'product_list_with_images' - | 'swatch' - /** - * The values for option config can vary based on the Modifier created. - */ - config?: { - /** - * (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. - */ - default_value?: string - /** - * (checkbox) Flag for setting the checkbox to be checked by default. - */ - checked_by_default?: boolean - /** - * (checkbox) Label displayed for the checkbox option. - */ - checkbox_label?: string - /** - * (date) Flag to limit the dates allowed to be entered on a date option. - */ - date_limited?: boolean - /** - * (date) The type of limit that is allowed to be entered on a date option. - */ - date_limit_mode?: 'earliest' | 'range' | 'latest' - /** - * (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_earliest_value?: string - /** - * (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_latest_value?: string - /** - * (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types. - */ - file_types_mode?: 'specific' | 'all' - /** - * (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: - * `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). - * `other` - Allows file types defined in the `file_types_other` array. - */ - file_types_supported?: string[] - /** - * (file) A list of other file types allowed with the file upload option. - */ - file_types_other?: string[] - /** - * (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server. - */ - file_max_size?: number - /** - * (text, multi_line_text) Flag to validate the length of a text or multi-line text input. - */ - text_characters_limited?: boolean - /** - * (text, multi_line_text) The minimum length allowed for a text or multi-line text option. - */ - text_min_length?: number - /** - * (text, multi_line_text) The maximum length allowed for a text or multi line text option. - */ - text_max_length?: number - /** - * (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input. - */ - text_lines_limited?: boolean - /** - * (multi_line_text) The maximum number of lines allowed on a multi-line text input. - */ - text_max_lines?: number - /** - * (numbers_only_text) Flag to limit the value of a number option. - */ - number_limited?: boolean - /** - * (numbers_only_text) The type of limit on values entered for a number option. - */ - number_limit_mode?: 'lowest' | 'highest' | 'range' - /** - * (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true. - */ - number_lowest_value?: number - /** - * (numbers_only_text) The highest allowed value for a number option if `number_limited` is true. - */ - number_highest_value?: number - /** - * (numbers_only_text) Flag to limit the input on a number option to whole numbers only. - */ - number_integers_only?: boolean - /** - * (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list. - */ - product_list_adjusts_inventory?: boolean - /** - * (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price. - */ - product_list_adjusts_pricing?: boolean - /** - * (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions. - */ - product_list_shipping_calc?: 'none' | 'weight' | 'package' - } - /** - * Order in which the option is displayed on the storefront. - */ - sort_order?: number - option_values?: ({ - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. - */ - value_data?: { [key: string]: any } - } & { - /** - * The unique numeric ID of the value; increments sequentially. - */ - id?: number - })[] - /** - * Publicly available image url - */ - image_url?: string - } - /** - * The model for a PUT to update options on a product. - */ - productOption_Put: { - /** - * The unique numerical ID of the option, increments sequentially. - */ - id?: number - /** - * The unique numerical ID of the product to which the option belongs. - */ - product_id?: number - /** - * The name of the option shown on the storefront. - */ - display_name?: string - /** - * The type of option, which determines how it will display on the storefront. Acceptable values: `radio_buttons`, `rectangles`, `dropdown`, `product_list`, `product_list_with_images`, `swatch`. For reference, the former v2 API values are: RB = radio_buttons, RT = rectangles, S = dropdown, P = product_list, PI = product_list_with_images, CS = swatch. - */ - type?: - | 'radio_buttons' - | 'rectangles' - | 'dropdown' - | 'product_list' - | 'product_list_with_images' - | 'swatch' - /** - * The values for option config can vary based on the Modifier created. - */ - config?: { - /** - * (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. - */ - default_value?: string - /** - * (checkbox) Flag for setting the checkbox to be checked by default. - */ - checked_by_default?: boolean - /** - * (checkbox) Label displayed for the checkbox option. - */ - checkbox_label?: string - /** - * (date) Flag to limit the dates allowed to be entered on a date option. - */ - date_limited?: boolean - /** - * (date) The type of limit that is allowed to be entered on a date option. - */ - date_limit_mode?: 'earliest' | 'range' | 'latest' - /** - * (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_earliest_value?: string - /** - * (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_latest_value?: string - /** - * (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types. - */ - file_types_mode?: 'specific' | 'all' - /** - * (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: - * `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). - * `other` - Allows file types defined in the `file_types_other` array. - */ - file_types_supported?: string[] - /** - * (file) A list of other file types allowed with the file upload option. - */ - file_types_other?: string[] - /** - * (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server. - */ - file_max_size?: number - /** - * (text, multi_line_text) Flag to validate the length of a text or multi-line text input. - */ - text_characters_limited?: boolean - /** - * (text, multi_line_text) The minimum length allowed for a text or multi-line text option. - */ - text_min_length?: number - /** - * (text, multi_line_text) The maximum length allowed for a text or multi line text option. - */ - text_max_length?: number - /** - * (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input. - */ - text_lines_limited?: boolean - /** - * (multi_line_text) The maximum number of lines allowed on a multi-line text input. - */ - text_max_lines?: number - /** - * (numbers_only_text) Flag to limit the value of a number option. - */ - number_limited?: boolean - /** - * (numbers_only_text) The type of limit on values entered for a number option. - */ - number_limit_mode?: 'lowest' | 'highest' | 'range' - /** - * (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true. - */ - number_lowest_value?: number - /** - * (numbers_only_text) The highest allowed value for a number option if `number_limited` is true. - */ - number_highest_value?: number - /** - * (numbers_only_text) Flag to limit the input on a number option to whole numbers only. - */ - number_integers_only?: boolean - /** - * (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list. - */ - product_list_adjusts_inventory?: boolean - /** - * (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price. - */ - product_list_adjusts_pricing?: boolean - /** - * (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions. - */ - product_list_shipping_calc?: 'none' | 'weight' | 'package' - } - /** - * Order in which the option is displayed on the storefront. - */ - sort_order?: number - option_values?: ({ - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. - */ - value_data?: { [key: string]: any } - } & { - /** - * The unique numeric ID of the value; increments sequentially. - */ - id?: number - })[] - /** - * Publicly available image url - */ - image_url?: string - } - /** - * Returns the categories tree, a nested lineage of the categories with parent->child relationship. The Category objects returned are simplified versions of the category objects returned in the rest of this API. - */ - categoriesTree_Resp: { - data?: definitions['categoriesTreeNode_Full'][] - meta?: definitions['metaEmpty_Full'] - } - /** - * Used to reflect parent <> child category relationships. Used by Category Tree. - */ - categoriesTreeNode_Full: { - /** - * The unique numeric ID of the category; increments sequentially. - */ - id?: number - /** - * The unique numeric ID of the category's parent. This field controls where the category sits in the tree of categories that organize the catalog. - */ - parent_id?: number - /** - * The name displayed for the category. Name is unique with respect to the category's siblings. - */ - name?: string - /** - * Flag to determine whether the product should be displayed to customers browsing the store. If `true`, the category will be displayed. If `false`, the category will be hidden from view. - */ - is_visible?: boolean - /** - * The custom URL for the category on the storefront. - */ - url?: string - /** - * The list of children of the category. - */ - children?: definitions['categoriesTreeNode_Full'][] - } - /** - * Common Category object properties. - */ - category_Full: { - /** - * Unique ID of the *Category*. Increments sequentially. - * Read-Only. - */ - id?: number - /** - * The unique numeric ID of the category's parent. This field controls where the category sits in the tree of categories that organize the catalog. - * Required in a POST if creating a child category. - */ - parent_id: number - /** - * The name displayed for the category. Name is unique with respect to the category's siblings. - * Required in a POST. - */ - name: string - /** - * The product description, which can include HTML formatting. - */ - description?: string - /** - * Number of views the category has on the storefront. - */ - views?: number - /** - * Priority this category will be given when included in the menu and category pages. The lower the number, the closer to the top of the results the category will be. - */ - sort_order?: number - /** - * Custom title for the category page. If not defined, the category name will be used as the meta title. - */ - page_title?: string - /** - * A comma-separated list of keywords that can be used to locate the category when searching the store. - */ - search_keywords?: string - /** - * Custom meta keywords for the category page. If not defined, the store's default keywords will be used. Must post as an array like: ["awesome","sauce"]. - */ - meta_keywords?: string[] - /** - * Custom meta description for the category page. If not defined, the store's default meta description will be used. - */ - meta_description?: string - /** - * A valid layout file. (Please refer to [this article](https://support.bigcommerce.com/articles/Public/Creating-Custom-Template-Files/) on creating category files.) This field is writable only for stores with a Blueprint theme applied. - */ - layout_file?: string - /** - * Flag to determine whether the product should be displayed to customers browsing the store. If `true`, the category will be displayed. If `false`, the category will be hidden from view. - */ - is_visible?: boolean - /** - * Determines how the products are sorted on category page load. - */ - default_product_sort?: - | 'use_store_settings' - | 'featured' - | 'newest' - | 'best_selling' - | 'alpha_asc' - | 'alpha_desc' - | 'avg_customer_review' - | 'price_asc' - | 'price_desc' - /** - * Image URL used for this category on the storefront. Images can be uploaded via form file post to `/categories/{categoryId}/image`, or by providing a publicly accessible URL in this field. - */ - image_url?: string - custom_url?: definitions['customUrl_Full'] - } - /** - * Common Brand properties. - */ - brand_Full: { - /** - * Unique ID of the *Brand*. Read-Only. - */ - id?: number - /** - * The name of the brand. Must be unique. - * Required in POST. - */ - name: string - /** - * The title shown in the browser while viewing the brand. - */ - page_title?: string - /** - * Comma-separated list of meta keywords to include in the HTML. - */ - meta_keywords?: string[] - /** - * A meta description to include. - */ - meta_description?: string - /** - * A comma-separated list of keywords that can be used to locate this brand. - */ - search_keywords?: string - /** - * Image URL used for this category on the storefront. Images can be uploaded via form file post to `/brands/{brandId}/image`, or by providing a publicly accessible URL in this field. - */ - image_url?: string - custom_url?: definitions['customUrl_Full'] - } - /** - * Common Variant properties. - */ - productVariant_Base: { - /** - * The cost price of the variant. Not affected by Price List prices. - */ - cost_price?: number - /** - * This variant's base price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is `null`, the product's default price (set in the Product resource's `price` field) will be used as the base price. - */ - price?: number - /** - * This variant's sale price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's sale price (set in the Product resource's `price` field) will be used as the sale price. - */ - sale_price?: number - /** - * This variant's retail price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's retail price (set in the Product resource's `price` field) will be used as the retail price. - */ - retail_price?: number - /** - * This variant's base weight on the storefront. If this value is null, the product's default weight (set in the Product resource's weight field) will be used as the base weight. - */ - weight?: number - /** - * Width of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default width (set in the Product resource's `width` field) will be used as the base width. - */ - width?: number - /** - * Height of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default height (set in the Product resource's `height` field) will be used as the base height. - */ - height?: number - /** - * Depth of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default depth (set in the Product resource's `depth` field) will be used as the base depth. - */ - depth?: number - /** - * Flag used to indicate whether the variant has free shipping. If `true`, the shipping cost for the variant will be zero. - */ - is_free_shipping?: boolean - /** - * A fixed shipping cost for the variant. If defined, this value will be used during checkout instead of normal shipping-cost calculation. - */ - fixed_cost_shipping_price?: number - /** - * If `true`, this variant will not be purchasable on the storefront. - */ - purchasing_disabled?: boolean - /** - * If `purchasing_disabled` is `true`, this message should show on the storefront when the variant is selected. - */ - purchasing_disabled_message?: string - /** - * The UPC code used in feeds for shopping comparison sites and external channel integrations. - */ - upc?: string - /** - * Inventory level for the variant, which is used when the product's inventory_tracking is set to `variant`. - */ - inventory_level?: number - /** - * When the variant hits this inventory level, it is considered low stock. - */ - inventory_warning_level?: number - /** - * Identifies where in a warehouse the variant is located. - */ - bin_picking_number?: string - } - productVariant_Full: definitions['productVariant_Base'] & { - id?: number - product_id?: number - sku?: string - /** - * Read-only reference to v2 API's SKU ID. Null if it is a base variant. - */ - sku_id?: number - /** - * Array of option and option values IDs that make up this variant. Will be empty if the variant is the product's base variant. - */ - option_values?: definitions['productVariantOptionValue_Base'][] - /** - * The price of the variant as seen on the storefront. This price takes into account `sale_price` and any price adjustment rules that are applicable to this variant. - */ - calculated_price?: number - } - /** - * The model for a POST to create variants on a product. - */ - productVariant_Post: { - /** - * The cost price of the variant. Not affected by Price List prices. - */ - cost_price?: number - /** - * This variant's base price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is `null`, the product's default price (set in the Product resource's `price` field) will be used as the base price. - */ - price?: number - /** - * This variant's sale price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's sale price (set in the Product resource's `price` field) will be used as the sale price. - */ - sale_price?: number - /** - * This variant's retail price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's retail price (set in the Product resource's `price` field) will be used as the retail price. - */ - retail_price?: number - /** - * This variant's base weight on the storefront. If this value is null, the product's default weight (set in the Product resource's weight field) will be used as the base weight. - */ - weight?: number - /** - * Width of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default width (set in the Product resource's `width` field) will be used as the base width. - */ - width?: number - /** - * Height of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default height (set in the Product resource's `height` field) will be used as the base height. - */ - height?: number - /** - * Depth of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default depth (set in the Product resource's `depth` field) will be used as the base depth. - */ - depth?: number - /** - * Flag used to indicate whether the variant has free shipping. If `true`, the shipping cost for the variant will be zero. - */ - is_free_shipping?: boolean - /** - * A fixed shipping cost for the variant. If defined, this value will be used during checkout instead of normal shipping-cost calculation. - */ - fixed_cost_shipping_price?: number - /** - * If `true`, this variant will not be purchasable on the storefront. - */ - purchasing_disabled?: boolean - /** - * If `purchasing_disabled` is `true`, this message should show on the storefront when the variant is selected. - */ - purchasing_disabled_message?: string - /** - * The UPC code used in feeds for shopping comparison sites and external channel integrations. - */ - upc?: string - /** - * Inventory level for the variant, which is used when the product's inventory_tracking is set to `variant`. - */ - inventory_level?: number - /** - * When the variant hits this inventory level, it is considered low stock. - */ - inventory_warning_level?: number - /** - * Identifies where in a warehouse the variant is located. - */ - bin_picking_number?: string - } & { - product_id?: number - sku?: string - /** - * Array of option and option values IDs that make up this variant. Will be empty if the variant is the product's base variant. - */ - option_values?: { id?: number; option_id?: number }[] - } - variantCollection_Put: definitions['productVariant_Full'][] - /** - * The model for a PUT to update variants on a product. - */ - variant_Put: { - /** - * The cost price of the variant. Not affected by Price List prices. - */ - cost_price?: number - /** - * This variant's base price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is `null`, the product's default price (set in the Product resource's `price` field) will be used as the base price. - */ - price?: number - /** - * This variant's sale price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's sale price (set in the Product resource's `price` field) will be used as the sale price. - */ - sale_price?: number - /** - * This variant's retail price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's retail price (set in the Product resource's `price` field) will be used as the retail price. - */ - retail_price?: number - /** - * This variant's base weight on the storefront. If this value is null, the product's default weight (set in the Product resource's weight field) will be used as the base weight. - */ - weight?: number - /** - * Width of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default width (set in the Product resource's `width` field) will be used as the base width. - */ - width?: number - /** - * Height of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default height (set in the Product resource's `height` field) will be used as the base height. - */ - height?: number - /** - * Depth of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default depth (set in the Product resource's `depth` field) will be used as the base depth. - */ - depth?: number - /** - * Flag used to indicate whether the variant has free shipping. If `true`, the shipping cost for the variant will be zero. - */ - is_free_shipping?: boolean - /** - * A fixed shipping cost for the variant. If defined, this value will be used during checkout instead of normal shipping-cost calculation. - */ - fixed_cost_shipping_price?: number - /** - * If `true`, this variant will not be purchasable on the storefront. - */ - purchasing_disabled?: boolean - /** - * If `purchasing_disabled` is `true`, this message should show on the storefront when the variant is selected. - */ - purchasing_disabled_message?: string - /** - * The UPC code used in feeds for shopping comparison sites and external channel integrations. - */ - upc?: string - /** - * Inventory level for the variant, which is used when the product's inventory_tracking is set to `variant`. - */ - inventory_level?: number - /** - * When the variant hits this inventory level, it is considered low stock. - */ - inventory_warning_level?: number - /** - * Identifies where in a warehouse the variant is located. - */ - bin_picking_number?: string - } & { id?: number } - /** - * The model for a POST to create variants on a product. - */ - productVariant_Post_Product: definitions['productVariant_Base'] & { - sku?: string - option_values?: { - /** - * The name of the option. - */ - option_display_name?: string - /** - * The label of the option value. - */ - label?: string - }[] - } - /** - * The model for a PUT to update variants on a product. - */ - productVariant_Put_Product: { - /** - * The cost price of the variant. Not affected by Price List prices. - */ - cost_price?: number - /** - * This variant's base price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is `null`, the product's default price (set in the Product resource's `price` field) will be used as the base price. - */ - price?: number - /** - * This variant's sale price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's sale price (set in the Product resource's `price` field) will be used as the sale price. - */ - sale_price?: number - /** - * This variant's retail price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's retail price (set in the Product resource's `price` field) will be used as the retail price. - */ - retail_price?: number - /** - * This variant's base weight on the storefront. If this value is null, the product's default weight (set in the Product resource's weight field) will be used as the base weight. - */ - weight?: number - /** - * Width of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default width (set in the Product resource's `width` field) will be used as the base width. - */ - width?: number - /** - * Height of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default height (set in the Product resource's `height` field) will be used as the base height. - */ - height?: number - /** - * Depth of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default depth (set in the Product resource's `depth` field) will be used as the base depth. - */ - depth?: number - /** - * Flag used to indicate whether the variant has free shipping. If `true`, the shipping cost for the variant will be zero. - */ - is_free_shipping?: boolean - /** - * A fixed shipping cost for the variant. If defined, this value will be used during checkout instead of normal shipping-cost calculation. - */ - fixed_cost_shipping_price?: number - /** - * If `true`, this variant will not be purchasable on the storefront. - */ - purchasing_disabled?: boolean - /** - * If `purchasing_disabled` is `true`, this message should show on the storefront when the variant is selected. - */ - purchasing_disabled_message?: string - /** - * The UPC code used in feeds for shopping comparison sites and external channel integrations. - */ - upc?: string - /** - * Inventory level for the variant, which is used when the product's inventory_tracking is set to `variant`. - */ - inventory_level?: number - /** - * When the variant hits this inventory level, it is considered low stock. - */ - inventory_warning_level?: number - /** - * Identifies where in a warehouse the variant is located. - */ - bin_picking_number?: string - product_id?: number - sku?: string - } - productVariantOptionValue_Full: { - /** - * The name of the option. - */ - option_display_name?: string - /** - * The label of the option value. - */ - label?: string - } & definitions['productVariantOptionValue_Base'] - /** - * The model for a POST to create option values on a product. - */ - productOptionValue_Post_Product: { - /** - * The name of the option. - */ - option_display_name?: string - /** - * The label of the option value. - */ - label?: string - } - /** - * Common Product Variant Option properties. - */ - productVariantOptionValue_Base: { id?: number; option_id?: number } - /** - * The model for a POST to create option values on a variant. - */ - productVariantOptionValue_Post: { id?: number; option_id?: number } - resp_productOptionValue: { - data?: definitions['productOptionOptionValue_Full'] - /** - * Empty meta object; may be used later. - */ - meta?: { ''?: string } - } - /** - * Common Product Option `option_value` properties. - */ - productOptionOptionValue_Base: { - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. If no data is available, returns `null`. - */ - value_data?: { [key: string]: any } - } - /** - * Product Option `option_value`. - */ - productOptionOptionValue_Full: definitions['productOptionOptionValue_Base'] & { - /** - * The unique numeric ID of the value; increments sequentially. - */ - id?: number - } - /** - * The model for a POST to create option values on a product. - */ - productOptionValue_Post: { - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. - */ - value_data?: { [key: string]: any } - } - /** - * The model for a PUT to update option values on a product. - */ - productOptionValue_Put: { - /** - * The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. - */ - is_default?: boolean - /** - * The text display identifying the value on the storefront. Required in a /POST. - */ - label: string - /** - * The order in which the value will be displayed on the product page. Required in a /POST. - */ - sort_order: number - /** - * Extra data describing the value, based on the type of option or modifier with which the value is associated. The `swatch` type option can accept an array of `colors`, with up to three hexidecimal color keys; or an `image_url`, which is a full image URL path including protocol. The `product list` type option requires a `product_id`. The `checkbox` type option requires a boolean flag, called `checked_value`, to determine which value is considered to be the checked state. - */ - value_data?: { [key: string]: any } - } & { - /** - * The unique numeric ID of the value; increments sequentially. - */ - id?: number - } - /** - * Common ProductImage properties. - */ - productImage_Base: { - /** - * The local path to the original image file uploaded to BigCommerce. - */ - image_file?: string - /** - * Flag for identifying whether the image is used as the product's thumbnail. - */ - is_thumbnail?: boolean - /** - * The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a `sort_order` the same as or greater than the image's new `sort_order` value will have their `sort_order`s reordered. - */ - sort_order?: number - /** - * The description for the image. - */ - description?: string - /** - * Must be a fully qualified URL path, including protocol. Limit of 8MB per file. - */ - image_url?: string - } - /** - * The model for a POST to create an image on a product. - */ - productImage_Post: { - /** - * The unique numeric ID of the image; increments sequentially. - */ - id?: number - /** - * The unique numeric identifier for the product with which the image is associated. - */ - product_id?: number - /** - * The local path to the original image file uploaded to BigCommerce. - */ - image_file?: string - /** - * The zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. - */ - url_zoom?: string - /** - * The standard URL for this image. By default, this is used for product-page images. - */ - url_standard?: string - /** - * The thumbnail URL for this image. By default, this is the image size used on the category page and in side panels. - */ - url_thumbnail?: string - /** - * The tiny URL for this image. By default, this is the image size used for thumbnails beneath the product image on a product page. - */ - url_tiny?: string - /** - * The date on which the product image was modified. - */ - date_modified?: string - /** - * Flag for identifying whether the image is used as the product's thumbnail. - */ - is_thumbnail?: boolean - /** - * The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a `sort_order` the same as or greater than the image's new `sort_order` value will have their `sort_order`s reordered. - */ - sort_order?: number - /** - * The description for the image. - */ - description?: string - } & { - /** - * Must be a fully qualified URL path, including protocol. Limit of 8MB per file. - */ - image_url?: string - /** - * Must be sent as a multipart/form-data field in the request body. - */ - image_file?: string - } - /** - * The model for a PUT to update applicable Product Image fields. - */ - productImage_Put: { - /** - * The unique numeric ID of the image; increments sequentially. - */ - id?: number - /** - * The unique numeric identifier for the product with which the image is associated. - */ - product_id?: number - /** - * The local path to the original image file uploaded to BigCommerce. - */ - image_file?: string - /** - * The zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. - */ - url_zoom?: string - /** - * The standard URL for this image. By default, this is used for product-page images. - */ - url_standard?: string - /** - * The thumbnail URL for this image. By default, this is the image size used on the category page and in side panels. - */ - url_thumbnail?: string - /** - * The tiny URL for this image. By default, this is the image size used for thumbnails beneath the product image on a product page. - */ - url_tiny?: string - /** - * The date on which the product image was modified. - */ - date_modified?: string - /** - * Flag for identifying whether the image is used as the product's thumbnail. - */ - is_thumbnail?: boolean - /** - * The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a `sort_order` the same as or greater than the image's new `sort_order` value will have their `sort_order`s reordered. - */ - sort_order?: number - /** - * The description for the image. - */ - description?: string - } - /** - * The model for a POST to create a video on a product. - */ - productVideo_Base: { - /** - * The title for the video. If left blank, this will be filled in according to data on a host site. - */ - title?: string - /** - * The description for the video. If left blank, this will be filled in according to data on a host site. - */ - description?: string - /** - * The order in which the video will be displayed on the product page. Higher integers give the video a lower priority. When updating, if the video is given a lower priority, all videos with a `sort_order` the same as or greater than the video's new `sort_order` value will have their `sort_order`s reordered. - */ - sort_order?: number - /** - * The video type (a short name of a host site). - */ - type?: 'youtube' - /** - * The ID of the video on a host site. - */ - video_id?: string - } - /** - * A product video model. - */ - productVideo_Full: definitions['productVideo_Base'] & { - /** - * The unique numeric ID of the product video; increments sequentially. - */ - id?: number - /** - * The unique numeric identifier for the product with which the image is associated. - */ - product_id?: number - /** - * Length of the video. This will be filled in according to data on a host site. - */ - length?: string - } - /** - * The model for a POST to create a video on a product. - */ - productVideo_Post: definitions['productVideo_Base'] - /** - * The model for a PUT to update a video on a product. - */ - productVideo_Put: definitions['productVideo_Base'] & { - /** - * The unique numeric ID of the product video; increments sequentially. - */ - id?: number - } - productReview_Base: { - /** - * The title for the product review. - * Required in /POST. - */ - title: string - /** - * The text for the product review. - */ - text?: string - /** - * The status of the product review. Must be one of `approved`, `disapproved` or `pending`. - */ - status?: string - /** - * The rating of the product review. Must be one of 0, 1, 2, 3, 4, 5. - */ - rating?: number - /** - * The email of the reviewer. Must be a valid email, or an empty string. - */ - email?: string - /** - * The name of the reviewer. - */ - name?: string - /** - * Date the product was reviewed. Required in /POST. - */ - date_reviewed: string - } - /** - * A product review model. - */ - productReview_Full: definitions['productReview_Base'] & { - /** - * The unique numeric ID of the product review; increments sequentially. - */ - id?: number - /** - * The unique numeric identifier for the product with which the review is associated. - */ - product_id?: number - /** - * Date the product review was created. - */ - date_created?: string - /** - * Date the product review was modified. - */ - date_modified?: string - } - /** - * The model for a POST to create a product review. - */ - productReview_Post: { - /** - * The title for the product review. - * Required in /POST. - */ - title: string - /** - * The text for the product review. - */ - text?: string - /** - * The status of the product review. Must be one of `approved`, `disapproved` or `pending`. - */ - status?: string - /** - * The rating of the product review. Must be one of 0, 1, 2, 3, 4, 5. - */ - rating?: number - /** - * The email of the reviewer. Must be a valid email, or an empty string. - */ - email?: string - /** - * The name of the reviewer. - */ - name?: string - /** - * Date the product was reviewed. Required in /POST. - */ - date_reviewed: string - } - /** - * The model for a PUT to update a product review. - */ - productReview_Put: { - /** - * The title for the product review. - * Required in /POST. - */ - title: string - /** - * The text for the product review. - */ - text?: string - /** - * The status of the product review. Must be one of `approved`, `disapproved` or `pending`. - */ - status?: string - /** - * The rating of the product review. Must be one of 0, 1, 2, 3, 4, 5. - */ - rating?: number - /** - * The email of the reviewer. Must be a valid email, or an empty string. - */ - email?: string - /** - * The name of the reviewer. - */ - name?: string - /** - * Date the product was reviewed. Required in /POST. - */ - date_reviewed: string - } - /** - * Image Response returns for: - * * Create Variant Image - * * Create Modifier Image - * * Create Category Image - * * Create Brand Image - */ - resp_productImage: { - data?: definitions['productImage_Full'] - /** - * Empty meta object; may be used later. - */ - meta?: { [key: string]: any } - } - /** - * An object containing a publicly accessible image URL, or a form post that contains an image file. - */ - resourceImage_Full: { - /** - * A public URL for a GIF, JPEG, or PNG image. Limit of 8MB per file. - */ - image_url?: string - } - product_Post: definitions['product_Base'] & { - variants?: definitions['productVariant_Post_Product'] - } - /** - * The model for a PUT to update a product. - */ - product_Put: { - /** - * The unique numerical ID of the product; increments sequentially. - */ - id?: number - } & definitions['product_Base'] & { - variants?: definitions['productVariant_Put_Product'] - } - /** - * Catalog Summary object describes a lightweight summary of the catalog. - */ - catalogSummary_Full: { - /** - * A count of all inventory items in the catalog. - */ - inventory_count?: number - /** - * Total value of store's inventory. - */ - inventory_value?: number - /** - * ID of the category containing the most products. - */ - primary_category_id?: number - /** - * Name of the category containing the most products. - */ - primary_category_name?: string - /** - * Total number of variants - */ - variant_count?: number - /** - * Highest priced variant - */ - highest_variant_price?: number - /** - * Average price of all variants - */ - average_variant_price?: number - /** - * Lowest priced variant in the store - */ - lowest_variant_price?: string - oldest_variant_date?: string - newest_variant_date?: string - } - /** - * Metafield for products, categories, variants, and brands. The max number of metafields allowed on each product, category, variant, or brand is fifty. For more information, see [Platform Limits](https://support.bigcommerce.com/s/article/Platform-Limits) in the Help Center. - */ - metafield_Base: { - /** - * Unique ID of the *Metafield*. Read-Only. - */ - id?: number - /** - * Determines the visibility and writeability of the field by other API consumers. - * - * |Value|Description - * |-|-| - * |`app_only`|Private to the app that owns the field| - * |`read`|Visible to other API consumers| - * |`write`|Open for reading and writing by other API consumers| - * |`read_and_sf_access`|Visible to other API consumers, including on storefront| - * |`write_and_sf_access`|Open for reading and writing by other API consumers, including on storefront| - */ - permission_set: - | 'app_only' - | 'read' - | 'write' - | 'read_and_sf_access' - | 'write_and_sf_access' - /** - * Namespace for the metafield, for organizational purposes. This is set set by the developer. Required for POST. - */ - namespace: string - /** - * The name of the field, for example: `location_id`, `color`. Required for POST. - */ - key: string - /** - * The value of the field, for example: `1`, `blue`. Required for POST. - */ - value: string - /** - * Description for the metafields. - */ - description?: string - /** - * The type of resource with which the metafield is associated. - */ - resource_type?: 'category' | 'brand' | 'product' | 'variant' - /** - * The ID for the resource with which the metafield is associated. - */ - resource_id?: number - /** - * Date and time of the metafield's creation. Read-Only. - */ - date_created?: string - /** - * Date and time when the metafield was last updated. Read-Only. - */ - date_modified?: string - } - /** - * Common ComplexRule properties. - */ - complexRule_Base: { - /** - * The unique numeric ID of the rule; increments sequentially. - * Read-Only - */ - id?: number - /** - * The unique numeric ID of the product with which the rule is associated; increments sequentially. - */ - product_id?: number - /** - * The priority to give this rule when making adjustments to the product properties. - */ - sort_order?: number - /** - * Flag for determining whether the rule is to be used when adjusting a product's price, weight, image, or availabilty. - */ - enabled?: boolean - /** - * Flag for determining whether other rules should not be applied after this rule has been applied. - */ - stop?: boolean - /** - * Flag for determining whether the rule should disable purchasing of a product when the conditions are applied. - */ - purchasing_disabled?: boolean - /** - * Message displayed on the storefront when a rule disables the purchasing of a product. - */ - purchasing_disabled_message?: string - /** - * Flag for determining whether the rule should hide purchasing of a product when the conditions are applied. - */ - purchasing_hidden?: boolean - /** - * The URL for an image displayed on the storefront when the conditions are applied. Limit of 8MB per file. - */ - image_url?: string - price_adjuster?: definitions['adjuster_Full'] - weight_adjuster?: definitions['adjuster_Full'] - conditions?: definitions['complexRuleConditionBase'][] - } - /** - * Gets custom fields associated with a product. These allow you to specify additional information that will appear on the product's page, such as a book's ISBN or a DVD's release date. - */ - productCustomField_Base: { - /** - * The unique numeric ID of the custom field; increments sequentially. - * Read-Only - */ - id?: number - /** - * The name of the field, shown on the storefront, orders, etc. Required for /POST - */ - name: string - /** - * The name of the field, shown on the storefront, orders, etc. Required for /POST - */ - value: string - } - /** - * The model for a POST to create a custom field on a product. - */ - productCustomField_Post: { - /** - * The unique numeric ID of the custom field; increments sequentially. - * Read-Only - */ - id?: number - /** - * The name of the field, shown on the storefront, orders, etc. Required for /POST - */ - name: string - /** - * The name of the field, shown on the storefront, orders, etc. Required for /POST - */ - value: string - } - /** - * The model for a PUT to update a custom field on a product. - */ - productCustomField_Put: { - /** - * The unique numeric ID of the custom field; increments sequentially. - * Read-Only - */ - id?: number - /** - * The name of the field, shown on the storefront, orders, etc. Required for /POST - */ - name: string - /** - * The name of the field, shown on the storefront, orders, etc. Required for /POST - */ - value: string - } - /** - * Complex rules may return with conditions that apply to one or more variants, or with a single modifier value (if the rules were created using the v2 API or the control panel). Complex rules created or updated in the v3 API must have conditions that either reference multiple `modifier_value_id`'s, or else reference a `modifier_value_id` and a `variant_id`. - */ - complexRuleConditionBase: { - /** - * The unique numeric ID of the rule condition; increments sequentially. Read-Only - */ - id?: number - /** - * The unique numeric ID of the rule with which the condition is associated. - * Read-Only - */ - rule_id?: number - /** - * The unique numeric ID of the modifier with which the rule condition is associated. - * Required in /POST. - */ - modifier_id: number - /** - * The unique numeric ID of the modifier value with which the rule condition is associated. - * Required in /POST. - */ - modifier_value_id: number - /** - * The unique numeric ID of the variant with which the rule condition is associated. - * Required in /POST. - */ - variant_id: number - /** - * (READ-ONLY:) The unique numeric ID of the SKU (v2 API), or Combination, with which the rule condition is associated. This is to maintain cross-compatibility between v2 and v3. - */ - combination_id?: number - } - /** - * The custom URL for the category on the storefront. - */ - customUrl_Full: { - /** - * Category URL on the storefront. - */ - url?: string - /** - * Returns `true` if the URL has been changed from its default state (the auto-assigned URL that BigCommerce provides). - */ - is_customized?: boolean - } - /** - * Common Bulk Pricing Rule properties - */ - bulkPricingRule_Full: { - /** - * Unique ID of the *Bulk Pricing Rule*. Read-Only. - */ - id?: number - /** - * The minimum inclusive quantity of a product to satisfy this rule. Must be greater than or equal to zero. - * Required in /POST. - */ - quantity_min: number - /** - * The maximum inclusive quantity of a product to satisfy this rule. Must be greater than the `quantity_min` value – unless this field has a value of 0 (zero), in which case there will be no maximum bound for this rule. - * Required in /POST. - */ - quantity_max: number - /** - * The type of adjustment that is made. Values: `price` - the adjustment amount per product; `percent` - the adjustment as a percentage of the original price; `fixed` - the adjusted absolute price of the product. - * Required in /POST. - */ - type: 'price' | 'percent' | 'fixed' - /** - * The discount can be a fixed dollar amount or a percentage. For a fixed dollar amount enter it as an integer and the response will return as an integer. For percentage enter the amount as the percentage divided by 100 using string format. For example 10% percent would be “.10”. The response will return as an integer. - * Required in /POST. - */ - amount: number - } - /** - * The values for option config can vary based on the Modifier created. - */ - productOptionConfig_Full: { - /** - * (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. - */ - default_value?: string - /** - * (checkbox) Flag for setting the checkbox to be checked by default. - */ - checked_by_default?: boolean - /** - * (checkbox) Label displayed for the checkbox option. - */ - checkbox_label?: string - /** - * (date) Flag to limit the dates allowed to be entered on a date option. - */ - date_limited?: boolean - /** - * (date) The type of limit that is allowed to be entered on a date option. - */ - date_limit_mode?: 'earliest' | 'range' | 'latest' - /** - * (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_earliest_value?: string - /** - * (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_latest_value?: string - /** - * (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types. - */ - file_types_mode?: 'specific' | 'all' - /** - * (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: - * `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). - * `other` - Allows file types defined in the `file_types_other` array. - */ - file_types_supported?: string[] - /** - * (file) A list of other file types allowed with the file upload option. - */ - file_types_other?: string[] - /** - * (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server. - */ - file_max_size?: number - /** - * (text, multi_line_text) Flag to validate the length of a text or multi-line text input. - */ - text_characters_limited?: boolean - /** - * (text, multi_line_text) The minimum length allowed for a text or multi-line text option. - */ - text_min_length?: number - /** - * (text, multi_line_text) The maximum length allowed for a text or multi line text option. - */ - text_max_length?: number - /** - * (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input. - */ - text_lines_limited?: boolean - /** - * (multi_line_text) The maximum number of lines allowed on a multi-line text input. - */ - text_max_lines?: number - /** - * (numbers_only_text) Flag to limit the value of a number option. - */ - number_limited?: boolean - /** - * (numbers_only_text) The type of limit on values entered for a number option. - */ - number_limit_mode?: 'lowest' | 'highest' | 'range' - /** - * (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true. - */ - number_lowest_value?: number - /** - * (numbers_only_text) The highest allowed value for a number option if `number_limited` is true. - */ - number_highest_value?: number - /** - * (numbers_only_text) Flag to limit the input on a number option to whole numbers only. - */ - number_integers_only?: boolean - /** - * (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list. - */ - product_list_adjusts_inventory?: boolean - /** - * (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price. - */ - product_list_adjusts_pricing?: boolean - /** - * (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions. - */ - product_list_shipping_calc?: 'none' | 'weight' | 'package' - } - /** - * Adjuster for Complex Rules. - */ - adjuster_Full: { - /** - * The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster?: 'relative' | 'percentage' - /** - * The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. - */ - adjuster_value?: number - } - /** - * Errors during batch usage for the BigCommerce API. - */ - resp_variantBatchError: { - batch_errors?: (definitions['error_Base'] & { - errors?: { additionalProperties?: string } - })[] - } - /** - * Data about the response, including pagination and collection totals. - */ - metaCollection_Full: { pagination?: definitions['pagination_Full'] } - /** - * Data about the response, including pagination and collection totals. - */ - pagination_Full: { - /** - * Total number of items in the result set. - */ - total?: number - /** - * Total number of items in the collection response. - */ - count?: number - /** - * The amount of items returned in the collection per page, controlled by the limit parameter. - */ - per_page?: number - /** - * The page you are currently on within the collection. - */ - current_page?: number - /** - * The total number of pages in the collection. - */ - total_pages?: number - /** - * Pagination links for the previous and next parts of the whole collection. - */ - links?: { - /** - * Link to the previous page returned in the response. - */ - previous?: string - /** - * Link to the current page returned in the response. - */ - current?: string - /** - * Link to the next page returned in the response. - */ - next?: string - } - } - /** - * Empty meta object; may be used later. - */ - metaEmpty_Full: { [key: string]: any } - errorResponse_Full: definitions['error_Base'] & { - errors?: definitions['detailedErrors'] - } - /** - * Error payload for the BigCommerce API. - */ - error_Base: { - /** - * The HTTP status code. - */ - status?: number - /** - * The error title describing the particular error. - */ - title?: string - type?: string - instance?: string - } - /** - * Error payload for the BigCommerce API. - */ - errorNotFound: { - /** - * 404 HTTP status code. - */ - status?: number - /** - * The error title describing the particular error. - */ - title?: string - type?: string - instance?: string - } - /** - * A gift-certificate model. - */ - giftCertificate_Full: { - /** - * The gift-certificate code. - */ - code?: string - /** - * The balance on a gift certificate when it was purchased. - */ - original_balance?: number - /** - * The balance on a gift certificate at the time of this purchase. - */ - starting_balance?: number - /** - * The remaining balance on a gift certificate. - */ - remaining_balance?: number - /** - * The status of a gift certificate: `active` - gift certificate is active; `pending` - gift certificate purchase is pending; `disabled` - gift certificate is disabled; `expired` - gift certificate is expired. - */ - status?: 'active' | 'pending' | 'disabled' | 'expired' - } - /** - * No-content response for the BigCommerce API. - */ - errorNoContent: { - /** - * 204 HTTP status code. - */ - status?: number - /** - * The error title describing the situation. - */ - title?: string - type?: string - instance?: string - } - detailedErrors: { additionalProperties?: string } - product_Full: definitions['product_Base'] & { - /** - * The date on which the product was created. - */ - date_created?: string - /** - * The date on which the product was modified. - */ - date_modified?: string - /** - * ID of the product. Read Only. - */ - id?: number - /** - * The unique identifier of the base variant associated with a simple product. This value is `null` for complex products. - */ - base_variant_id?: number - /** - * The price of the product as seen on the storefront. It will be equal to the `sale_price`, if set, and the `price` if there is not a `sale_price`. - */ - calculated_price?: number - options?: definitions['productOption_Base'][] - modifiers?: definitions['productModifier_Full'][] - /** - * Minimum Advertised Price. - */ - map_price?: number - /** - * Indicates that the product is in an Option Set (legacy V2 concept). - */ - option_set_id?: number - /** - * Legacy template setting which controls if the option set shows up to the side of or below the product image and description. - */ - option_set_display?: string - } & { variants?: definitions['productVariant_Full'] } - /** - * Common ProductImage properties. - */ - productImage_Full: definitions['productImage_Base'] & { - /** - * The unique numeric ID of the image; increments sequentially. - */ - id?: number - /** - * The unique numeric identifier for the product with which the image is associated. - */ - product_id?: number - /** - * The zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. - */ - url_zoom?: string - /** - * The standard URL for this image. By default, this is used for product-page images. - */ - url_standard?: string - /** - * The thumbnail URL for this image. By default, this is the image size used on the category page and in side panels. - */ - url_thumbnail?: string - /** - * The tiny URL for this image. By default, this is the image size used for thumbnails beneath the product image on a product page. - */ - url_tiny?: string - /** - * The date on which the product image was modified. - */ - date_modified?: string - } - metafield_Post: definitions['metafield_Base'] - /** - * The model for batch updating products. - */ - product_Put_Collection: ({ - /** - * The unique numerical ID of the product; increments sequentially. Required on batch product `PUT` requests. - */ - id: number - } & definitions['product_Base'])[] - /** - * The values for option config can vary based on the Modifier created. - */ - config_Full: { - /** - * (date, text, multi_line_text, numbers_only_text) The default value. Shown on a date option as an ISO-8601–formatted string, or on a text option as a string. - */ - default_value?: string - /** - * (checkbox) Flag for setting the checkbox to be checked by default. - */ - checked_by_default?: boolean - /** - * (checkbox) Label displayed for the checkbox option. - */ - checkbox_label?: string - /** - * (date) Flag to limit the dates allowed to be entered on a date option. - */ - date_limited?: boolean - /** - * (date) The type of limit that is allowed to be entered on a date option. - */ - date_limit_mode?: 'earliest' | 'range' | 'latest' - /** - * (date) The earliest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_earliest_value?: string - /** - * (date) The latest date allowed to be entered on the date option, as an ISO-8601 formatted string. - */ - date_latest_value?: string - /** - * (file) The kind of restriction on the file types that can be uploaded with a file upload option. Values: `specific` - restricts uploads to particular file types; `all` - allows all file types. - */ - file_types_mode?: 'specific' | 'all' - /** - * (file) The type of files allowed to be uploaded if the `file_type_option` is set to `specific`. Values: - * `images` - Allows upload of image MIME types (`bmp`, `gif`, `jpg`, `jpeg`, `jpe`, `jif`, `jfif`, `jfi`, `png`, `wbmp`, `xbm`, `tiff`). `documents` - Allows upload of document MIME types (`txt`, `pdf`, `rtf`, `doc`, `docx`, `xls`, `xlsx`, `accdb`, `mdb`, `one`, `pps`, `ppsx`, `ppt`, `pptx`, `pub`, `odt`, `ods`, `odp`, `odg`, `odf`). - * `other` - Allows file types defined in the `file_types_other` array. - */ - file_types_supported?: string[] - /** - * (file) A list of other file types allowed with the file upload option. - */ - file_types_other?: string[] - /** - * (file) The maximum size for a file that can be used with the file upload option. This will still be limited by the server. - */ - file_max_size?: number - /** - * (text, multi_line_text) Flag to validate the length of a text or multi-line text input. - */ - text_characters_limited?: boolean - /** - * (text, multi_line_text) The minimum length allowed for a text or multi-line text option. - */ - text_min_length?: number - /** - * (text, multi_line_text) The maximum length allowed for a text or multi line text option. - */ - text_max_length?: number - /** - * (multi_line_text) Flag to validate the maximum number of lines allowed on a multi-line text input. - */ - text_lines_limited?: boolean - /** - * (multi_line_text) The maximum number of lines allowed on a multi-line text input. - */ - text_max_lines?: number - /** - * (numbers_only_text) Flag to limit the value of a number option. - */ - number_limited?: boolean - /** - * (numbers_only_text) The type of limit on values entered for a number option. - */ - number_limit_mode?: 'lowest' | 'highest' | 'range' - /** - * (numbers_only_text) The lowest allowed value for a number option if `number_limited` is true. - */ - number_lowest_value?: number - /** - * (numbers_only_text) The highest allowed value for a number option if `number_limited` is true. - */ - number_highest_value?: number - /** - * (numbers_only_text) Flag to limit the input on a number option to whole numbers only. - */ - number_integers_only?: boolean - /** - * (product_list, product_list_with_images) Flag for automatically adjusting inventory on a product included in the list. - */ - product_list_adjusts_inventory?: boolean - /** - * (product_list, product_list_with_images) Flag to add the optional product's price to the main product's price. - */ - product_list_adjusts_pricing?: boolean - /** - * (product_list, product_list_with_images) How to factor the optional product's weight and package dimensions into the shipping quote. Values: `none` - don't adjust; `weight` - use shipping weight only; `package` - use weight and dimensions. - */ - product_list_shipping_calc?: 'none' | 'weight' | 'package' - } - adjusters_Full: { - price?: definitions['adjuster_Full'] - weight?: definitions['adjuster_Full'] - /** - * The URL for an image displayed on the storefront when the modifier value is selected.Limit of 8MB per file. - */ - image_url?: string - purchasing_disabled?: { - /** - * Flag for whether the modifier value disables purchasing when selected on the storefront. This can be used for temporarily disabling a particular modifier value. - */ - status?: boolean - /** - * The message displayed on the storefront when the purchasing disabled status is `true`. - */ - message?: string - } - } - /** - * Variant properties used on: - * * `/catalog/products/variants` - * * `/catalog/variants` - */ - variant_Base: { - /** - * The cost price of the variant. Not affected by Price List prices. - */ - cost_price?: number - /** - * This variant's base price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is `null`, the product's default price (set in the Product resource's `price` field) will be used as the base price. - */ - price?: number - /** - * This variant's sale price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's sale price (set in the Product resource's `price` field) will be used as the sale price. - */ - sale_price?: number - /** - * This variant's retail price on the storefront. If a Price List ID is used, the Price List value will be used. If a Price List ID is not used, and this value is null, the product's retail price (set in the Product resource's `price` field) will be used as the retail price. - */ - retail_price?: number - /** - * This variant's base weight on the storefront. If this value is null, the product's default weight (set in the Product resource's weight field) will be used as the base weight. - */ - weight?: number - /** - * Width of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default width (set in the Product resource's `width` field) will be used as the base width. - */ - width?: number - /** - * Height of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default height (set in the Product resource's `height` field) will be used as the base height. - */ - height?: number - /** - * Depth of the variant, which can be used when calculating shipping costs. If this value is `null`, the product's default depth (set in the Product resource's `depth` field) will be used as the base depth. - */ - depth?: number - /** - * Flag used to indicate whether the variant has free shipping. If `true`, the shipping cost for the variant will be zero. - */ - is_free_shipping?: boolean - /** - * A fixed shipping cost for the variant. If defined, this value will be used during checkout instead of normal shipping-cost calculation. - */ - fixed_cost_shipping_price?: number - /** - * If `true`, this variant will not be purchasable on the storefront. - */ - purchasing_disabled?: boolean - /** - * If `purchasing_disabled` is `true`, this message should show on the storefront when the variant is selected. - */ - purchasing_disabled_message?: string - /** - * The UPC code used in feeds for shopping comparison sites and external channel integrations. - */ - upc?: string - /** - * Inventory level for the variant, which is used when the product's inventory_tracking is set to `variant`. - */ - inventory_level?: number - /** - * When the variant hits this inventory level, it is considered low stock. - */ - inventory_warning_level?: number - /** - * Identifies where in a warehouse the variant is located. - */ - bin_picking_number?: string - } - /** - * Shared `Product` properties used in: - * * `POST` - * * `PUT` - * * `GET` - */ - product_Base: { - /** - * The product name. - */ - name?: string - /** - * The product type. One of: `physical` - a physical stock unit, `digital` - a digital download. - */ - type?: 'physical' | 'digital' - /** - * User defined product code/stock keeping unit (SKU). - */ - sku?: string - /** - * The product description, which can include HTML formatting. - */ - description?: string - /** - * Weight of the product, which can be used when calculating shipping costs. This is based on the unit set on the store - */ - weight?: number - /** - * Width of the product, which can be used when calculating shipping costs. - */ - width?: number - /** - * Depth of the product, which can be used when calculating shipping costs. - */ - depth?: number - /** - * Height of the product, which can be used when calculating shipping costs. - */ - height?: number - /** - * The price of the product. The price should include or exclude tax, based on the store settings. - */ - price?: number - /** - * The cost price of the product. Stored for reference only; it is not used or displayed anywhere on the store. - */ - cost_price?: number - /** - * The retail cost of the product. If entered, the retail cost price will be shown on the product page. - */ - retail_price?: number - /** - * If entered, the sale price will be used instead of value in the price field when calculating the product's cost. - */ - sale_price?: number - /** - * The ID of the tax class applied to the product. (NOTE: Value ignored if automatic tax is enabled.) - */ - tax_class_id?: number - /** - * Accepts AvaTax System Tax Codes, which identify products and services that fall into special sales-tax categories. By using these codes, merchants who subscribe to BigCommerce's Avalara Premium integration can calculate sales taxes more accurately. Stores without Avalara Premium will ignore the code when calculating sales tax. Do not pass more than one code. The codes are case-sensitive. For details, please see Avalara's documentation. - */ - product_tax_code?: string - /** - * An array of IDs for the categories to which this product belongs. When updating a product, if an array of categories is supplied, all product categories will be overwritten. Does not accept more than 1,000 ID values. - */ - categories?: number[] - /** - * A product can be added to an existing brand during a product /PUT or /POST. - */ - brand_id?: number - /** - * Current inventory level of the product. Simple inventory tracking must be enabled (See the `inventory_tracking` field) for this to take any effect. - */ - inventory_level?: number - /** - * Inventory warning level for the product. When the product's inventory level drops below the warning level, the store owner will be informed. Simple inventory tracking must be enabled (see the `inventory_tracking` field) for this to take any effect. - */ - inventory_warning_level?: number - /** - * The type of inventory tracking for the product. Values are: `none` - inventory levels will not be tracked; `product` - inventory levels will be tracked using the `inventory_level` and `inventory_warning_level` fields; `variant` - inventory levels will be tracked based on variants, which maintain their own warning levels and inventory levels. - */ - inventory_tracking?: 'none' | 'product' | 'variant' - /** - * A fixed shipping cost for the product. If defined, this value will be used during checkout instead of normal shipping-cost calculation. - */ - fixed_cost_shipping_price?: number - /** - * Flag used to indicate whether the product has free shipping. If `true`, the shipping cost for the product will be zero. - */ - is_free_shipping?: boolean - /** - * Flag to determine whether the product should be displayed to customers browsing the store. If `true`, the product will be displayed. If `false`, the product will be hidden from view. - */ - is_visible?: boolean - /** - * Flag to determine whether the product should be included in the `featured products` panel when viewing the store. - */ - is_featured?: boolean - /** - * An array of IDs for the related products. - */ - related_products?: number[] - /** - * Warranty information displayed on the product page. Can include HTML formatting. - */ - warranty?: string - /** - * The BIN picking number for the product. - */ - bin_picking_number?: string - /** - * The layout template file used to render this product category. This field is writable only for stores with a Blueprint theme applied. - */ - layout_file?: string - /** - * The product UPC code, which is used in feeds for shopping comparison sites and external channel integrations. - */ - upc?: string - /** - * A comma-separated list of keywords that can be used to locate the product when searching the store. - */ - search_keywords?: string - /** - * Availability of the product. Availability options are: `available` - the product can be purchased on the storefront; `disabled` - the product is listed in the storefront, but cannot be purchased; `preorder` - the product is listed for pre-orders. - */ - availability?: 'available' | 'disabled' | 'preorder' - /** - * Availability text displayed on the checkout page, under the product title. Tells the customer how long it will normally take to ship this product, such as: 'Usually ships in 24 hours.' - */ - availability_description?: string - /** - * Type of gift-wrapping options. Values: `any` - allow any gift-wrapping options in the store; `none` - disallow gift-wrapping on the product; `list` – provide a list of IDs in the `gift_wrapping_options_list` field. - */ - gift_wrapping_options_type?: 'any' | 'none' | 'list' - /** - * A list of gift-wrapping option IDs. - */ - gift_wrapping_options_list?: number[] - /** - * Priority to give this product when included in product lists on category pages and in search results. Lower integers will place the product closer to the top of the results. - */ - sort_order?: number - /** - * The product condition. Will be shown on the product page if the `is_condition_shown` field's value is `true`. Possible values: `New`, `Used`, `Refurbished`. - */ - condition?: 'New' | 'Used' | 'Refurbished' - /** - * Flag used to determine whether the product condition is shown to the customer on the product page. - */ - is_condition_shown?: boolean - /** - * The minimum quantity an order must contain, to be eligible to purchase this product. - */ - order_quantity_minimum?: number - /** - * The maximum quantity an order can contain when purchasing the product. - */ - order_quantity_maximum?: number - /** - * Custom title for the product page. If not defined, the product name will be used as the meta title. - */ - page_title?: string - /** - * Custom meta keywords for the product page. If not defined, the store's default keywords will be used. - */ - meta_keywords?: string[] - /** - * Custom meta description for the product page. If not defined, the store's default meta description will be used. - */ - meta_description?: string - /** - * The number of times the product has been viewed. - */ - view_count?: number - /** - * Pre-order release date. See the `availability` field for details on setting a product's availability to accept pre-orders. - */ - preorder_release_date?: string - /** - * Custom expected-date message to display on the product page. If undefined, the message defaults to the storewide setting. Can contain the `%%DATE%%` placeholder, which will be substituted for the release date. - */ - preorder_message?: string - /** - * If set to true then on the preorder release date the preorder status will automatically be removed. - * If set to false, then on the release date the preorder status **will not** be removed. It will need to be changed manually either in the - * control panel or using the API. Using the API set `availability` to `available`. - */ - is_preorder_only?: boolean - /** - * False by default, indicating that this product's price should be shown on the product page. If set to `true`, the price is hidden. (NOTE: To successfully set `is_price_hidden` to `true`, the `availability` value must be `disabled`.) - */ - is_price_hidden?: boolean - /** - * By default, an empty string. If `is_price_hidden` is `true`, the value of `price_hidden_label` is displayed instead of the price. (NOTE: To successfully set a non-empty string value with `is_price_hidden` set to `true`, the `availability` value must be `disabled`.) - */ - price_hidden_label?: string - custom_url?: definitions['customUrl_Full'] - /** - * Type of product, defaults to `product`. - */ - open_graph_type?: - | 'product' - | 'album' - | 'book' - | 'drink' - | 'food' - | 'game' - | 'movie' - | 'song' - | 'tv_show' - /** - * Title of the product, if not specified the product name will be used instead. - */ - open_graph_title?: string - /** - * Description to use for the product, if not specified then the meta_description will be used instead. - */ - open_graph_description?: string - /** - * Flag to determine if product description or open graph description is used. - */ - open_graph_use_meta_description?: boolean - /** - * Flag to determine if product name or open graph name is used. - */ - open_graph_use_product_name?: boolean - /** - * Flag to determine if product image or open graph image is used. - */ - open_graph_use_image?: boolean - /** - * The brand can be created during a product PUT or POST request. If the brand already exists then the product will be added. If not the brand will be created and the product added. If using `brand_name` it performs a fuzzy match and adds the brand. eg. "Common Good" and "Common good" are the same. Brand name does not return as part of a product response. Only the `brand_id`. - */ - 'brand_name or brand_id'?: string - /** - * Global Trade Item Number - */ - gtin?: string - /** - * Manufacturer Part Number - */ - mpn?: string - /** - * The total rating for the product. - */ - reviews_rating_sum?: number - /** - * The number of times the product has been rated. - */ - reviews_count?: number - /** - * The total quantity of this product sold. - */ - total_sold?: number - custom_fields?: definitions['productCustomField_Put'][] - bulk_pricing_rules?: definitions['bulkPricingRule_Full'][] - images?: definitions['productImage_Full'][] - primary_image?: definitions['productImage_Full'] - videos?: definitions['productVideo_Full'][] - } - /** - * Properties for updating metafields. - */ - metafield_Put: { - /** - * Unique ID of the *Metafield*. Read-Only. - */ - id?: number - } & definitions['metafield_Base'] - metafield_Full: definitions['metafield_Put'] & { - /** - * Date and time of the metafield's creation. Read-Only. - */ - date_created?: string - /** - * Date and time when the metafield was last updated. Read-Only. - */ - date_modified?: string - } - /** - * The model for a PUT to update variants on a product. - */ - productVariant_Put: definitions['productVariant_Base'] & { - product_id?: number - sku?: string - } -} diff --git a/framework/bigcommerce/api/definitions/store-content.ts b/framework/bigcommerce/api/definitions/store-content.ts deleted file mode 100644 index f00c28844..000000000 --- a/framework/bigcommerce/api/definitions/store-content.ts +++ /dev/null @@ -1,329 +0,0 @@ -/** - * This file was auto-generated by swagger-to-ts. - * Do not make direct changes to the file. - */ - -export interface definitions { - blogPost_Full: { - /** - * ID of this blog post. (READ-ONLY) - */ - id?: number - } & definitions['blogPost_Base'] - addresses: { - /** - * Full URL of where the resource is located. - */ - url?: string - /** - * Resource being accessed. - */ - resource?: string - } - formField: { - /** - * Name of the form field - */ - name?: string - /** - * Value of the form field - */ - value?: string - } - page_Full: { - /** - * ID of the page. - */ - id?: number - } & definitions['page_Base'] - redirect: { - /** - * Numeric ID of the redirect. - */ - id?: number - /** - * The path from which to redirect. - */ - path: string - forward: definitions['forward'] - /** - * URL of the redirect. READ-ONLY - */ - url?: string - } - forward: { - /** - * The type of redirect. If it is a `manual` redirect then type will always be manual. Dynamic redirects will have the type of the page. Such as product or category. - */ - type?: string - /** - * Reference of the redirect. Dynamic redirects will have the category or product number. Manual redirects will have the url that is being directed to. - */ - ref?: number - } - customer_Full: { - /** - * Unique numeric ID of this customer. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request. - */ - id?: number - /** - * Not returned in any responses, but accepts up to two fields allowing you to set the customer’s password. If a password is not supplied, it is generated automatically. For further information about using this object, please see the Customers resource documentation. - */ - _authentication?: { - force_reset?: string - password?: string - password_confirmation?: string - } - /** - * The name of the company for which the customer works. - */ - company?: string - /** - * First name of the customer. - */ - first_name: string - /** - * Last name of the customer. - */ - last_name: string - /** - * Email address of the customer. - */ - email: string - /** - * Phone number of the customer. - */ - phone?: string - /** - * Date on which the customer registered from the storefront or was created in the control panel. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request. - */ - date_created?: string - /** - * Date on which the customer updated their details in the storefront or was updated in the control panel. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request. - */ - date_modified?: string - /** - * The amount of credit the customer has. (Float, Float as String, Integer) - */ - store_credit?: string - /** - * The customer’s IP address when they signed up. - */ - registration_ip_address?: string - /** - * The group to which the customer belongs. - */ - customer_group_id?: number - /** - * Store-owner notes on the customer. - */ - notes?: string - /** - * Used to identify customers who fall into special sales-tax categories – in particular, those who are fully or partially exempt from paying sales tax. Can be blank, or can contain a single AvaTax code. (The codes are case-sensitive.) Stores that subscribe to BigCommerce’s Avalara Premium integration will use this code to determine how/whether to apply sales tax. Does not affect sales-tax calculations for stores that do not subscribe to Avalara Premium. - */ - tax_exempt_category?: string - /** - * Records whether the customer would like to receive marketing content from this store. READ-ONLY.This is a READ-ONLY field; do not set or modify its value in a POST or PUT request. - */ - accepts_marketing?: boolean - addresses?: definitions['addresses'] - /** - * Array of custom fields. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request. - */ - form_fields?: definitions['formField'][] - /** - * Force a password change on next login. - */ - reset_pass_on_login?: boolean - } - categoryAccessLevel: { - /** - * + `all` - Customers can access all categories - * + `specific` - Customers can access a specific list of categories - * + `none` - Customers are prevented from viewing any of the categories in this group. - */ - type?: 'all' | 'specific' | 'none' - /** - * Is an array of category IDs and should be supplied only if `type` is specific. - */ - categories?: string[] - } - timeZone: { - /** - * a string identifying the time zone, in the format: /. - */ - name?: string - /** - * a negative or positive number, identifying the offset from UTC/GMT, in seconds, during winter/standard time. - */ - raw_offset?: number - /** - * "-/+" offset from UTC/GMT, in seconds, during summer/daylight saving time. - */ - dst_offset?: number - /** - * a boolean indicating whether this time zone observes daylight saving time. - */ - dst_correction?: boolean - date_format?: definitions['dateFormat'] - } - count_Response: { count?: number } - dateFormat: { - /** - * string that defines dates’ display format, in the pattern: M jS Y - */ - display?: string - /** - * string that defines the CSV export format for orders, customers, and products, in the pattern: M jS Y - */ - export?: string - /** - * string that defines dates’ extended-display format, in the pattern: M jS Y @ g:i A. - */ - extended_display?: string - } - blogTags: { tag?: string; post_ids?: number[] }[] - blogPost_Base: { - /** - * Title of this blog post. - */ - title: string - /** - * URL for the public blog post. - */ - url?: string - /** - * URL to preview the blog post. (READ-ONLY) - */ - preview_url?: string - /** - * Text body of the blog post. - */ - body: string - /** - * Tags to characterize the blog post. - */ - tags?: string[] - /** - * Summary of the blog post. (READ-ONLY) - */ - summary?: string - /** - * Whether the blog post is published. - */ - is_published?: boolean - published_date?: definitions['publishedDate'] - /** - * Published date in `ISO 8601` format. - */ - published_date_iso8601?: string - /** - * Description text for this blog post’s `` element. - */ - meta_description?: string - /** - * Keywords for this blog post’s `` element. - */ - meta_keywords?: string - /** - * Name of the blog post’s author. - */ - author?: string - /** - * Local path to a thumbnail uploaded to `product_images/` via [WebDav](https://support.bigcommerce.com/s/article/File-Access-WebDAV). - */ - thumbnail_path?: string - } - publishedDate: { timezone_type?: string; date?: string; timezone?: string } - /** - * Not returned in any responses, but accepts up to two fields allowing you to set the customer’s password. If a password is not supplied, it is generated automatically. For further information about using this object, please see the Customers resource documentation. - */ - authentication: { - force_reset?: string - password?: string - password_confirmation?: string - } - customer_Base: { [key: string]: any } - page_Base: { - /** - * ID of any parent Web page. - */ - parent_id?: number - /** - * `page`: free-text page - * `link`: link to another web address - * `rss_feed`: syndicated content from an RSS feed - * `contact_form`: When the store's contact form is used. - */ - type: 'page' | 'rss_feed' | 'contact_form' | 'raw' | 'link' - /** - * Where the page’s type is a contact form: object whose members are the fields enabled (in the control panel) for storefront display. Possible members are:`fullname`: full name of the customer submitting the form; `phone`: customer’s phone number, as submitted on the form; `companyname`: customer’s submitted company name; `orderno`: customer’s submitted order number; `rma`: customer’s submitted RMA (Return Merchandise Authorization) number. - */ - contact_fields?: string - /** - * Where the page’s type is a contact form: email address that receives messages sent via the form. - */ - email?: string - /** - * Page name, as displayed on the storefront. - */ - name: string - /** - * Relative URL on the storefront for this page. - */ - url?: string - /** - * Description contained within this page’s `` element. - */ - meta_description?: string - /** - * HTML or variable that populates this page’s `` element, in default/desktop view. Required in POST if page type is `raw`. - */ - body: string - /** - * HTML to use for this page's body when viewed in the mobile template (deprecated). - */ - mobile_body?: string - /** - * If true, this page has a mobile version. - */ - has_mobile_version?: boolean - /** - * If true, this page appears in the storefront’s navigation menu. - */ - is_visible?: boolean - /** - * If true, this page is the storefront’s home page. - */ - is_homepage?: boolean - /** - * Text specified for this page’s `` element. (If empty, the value of the name property is used.) - */ - meta_title?: string - /** - * Layout template for this page. This field is writable only for stores with a Blueprint theme applied. - */ - layout_file?: string - /** - * Order in which this page should display on the storefront. (Lower integers specify earlier display.) - */ - sort_order?: number - /** - * Comma-separated list of keywords that shoppers can use to locate this page when searching the store. - */ - search_keywords?: string - /** - * Comma-separated list of SEO-relevant keywords to include in the page’s `<meta/>` element. - */ - meta_keywords?: string - /** - * If page type is `rss_feed` the n this field is visisble. Required in POST required for `rss page` type. - */ - feed: string - /** - * If page type is `link` this field is returned. Required in POST to create a `link` page. - */ - link: string - content_type?: 'application/json' | 'text/javascript' | 'text/html' - } -} diff --git a/framework/bigcommerce/api/definitions/wishlist.ts b/framework/bigcommerce/api/definitions/wishlist.ts deleted file mode 100644 index 6ec21c103..000000000 --- a/framework/bigcommerce/api/definitions/wishlist.ts +++ /dev/null @@ -1,142 +0,0 @@ -/** - * This file was auto-generated by swagger-to-ts. - * Do not make direct changes to the file. - */ - -export interface definitions { - wishlist_Post: { - /** - * The customer id. - */ - customer_id: number - /** - * Whether the wishlist is available to the public. - */ - is_public?: boolean - /** - * The title of the wishlist. - */ - name?: string - /** - * Array of Wishlist items. - */ - items?: { - /** - * The ID of the product. - */ - product_id?: number - /** - * The variant ID of the product. - */ - variant_id?: number - }[] - } - wishlist_Put: { - /** - * The customer id. - */ - customer_id: number - /** - * Whether the wishlist is available to the public. - */ - is_public?: boolean - /** - * The title of the wishlist. - */ - name?: string - /** - * Array of Wishlist items. - */ - items?: { - /** - * The ID of the item - */ - id?: number - /** - * The ID of the product. - */ - product_id?: number - /** - * The variant ID of the item. - */ - variant_id?: number - }[] - } - wishlist_Full: { - /** - * Wishlist ID, provided after creating a wishlist with a POST. - */ - id?: number - /** - * The ID the customer to which the wishlist belongs. - */ - customer_id?: number - /** - * The Wishlist's name. - */ - name?: string - /** - * Whether the Wishlist is available to the public. - */ - is_public?: boolean - /** - * The token of the Wishlist. This is created internally within BigCommerce. The Wishlist ID is to be used for external apps. Read-Only - */ - token?: string - /** - * Array of Wishlist items - */ - items?: definitions['wishlistItem_Full'][] - } - wishlistItem_Full: { - /** - * The ID of the item - */ - id?: number - /** - * The ID of the product. - */ - product_id?: number - /** - * The variant ID of the item. - */ - variant_id?: number - } - wishlistItem_Post: { - /** - * The ID of the product. - */ - product_id?: number - /** - * The variant ID of the product. - */ - variant_id?: number - } - /** - * Data about the response, including pagination and collection totals. - */ - pagination: { - /** - * Total number of items in the result set. - */ - total?: number - /** - * Total number of items in the collection response. - */ - count?: number - /** - * The amount of items returned in the collection per page, controlled by the limit parameter. - */ - per_page?: number - /** - * The page you are currently on within the collection. - */ - current_page?: number - /** - * The total number of pages in the collection. - */ - total_pages?: number - } - error: { status?: number; title?: string; type?: string } - metaCollection: { pagination?: definitions['pagination'] } -} diff --git a/framework/bigcommerce/api/endpoints/cart/add-item.ts b/framework/bigcommerce/api/endpoints/cart/add-item.ts deleted file mode 100644 index 52ef1223d..000000000 --- a/framework/bigcommerce/api/endpoints/cart/add-item.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { normalizeCart } from '../../../lib/normalize' -import { parseCartItem } from '../../utils/parse-item' -import getCartCookie from '../../utils/get-cart-cookie' -import type { CartEndpoint } from '.' - -const addItem: CartEndpoint['handlers']['addItem'] = async ({ - res, - body: { cartId, item }, - config, -}) => { - if (!item) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Missing item' }], - }) - } - if (!item.quantity) item.quantity = 1 - - const options = { - method: 'POST', - body: JSON.stringify({ - line_items: [parseCartItem(item)], - ...(!cartId && config.storeChannelId - ? { channel_id: config.storeChannelId } - : {}), - }), - } - const { data } = cartId - ? await config.storeApiFetch( - `/v3/carts/${cartId}/items?include=line_items.physical_items.options`, - options - ) - : await config.storeApiFetch( - '/v3/carts?include=line_items.physical_items.options', - options - ) - - // Create or update the cart cookie - res.setHeader( - 'Set-Cookie', - getCartCookie(config.cartCookie, data.id, config.cartCookieMaxAge) - ) - res.status(200).json({ data: normalizeCart(data) }) -} - -export default addItem diff --git a/framework/bigcommerce/api/endpoints/cart/get-cart.ts b/framework/bigcommerce/api/endpoints/cart/get-cart.ts deleted file mode 100644 index d3bb309e2..000000000 --- a/framework/bigcommerce/api/endpoints/cart/get-cart.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { normalizeCart } from '../../../lib/normalize' -import { BigcommerceApiError } from '../../utils/errors' -import getCartCookie from '../../utils/get-cart-cookie' -import type { BigcommerceCart } from '../../../types/cart' -import type { CartEndpoint } from '.' - -// Return current cart info -const getCart: CartEndpoint['handlers']['getCart'] = async ({ - res, - body: { cartId }, - config, -}) => { - let result: { data?: BigcommerceCart } = {} - - if (cartId) { - try { - result = await config.storeApiFetch( - `/v3/carts/${cartId}?include=line_items.physical_items.options` - ) - } catch (error) { - if (error instanceof BigcommerceApiError && error.status === 404) { - // Remove the cookie if it exists but the cart wasn't found - res.setHeader('Set-Cookie', getCartCookie(config.cartCookie)) - } else { - throw error - } - } - } - - res.status(200).json({ - data: result.data ? normalizeCart(result.data) : null, - }) -} - -export default getCart diff --git a/framework/bigcommerce/api/endpoints/cart/index.ts b/framework/bigcommerce/api/endpoints/cart/index.ts deleted file mode 100644 index ae2414d70..000000000 --- a/framework/bigcommerce/api/endpoints/cart/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import cartEndpoint from '@commerce/api/endpoints/cart' -import type { CartSchema } from '../../../types/cart' -import type { BigcommerceAPI } from '../..' -import getCart from './get-cart' -import addItem from './add-item' -import updateItem from './update-item' -import removeItem from './remove-item' - -export type CartAPI = GetAPISchema<BigcommerceAPI, CartSchema> - -export type CartEndpoint = CartAPI['endpoint'] - -export const handlers: CartEndpoint['handlers'] = { - getCart, - addItem, - updateItem, - removeItem, -} - -const cartApi = createEndpoint<CartAPI>({ - handler: cartEndpoint, - handlers, -}) - -export default cartApi diff --git a/framework/bigcommerce/api/endpoints/cart/remove-item.ts b/framework/bigcommerce/api/endpoints/cart/remove-item.ts deleted file mode 100644 index baf10c80f..000000000 --- a/framework/bigcommerce/api/endpoints/cart/remove-item.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { normalizeCart } from '../../../lib/normalize' -import getCartCookie from '../../utils/get-cart-cookie' -import type { CartEndpoint } from '.' - -const removeItem: CartEndpoint['handlers']['removeItem'] = async ({ - res, - body: { cartId, itemId }, - config, -}) => { - if (!cartId || !itemId) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Invalid request' }], - }) - } - - const result = await config.storeApiFetch<{ data: any } | null>( - `/v3/carts/${cartId}/items/${itemId}?include=line_items.physical_items.options`, - { method: 'DELETE' } - ) - const data = result?.data ?? null - - res.setHeader( - 'Set-Cookie', - data - ? // Update the cart cookie - getCartCookie(config.cartCookie, cartId, config.cartCookieMaxAge) - : // Remove the cart cookie if the cart was removed (empty items) - getCartCookie(config.cartCookie) - ) - res.status(200).json({ data: data && normalizeCart(data) }) -} - -export default removeItem diff --git a/framework/bigcommerce/api/endpoints/cart/update-item.ts b/framework/bigcommerce/api/endpoints/cart/update-item.ts deleted file mode 100644 index 113553fad..000000000 --- a/framework/bigcommerce/api/endpoints/cart/update-item.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { normalizeCart } from '../../../lib/normalize' -import { parseCartItem } from '../../utils/parse-item' -import getCartCookie from '../../utils/get-cart-cookie' -import type { CartEndpoint } from '.' - -const updateItem: CartEndpoint['handlers']['updateItem'] = async ({ - res, - body: { cartId, itemId, item }, - config, -}) => { - if (!cartId || !itemId || !item) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Invalid request' }], - }) - } - - const { data } = await config.storeApiFetch( - `/v3/carts/${cartId}/items/${itemId}?include=line_items.physical_items.options`, - { - method: 'PUT', - body: JSON.stringify({ - line_item: parseCartItem(item), - }), - } - ) - - // Update the cart cookie - res.setHeader( - 'Set-Cookie', - getCartCookie(config.cartCookie, cartId, config.cartCookieMaxAge) - ) - res.status(200).json({ data: normalizeCart(data) }) -} - -export default updateItem diff --git a/framework/bigcommerce/api/endpoints/catalog/products/get-products.ts b/framework/bigcommerce/api/endpoints/catalog/products/get-products.ts deleted file mode 100644 index 6dde39e28..000000000 --- a/framework/bigcommerce/api/endpoints/catalog/products/get-products.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Product } from '@commerce/types/product' -import { ProductsEndpoint } from '.' - -const SORT: { [key: string]: string | undefined } = { - latest: 'id', - trending: 'total_sold', - price: 'price', -} - -const LIMIT = 12 - -// Return current cart info -const getProducts: ProductsEndpoint['handlers']['getProducts'] = async ({ - res, - body: { search, categoryId, brandId, sort }, - config, - commerce, -}) => { - // Use a dummy base as we only care about the relative path - const url = new URL('/v3/catalog/products', 'http://a') - - url.searchParams.set('is_visible', 'true') - url.searchParams.set('limit', String(LIMIT)) - - if (search) url.searchParams.set('keyword', search) - - if (categoryId && Number.isInteger(Number(categoryId))) - url.searchParams.set('categories:in', String(categoryId)) - - if (brandId && Number.isInteger(Number(brandId))) - url.searchParams.set('brand_id', String(brandId)) - - if (sort) { - const [_sort, direction] = sort.split('-') - const sortValue = SORT[_sort] - - if (sortValue && direction) { - url.searchParams.set('sort', sortValue) - url.searchParams.set('direction', direction) - } - } - - // We only want the id of each product - url.searchParams.set('include_fields', 'id') - - const { data } = await config.storeApiFetch<{ data: { id: number }[] }>( - url.pathname + url.search - ) - - const ids = data.map((p) => String(p.id)) - const found = ids.length > 0 - - // We want the GraphQL version of each product - const graphqlData = await commerce.getAllProducts({ - variables: { first: LIMIT, ids }, - config, - }) - - // Put the products in an object that we can use to get them by id - const productsById = graphqlData.products.reduce<{ - [k: string]: Product - }>((prods, p) => { - prods[Number(p.id)] = p - return prods - }, {}) - - const products: Product[] = found ? [] : graphqlData.products - - // Populate the products array with the graphql products, in the order - // assigned by the list of entity ids - ids.forEach((id) => { - const product = productsById[id] - if (product) products.push(product) - }) - - res.status(200).json({ data: { products, found } }) -} - -export default getProducts diff --git a/framework/bigcommerce/api/endpoints/catalog/products/index.ts b/framework/bigcommerce/api/endpoints/catalog/products/index.ts deleted file mode 100644 index 555740f60..000000000 --- a/framework/bigcommerce/api/endpoints/catalog/products/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import productsEndpoint from '@commerce/api/endpoints/catalog/products' -import type { ProductsSchema } from '../../../../types/product' -import type { BigcommerceAPI } from '../../..' -import getProducts from './get-products' - -export type ProductsAPI = GetAPISchema<BigcommerceAPI, ProductsSchema> - -export type ProductsEndpoint = ProductsAPI['endpoint'] - -export const handlers: ProductsEndpoint['handlers'] = { getProducts } - -const productsApi = createEndpoint<ProductsAPI>({ - handler: productsEndpoint, - handlers, -}) - -export default productsApi diff --git a/framework/bigcommerce/api/endpoints/checkout/checkout.ts b/framework/bigcommerce/api/endpoints/checkout/checkout.ts deleted file mode 100644 index 15c834557..000000000 --- a/framework/bigcommerce/api/endpoints/checkout/checkout.ts +++ /dev/null @@ -1,90 +0,0 @@ -import type { CheckoutEndpoint } from '.' -import getCustomerId from '../../utils/get-customer-id' -import jwt from 'jsonwebtoken' -import { uuid } from 'uuidv4' - -const fullCheckout = true - -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ - req, - res, - config, -}) => { - const { cookies } = req - const cartId = cookies[config.cartCookie] - const customerToken = cookies[config.customerCookie] - if (!cartId) { - res.redirect('/cart') - return - } - const { data } = await config.storeApiFetch( - `/v3/carts/${cartId}/redirect_urls`, - { - method: 'POST', - } - ) - const customerId = - customerToken && (await getCustomerId({ customerToken, config })) - - //if there is a customer create a jwt token - if (!customerId) { - if (fullCheckout) { - res.redirect(data.checkout_url) - return - } - } else { - const dateCreated = Math.round(new Date().getTime() / 1000) - const payload = { - iss: config.storeApiClientId, - iat: dateCreated, - jti: uuid(), - operation: 'customer_login', - store_hash: config.storeHash, - customer_id: customerId, - channel_id: config.storeChannelId, - redirect_to: data.checkout_url, - } - let token = jwt.sign(payload, config.storeApiClientSecret!, { - algorithm: 'HS256', - }) - let checkouturl = `${config.storeUrl}/login/token/${token}` - console.log('checkouturl', checkouturl) - if (fullCheckout) { - res.redirect(checkouturl) - return - } - } - - // TODO: make the embedded checkout work too! - const html = ` - <!DOCTYPE html> - <html lang="en"> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Checkout - - - - -
- - - ` - - res.status(200) - res.setHeader('Content-Type', 'text/html') - res.write(html) - res.end() -} - -export default checkout diff --git a/framework/bigcommerce/api/endpoints/checkout/index.ts b/framework/bigcommerce/api/endpoints/checkout/index.ts deleted file mode 100644 index eaba32e47..000000000 --- a/framework/bigcommerce/api/endpoints/checkout/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import checkoutEndpoint from '@commerce/api/endpoints/checkout' -import type { CheckoutSchema } from '../../../types/checkout' -import type { BigcommerceAPI } from '../..' -import checkout from './checkout' - -export type CheckoutAPI = GetAPISchema - -export type CheckoutEndpoint = CheckoutAPI['endpoint'] - -export const handlers: CheckoutEndpoint['handlers'] = { checkout } - -const checkoutApi = createEndpoint({ - handler: checkoutEndpoint, - handlers, -}) - -export default checkoutApi diff --git a/framework/bigcommerce/api/endpoints/customer/get-logged-in-customer.ts b/framework/bigcommerce/api/endpoints/customer/get-logged-in-customer.ts deleted file mode 100644 index cfcce9532..000000000 --- a/framework/bigcommerce/api/endpoints/customer/get-logged-in-customer.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { GetLoggedInCustomerQuery } from '../../../schema' -import type { CustomerEndpoint } from '.' - -export const getLoggedInCustomerQuery = /* GraphQL */ ` - query getLoggedInCustomer { - customer { - entityId - firstName - lastName - email - company - customerGroupId - notes - phone - addressCount - attributeCount - storeCredit { - value - currencyCode - } - } - } -` - -export type Customer = NonNullable - -const getLoggedInCustomer: CustomerEndpoint['handlers']['getLoggedInCustomer'] = async ({ - req, - res, - config, -}) => { - const token = req.cookies[config.customerCookie] - - if (token) { - const { data } = await config.fetch( - getLoggedInCustomerQuery, - undefined, - { - headers: { - cookie: `${config.customerCookie}=${token}`, - }, - } - ) - const { customer } = data - - if (!customer) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Customer not found', code: 'not_found' }], - }) - } - - return res.status(200).json({ data: { customer } }) - } - - res.status(200).json({ data: null }) -} - -export default getLoggedInCustomer diff --git a/framework/bigcommerce/api/endpoints/customer/index.ts b/framework/bigcommerce/api/endpoints/customer/index.ts deleted file mode 100644 index cb0f6787a..000000000 --- a/framework/bigcommerce/api/endpoints/customer/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import customerEndpoint from '@commerce/api/endpoints/customer' -import type { CustomerSchema } from '../../../types/customer' -import type { BigcommerceAPI } from '../..' -import getLoggedInCustomer from './get-logged-in-customer' - -export type CustomerAPI = GetAPISchema - -export type CustomerEndpoint = CustomerAPI['endpoint'] - -export const handlers: CustomerEndpoint['handlers'] = { getLoggedInCustomer } - -const customerApi = createEndpoint({ - handler: customerEndpoint, - handlers, -}) - -export default customerApi diff --git a/framework/bigcommerce/api/endpoints/login/index.ts b/framework/bigcommerce/api/endpoints/login/index.ts deleted file mode 100644 index 2b454c7c2..000000000 --- a/framework/bigcommerce/api/endpoints/login/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import loginEndpoint from '@commerce/api/endpoints/login' -import type { LoginSchema } from '../../../types/login' -import type { BigcommerceAPI } from '../..' -import login from './login' - -export type LoginAPI = GetAPISchema - -export type LoginEndpoint = LoginAPI['endpoint'] - -export const handlers: LoginEndpoint['handlers'] = { login } - -const loginApi = createEndpoint({ - handler: loginEndpoint, - handlers, -}) - -export default loginApi diff --git a/framework/bigcommerce/api/endpoints/login/login.ts b/framework/bigcommerce/api/endpoints/login/login.ts deleted file mode 100644 index f55c3b54f..000000000 --- a/framework/bigcommerce/api/endpoints/login/login.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { FetcherError } from '@commerce/utils/errors' -import type { LoginEndpoint } from '.' - -const invalidCredentials = /invalid credentials/i - -const login: LoginEndpoint['handlers']['login'] = async ({ - res, - body: { email, password }, - config, - commerce, -}) => { - // TODO: Add proper validations with something like Ajv - if (!(email && password)) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Invalid request' }], - }) - } - // TODO: validate the password and email - // Passwords must be at least 7 characters and contain both alphabetic - // and numeric characters. - - try { - await commerce.login({ variables: { email, password }, config, res }) - } catch (error) { - // Check if the email and password didn't match an existing account - if ( - error instanceof FetcherError && - invalidCredentials.test(error.message) - ) { - return res.status(401).json({ - data: null, - errors: [ - { - message: - 'Cannot find an account that matches the provided credentials', - code: 'invalid_credentials', - }, - ], - }) - } - - throw error - } - - res.status(200).json({ data: null }) -} - -export default login diff --git a/framework/bigcommerce/api/endpoints/logout/index.ts b/framework/bigcommerce/api/endpoints/logout/index.ts deleted file mode 100644 index 0dbb23bab..000000000 --- a/framework/bigcommerce/api/endpoints/logout/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import logoutEndpoint from '@commerce/api/endpoints/logout' -import type { LogoutSchema } from '../../../types/logout' -import type { BigcommerceAPI } from '../..' -import logout from './logout' - -export type LogoutAPI = GetAPISchema - -export type LogoutEndpoint = LogoutAPI['endpoint'] - -export const handlers: LogoutEndpoint['handlers'] = { logout } - -const logoutApi = createEndpoint({ - handler: logoutEndpoint, - handlers, -}) - -export default logoutApi diff --git a/framework/bigcommerce/api/endpoints/logout/logout.ts b/framework/bigcommerce/api/endpoints/logout/logout.ts deleted file mode 100644 index b90a8c3ce..000000000 --- a/framework/bigcommerce/api/endpoints/logout/logout.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { serialize } from 'cookie' -import type { LogoutEndpoint } from '.' - -const logout: LogoutEndpoint['handlers']['logout'] = async ({ - res, - body: { redirectTo }, - config, -}) => { - // Remove the cookie - res.setHeader( - 'Set-Cookie', - serialize(config.customerCookie, '', { maxAge: -1, path: '/' }) - ) - - // Only allow redirects to a relative URL - if (redirectTo?.startsWith('/')) { - res.redirect(redirectTo) - } else { - res.status(200).json({ data: null }) - } -} - -export default logout diff --git a/framework/bigcommerce/api/endpoints/signup/index.ts b/framework/bigcommerce/api/endpoints/signup/index.ts deleted file mode 100644 index 6ce8be271..000000000 --- a/framework/bigcommerce/api/endpoints/signup/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import signupEndpoint from '@commerce/api/endpoints/signup' -import type { SignupSchema } from '../../../types/signup' -import type { BigcommerceAPI } from '../..' -import signup from './signup' - -export type SignupAPI = GetAPISchema - -export type SignupEndpoint = SignupAPI['endpoint'] - -export const handlers: SignupEndpoint['handlers'] = { signup } - -const singupApi = createEndpoint({ - handler: signupEndpoint, - handlers, -}) - -export default singupApi diff --git a/framework/bigcommerce/api/endpoints/signup/signup.ts b/framework/bigcommerce/api/endpoints/signup/signup.ts deleted file mode 100644 index 46c071be8..000000000 --- a/framework/bigcommerce/api/endpoints/signup/signup.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { BigcommerceApiError } from '../../utils/errors' -import type { SignupEndpoint } from '.' - -const signup: SignupEndpoint['handlers']['signup'] = async ({ - res, - body: { firstName, lastName, email, password }, - config, - commerce, -}) => { - // TODO: Add proper validations with something like Ajv - if (!(firstName && lastName && email && password)) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Invalid request' }], - }) - } - // TODO: validate the password and email - // Passwords must be at least 7 characters and contain both alphabetic - // and numeric characters. - - try { - await config.storeApiFetch('/v3/customers', { - method: 'POST', - body: JSON.stringify([ - { - first_name: firstName, - last_name: lastName, - email, - authentication: { - new_password: password, - }, - }, - ]), - }) - } catch (error) { - if (error instanceof BigcommerceApiError && error.status === 422) { - const hasEmailError = '0.email' in error.data?.errors - - // If there's an error with the email, it most likely means it's duplicated - if (hasEmailError) { - return res.status(400).json({ - data: null, - errors: [ - { - message: 'The email is already in use', - code: 'duplicated_email', - }, - ], - }) - } - } - - throw error - } - - // Login the customer right after creating it - await commerce.login({ variables: { email, password }, res, config }) - - res.status(200).json({ data: null }) -} - -export default signup diff --git a/framework/bigcommerce/api/endpoints/wishlist/add-item.ts b/framework/bigcommerce/api/endpoints/wishlist/add-item.ts deleted file mode 100644 index bf449cb11..000000000 --- a/framework/bigcommerce/api/endpoints/wishlist/add-item.ts +++ /dev/null @@ -1,57 +0,0 @@ -import getCustomerWishlist from '../../operations/get-customer-wishlist' -import { parseWishlistItem } from '../../utils/parse-item' -import getCustomerId from '../../utils/get-customer-id' -import type { WishlistEndpoint } from '.' - -// Return wishlist info -const addItem: WishlistEndpoint['handlers']['addItem'] = async ({ - res, - body: { customerToken, item }, - config, - commerce, -}) => { - if (!item) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Missing item' }], - }) - } - - const customerId = - customerToken && (await getCustomerId({ customerToken, config })) - - if (!customerId) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Invalid request' }], - }) - } - - const { wishlist } = await commerce.getCustomerWishlist({ - variables: { customerId }, - config, - }) - const options = { - method: 'POST', - body: JSON.stringify( - wishlist - ? { - items: [parseWishlistItem(item)], - } - : { - name: 'Wishlist', - customer_id: customerId, - items: [parseWishlistItem(item)], - is_public: false, - } - ), - } - - const { data } = wishlist - ? await config.storeApiFetch(`/v3/wishlists/${wishlist.id}/items`, options) - : await config.storeApiFetch('/v3/wishlists', options) - - res.status(200).json({ data }) -} - -export default addItem diff --git a/framework/bigcommerce/api/endpoints/wishlist/get-wishlist.ts b/framework/bigcommerce/api/endpoints/wishlist/get-wishlist.ts deleted file mode 100644 index 479a67c6e..000000000 --- a/framework/bigcommerce/api/endpoints/wishlist/get-wishlist.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { Wishlist } from '../../../types/wishlist' -import type { WishlistEndpoint } from '.' -import getCustomerId from '../../utils/get-customer-id' -import getCustomerWishlist from '../../operations/get-customer-wishlist' - -// Return wishlist info -const getWishlist: WishlistEndpoint['handlers']['getWishlist'] = async ({ - res, - body: { customerToken, includeProducts }, - config, - commerce, -}) => { - let result: { data?: Wishlist } = {} - - if (customerToken) { - const customerId = - customerToken && (await getCustomerId({ customerToken, config })) - - if (!customerId) { - // If the customerToken is invalid, then this request is too - return res.status(404).json({ - data: null, - errors: [{ message: 'Wishlist not found' }], - }) - } - - const { wishlist } = await commerce.getCustomerWishlist({ - variables: { customerId }, - includeProducts, - config, - }) - - result = { data: wishlist } - } - - res.status(200).json({ data: result.data ?? null }) -} - -export default getWishlist diff --git a/framework/bigcommerce/api/endpoints/wishlist/index.ts b/framework/bigcommerce/api/endpoints/wishlist/index.ts deleted file mode 100644 index 31af234ce..000000000 --- a/framework/bigcommerce/api/endpoints/wishlist/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import wishlistEndpoint from '@commerce/api/endpoints/wishlist' -import type { WishlistSchema } from '../../../types/wishlist' -import type { BigcommerceAPI } from '../..' -import getWishlist from './get-wishlist' -import addItem from './add-item' -import removeItem from './remove-item' - -export type WishlistAPI = GetAPISchema - -export type WishlistEndpoint = WishlistAPI['endpoint'] - -export const handlers: WishlistEndpoint['handlers'] = { - getWishlist, - addItem, - removeItem, -} - -const wishlistApi = createEndpoint({ - handler: wishlistEndpoint, - handlers, -}) - -export default wishlistApi diff --git a/framework/bigcommerce/api/endpoints/wishlist/remove-item.ts b/framework/bigcommerce/api/endpoints/wishlist/remove-item.ts deleted file mode 100644 index 9b19d9b42..000000000 --- a/framework/bigcommerce/api/endpoints/wishlist/remove-item.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { Wishlist } from '../../../types/wishlist' -import getCustomerWishlist from '../../operations/get-customer-wishlist' -import getCustomerId from '../../utils/get-customer-id' -import type { WishlistEndpoint } from '.' - -// Return wishlist info -const removeItem: WishlistEndpoint['handlers']['removeItem'] = async ({ - res, - body: { customerToken, itemId }, - config, - commerce, -}) => { - const customerId = - customerToken && (await getCustomerId({ customerToken, config })) - const { wishlist } = - (customerId && - (await commerce.getCustomerWishlist({ - variables: { customerId }, - config, - }))) || - {} - - if (!wishlist || !itemId) { - return res.status(400).json({ - data: null, - errors: [{ message: 'Invalid request' }], - }) - } - - const result = await config.storeApiFetch<{ data: Wishlist } | null>( - `/v3/wishlists/${wishlist.id}/items/${itemId}`, - { method: 'DELETE' } - ) - const data = result?.data ?? null - - res.status(200).json({ data }) -} - -export default removeItem diff --git a/framework/bigcommerce/api/fragments/category-tree.ts b/framework/bigcommerce/api/fragments/category-tree.ts deleted file mode 100644 index e26f17195..000000000 --- a/framework/bigcommerce/api/fragments/category-tree.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const categoryTreeItemFragment = /* GraphQL */ ` - fragment categoryTreeItem on CategoryTreeItem { - entityId - name - path - description - productCount - } -` diff --git a/framework/bigcommerce/api/fragments/product.ts b/framework/bigcommerce/api/fragments/product.ts deleted file mode 100644 index d266b8c92..000000000 --- a/framework/bigcommerce/api/fragments/product.ts +++ /dev/null @@ -1,113 +0,0 @@ -export const productPrices = /* GraphQL */ ` - fragment productPrices on Prices { - price { - value - currencyCode - } - salePrice { - value - currencyCode - } - retailPrice { - value - currencyCode - } - } -` - -export const swatchOptionFragment = /* GraphQL */ ` - fragment swatchOption on SwatchOptionValue { - isDefault - hexColors - } -` - -export const multipleChoiceOptionFragment = /* GraphQL */ ` - fragment multipleChoiceOption on MultipleChoiceOption { - values { - edges { - node { - label - ...swatchOption - } - } - } - } - - ${swatchOptionFragment} -` - -export const productInfoFragment = /* GraphQL */ ` - fragment productInfo on Product { - entityId - name - path - brand { - entityId - } - description - prices { - ...productPrices - } - images { - edges { - node { - urlOriginal - altText - isDefault - } - } - } - variants { - edges { - node { - entityId - defaultImage { - urlOriginal - altText - isDefault - } - } - } - } - productOptions { - edges { - node { - __typename - entityId - displayName - ...multipleChoiceOption - } - } - } - localeMeta: metafields(namespace: $locale, keys: ["name", "description"]) - @include(if: $hasLocale) { - edges { - node { - key - value - } - } - } - } - - ${productPrices} - ${multipleChoiceOptionFragment} -` - -export const productConnectionFragment = /* GraphQL */ ` - fragment productConnnection on ProductConnection { - pageInfo { - startCursor - endCursor - } - edges { - cursor - node { - ...productInfo - } - } - } - - ${productInfoFragment} -` diff --git a/framework/bigcommerce/api/index.ts b/framework/bigcommerce/api/index.ts deleted file mode 100644 index 9dbe400f9..000000000 --- a/framework/bigcommerce/api/index.ts +++ /dev/null @@ -1,120 +0,0 @@ -import type { RequestInit } from '@vercel/fetch' -import { - CommerceAPI, - CommerceAPIConfig, - getCommerceApi as commerceApi, -} from '@commerce/api' -import createFetchGraphqlApi from './utils/fetch-graphql-api' -import createFetchStoreApi from './utils/fetch-store-api' - -import type { CartAPI } from './endpoints/cart' -import type { CustomerAPI } from './endpoints/customer' -import type { LoginAPI } from './endpoints/login' -import type { LogoutAPI } from './endpoints/logout' -import type { SignupAPI } from './endpoints/signup' -import type { ProductsAPI } from './endpoints/catalog/products' -import type { WishlistAPI } from './endpoints/wishlist' - -import login from './operations/login' -import getAllPages from './operations/get-all-pages' -import getPage from './operations/get-page' -import getSiteInfo from './operations/get-site-info' -import getCustomerWishlist from './operations/get-customer-wishlist' -import getAllProductPaths from './operations/get-all-product-paths' -import getAllProducts from './operations/get-all-products' -import getProduct from './operations/get-product' - -export interface BigcommerceConfig extends CommerceAPIConfig { - // Indicates if the returned metadata with translations should be applied to the - // data or returned as it is - applyLocale?: boolean - storeApiUrl: string - storeApiToken: string - storeApiClientId: string - storeChannelId?: string - storeUrl?: string - storeApiClientSecret?: string - storeHash?:string - storeApiFetch(endpoint: string, options?: RequestInit): Promise -} - -const API_URL = process.env.BIGCOMMERCE_STOREFRONT_API_URL -const API_TOKEN = process.env.BIGCOMMERCE_STOREFRONT_API_TOKEN -const STORE_API_URL = process.env.BIGCOMMERCE_STORE_API_URL -const STORE_API_TOKEN = process.env.BIGCOMMERCE_STORE_API_TOKEN -const STORE_API_CLIENT_ID = process.env.BIGCOMMERCE_STORE_API_CLIENT_ID -const STORE_CHANNEL_ID = process.env.BIGCOMMERCE_CHANNEL_ID -const STORE_URL = process.env.BIGCOMMERCE_STORE_URL -const CLIENT_SECRET = process.env.BIGCOMMERCE_STORE_API_CLIENT_SECRET -const STOREFRONT_HASH = process.env.BIGCOMMERCE_STORE_API_STORE_HASH - -if (!API_URL) { - throw new Error( - `The environment variable BIGCOMMERCE_STOREFRONT_API_URL is missing and it's required to access your store` - ) -} - -if (!API_TOKEN) { - throw new Error( - `The environment variable BIGCOMMERCE_STOREFRONT_API_TOKEN is missing and it's required to access your store` - ) -} - -if (!(STORE_API_URL && STORE_API_TOKEN && STORE_API_CLIENT_ID)) { - throw new Error( - `The environment variables BIGCOMMERCE_STORE_API_URL, BIGCOMMERCE_STORE_API_TOKEN, BIGCOMMERCE_STORE_API_CLIENT_ID have to be set in order to access the REST API of your store` - ) -} - -const ONE_DAY = 60 * 60 * 24 - -const config: BigcommerceConfig = { - commerceUrl: API_URL, - apiToken: API_TOKEN, - customerCookie: 'SHOP_TOKEN', - cartCookie: process.env.BIGCOMMERCE_CART_COOKIE ?? 'bc_cartId', - cartCookieMaxAge: ONE_DAY * 30, - fetch: createFetchGraphqlApi(() => getCommerceApi().getConfig()), - applyLocale: true, - // REST API only - storeApiUrl: STORE_API_URL, - storeApiToken: STORE_API_TOKEN, - storeApiClientId: STORE_API_CLIENT_ID, - storeChannelId: STORE_CHANNEL_ID, - storeUrl:STORE_URL, - storeApiClientSecret:CLIENT_SECRET, - storeHash: STOREFRONT_HASH, - storeApiFetch: createFetchStoreApi(() => getCommerceApi().getConfig()), -} - -const operations = { - login, - getAllPages, - getPage, - getSiteInfo, - getCustomerWishlist, - getAllProductPaths, - getAllProducts, - getProduct, -} - -export const provider = { config, operations } - -export type Provider = typeof provider - -export type APIs = - | CartAPI - | CustomerAPI - | LoginAPI - | LogoutAPI - | SignupAPI - | ProductsAPI - | WishlistAPI - -export type BigcommerceAPI

= CommerceAPI

- -export function getCommerceApi

( - customProvider: P = provider as any -): BigcommerceAPI

{ - return commerceApi(customProvider) -} diff --git a/framework/bigcommerce/api/operations/get-all-pages.ts b/framework/bigcommerce/api/operations/get-all-pages.ts deleted file mode 100644 index 3a9b64b1f..000000000 --- a/framework/bigcommerce/api/operations/get-all-pages.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { Page, GetAllPagesOperation } from '../../types/page' -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import { BigcommerceConfig, Provider } from '..' - -export default function getAllPagesOperation({ - commerce, -}: OperationContext) { - async function getAllPages(opts?: { - config?: Partial - preview?: boolean - }): Promise - - async function getAllPages( - opts: { - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getAllPages({ - config, - preview, - }: { - url?: string - config?: Partial - preview?: boolean - } = {}): Promise { - const cfg = commerce.getConfig(config) - // RecursivePartial forces the method to check for every prop in the data, which is - // required in case there's a custom `url` - const { data } = await cfg.storeApiFetch< - RecursivePartial<{ data: Page[] }> - >('/v3/content/pages') - const pages = (data as RecursiveRequired) ?? [] - - return { - pages: preview ? pages : pages.filter((p) => p.is_visible), - } - } - - return getAllPages -} diff --git a/framework/bigcommerce/api/operations/get-all-product-paths.ts b/framework/bigcommerce/api/operations/get-all-product-paths.ts deleted file mode 100644 index da7b457eb..000000000 --- a/framework/bigcommerce/api/operations/get-all-product-paths.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { GetAllProductPathsQuery } from '../../schema' -import type { GetAllProductPathsOperation } from '../../types/product' -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import filterEdges from '../utils/filter-edges' -import { BigcommerceConfig, Provider } from '..' - -export const getAllProductPathsQuery = /* GraphQL */ ` - query getAllProductPaths($first: Int = 100) { - site { - products(first: $first) { - edges { - node { - path - } - } - } - } - } -` - -export default function getAllProductPathsOperation({ - commerce, -}: OperationContext) { - async function getAllProductPaths< - T extends GetAllProductPathsOperation - >(opts?: { - variables?: T['variables'] - config?: BigcommerceConfig - }): Promise - - async function getAllProductPaths( - opts: { - variables?: T['variables'] - config?: BigcommerceConfig - } & OperationOptions - ): Promise - - async function getAllProductPaths({ - query = getAllProductPathsQuery, - variables, - config, - }: { - query?: string - variables?: T['variables'] - config?: BigcommerceConfig - } = {}): Promise { - config = commerce.getConfig(config) - // RecursivePartial forces the method to check for every prop in the data, which is - // required in case there's a custom `query` - const { data } = await config.fetch< - RecursivePartial - >(query, { variables }) - const products = data.site?.products?.edges - - return { - products: filterEdges(products as RecursiveRequired).map( - ({ node }) => node - ), - } - } - return getAllProductPaths -} diff --git a/framework/bigcommerce/api/operations/get-all-products.ts b/framework/bigcommerce/api/operations/get-all-products.ts deleted file mode 100644 index c2652f5bf..000000000 --- a/framework/bigcommerce/api/operations/get-all-products.ts +++ /dev/null @@ -1,135 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { - GetAllProductsQuery, - GetAllProductsQueryVariables, -} from '../../schema' -import type { GetAllProductsOperation } from '../../types/product' -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import filterEdges from '../utils/filter-edges' -import setProductLocaleMeta from '../utils/set-product-locale-meta' -import { productConnectionFragment } from '../fragments/product' -import { BigcommerceConfig, Provider } from '..' -import { normalizeProduct } from '../../lib/normalize' - -export const getAllProductsQuery = /* GraphQL */ ` - query getAllProducts( - $hasLocale: Boolean = false - $locale: String = "null" - $entityIds: [Int!] - $first: Int = 10 - $products: Boolean = false - $featuredProducts: Boolean = false - $bestSellingProducts: Boolean = false - $newestProducts: Boolean = false - ) { - site { - products(first: $first, entityIds: $entityIds) @include(if: $products) { - ...productConnnection - } - featuredProducts(first: $first) @include(if: $featuredProducts) { - ...productConnnection - } - bestSellingProducts(first: $first) @include(if: $bestSellingProducts) { - ...productConnnection - } - newestProducts(first: $first) @include(if: $newestProducts) { - ...productConnnection - } - } - } - - ${productConnectionFragment} -` - -export type ProductEdge = NonNullable< - NonNullable[0] -> - -export type ProductNode = ProductEdge['node'] - -export type GetAllProductsResult< - T extends Record = { - products: ProductEdge[] - } -> = T - -function getProductsType( - relevance?: GetAllProductsOperation['variables']['relevance'] -) { - switch (relevance) { - case 'featured': - return 'featuredProducts' - case 'best_selling': - return 'bestSellingProducts' - case 'newest': - return 'newestProducts' - default: - return 'products' - } -} - -export default function getAllProductsOperation({ - commerce, -}: OperationContext) { - async function getAllProducts(opts?: { - variables?: T['variables'] - config?: Partial - preview?: boolean - }): Promise - - async function getAllProducts( - opts: { - variables?: T['variables'] - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getAllProducts({ - query = getAllProductsQuery, - variables: vars = {}, - config: cfg, - }: { - query?: string - variables?: T['variables'] - config?: Partial - preview?: boolean - } = {}): Promise { - const config = commerce.getConfig(cfg) - const { locale } = config - const field = getProductsType(vars.relevance) - const variables: GetAllProductsQueryVariables = { - locale, - hasLocale: !!locale, - } - - variables[field] = true - - if (vars.first) variables.first = vars.first - if (vars.ids) variables.entityIds = vars.ids.map((id) => Number(id)) - - // RecursivePartial forces the method to check for every prop in the data, which is - // required in case there's a custom `query` - const { data } = await config.fetch>( - query, - { variables } - ) - const edges = data.site?.[field]?.edges - const products = filterEdges(edges as RecursiveRequired) - - if (locale && config.applyLocale) { - products.forEach((product: RecursivePartial) => { - if (product.node) setProductLocaleMeta(product.node) - }) - } - - return { - products: products.map(({ node }) => normalizeProduct(node as any)), - } - } - - return getAllProducts -} diff --git a/framework/bigcommerce/api/operations/get-customer-wishlist.ts b/framework/bigcommerce/api/operations/get-customer-wishlist.ts deleted file mode 100644 index fc9487ffe..000000000 --- a/framework/bigcommerce/api/operations/get-customer-wishlist.ts +++ /dev/null @@ -1,81 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { - GetCustomerWishlistOperation, - Wishlist, -} from '../../types/wishlist' -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import { BigcommerceConfig, Provider } from '..' -import getAllProducts, { ProductEdge } from './get-all-products' - -export default function getCustomerWishlistOperation({ - commerce, -}: OperationContext) { - async function getCustomerWishlist< - T extends GetCustomerWishlistOperation - >(opts: { - variables: T['variables'] - config?: BigcommerceConfig - includeProducts?: boolean - }): Promise - - async function getCustomerWishlist( - opts: { - variables: T['variables'] - config?: BigcommerceConfig - includeProducts?: boolean - } & OperationOptions - ): Promise - - async function getCustomerWishlist({ - config, - variables, - includeProducts, - }: { - url?: string - variables: T['variables'] - config?: BigcommerceConfig - includeProducts?: boolean - }): Promise { - config = commerce.getConfig(config) - - const { data = [] } = await config.storeApiFetch< - RecursivePartial<{ data: Wishlist[] }> - >(`/v3/wishlists?customer_id=${variables.customerId}`) - const wishlist = data[0] - - if (includeProducts && wishlist?.items?.length) { - const ids = wishlist.items - ?.map((item) => (item?.product_id ? String(item?.product_id) : null)) - .filter((id): id is string => !!id) - - if (ids?.length) { - const graphqlData = await commerce.getAllProducts({ - variables: { first: 100, ids }, - config, - }) - // Put the products in an object that we can use to get them by id - const productsById = graphqlData.products.reduce<{ - [k: number]: ProductEdge - }>((prods, p) => { - prods[Number(p.id)] = p as any - return prods - }, {}) - // Populate the wishlist items with the graphql products - wishlist.items.forEach((item) => { - const product = item && productsById[item.product_id!] - if (item && product) { - // @ts-ignore Fix this type when the wishlist type is properly defined - item.product = product - } - }) - } - } - - return { wishlist: wishlist as RecursiveRequired } - } - - return getCustomerWishlist -} diff --git a/framework/bigcommerce/api/operations/get-page.ts b/framework/bigcommerce/api/operations/get-page.ts deleted file mode 100644 index 6a1fea9d0..000000000 --- a/framework/bigcommerce/api/operations/get-page.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { GetPageOperation, Page } from '../../types/page' -import type { RecursivePartial, RecursiveRequired } from '../utils/types' -import type { BigcommerceConfig, Provider } from '..' -import { normalizePage } from '../../lib/normalize' - -export default function getPageOperation({ - commerce, -}: OperationContext) { - async function getPage(opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise - - async function getPage( - opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getPage({ - url, - variables, - config, - preview, - }: { - url?: string - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise { - const cfg = commerce.getConfig(config) - // RecursivePartial forces the method to check for every prop in the data, which is - // required in case there's a custom `url` - const { data } = await cfg.storeApiFetch< - RecursivePartial<{ data: Page[] }> - >(url || `/v3/content/pages?id=${variables.id}&include=body`) - const firstPage = data?.[0] - const page = firstPage as RecursiveRequired - - if (preview || page?.is_visible) { - return { page: normalizePage(page as any) } - } - return {} - } - - return getPage -} diff --git a/framework/bigcommerce/api/operations/get-product.ts b/framework/bigcommerce/api/operations/get-product.ts deleted file mode 100644 index fb356e952..000000000 --- a/framework/bigcommerce/api/operations/get-product.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { GetProductOperation } from '../../types/product' -import type { GetProductQuery, GetProductQueryVariables } from '../../schema' -import setProductLocaleMeta from '../utils/set-product-locale-meta' -import { productInfoFragment } from '../fragments/product' -import { BigcommerceConfig, Provider } from '..' -import { normalizeProduct } from '../../lib/normalize' - -export const getProductQuery = /* GraphQL */ ` - query getProduct( - $hasLocale: Boolean = false - $locale: String = "null" - $path: String! - ) { - site { - route(path: $path) { - node { - __typename - ... on Product { - ...productInfo - variants { - edges { - node { - entityId - defaultImage { - urlOriginal - altText - isDefault - } - prices { - ...productPrices - } - inventory { - aggregated { - availableToSell - warningLevel - } - isInStock - } - productOptions { - edges { - node { - __typename - entityId - displayName - ...multipleChoiceOption - } - } - } - } - } - } - } - } - } - } - } - - ${productInfoFragment} -` - -// TODO: See if this type is useful for defining the Product type -// export type ProductNode = Extract< -// GetProductQuery['site']['route']['node'], -// { __typename: 'Product' } -// > - -export default function getAllProductPathsOperation({ - commerce, -}: OperationContext) { - async function getProduct(opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise - - async function getProduct( - opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getProduct({ - query = getProductQuery, - variables: { slug, ...vars }, - config: cfg, - }: { - query?: string - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise { - const config = commerce.getConfig(cfg) - const { locale } = config - const variables: GetProductQueryVariables = { - locale, - hasLocale: !!locale, - path: slug ? `/${slug}/` : vars.path!, - } - const { data } = await config.fetch(query, { variables }) - const product = data.site?.route?.node - - if (product?.__typename === 'Product') { - if (locale && config.applyLocale) { - setProductLocaleMeta(product) - } - - return { product: normalizeProduct(product as any) } - } - - return {} - } - return getProduct -} diff --git a/framework/bigcommerce/api/operations/get-site-info.ts b/framework/bigcommerce/api/operations/get-site-info.ts deleted file mode 100644 index 0dd94dd9d..000000000 --- a/framework/bigcommerce/api/operations/get-site-info.ts +++ /dev/null @@ -1,87 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { GetSiteInfoOperation } from '../../types/site' -import type { GetSiteInfoQuery } from '../../schema' -import filterEdges from '../utils/filter-edges' -import type { BigcommerceConfig, Provider } from '..' -import { categoryTreeItemFragment } from '../fragments/category-tree' -import { normalizeCategory } from '../../lib/normalize' - -// Get 3 levels of categories -export const getSiteInfoQuery = /* GraphQL */ ` - query getSiteInfo { - site { - categoryTree { - ...categoryTreeItem - children { - ...categoryTreeItem - children { - ...categoryTreeItem - } - } - } - brands { - pageInfo { - startCursor - endCursor - } - edges { - cursor - node { - entityId - name - defaultImage { - urlOriginal - altText - } - pageTitle - metaDesc - metaKeywords - searchKeywords - path - } - } - } - } - } - ${categoryTreeItemFragment} -` - -export default function getSiteInfoOperation({ - commerce, -}: OperationContext) { - async function getSiteInfo(opts?: { - config?: Partial - preview?: boolean - }): Promise - - async function getSiteInfo( - opts: { - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getSiteInfo({ - query = getSiteInfoQuery, - config, - }: { - query?: string - config?: Partial - preview?: boolean - } = {}): Promise { - const cfg = commerce.getConfig(config) - const { data } = await cfg.fetch(query) - const categories = data.site.categoryTree.map(normalizeCategory) - const brands = data.site?.brands?.edges - - return { - categories: categories ?? [], - brands: filterEdges(brands), - } - } - - return getSiteInfo -} diff --git a/framework/bigcommerce/api/operations/login.ts b/framework/bigcommerce/api/operations/login.ts deleted file mode 100644 index 021ba3c65..000000000 --- a/framework/bigcommerce/api/operations/login.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { ServerResponse } from 'http' -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { LoginOperation } from '../../types/login' -import type { LoginMutation } from '../../schema' -import type { RecursivePartial } from '../utils/types' -import concatHeader from '../utils/concat-cookie' -import type { BigcommerceConfig, Provider } from '..' - -export const loginMutation = /* GraphQL */ ` - mutation login($email: String!, $password: String!) { - login(email: $email, password: $password) { - result - } - } -` - -export default function loginOperation({ - commerce, -}: OperationContext) { - async function login(opts: { - variables: T['variables'] - config?: BigcommerceConfig - res: ServerResponse - }): Promise - - async function login( - opts: { - variables: T['variables'] - config?: BigcommerceConfig - res: ServerResponse - } & OperationOptions - ): Promise - - async function login({ - query = loginMutation, - variables, - res: response, - config, - }: { - query?: string - variables: T['variables'] - res: ServerResponse - config?: BigcommerceConfig - }): Promise { - config = commerce.getConfig(config) - - const { data, res } = await config.fetch>( - query, - { variables } - ) - // Bigcommerce returns a Set-Cookie header with the auth cookie - let cookie = res.headers.get('Set-Cookie') - - if (cookie && typeof cookie === 'string') { - // In development, don't set a secure cookie or the browser will ignore it - if (process.env.NODE_ENV !== 'production') { - cookie = cookie.replace('; Secure', '') - // SameSite=none can't be set unless the cookie is Secure - // bc seems to sometimes send back SameSite=None rather than none so make - // this case insensitive - cookie = cookie.replace(/; SameSite=none/gi, '; SameSite=lax') - } - - response.setHeader( - 'Set-Cookie', - concatHeader(response.getHeader('Set-Cookie'), cookie)! - ) - } - - return { - result: data.login?.result, - } - } - - return login -} diff --git a/framework/bigcommerce/api/utils/concat-cookie.ts b/framework/bigcommerce/api/utils/concat-cookie.ts deleted file mode 100644 index 362e12e99..000000000 --- a/framework/bigcommerce/api/utils/concat-cookie.ts +++ /dev/null @@ -1,14 +0,0 @@ -type Header = string | number | string[] | undefined - -export default function concatHeader(prev: Header, val: Header) { - if (!val) return prev - if (!prev) return val - - if (Array.isArray(prev)) return prev.concat(String(val)) - - prev = String(prev) - - if (Array.isArray(val)) return [prev].concat(val) - - return [prev, String(val)] -} diff --git a/framework/bigcommerce/api/utils/errors.ts b/framework/bigcommerce/api/utils/errors.ts deleted file mode 100644 index 77e2007fc..000000000 --- a/framework/bigcommerce/api/utils/errors.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Response } from '@vercel/fetch' - -// Used for GraphQL errors -export class BigcommerceGraphQLError extends Error {} - -export class BigcommerceApiError extends Error { - status: number - res: Response - data: any - - constructor(msg: string, res: Response, data?: any) { - super(msg) - this.name = 'BigcommerceApiError' - this.status = res.status - this.res = res - this.data = data - } -} - -export class BigcommerceNetworkError extends Error { - constructor(msg: string) { - super(msg) - this.name = 'BigcommerceNetworkError' - } -} diff --git a/framework/bigcommerce/api/utils/fetch-graphql-api.ts b/framework/bigcommerce/api/utils/fetch-graphql-api.ts deleted file mode 100644 index 8cc76c067..000000000 --- a/framework/bigcommerce/api/utils/fetch-graphql-api.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { FetcherError } from '@commerce/utils/errors' -import type { GraphQLFetcher } from '@commerce/api' -import type { BigcommerceConfig } from '../index' -import fetch from './fetch' - -const fetchGraphqlApi: (getConfig: () => BigcommerceConfig) => GraphQLFetcher = - (getConfig) => - async (query: string, { variables, preview } = {}, fetchOptions) => { - // log.warn(query) - const config = getConfig() - const res = await fetch(config.commerceUrl + (preview ? '/preview' : ''), { - ...fetchOptions, - method: 'POST', - headers: { - Authorization: `Bearer ${config.apiToken}`, - ...fetchOptions?.headers, - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - query, - variables, - }), - }) - - const json = await res.json() - if (json.errors) { - throw new FetcherError({ - errors: json.errors ?? [{ message: 'Failed to fetch Bigcommerce API' }], - status: res.status, - }) - } - - return { data: json.data, res } - } - -export default fetchGraphqlApi diff --git a/framework/bigcommerce/api/utils/fetch-store-api.ts b/framework/bigcommerce/api/utils/fetch-store-api.ts deleted file mode 100644 index 1e44b28f9..000000000 --- a/framework/bigcommerce/api/utils/fetch-store-api.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { RequestInit, Response } from '@vercel/fetch' -import type { BigcommerceConfig } from '../index' -import { BigcommerceApiError, BigcommerceNetworkError } from './errors' -import fetch from './fetch' - -const fetchStoreApi = - (getConfig: () => BigcommerceConfig) => - async (endpoint: string, options?: RequestInit): Promise => { - const config = getConfig() - let res: Response - - try { - res = await fetch(config.storeApiUrl + endpoint, { - ...options, - headers: { - ...options?.headers, - 'Content-Type': 'application/json', - 'X-Auth-Token': config.storeApiToken, - 'X-Auth-Client': config.storeApiClientId, - }, - }) - } catch (error) { - throw new BigcommerceNetworkError( - `Fetch to Bigcommerce failed: ${error.message}` - ) - } - - const contentType = res.headers.get('Content-Type') - const isJSON = contentType?.includes('application/json') - - if (!res.ok) { - const data = isJSON ? await res.json() : await getTextOrNull(res) - const headers = getRawHeaders(res) - const msg = `Big Commerce API error (${ - res.status - }) \nHeaders: ${JSON.stringify(headers, null, 2)}\n${ - typeof data === 'string' ? data : JSON.stringify(data, null, 2) - }` - - throw new BigcommerceApiError(msg, res, data) - } - - if (res.status !== 204 && !isJSON) { - throw new BigcommerceApiError( - `Fetch to Bigcommerce API failed, expected JSON content but found: ${contentType}`, - res - ) - } - - // If something was removed, the response will be empty - return res.status === 204 ? null : await res.json() - } -export default fetchStoreApi - -function getRawHeaders(res: Response) { - const headers: { [key: string]: string } = {} - - res.headers.forEach((value, key) => { - headers[key] = value - }) - - return headers -} - -function getTextOrNull(res: Response) { - try { - return res.text() - } catch (err) { - return null - } -} diff --git a/framework/bigcommerce/api/utils/fetch.ts b/framework/bigcommerce/api/utils/fetch.ts deleted file mode 100644 index 9d9fff3ed..000000000 --- a/framework/bigcommerce/api/utils/fetch.ts +++ /dev/null @@ -1,3 +0,0 @@ -import zeitFetch from '@vercel/fetch' - -export default zeitFetch() diff --git a/framework/bigcommerce/api/utils/filter-edges.ts b/framework/bigcommerce/api/utils/filter-edges.ts deleted file mode 100644 index 09cd20640..000000000 --- a/framework/bigcommerce/api/utils/filter-edges.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default function filterEdges( - edges: (T | null | undefined)[] | null | undefined -) { - return edges?.filter((edge): edge is T => !!edge) ?? [] -} diff --git a/framework/bigcommerce/api/utils/get-cart-cookie.ts b/framework/bigcommerce/api/utils/get-cart-cookie.ts deleted file mode 100644 index 7ca6cd5e4..000000000 --- a/framework/bigcommerce/api/utils/get-cart-cookie.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { serialize, CookieSerializeOptions } from 'cookie' - -export default function getCartCookie( - name: string, - cartId?: string, - maxAge?: number -) { - const options: CookieSerializeOptions = - cartId && maxAge - ? { - maxAge, - expires: new Date(Date.now() + maxAge * 1000), - secure: process.env.NODE_ENV === 'production', - path: '/', - sameSite: 'lax', - } - : { maxAge: -1, path: '/' } // Removes the cookie - - return serialize(name, cartId || '', options) -} diff --git a/framework/bigcommerce/api/utils/get-customer-id.ts b/framework/bigcommerce/api/utils/get-customer-id.ts deleted file mode 100644 index 7efeeed3c..000000000 --- a/framework/bigcommerce/api/utils/get-customer-id.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { GetCustomerIdQuery } from '../../schema' -import type { BigcommerceConfig } from '../' - -export const getCustomerIdQuery = /* GraphQL */ ` - query getCustomerId { - customer { - entityId - } - } -` - -async function getCustomerId({ - customerToken, - config, -}: { - customerToken: string - config: BigcommerceConfig -}): Promise { - const { data } = await config.fetch( - getCustomerIdQuery, - undefined, - { - headers: { - cookie: `${config.customerCookie}=${customerToken}`, - }, - } - ) - - return String(data?.customer?.entityId) -} - -export default getCustomerId diff --git a/framework/bigcommerce/api/utils/parse-item.ts b/framework/bigcommerce/api/utils/parse-item.ts deleted file mode 100644 index bb59a6ec4..000000000 --- a/framework/bigcommerce/api/utils/parse-item.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { WishlistItemBody } from '../../types/wishlist' -import type { CartItemBody, OptionSelections } from '../../types/cart' - -type BCWishlistItemBody = { - product_id: number - variant_id: number -} - -type BCCartItemBody = { - product_id: number - variant_id: number - quantity?: number - option_selections?: OptionSelections[] -} - -export const parseWishlistItem = ( - item: WishlistItemBody -): BCWishlistItemBody => ({ - product_id: Number(item.productId), - variant_id: Number(item.variantId), -}) - -export const parseCartItem = (item: CartItemBody): BCCartItemBody => ({ - quantity: item.quantity, - product_id: Number(item.productId), - variant_id: Number(item.variantId), - option_selections: item.optionSelections, -}) diff --git a/framework/bigcommerce/api/utils/set-product-locale-meta.ts b/framework/bigcommerce/api/utils/set-product-locale-meta.ts deleted file mode 100644 index 767286477..000000000 --- a/framework/bigcommerce/api/utils/set-product-locale-meta.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { ProductNode } from '../operations/get-all-products' -import type { RecursivePartial } from './types' - -export default function setProductLocaleMeta( - node: RecursivePartial -) { - if (node.localeMeta?.edges) { - node.localeMeta.edges = node.localeMeta.edges.filter((edge) => { - const { key, value } = edge?.node ?? {} - if (key && key in node) { - ;(node as any)[key] = value - return false - } - return true - }) - - if (!node.localeMeta.edges.length) { - delete node.localeMeta - } - } -} diff --git a/framework/bigcommerce/api/utils/types.ts b/framework/bigcommerce/api/utils/types.ts deleted file mode 100644 index 56f9c1728..000000000 --- a/framework/bigcommerce/api/utils/types.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type RecursivePartial = { - [P in keyof T]?: RecursivePartial -} - -export type RecursiveRequired = { - [P in keyof T]-?: RecursiveRequired -} diff --git a/framework/bigcommerce/auth/index.ts b/framework/bigcommerce/auth/index.ts deleted file mode 100644 index 36e757a89..000000000 --- a/framework/bigcommerce/auth/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as useLogin } from './use-login' -export { default as useLogout } from './use-logout' -export { default as useSignup } from './use-signup' diff --git a/framework/bigcommerce/auth/use-login.tsx b/framework/bigcommerce/auth/use-login.tsx deleted file mode 100644 index d366b5260..000000000 --- a/framework/bigcommerce/auth/use-login.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useLogin, { UseLogin } from '@commerce/auth/use-login' -import type { LoginHook } from '../types/login' -import useCustomer from '../customer/use-customer' - -export default useLogin as UseLogin - -export const handler: MutationHook = { - fetchOptions: { - url: '/api/login', - method: 'POST', - }, - async fetcher({ input: { email, password }, options, fetch }) { - if (!(email && password)) { - throw new CommerceError({ - message: - 'An email and password are required to login', - }) - } - - return fetch({ - ...options, - body: { email, password }, - }) - }, - useHook: ({ fetch }) => () => { - const { revalidate } = useCustomer() - - return useCallback( - async function login(input) { - const data = await fetch({ input }) - await revalidate() - return data - }, - [fetch, revalidate] - ) - }, -} diff --git a/framework/bigcommerce/auth/use-logout.tsx b/framework/bigcommerce/auth/use-logout.tsx deleted file mode 100644 index e75563e04..000000000 --- a/framework/bigcommerce/auth/use-logout.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import useLogout, { UseLogout } from '@commerce/auth/use-logout' -import type { LogoutHook } from '../types/logout' -import useCustomer from '../customer/use-customer' - -export default useLogout as UseLogout - -export const handler: MutationHook = { - fetchOptions: { - url: '/api/logout', - method: 'GET', - }, - useHook: ({ fetch }) => () => { - const { mutate } = useCustomer() - - return useCallback( - async function logout() { - const data = await fetch() - await mutate(null, false) - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/bigcommerce/auth/use-signup.tsx b/framework/bigcommerce/auth/use-signup.tsx deleted file mode 100644 index da06fd3eb..000000000 --- a/framework/bigcommerce/auth/use-signup.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useSignup, { UseSignup } from '@commerce/auth/use-signup' -import type { SignupHook } from '../types/signup' -import useCustomer from '../customer/use-customer' - -export default useSignup as UseSignup - -export const handler: MutationHook = { - fetchOptions: { - url: '/api/signup', - method: 'POST', - }, - async fetcher({ - input: { firstName, lastName, email, password }, - options, - fetch, - }) { - if (!(firstName && lastName && email && password)) { - throw new CommerceError({ - message: - 'A first name, last name, email and password are required to signup', - }) - } - - return fetch({ - ...options, - body: { firstName, lastName, email, password }, - }) - }, - useHook: ({ fetch }) => () => { - const { revalidate } = useCustomer() - - return useCallback( - async function signup(input) { - const data = await fetch({ input }) - await revalidate() - return data - }, - [fetch, revalidate] - ) - }, -} diff --git a/framework/bigcommerce/cart/index.ts b/framework/bigcommerce/cart/index.ts deleted file mode 100644 index 3b8ba990e..000000000 --- a/framework/bigcommerce/cart/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { default as useCart } from './use-cart' -export { default as useAddItem } from './use-add-item' -export { default as useRemoveItem } from './use-remove-item' -export { default as useUpdateItem } from './use-update-item' diff --git a/framework/bigcommerce/cart/use-add-item.tsx b/framework/bigcommerce/cart/use-add-item.tsx deleted file mode 100644 index 1ac6ac6f8..000000000 --- a/framework/bigcommerce/cart/use-add-item.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useAddItem, { UseAddItem } from '@commerce/cart/use-add-item' -import type { AddItemHook } from '@commerce/types/cart' -import useCart from './use-cart' - -export default useAddItem as UseAddItem - -export const handler: MutationHook = { - fetchOptions: { - url: '/api/cart', - method: 'POST', - }, - async fetcher({ input: item, options, fetch }) { - if ( - item.quantity && - (!Number.isInteger(item.quantity) || item.quantity! < 1) - ) { - throw new CommerceError({ - message: 'The item quantity has to be a valid integer greater than 0', - }) - } - - const data = await fetch({ - ...options, - body: { item }, - }) - - return data - }, - useHook: ({ fetch }) => () => { - const { mutate } = useCart() - - return useCallback( - async function addItem(input) { - const data = await fetch({ input }) - await mutate(data, false) - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/bigcommerce/cart/use-cart.tsx b/framework/bigcommerce/cart/use-cart.tsx deleted file mode 100644 index 4ba1724d9..000000000 --- a/framework/bigcommerce/cart/use-cart.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { useMemo } from 'react' -import { SWRHook } from '@commerce/utils/types' -import useCart, { UseCart } from '@commerce/cart/use-cart' -import type { GetCartHook } from '@commerce/types/cart' - -export default useCart as UseCart - -export const handler: SWRHook = { - fetchOptions: { - url: '/api/cart', - method: 'GET', - }, - useHook: ({ useData }) => (input) => { - const response = useData({ - swrOptions: { revalidateOnFocus: false, ...input?.swrOptions }, - }) - - return useMemo( - () => - Object.create(response, { - isEmpty: { - get() { - return (response.data?.lineItems.length ?? 0) <= 0 - }, - enumerable: true, - }, - }), - [response] - ) - }, -} diff --git a/framework/bigcommerce/cart/use-remove-item.tsx b/framework/bigcommerce/cart/use-remove-item.tsx deleted file mode 100644 index 1376f29ce..000000000 --- a/framework/bigcommerce/cart/use-remove-item.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { useCallback } from 'react' -import type { - MutationHookContext, - HookFetcherContext, -} from '@commerce/utils/types' -import { ValidationError } from '@commerce/utils/errors' -import useRemoveItem, { UseRemoveItem } from '@commerce/cart/use-remove-item' -import type { Cart, LineItem, RemoveItemHook } from '@commerce/types/cart' -import useCart from './use-cart' - -export type RemoveItemFn = T extends LineItem - ? (input?: RemoveItemActionInput) => Promise - : (input: RemoveItemActionInput) => Promise - -export type RemoveItemActionInput = T extends LineItem - ? Partial - : RemoveItemHook['actionInput'] - -export default useRemoveItem as UseRemoveItem - -export const handler = { - fetchOptions: { - url: '/api/cart', - method: 'DELETE', - }, - async fetcher({ - input: { itemId }, - options, - fetch, - }: HookFetcherContext) { - return await fetch({ ...options, body: { itemId } }) - }, - useHook: ({ fetch }: MutationHookContext) => < - T extends LineItem | undefined = undefined - >( - ctx: { item?: T } = {} - ) => { - const { item } = ctx - const { mutate } = useCart() - const removeItem: RemoveItemFn = async (input) => { - const itemId = input?.id ?? item?.id - - if (!itemId) { - throw new ValidationError({ - message: 'Invalid input used for this operation', - }) - } - - const data = await fetch({ input: { itemId } }) - await mutate(data, false) - return data - } - - return useCallback(removeItem as RemoveItemFn, [fetch, mutate]) - }, -} diff --git a/framework/bigcommerce/cart/use-update-item.tsx b/framework/bigcommerce/cart/use-update-item.tsx deleted file mode 100644 index 0f9f5754d..000000000 --- a/framework/bigcommerce/cart/use-update-item.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { useCallback } from 'react' -import debounce from 'lodash.debounce' -import type { - MutationHookContext, - HookFetcherContext, -} from '@commerce/utils/types' -import { ValidationError } from '@commerce/utils/errors' -import useUpdateItem, { UseUpdateItem } from '@commerce/cart/use-update-item' -import type { LineItem, UpdateItemHook } from '@commerce/types/cart' -import { handler as removeItemHandler } from './use-remove-item' -import useCart from './use-cart' - -export type UpdateItemActionInput = T extends LineItem - ? Partial - : UpdateItemHook['actionInput'] - -export default useUpdateItem as UseUpdateItem - -export const handler = { - fetchOptions: { - url: '/api/cart', - method: 'PUT', - }, - async fetcher({ - input: { itemId, item }, - options, - fetch, - }: HookFetcherContext) { - if (Number.isInteger(item.quantity)) { - // Also allow the update hook to remove an item if the quantity is lower than 1 - if (item.quantity! < 1) { - return removeItemHandler.fetcher({ - options: removeItemHandler.fetchOptions, - input: { itemId }, - fetch, - }) - } - } else if (item.quantity) { - throw new ValidationError({ - message: 'The item quantity has to be a valid integer', - }) - } - - return await fetch({ - ...options, - body: { itemId, item }, - }) - }, - useHook: ({ fetch }: MutationHookContext) => < - T extends LineItem | undefined = undefined - >( - ctx: { - item?: T - wait?: number - } = {} - ) => { - const { item } = ctx - const { mutate } = useCart() as any - - return useCallback( - debounce(async (input: UpdateItemActionInput) => { - const itemId = input.id ?? item?.id - const productId = input.productId ?? item?.productId - const variantId = input.productId ?? item?.variantId - - if (!itemId || !productId || !variantId) { - throw new ValidationError({ - message: 'Invalid input used for this operation', - }) - } - - const data = await fetch({ - input: { - itemId, - item: { productId, variantId, quantity: input.quantity }, - }, - }) - await mutate(data, false) - return data - }, ctx.wait ?? 500), - [fetch, mutate] - ) - }, -} diff --git a/framework/bigcommerce/commerce.config.json b/framework/bigcommerce/commerce.config.json deleted file mode 100644 index 89ce5625c..000000000 --- a/framework/bigcommerce/commerce.config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "provider": "bigcommerce", - "features": { - "wishlist": true, - "customerAuth": true - } -} diff --git a/framework/bigcommerce/customer/index.ts b/framework/bigcommerce/customer/index.ts deleted file mode 100644 index 6c903ecc5..000000000 --- a/framework/bigcommerce/customer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as useCustomer } from './use-customer' diff --git a/framework/bigcommerce/customer/use-customer.tsx b/framework/bigcommerce/customer/use-customer.tsx deleted file mode 100644 index 238b1229b..000000000 --- a/framework/bigcommerce/customer/use-customer.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { SWRHook } from '@commerce/utils/types' -import useCustomer, { UseCustomer } from '@commerce/customer/use-customer' -import type { CustomerHook } from '../types/customer' - -export default useCustomer as UseCustomer - -export const handler: SWRHook = { - fetchOptions: { - url: '/api/customer', - method: 'GET', - }, - async fetcher({ options, fetch }) { - const data = await fetch(options) - return data?.customer ?? null - }, - useHook: ({ useData }) => (input) => { - return useData({ - swrOptions: { - revalidateOnFocus: false, - ...input?.swrOptions, - }, - }) - }, -} diff --git a/framework/bigcommerce/fetcher.ts b/framework/bigcommerce/fetcher.ts deleted file mode 100644 index f8ca0c578..000000000 --- a/framework/bigcommerce/fetcher.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { FetcherError } from '@commerce/utils/errors' -import type { Fetcher } from '@commerce/utils/types' - -async function getText(res: Response) { - try { - return (await res.text()) || res.statusText - } catch (error) { - return res.statusText - } -} - -async function getError(res: Response) { - if (res.headers.get('Content-Type')?.includes('application/json')) { - const data = await res.json() - return new FetcherError({ errors: data.errors, status: res.status }) - } - return new FetcherError({ message: await getText(res), status: res.status }) -} - -const fetcher: Fetcher = async ({ - url, - method = 'GET', - variables, - body: bodyObj, -}) => { - const hasBody = Boolean(variables || bodyObj) - const body = hasBody - ? JSON.stringify(variables ? { variables } : bodyObj) - : undefined - const headers = hasBody ? { 'Content-Type': 'application/json' } : undefined - const res = await fetch(url!, { method, body, headers }) - - if (res.ok) { - const { data } = await res.json() - return data - } - - throw await getError(res) -} - -export default fetcher diff --git a/framework/bigcommerce/index.tsx b/framework/bigcommerce/index.tsx deleted file mode 100644 index 024e54b56..000000000 --- a/framework/bigcommerce/index.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import type { ReactNode } from 'react' -import { - CommerceConfig, - CommerceProvider as CoreCommerceProvider, - useCommerce as useCoreCommerce, -} from '@commerce' -import { bigcommerceProvider } from './provider' -import type { BigcommerceProvider } from './provider' - -export { bigcommerceProvider } -export type { BigcommerceProvider } - -export const bigcommerceConfig: CommerceConfig = { - locale: 'en-us', - cartCookie: 'bc_cartId', -} - -export type BigcommerceConfig = Partial - -export type BigcommerceProps = { - children?: ReactNode - locale: string -} & BigcommerceConfig - -export function CommerceProvider({ children, ...config }: BigcommerceProps) { - return ( - - {children} - - ) -} - -export const useCommerce = () => useCoreCommerce() diff --git a/framework/bigcommerce/lib/get-slug.ts b/framework/bigcommerce/lib/get-slug.ts deleted file mode 100644 index 329c5a27e..000000000 --- a/framework/bigcommerce/lib/get-slug.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Remove trailing and leading slash, usually included in nodes -// returned by the BigCommerce API -const getSlug = (path: string) => path.replace(/^\/|\/$/g, '') - -export default getSlug diff --git a/framework/bigcommerce/lib/immutability.ts b/framework/bigcommerce/lib/immutability.ts deleted file mode 100644 index 488d3570f..000000000 --- a/framework/bigcommerce/lib/immutability.ts +++ /dev/null @@ -1,13 +0,0 @@ -import update, { Context } from 'immutability-helper' - -const c = new Context() - -c.extend('$auto', function (value, object) { - return object ? c.update(object, value) : c.update({}, value) -}) - -c.extend('$autoArray', function (value, object) { - return object ? c.update(object, value) : c.update([], value) -}) - -export default c.update diff --git a/framework/bigcommerce/lib/normalize.ts b/framework/bigcommerce/lib/normalize.ts deleted file mode 100644 index 82a22de00..000000000 --- a/framework/bigcommerce/lib/normalize.ts +++ /dev/null @@ -1,136 +0,0 @@ -import type { Product } from '../types/product' -import type { Cart, BigcommerceCart, LineItem } from '../types/cart' -import type { Page } from '../types/page' -import type { BCCategory, Category } from '../types/site' -import { definitions } from '../api/definitions/store-content' -import update from './immutability' -import getSlug from './get-slug' - -function normalizeProductOption(productOption: any) { - const { - node: { - entityId, - values: { edges = [] } = {}, - ...rest - }, - } = productOption - - return { - id: entityId, - values: edges?.map(({ node }: any) => node), - ...rest, - } -} - -export function normalizeProduct(productNode: any): Product { - const { - entityId: id, - productOptions, - prices, - path, - id: _, - options: _0, - } = productNode - - return update(productNode, { - id: { $set: String(id) }, - images: { - $apply: ({ edges }: any) => - edges?.map(({ node: { urlOriginal, altText, ...rest } }: any) => ({ - url: urlOriginal, - alt: altText, - ...rest, - })), - }, - variants: { - $apply: ({ edges }: any) => - edges?.map(({ node: { entityId, productOptions, ...rest } }: any) => ({ - id: entityId, - options: productOptions?.edges - ? productOptions.edges.map(normalizeProductOption) - : [], - ...rest, - })), - }, - options: { - $set: productOptions.edges - ? productOptions?.edges.map(normalizeProductOption) - : [], - }, - brand: { - $apply: (brand: any) => (brand?.entityId ? brand?.entityId : null), - }, - slug: { - $set: path?.replace(/^\/+|\/+$/g, ''), - }, - price: { - $set: { - value: prices?.price.value, - currencyCode: prices?.price.currencyCode, - }, - }, - $unset: ['entityId'], - }) -} - -export function normalizePage(page: definitions['page_Full']): Page { - return { - id: String(page.id), - name: page.name, - is_visible: page.is_visible, - sort_order: page.sort_order, - body: page.body, - } -} - -export function normalizeCart(data: BigcommerceCart): Cart { - return { - id: data.id, - customerId: String(data.customer_id), - email: data.email, - createdAt: data.created_time, - currency: data.currency, - taxesIncluded: data.tax_included, - lineItems: data.line_items.physical_items.map(normalizeLineItem), - lineItemsSubtotalPrice: data.base_amount, - subtotalPrice: data.base_amount + data.discount_amount, - totalPrice: data.cart_amount, - discounts: data.discounts?.map((discount) => ({ - value: discount.discounted_amount, - })), - } -} - -function normalizeLineItem(item: any): LineItem { - return { - id: item.id, - variantId: String(item.variant_id), - productId: String(item.product_id), - name: item.name, - quantity: item.quantity, - variant: { - id: String(item.variant_id), - sku: item.sku, - name: item.name, - image: { - url: item.image_url, - }, - requiresShipping: item.is_require_shipping, - price: item.sale_price, - listPrice: item.list_price, - }, - path: item.url.split('/')[3], - discounts: item.discounts.map((discount: any) => ({ - value: discount.discounted_amount, - })), - } -} - -export function normalizeCategory(category: BCCategory): Category { - return { - id: `${category.entityId}`, - name: category.name, - slug: getSlug(category.path), - path: category.path, - } -} diff --git a/framework/bigcommerce/next.config.js b/framework/bigcommerce/next.config.js deleted file mode 100644 index f33b16630..000000000 --- a/framework/bigcommerce/next.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const commerce = require('./commerce.config.json') - -module.exports = { - commerce, - images: { - domains: ['cdn11.bigcommerce.com'], - }, -} diff --git a/framework/bigcommerce/product/index.ts b/framework/bigcommerce/product/index.ts deleted file mode 100644 index 426a3edcd..000000000 --- a/framework/bigcommerce/product/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as usePrice } from './use-price' -export { default as useSearch } from './use-search' diff --git a/framework/bigcommerce/product/use-price.tsx b/framework/bigcommerce/product/use-price.tsx deleted file mode 100644 index 0174faf5e..000000000 --- a/framework/bigcommerce/product/use-price.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export * from '@commerce/product/use-price' -export { default } from '@commerce/product/use-price' diff --git a/framework/bigcommerce/product/use-search.tsx b/framework/bigcommerce/product/use-search.tsx deleted file mode 100644 index cd6c34612..000000000 --- a/framework/bigcommerce/product/use-search.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { SWRHook } from '@commerce/utils/types' -import useSearch, { UseSearch } from '@commerce/product/use-search' -import type { SearchProductsHook } from '../types/product' - -export default useSearch as UseSearch - -export type SearchProductsInput = { - search?: string - categoryId?: number | string - brandId?: number - sort?: string - locale?: string -} - -export const handler: SWRHook = { - fetchOptions: { - url: '/api/catalog/products', - method: 'GET', - }, - fetcher({ input: { search, categoryId, brandId, sort }, options, fetch }) { - // Use a dummy base as we only care about the relative path - const url = new URL(options.url!, 'http://a') - - if (search) url.searchParams.set('search', search) - if (Number.isInteger(Number(categoryId))) - url.searchParams.set('categoryId', String(categoryId)) - if (Number.isInteger(brandId)) - url.searchParams.set('brandId', String(brandId)) - if (sort) url.searchParams.set('sort', sort) - - return fetch({ - url: url.pathname + url.search, - method: options.method, - }) - }, - useHook: ({ useData }) => (input = {}) => { - return useData({ - input: [ - ['search', input.search], - ['categoryId', input.categoryId], - ['brandId', input.brandId], - ['sort', input.sort], - ], - swrOptions: { - revalidateOnFocus: false, - ...input.swrOptions, - }, - }) - }, -} diff --git a/framework/bigcommerce/provider.ts b/framework/bigcommerce/provider.ts deleted file mode 100644 index 196855438..000000000 --- a/framework/bigcommerce/provider.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { handler as useCart } from './cart/use-cart' -import { handler as useAddItem } from './cart/use-add-item' -import { handler as useUpdateItem } from './cart/use-update-item' -import { handler as useRemoveItem } from './cart/use-remove-item' - -import { handler as useWishlist } from './wishlist/use-wishlist' -import { handler as useWishlistAddItem } from './wishlist/use-add-item' -import { handler as useWishlistRemoveItem } from './wishlist/use-remove-item' - -import { handler as useCustomer } from './customer/use-customer' -import { handler as useSearch } from './product/use-search' - -import { handler as useLogin } from './auth/use-login' -import { handler as useLogout } from './auth/use-logout' -import { handler as useSignup } from './auth/use-signup' - -import fetcher from './fetcher' - -export const bigcommerceProvider = { - locale: 'en-us', - cartCookie: 'bc_cartId', - fetcher, - cart: { useCart, useAddItem, useUpdateItem, useRemoveItem }, - wishlist: { - useWishlist, - useAddItem: useWishlistAddItem, - useRemoveItem: useWishlistRemoveItem, - }, - customer: { useCustomer }, - products: { useSearch }, - auth: { useLogin, useLogout, useSignup }, -} - -export type BigcommerceProvider = typeof bigcommerceProvider diff --git a/framework/bigcommerce/schema.d.ts b/framework/bigcommerce/schema.d.ts deleted file mode 100644 index 04824e263..000000000 --- a/framework/bigcommerce/schema.d.ts +++ /dev/null @@ -1,2064 +0,0 @@ -export type Maybe = T | null -export type Exact = { - [K in keyof T]: T[K] -} -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string - String: string - Boolean: boolean - Int: number - Float: number - DateTime: any - /** The `BigDecimal` scalar type represents signed fractional values with arbitrary precision. */ - BigDecimal: any - /** The `Long` scalar type represents non-fractional signed whole numeric values. Long can represent values between -(2^63) and 2^63 - 1. */ - Long: any -} - -/** Login result */ -export type LoginResult = { - __typename?: 'LoginResult' - /** The result of a login */ - result: Scalars['String'] -} - -/** Logout result */ -export type LogoutResult = { - __typename?: 'LogoutResult' - /** The result of a logout */ - result: Scalars['String'] -} - -export type Mutation = { - __typename?: 'Mutation' - login: LoginResult - logout: LogoutResult -} - -export type MutationLoginArgs = { - email: Scalars['String'] - password: Scalars['String'] -} - -/** Aggregated */ -export type Aggregated = { - __typename?: 'Aggregated' - /** Number of available products in stock. This can be 'null' if inventory is not set orif the store's Inventory Settings disable displaying stock levels on the storefront. */ - availableToSell: Scalars['Long'] - /** Indicates a threshold low-stock level. This can be 'null' if the inventory warning level is not set or if the store's Inventory Settings disable displaying stock levels on the storefront. */ - warningLevel: Scalars['Int'] -} - -/** Aggregated Product Inventory */ -export type AggregatedInventory = { - __typename?: 'AggregatedInventory' - /** Number of available products in stock. This can be 'null' if inventory is not set orif the store's Inventory Settings disable displaying stock levels on the storefront. */ - availableToSell: Scalars['Int'] - /** Indicates a threshold low-stock level. This can be 'null' if the inventory warning level is not set or if the store's Inventory Settings disable displaying stock levels on the storefront. */ - warningLevel: Scalars['Int'] -} - -/** Brand */ -export type Brand = Node & { - __typename?: 'Brand' - /** The ID of an object */ - id: Scalars['ID'] - /** Id of the brand. */ - entityId: Scalars['Int'] - /** Name of the brand. */ - name: Scalars['String'] - /** Default image for brand. */ - defaultImage?: Maybe - /** Page title for the brand. */ - pageTitle: Scalars['String'] - /** Meta description for the brand. */ - metaDesc: Scalars['String'] - /** Meta keywords for the brand. */ - metaKeywords: Array - /** Search keywords for the brand. */ - searchKeywords: Array - /** Path for the brand page. */ - path: Scalars['String'] - products: ProductConnection - /** Metafield data related to a brand. */ - metafields: MetafieldConnection -} - -/** Brand */ -export type BrandProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Brand */ -export type BrandMetafieldsArgs = { - namespace: Scalars['String'] - keys?: Maybe> - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** A connection to a list of items. */ -export type BrandConnection = { - __typename?: 'BrandConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type BrandEdge = { - __typename?: 'BrandEdge' - /** The item at the end of the edge. */ - node: Brand - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Breadcrumb */ -export type Breadcrumb = { - __typename?: 'Breadcrumb' - /** Category id. */ - entityId: Scalars['Int'] - /** Name of the category. */ - name: Scalars['String'] -} - -/** A connection to a list of items. */ -export type BreadcrumbConnection = { - __typename?: 'BreadcrumbConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type BreadcrumbEdge = { - __typename?: 'BreadcrumbEdge' - /** The item at the end of the edge. */ - node: Breadcrumb - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Bulk pricing tier that sets a fixed price for the product or variant. */ -export type BulkPricingFixedPriceDiscount = BulkPricingTier & { - __typename?: 'BulkPricingFixedPriceDiscount' - /** This price will override the current product price. */ - price: Scalars['BigDecimal'] - /** Minimum item quantity that applies to this bulk pricing tier. */ - minimumQuantity: Scalars['Int'] - /** Maximum item quantity that applies to this bulk pricing tier - if not defined then the tier does not have an upper bound. */ - maximumQuantity?: Maybe -} - -/** Bulk pricing tier that reduces the price of the product or variant by a percentage. */ -export type BulkPricingPercentageDiscount = BulkPricingTier & { - __typename?: 'BulkPricingPercentageDiscount' - /** The percentage that will be removed from the product price. */ - percentOff: Scalars['BigDecimal'] - /** Minimum item quantity that applies to this bulk pricing tier. */ - minimumQuantity: Scalars['Int'] - /** Maximum item quantity that applies to this bulk pricing tier - if not defined then the tier does not have an upper bound. */ - maximumQuantity?: Maybe -} - -/** Bulk pricing tier that will subtract an amount from the price of the product or variant. */ -export type BulkPricingRelativePriceDiscount = BulkPricingTier & { - __typename?: 'BulkPricingRelativePriceDiscount' - /** The price of the product/variant will be reduced by this priceAdjustment. */ - priceAdjustment: Scalars['BigDecimal'] - /** Minimum item quantity that applies to this bulk pricing tier. */ - minimumQuantity: Scalars['Int'] - /** Maximum item quantity that applies to this bulk pricing tier - if not defined then the tier does not have an upper bound. */ - maximumQuantity?: Maybe -} - -/** A set of bulk pricing tiers that define price discounts which apply when purchasing specified quantities of a product or variant. */ -export type BulkPricingTier = { - /** Minimum item quantity that applies to this bulk pricing tier. */ - minimumQuantity: Scalars['Int'] - /** Maximum item quantity that applies to this bulk pricing tier - if not defined then the tier does not have an upper bound. */ - maximumQuantity?: Maybe -} - -/** Product Option */ -export type CatalogProductOption = { - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] -} - -/** Product Option Value */ -export type CatalogProductOptionValue = { - /** Unique ID for the option value. */ - entityId: Scalars['Int'] - /** Label for the option value. */ - label: Scalars['String'] - /** Indicates whether this value is the chosen default selected value. */ - isDefault: Scalars['Boolean'] -} - -/** Category */ -export type Category = Node & { - __typename?: 'Category' - /** The ID of an object */ - id: Scalars['ID'] - /** Unique ID for the category. */ - entityId: Scalars['Int'] - /** Category name. */ - name: Scalars['String'] - /** Category path. */ - path: Scalars['String'] - /** Default image for the category. */ - defaultImage?: Maybe - /** Category description. */ - description: Scalars['String'] - /** Category breadcrumbs. */ - breadcrumbs: BreadcrumbConnection - products: ProductConnection - /** Metafield data related to a category. */ - metafields: MetafieldConnection -} - -/** Category */ -export type CategoryBreadcrumbsArgs = { - depth: Scalars['Int'] - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Category */ -export type CategoryProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Category */ -export type CategoryMetafieldsArgs = { - namespace: Scalars['String'] - keys?: Maybe> - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** A connection to a list of items. */ -export type CategoryConnection = { - __typename?: 'CategoryConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type CategoryEdge = { - __typename?: 'CategoryEdge' - /** The item at the end of the edge. */ - node: Category - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** An item in a tree of categories. */ -export type CategoryTreeItem = { - __typename?: 'CategoryTreeItem' - /** The id category. */ - entityId: Scalars['Int'] - /** The name of category. */ - name: Scalars['String'] - /** Path assigned to this category */ - path: Scalars['String'] - /** The description of this category. */ - description: Scalars['String'] - /** The number of products in this category. */ - productCount: Scalars['Int'] - /** Subcategories of this category */ - children: Array -} - -/** A simple yes/no question represented by a checkbox. */ -export type CheckboxOption = CatalogProductOption & { - __typename?: 'CheckboxOption' - /** Indicates the default checked status. */ - checkedByDefault: Scalars['Boolean'] - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] -} - -/** Contact field */ -export type ContactField = { - __typename?: 'ContactField' - /** Store address line. */ - address: Scalars['String'] - /** Store country. */ - country: Scalars['String'] - /** Store address type. */ - addressType: Scalars['String'] - /** Store email. */ - email: Scalars['String'] - /** Store phone number. */ - phone: Scalars['String'] -} - -/** Custom field */ -export type CustomField = { - __typename?: 'CustomField' - /** Custom field id. */ - entityId: Scalars['Int'] - /** Name of the custom field. */ - name: Scalars['String'] - /** Value of the custom field. */ - value: Scalars['String'] -} - -/** A connection to a list of items. */ -export type CustomFieldConnection = { - __typename?: 'CustomFieldConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type CustomFieldEdge = { - __typename?: 'CustomFieldEdge' - /** The item at the end of the edge. */ - node: CustomField - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** A customer that shops on a store */ -export type Customer = { - __typename?: 'Customer' - /** The ID of the customer. */ - entityId: Scalars['Int'] - /** The company name of the customer. */ - company: Scalars['String'] - /** The customer group id of the customer. */ - customerGroupId: Scalars['Int'] - /** The email address of the customer. */ - email: Scalars['String'] - /** The first name of the customer. */ - firstName: Scalars['String'] - /** The last name of the customer. */ - lastName: Scalars['String'] - /** The notes of the customer. */ - notes: Scalars['String'] - /** The phone number of the customer. */ - phone: Scalars['String'] - /** The tax exempt category of the customer. */ - taxExemptCategory: Scalars['String'] - /** Customer addresses count. */ - addressCount: Scalars['Int'] - /** Customer attributes count. */ - attributeCount: Scalars['Int'] - /** Customer store credit. */ - storeCredit: Array - /** Customer attributes. */ - attributes: CustomerAttributes -} - -/** A custom, store-specific attribute for a customer */ -export type CustomerAttribute = { - __typename?: 'CustomerAttribute' - /** The ID of the custom customer attribute */ - entityId: Scalars['Int'] - /** The value of the custom customer attribute */ - value?: Maybe - /** The name of the custom customer attribute */ - name: Scalars['String'] -} - -/** Custom, store-specific customer attributes */ -export type CustomerAttributes = { - __typename?: 'CustomerAttributes' - attribute: CustomerAttribute -} - -/** Custom, store-specific customer attributes */ -export type CustomerAttributesAttributeArgs = { - entityId: Scalars['Int'] -} - -/** A calendar for allowing selection of a date. */ -export type DateFieldOption = CatalogProductOption & { - __typename?: 'DateFieldOption' - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] -} - -/** Date Time Extended */ -export type DateTimeExtended = { - __typename?: 'DateTimeExtended' - /** ISO-8601 formatted date in UTC */ - utc: Scalars['DateTime'] -} - -/** Display field */ -export type DisplayField = { - __typename?: 'DisplayField' - /** Short date format. */ - shortDateFormat: Scalars['String'] - /** Extended date format. */ - extendedDateFormat: Scalars['String'] -} - -/** A form allowing selection and uploading of a file from the user's local computer. */ -export type FileUploadFieldOption = CatalogProductOption & { - __typename?: 'FileUploadFieldOption' - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] -} - -/** Image */ -export type Image = { - __typename?: 'Image' - /** Absolute path to image using store CDN. */ - url: Scalars['String'] - /** Absolute path to original image using store CDN. */ - urlOriginal: Scalars['String'] - /** Text description of an image that can be used for SEO and/or accessibility purposes. */ - altText: Scalars['String'] - /** Indicates whether this is the primary image. */ - isDefault: Scalars['Boolean'] -} - -/** Image */ -export type ImageUrlArgs = { - width: Scalars['Int'] - height?: Maybe -} - -/** A connection to a list of items. */ -export type ImageConnection = { - __typename?: 'ImageConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type ImageEdge = { - __typename?: 'ImageEdge' - /** The item at the end of the edge. */ - node: Image - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** An inventory */ -export type Inventory = { - __typename?: 'Inventory' - /** Locations */ - locations: LocationConnection -} - -/** An inventory */ -export type InventoryLocationsArgs = { - entityIds?: Maybe> - codes?: Maybe> - typeIds?: Maybe> - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Inventory By Locations */ -export type InventoryByLocations = { - __typename?: 'InventoryByLocations' - /** Location id. */ - locationEntityId: Scalars['Long'] - /** Number of available products in stock. */ - availableToSell: Scalars['Long'] - /** Indicates a threshold low-stock level. */ - warningLevel: Scalars['Int'] - /** Indicates whether this product is in stock. */ - isInStock: Scalars['Boolean'] -} - -/** A connection to a list of items. */ -export type LocationConnection = { - __typename?: 'LocationConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type LocationEdge = { - __typename?: 'LocationEdge' - /** The item at the end of the edge. */ - node: InventoryByLocations - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Logo field */ -export type LogoField = { - __typename?: 'LogoField' - /** Logo title. */ - title: Scalars['String'] - /** Store logo image. */ - image: Image -} - -/** Measurement */ -export type Measurement = { - __typename?: 'Measurement' - /** Unformatted weight measurement value. */ - value: Scalars['Float'] - /** Unit of measurement. */ - unit: Scalars['String'] -} - -/** A connection to a list of items. */ -export type MetafieldConnection = { - __typename?: 'MetafieldConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type MetafieldEdge = { - __typename?: 'MetafieldEdge' - /** The item at the end of the edge. */ - node: Metafields - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Key/Value pairs of data attached tied to a resource entity (product, brand, category, etc.) */ -export type Metafields = { - __typename?: 'Metafields' - /** The ID of an object */ - id: Scalars['ID'] - /** The ID of the metafield when referencing via our backend API. */ - entityId: Scalars['Int'] - /** A label for identifying a metafield data value. */ - key: Scalars['String'] - /** A metafield value. */ - value: Scalars['String'] -} - -/** A money object - includes currency code and a money amount */ -export type Money = { - __typename?: 'Money' - /** Currency code of the current money. */ - currencyCode: Scalars['String'] - /** The amount of money. */ - value: Scalars['BigDecimal'] -} - -/** A min and max pair of money objects */ -export type MoneyRange = { - __typename?: 'MoneyRange' - /** Minimum money object. */ - min: Money - /** Maximum money object. */ - max: Money -} - -/** A multi-line text input field, aka a text box. */ -export type MultiLineTextFieldOption = CatalogProductOption & { - __typename?: 'MultiLineTextFieldOption' - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] -} - -/** An option type that has a fixed list of values. */ -export type MultipleChoiceOption = CatalogProductOption & { - __typename?: 'MultipleChoiceOption' - /** The chosen display style for this multiple choice option. */ - displayStyle: Scalars['String'] - /** List of option values. */ - values: ProductOptionValueConnection - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] -} - -/** An option type that has a fixed list of values. */ -export type MultipleChoiceOptionValuesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** A simple multiple choice value comprised of an id and a label. */ -export type MultipleChoiceOptionValue = CatalogProductOptionValue & { - __typename?: 'MultipleChoiceOptionValue' - /** Unique ID for the option value. */ - entityId: Scalars['Int'] - /** Label for the option value. */ - label: Scalars['String'] - /** Indicates whether this value is the chosen default selected value. */ - isDefault: Scalars['Boolean'] -} - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID'] -} - -/** A single line text input field that only accepts numbers. */ -export type NumberFieldOption = CatalogProductOption & { - __typename?: 'NumberFieldOption' - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] -} - -/** A connection to a list of items. */ -export type OptionConnection = { - __typename?: 'OptionConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type OptionEdge = { - __typename?: 'OptionEdge' - /** The item at the end of the edge. */ - node: ProductOption - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** A connection to a list of items. */ -export type OptionValueConnection = { - __typename?: 'OptionValueConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type OptionValueEdge = { - __typename?: 'OptionValueEdge' - /** The item at the end of the edge. */ - node: ProductOptionValue - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type OptionValueId = { - optionEntityId: Scalars['Int'] - valueEntityId: Scalars['Int'] -} - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo' - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean'] - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean'] - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe -} - -/** The min and max range of prices that apply to this product. */ -export type PriceRanges = { - __typename?: 'PriceRanges' - /** Product price min/max range. */ - priceRange: MoneyRange - /** Product retail price min/max range. */ - retailPriceRange?: Maybe -} - -/** The various prices that can be set on a product. */ -export type Prices = { - __typename?: 'Prices' - /** Calculated price of the product. */ - price: Money - /** Sale price of the product. */ - salePrice?: Maybe - /** Original price of the product. */ - basePrice?: Maybe - /** Retail price of the product. */ - retailPrice?: Maybe - /** Minimum advertised price of the product. */ - mapPrice?: Maybe - /** Product price min/max range. */ - priceRange: MoneyRange - /** Product retail price min/max range. */ - retailPriceRange?: Maybe - /** The difference between the retail price (MSRP) and the current price, which can be presented to the shopper as their savings. */ - saved?: Maybe - /** List of bulk pricing tiers applicable to a product or variant. */ - bulkPricing: Array -} - -/** Product */ -export type Product = Node & { - __typename?: 'Product' - /** The ID of an object */ - id: Scalars['ID'] - /** Id of the product. */ - entityId: Scalars['Int'] - /** Default product variant when no options are selected. */ - sku: Scalars['String'] - /** Relative URL path to product page. */ - path: Scalars['String'] - /** Name of the product. */ - name: Scalars['String'] - /** Description of the product. */ - description: Scalars['String'] - /** Description of the product in plain text. */ - plainTextDescription: Scalars['String'] - /** Warranty information of the product. */ - warranty: Scalars['String'] - /** Minimum purchasable quantity for this product in a single order. */ - minPurchaseQuantity?: Maybe - /** Maximum purchasable quantity for this product in a single order. */ - maxPurchaseQuantity?: Maybe - /** Absolute URL path for adding a product to cart. */ - addToCartUrl: Scalars['String'] - /** Absolute URL path for adding a product to customer's wishlist. */ - addToWishlistUrl: Scalars['String'] - /** Prices object determined by supplied product ID, variant ID, and selected option IDs. */ - prices?: Maybe - /** - * The minimum and maximum price of this product based on variant pricing and/or modifier price rules. - * @deprecated Use priceRanges inside prices node instead. - */ - priceRanges?: Maybe - /** Weight of the product. */ - weight?: Maybe - /** Height of the product. */ - height?: Maybe - /** Width of the product. */ - width?: Maybe - /** Depth of the product. */ - depth?: Maybe - /** Product options. */ - options: OptionConnection - /** Product options. */ - productOptions: ProductOptionConnection - /** Summary of the product reviews, includes the total number of reviews submitted and summation of the ratings on the reviews (ratings range from 0-5 per review). */ - reviewSummary: Reviews - /** Type of product, ex: physical, digital */ - type: Scalars['String'] - /** - * The availability state of the product. - * @deprecated Use status inside availabilityV2 instead. - */ - availability: Scalars['String'] - /** - * A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. - * @deprecated Use description inside availabilityV2 instead. - */ - availabilityDescription: Scalars['String'] - /** The availability state of the product. */ - availabilityV2: ProductAvailability - /** List of categories associated with the product. */ - categories: CategoryConnection - /** Brand associated with the product. */ - brand?: Maybe - /** Variants associated with the product. */ - variants: VariantConnection - /** Custom fields of the product. */ - customFields: CustomFieldConnection - /** A list of the images for a product. */ - images: ImageConnection - /** Default image for a product. */ - defaultImage?: Maybe - /** Related products for this product. */ - relatedProducts: RelatedProductsConnection - /** Inventory information of the product. */ - inventory: ProductInventory - /** Metafield data related to a product. */ - metafields: MetafieldConnection - /** - * Product creation date - * @deprecated Alpha version. Do not use in production. - */ - createdAt: DateTimeExtended -} - -/** Product */ -export type ProductPlainTextDescriptionArgs = { - characterLimit?: Maybe -} - -/** Product */ -export type ProductPricesArgs = { - includeTax?: Maybe - currencyCode?: Maybe -} - -/** Product */ -export type ProductPriceRangesArgs = { - includeTax?: Maybe -} - -/** Product */ -export type ProductOptionsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Product */ -export type ProductProductOptionsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Product */ -export type ProductCategoriesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Product */ -export type ProductVariantsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe - entityIds?: Maybe> - optionValueIds?: Maybe> -} - -/** Product */ -export type ProductCustomFieldsArgs = { - names?: Maybe> - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Product */ -export type ProductImagesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Product */ -export type ProductRelatedProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Product */ -export type ProductMetafieldsArgs = { - namespace: Scalars['String'] - keys?: Maybe> - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Product availability */ -export type ProductAvailability = { - /** The availability state of the product. */ - status: ProductAvailabilityStatus - /** A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. */ - description: Scalars['String'] -} - -/** Product availability status */ -export enum ProductAvailabilityStatus { - Available = 'Available', - Preorder = 'Preorder', - Unavailable = 'Unavailable', -} - -/** Available Product */ -export type ProductAvailable = ProductAvailability & { - __typename?: 'ProductAvailable' - /** The availability state of the product. */ - status: ProductAvailabilityStatus - /** A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. */ - description: Scalars['String'] -} - -/** A connection to a list of items. */ -export type ProductConnection = { - __typename?: 'ProductConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type ProductEdge = { - __typename?: 'ProductEdge' - /** The item at the end of the edge. */ - node: Product - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Product Inventory Information */ -export type ProductInventory = { - __typename?: 'ProductInventory' - /** Indicates whether this product is in stock. */ - isInStock: Scalars['Boolean'] - /** Indicates whether this product's inventory is being tracked on variant level. If true, you may wish to check the variants node to understand the true inventory of each individual variant, rather than relying on this product-level aggregate to understand how many items may be added to cart. */ - hasVariantInventory: Scalars['Boolean'] - /** Aggregated product inventory information. This data may not be available if not set or if the store's Inventory Settings have disabled displaying stock levels on the storefront. */ - aggregated?: Maybe -} - -/** Product Option */ -export type ProductOption = { - __typename?: 'ProductOption' - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] - /** Option values. */ - values: OptionValueConnection -} - -/** Product Option */ -export type ProductOptionValuesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** A connection to a list of items. */ -export type ProductOptionConnection = { - __typename?: 'ProductOptionConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type ProductOptionEdge = { - __typename?: 'ProductOptionEdge' - /** The item at the end of the edge. */ - node: CatalogProductOption - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Product Option Value */ -export type ProductOptionValue = { - __typename?: 'ProductOptionValue' - /** Unique ID for the option value. */ - entityId: Scalars['Int'] - /** Label for the option value. */ - label: Scalars['String'] -} - -/** A connection to a list of items. */ -export type ProductOptionValueConnection = { - __typename?: 'ProductOptionValueConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type ProductOptionValueEdge = { - __typename?: 'ProductOptionValueEdge' - /** The item at the end of the edge. */ - node: CatalogProductOptionValue - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** A Product PickList Value - a product to be mapped to the base product if selected. */ -export type ProductPickListOptionValue = CatalogProductOptionValue & { - __typename?: 'ProductPickListOptionValue' - /** The ID of the product associated with this option value. */ - productId: Scalars['Int'] - /** Unique ID for the option value. */ - entityId: Scalars['Int'] - /** Label for the option value. */ - label: Scalars['String'] - /** Indicates whether this value is the chosen default selected value. */ - isDefault: Scalars['Boolean'] -} - -/** PreOrder Product */ -export type ProductPreOrder = ProductAvailability & { - __typename?: 'ProductPreOrder' - /** The message to be shown in the store when a product is put into the pre-order availability state, e.g. "Expected release date is %%DATE%%" */ - message?: Maybe - /** Product release date */ - willBeReleasedAt?: Maybe - /** The availability state of the product. */ - status: ProductAvailabilityStatus - /** A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. */ - description: Scalars['String'] -} - -/** Unavailable Product */ -export type ProductUnavailable = ProductAvailability & { - __typename?: 'ProductUnavailable' - /** The message to be shown in the store when "Call for pricing" is enabled for this product, e.g. "Contact us at 555-5555" */ - message?: Maybe - /** The availability state of the product. */ - status: ProductAvailabilityStatus - /** A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. */ - description: Scalars['String'] -} - -export type Query = { - __typename?: 'Query' - site: Site - /** The currently logged in customer. */ - customer?: Maybe - /** Fetches an object given its ID */ - node?: Maybe - /** @deprecated Alpha version. Do not use in production. */ - inventory: Inventory -} - -export type QueryNodeArgs = { - id: Scalars['ID'] -} - -/** A connection to a list of items. */ -export type RelatedProductsConnection = { - __typename?: 'RelatedProductsConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type RelatedProductsEdge = { - __typename?: 'RelatedProductsEdge' - /** The item at the end of the edge. */ - node: Product - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Review Rating Summary */ -export type Reviews = { - __typename?: 'Reviews' - /** Total number of reviews on product. */ - numberOfReviews: Scalars['Int'] - /** Summation of rating scores from each review. */ - summationOfRatings: Scalars['Int'] -} - -/** route */ -export type Route = { - __typename?: 'Route' - /** node */ - node?: Maybe -} - -/** Store settings information from the control panel. */ -export type Settings = { - __typename?: 'Settings' - /** The name of the store. */ - storeName: Scalars['String'] - /** The hash of the store. */ - storeHash: Scalars['String'] - /** The current store status. */ - status: StorefrontStatusType - /** Logo information for the store. */ - logo: LogoField - /** Contact information for the store. */ - contact?: Maybe - /** Store urls. */ - url: UrlField - /** Store display format information. */ - display: DisplayField - /** Channel ID. */ - channelId: Scalars['Long'] -} - -/** A site */ -export type Site = { - __typename?: 'Site' - categoryTree: Array - /** Details of the brand. */ - brands: BrandConnection - /** Details of the products. */ - products: ProductConnection - /** Details of the newest products. */ - newestProducts: ProductConnection - /** Details of the best selling products. */ - bestSellingProducts: ProductConnection - /** Details of the featured products. */ - featuredProducts: ProductConnection - /** A single product object with variant pricing overlay capabilities. */ - product?: Maybe - /** Route for a node */ - route: Route - /** Store settings. */ - settings?: Maybe -} - -/** A site */ -export type SiteBrandsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe - productEntityIds?: Maybe> -} - -/** A site */ -export type SiteProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe - ids?: Maybe> - entityIds?: Maybe> -} - -/** A site */ -export type SiteNewestProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** A site */ -export type SiteBestSellingProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** A site */ -export type SiteFeaturedProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** A site */ -export type SiteProductArgs = { - id?: Maybe - entityId?: Maybe - variantEntityId?: Maybe - optionValueIds?: Maybe> - sku?: Maybe -} - -/** A site */ -export type SiteRouteArgs = { - path: Scalars['String'] -} - -/** Storefront Mode */ -export enum StorefrontStatusType { - Launched = 'LAUNCHED', - Maintenance = 'MAINTENANCE', - PreLaunch = 'PRE_LAUNCH', - Hibernation = 'HIBERNATION', -} - -/** A swatch option value - swatch values can be associated with a list of hexidecimal colors or an image. */ -export type SwatchOptionValue = CatalogProductOptionValue & { - __typename?: 'SwatchOptionValue' - /** List of up to 3 hex encoded colors to associate with a swatch value. */ - hexColors: Array - /** Absolute path of a swatch texture image. */ - imageUrl?: Maybe - /** Unique ID for the option value. */ - entityId: Scalars['Int'] - /** Label for the option value. */ - label: Scalars['String'] - /** Indicates whether this value is the chosen default selected value. */ - isDefault: Scalars['Boolean'] -} - -/** A swatch option value - swatch values can be associated with a list of hexidecimal colors or an image. */ -export type SwatchOptionValueImageUrlArgs = { - width: Scalars['Int'] - height?: Maybe -} - -/** A single line text input field. */ -export type TextFieldOption = CatalogProductOption & { - __typename?: 'TextFieldOption' - /** Unique ID for the option. */ - entityId: Scalars['Int'] - /** Display name for the option. */ - displayName: Scalars['String'] - /** One of the option values is required to be selected for the checkout. */ - isRequired: Scalars['Boolean'] -} - -/** Url field */ -export type UrlField = { - __typename?: 'UrlField' - /** Store url. */ - vanityUrl: Scalars['String'] - /** CDN url to fetch assets. */ - cdnUrl: Scalars['String'] -} - -/** Variant */ -export type Variant = Node & { - __typename?: 'Variant' - /** The ID of an object */ - id: Scalars['ID'] - /** Id of the variant. */ - entityId: Scalars['Int'] - /** Sku of the variant. */ - sku: Scalars['String'] - /** The variant's weight. If a weight was not explicitly specified on the variant, this will be the product's weight. */ - weight?: Maybe - /** The variant's height. If a height was not explicitly specified on the variant, this will be the product's height. */ - height?: Maybe - /** The variant's width. If a width was not explicitly specified on the variant, this will be the product's width. */ - width?: Maybe - /** The variant's depth. If a depth was not explicitly specified on the variant, this will be the product's depth. */ - depth?: Maybe - /** The options which define a variant. */ - options: OptionConnection - /** Product options that compose this variant. */ - productOptions: ProductOptionConnection - /** Default image for a variant. */ - defaultImage?: Maybe - /** Variant prices */ - prices?: Maybe - /** Variant inventory */ - inventory?: Maybe - /** Metafield data related to a variant. */ - metafields: MetafieldConnection -} - -/** Variant */ -export type VariantOptionsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Variant */ -export type VariantProductOptionsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Variant */ -export type VariantPricesArgs = { - includeTax?: Maybe - currencyCode?: Maybe -} - -/** Variant */ -export type VariantMetafieldsArgs = { - namespace: Scalars['String'] - keys?: Maybe> - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** A connection to a list of items. */ -export type VariantConnection = { - __typename?: 'VariantConnection' - /** Information to aid in pagination. */ - pageInfo: PageInfo - /** A list of edges. */ - edges?: Maybe>> -} - -/** An edge in a connection. */ -export type VariantEdge = { - __typename?: 'VariantEdge' - /** The item at the end of the edge. */ - node: Variant - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Variant Inventory */ -export type VariantInventory = { - __typename?: 'VariantInventory' - /** Aggregated product variant inventory information. This data may not be available if not set or if the store's Inventory Settings have disabled displaying stock levels on the storefront. */ - aggregated?: Maybe - /** Indicates whether this product is in stock. */ - isInStock: Scalars['Boolean'] - /** Inventory by locations. */ - byLocation?: Maybe -} - -/** Variant Inventory */ -export type VariantInventoryByLocationArgs = { - locationEntityIds?: Maybe> - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Please select a currency */ -export enum CurrencyCode { - Adp = 'ADP', - Aed = 'AED', - Afa = 'AFA', - Afn = 'AFN', - Alk = 'ALK', - All = 'ALL', - Amd = 'AMD', - Ang = 'ANG', - Aoa = 'AOA', - Aok = 'AOK', - Aon = 'AON', - Aor = 'AOR', - Ara = 'ARA', - Arl = 'ARL', - Arm = 'ARM', - Arp = 'ARP', - Ars = 'ARS', - Ats = 'ATS', - Aud = 'AUD', - Awg = 'AWG', - Azm = 'AZM', - Azn = 'AZN', - Bad = 'BAD', - Bam = 'BAM', - Ban = 'BAN', - Bbd = 'BBD', - Bdt = 'BDT', - Bec = 'BEC', - Bef = 'BEF', - Bel = 'BEL', - Bgl = 'BGL', - Bgm = 'BGM', - Bgn = 'BGN', - Bgo = 'BGO', - Bhd = 'BHD', - Bif = 'BIF', - Bmd = 'BMD', - Bnd = 'BND', - Bob = 'BOB', - Bol = 'BOL', - Bop = 'BOP', - Bov = 'BOV', - Brb = 'BRB', - Brc = 'BRC', - Bre = 'BRE', - Brl = 'BRL', - Brn = 'BRN', - Brr = 'BRR', - Brz = 'BRZ', - Bsd = 'BSD', - Btn = 'BTN', - Buk = 'BUK', - Bwp = 'BWP', - Byb = 'BYB', - Byr = 'BYR', - Bzd = 'BZD', - Cad = 'CAD', - Cdf = 'CDF', - Che = 'CHE', - Chf = 'CHF', - Chw = 'CHW', - Cle = 'CLE', - Clf = 'CLF', - Clp = 'CLP', - Cnx = 'CNX', - Cny = 'CNY', - Cop = 'COP', - Cou = 'COU', - Crc = 'CRC', - Csd = 'CSD', - Csk = 'CSK', - Cve = 'CVE', - Cyp = 'CYP', - Czk = 'CZK', - Ddm = 'DDM', - Dem = 'DEM', - Djf = 'DJF', - Dkk = 'DKK', - Dop = 'DOP', - Dzd = 'DZD', - Ecs = 'ECS', - Ecv = 'ECV', - Eek = 'EEK', - Egp = 'EGP', - Ern = 'ERN', - Esa = 'ESA', - Esb = 'ESB', - Esp = 'ESP', - Etb = 'ETB', - Eur = 'EUR', - Fim = 'FIM', - Fjd = 'FJD', - Fkp = 'FKP', - Frf = 'FRF', - Gbp = 'GBP', - Gek = 'GEK', - Gel = 'GEL', - Ghc = 'GHC', - Ghs = 'GHS', - Gip = 'GIP', - Gmd = 'GMD', - Gnf = 'GNF', - Gns = 'GNS', - Gqe = 'GQE', - Grd = 'GRD', - Gtq = 'GTQ', - Gwe = 'GWE', - Gwp = 'GWP', - Gyd = 'GYD', - Hkd = 'HKD', - Hnl = 'HNL', - Hrd = 'HRD', - Hrk = 'HRK', - Htg = 'HTG', - Huf = 'HUF', - Idr = 'IDR', - Iep = 'IEP', - Ilp = 'ILP', - Ilr = 'ILR', - Ils = 'ILS', - Inr = 'INR', - Iqd = 'IQD', - Isj = 'ISJ', - Isk = 'ISK', - Itl = 'ITL', - Jmd = 'JMD', - Jod = 'JOD', - Jpy = 'JPY', - Kes = 'KES', - Kgs = 'KGS', - Khr = 'KHR', - Kmf = 'KMF', - Krh = 'KRH', - Kro = 'KRO', - Krw = 'KRW', - Kwd = 'KWD', - Kyd = 'KYD', - Kzt = 'KZT', - Lak = 'LAK', - Lbp = 'LBP', - Lkr = 'LKR', - Lrd = 'LRD', - Lsl = 'LSL', - Ltl = 'LTL', - Ltt = 'LTT', - Luc = 'LUC', - Luf = 'LUF', - Lul = 'LUL', - Lvl = 'LVL', - Lvr = 'LVR', - Lyd = 'LYD', - Mad = 'MAD', - Maf = 'MAF', - Mcf = 'MCF', - Mdc = 'MDC', - Mdl = 'MDL', - Mga = 'MGA', - Mgf = 'MGF', - Mkd = 'MKD', - Mkn = 'MKN', - Mlf = 'MLF', - Mmk = 'MMK', - Mnt = 'MNT', - Mop = 'MOP', - Mro = 'MRO', - Mtl = 'MTL', - Mtp = 'MTP', - Mur = 'MUR', - Mvp = 'MVP', - Mvr = 'MVR', - Mwk = 'MWK', - Mxn = 'MXN', - Mxp = 'MXP', - Mxv = 'MXV', - Myr = 'MYR', - Mze = 'MZE', - Mzm = 'MZM', - Mzn = 'MZN', - Nad = 'NAD', - Ngn = 'NGN', - Nic = 'NIC', - Nio = 'NIO', - Nlg = 'NLG', - Nok = 'NOK', - Npr = 'NPR', - Nzd = 'NZD', - Omr = 'OMR', - Pab = 'PAB', - Pei = 'PEI', - Pen = 'PEN', - Pes = 'PES', - Pgk = 'PGK', - Php = 'PHP', - Pkr = 'PKR', - Pln = 'PLN', - Plz = 'PLZ', - Pte = 'PTE', - Pyg = 'PYG', - Qar = 'QAR', - Rhd = 'RHD', - Rol = 'ROL', - Ron = 'RON', - Rsd = 'RSD', - Rub = 'RUB', - Rur = 'RUR', - Rwf = 'RWF', - Sar = 'SAR', - Sbd = 'SBD', - Scr = 'SCR', - Sdd = 'SDD', - Sdg = 'SDG', - Sdp = 'SDP', - Sek = 'SEK', - Sgd = 'SGD', - Shp = 'SHP', - Sit = 'SIT', - Skk = 'SKK', - Sll = 'SLL', - Sos = 'SOS', - Srd = 'SRD', - Srg = 'SRG', - Ssp = 'SSP', - Std = 'STD', - Sur = 'SUR', - Svc = 'SVC', - Syp = 'SYP', - Szl = 'SZL', - Thb = 'THB', - Tjr = 'TJR', - Tjs = 'TJS', - Tmm = 'TMM', - Tmt = 'TMT', - Tnd = 'TND', - Top = 'TOP', - Tpe = 'TPE', - Trl = 'TRL', - Try = 'TRY', - Ttd = 'TTD', - Twd = 'TWD', - Tzs = 'TZS', - Uah = 'UAH', - Uak = 'UAK', - Ugs = 'UGS', - Ugx = 'UGX', - Usd = 'USD', - Usn = 'USN', - Uss = 'USS', - Uyi = 'UYI', - Uyp = 'UYP', - Uyu = 'UYU', - Uzs = 'UZS', - Veb = 'VEB', - Vef = 'VEF', - Vnd = 'VND', - Vnn = 'VNN', - Vuv = 'VUV', - Wst = 'WST', - Xaf = 'XAF', - Xcd = 'XCD', - Xeu = 'XEU', - Xfo = 'XFO', - Xfu = 'XFU', - Xof = 'XOF', - Xpf = 'XPF', - Xre = 'XRE', - Ydd = 'YDD', - Yer = 'YER', - Yud = 'YUD', - Yum = 'YUM', - Yun = 'YUN', - Yur = 'YUR', - Zal = 'ZAL', - Zar = 'ZAR', - Zmk = 'ZMK', - Zmw = 'ZMW', - Zrn = 'ZRN', - Zrz = 'ZRZ', - Zwd = 'ZWD', - Zwl = 'ZWL', - Zwr = 'ZWR', -} - -export type GetLoggedInCustomerQueryVariables = Exact<{ [key: string]: never }> - -export type GetLoggedInCustomerQuery = { __typename?: 'Query' } & { - customer?: Maybe< - { __typename?: 'Customer' } & Pick< - Customer, - | 'entityId' - | 'firstName' - | 'lastName' - | 'email' - | 'company' - | 'customerGroupId' - | 'notes' - | 'phone' - | 'addressCount' - | 'attributeCount' - > & { - storeCredit: Array< - { __typename?: 'Money' } & Pick - > - } - > -} - -export type CategoryTreeItemFragment = { - __typename?: 'CategoryTreeItem' -} & Pick< - CategoryTreeItem, - 'entityId' | 'name' | 'path' | 'description' | 'productCount' -> - -export type ProductPricesFragment = { __typename?: 'Prices' } & { - price: { __typename?: 'Money' } & Pick - salePrice?: Maybe< - { __typename?: 'Money' } & Pick - > - retailPrice?: Maybe< - { __typename?: 'Money' } & Pick - > -} - -export type SwatchOptionFragment = { __typename?: 'SwatchOptionValue' } & Pick< - SwatchOptionValue, - 'isDefault' | 'hexColors' -> - -export type MultipleChoiceOptionFragment = { - __typename?: 'MultipleChoiceOption' -} & { - values: { __typename?: 'ProductOptionValueConnection' } & { - edges?: Maybe< - Array< - Maybe< - { __typename?: 'ProductOptionValueEdge' } & { - node: - | ({ __typename?: 'MultipleChoiceOptionValue' } & Pick< - MultipleChoiceOptionValue, - 'label' - >) - | ({ __typename?: 'ProductPickListOptionValue' } & Pick< - ProductPickListOptionValue, - 'label' - >) - | ({ __typename?: 'SwatchOptionValue' } & Pick< - SwatchOptionValue, - 'label' - > & - SwatchOptionFragment) - } - > - > - > - } -} - -export type ProductInfoFragment = { __typename?: 'Product' } & Pick< - Product, - 'entityId' | 'name' | 'path' | 'description' -> & { - brand?: Maybe<{ __typename?: 'Brand' } & Pick> - prices?: Maybe<{ __typename?: 'Prices' } & ProductPricesFragment> - images: { __typename?: 'ImageConnection' } & { - edges?: Maybe< - Array< - Maybe< - { __typename?: 'ImageEdge' } & { - node: { __typename?: 'Image' } & Pick< - Image, - 'urlOriginal' | 'altText' | 'isDefault' - > - } - > - > - > - } - variants: { __typename?: 'VariantConnection' } & { - edges?: Maybe< - Array< - Maybe< - { __typename?: 'VariantEdge' } & { - node: { __typename?: 'Variant' } & Pick & { - defaultImage?: Maybe< - { __typename?: 'Image' } & Pick< - Image, - 'urlOriginal' | 'altText' | 'isDefault' - > - > - } - } - > - > - > - } - productOptions: { __typename?: 'ProductOptionConnection' } & { - edges?: Maybe< - Array< - Maybe< - { __typename?: 'ProductOptionEdge' } & { - node: - | ({ __typename: 'CheckboxOption' } & Pick< - CheckboxOption, - 'entityId' | 'displayName' - >) - | ({ __typename: 'DateFieldOption' } & Pick< - DateFieldOption, - 'entityId' | 'displayName' - >) - | ({ __typename: 'FileUploadFieldOption' } & Pick< - FileUploadFieldOption, - 'entityId' | 'displayName' - >) - | ({ __typename: 'MultiLineTextFieldOption' } & Pick< - MultiLineTextFieldOption, - 'entityId' | 'displayName' - >) - | ({ __typename: 'MultipleChoiceOption' } & Pick< - MultipleChoiceOption, - 'entityId' | 'displayName' - > & - MultipleChoiceOptionFragment) - | ({ __typename: 'NumberFieldOption' } & Pick< - NumberFieldOption, - 'entityId' | 'displayName' - >) - | ({ __typename: 'TextFieldOption' } & Pick< - TextFieldOption, - 'entityId' | 'displayName' - >) - } - > - > - > - } - localeMeta: { __typename?: 'MetafieldConnection' } & { - edges?: Maybe< - Array< - Maybe< - { __typename?: 'MetafieldEdge' } & { - node: { __typename?: 'Metafields' } & Pick< - Metafields, - 'key' | 'value' - > - } - > - > - > - } - } - -export type ProductConnnectionFragment = { - __typename?: 'ProductConnection' -} & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'startCursor' | 'endCursor' - > - edges?: Maybe< - Array< - Maybe< - { __typename?: 'ProductEdge' } & Pick & { - node: { __typename?: 'Product' } & ProductInfoFragment - } - > - > - > -} - -export type GetAllProductPathsQueryVariables = Exact<{ - first?: Maybe -}> - -export type GetAllProductPathsQuery = { __typename?: 'Query' } & { - site: { __typename?: 'Site' } & { - products: { __typename?: 'ProductConnection' } & { - edges?: Maybe< - Array< - Maybe< - { __typename?: 'ProductEdge' } & { - node: { __typename?: 'Product' } & Pick - } - > - > - > - } - } -} - -export type GetAllProductsQueryVariables = Exact<{ - hasLocale?: Maybe - locale?: Maybe - entityIds?: Maybe> - first?: Maybe - products?: Maybe - featuredProducts?: Maybe - bestSellingProducts?: Maybe - newestProducts?: Maybe -}> - -export type GetAllProductsQuery = { __typename?: 'Query' } & { - site: { __typename?: 'Site' } & { - products: { __typename?: 'ProductConnection' } & ProductConnnectionFragment - featuredProducts: { - __typename?: 'ProductConnection' - } & ProductConnnectionFragment - bestSellingProducts: { - __typename?: 'ProductConnection' - } & ProductConnnectionFragment - newestProducts: { - __typename?: 'ProductConnection' - } & ProductConnnectionFragment - } -} - -export type GetCustomerIdQueryVariables = Exact<{ [key: string]: never }> - -export type GetCustomerIdQuery = { __typename?: 'Query' } & { - customer?: Maybe<{ __typename?: 'Customer' } & Pick> -} - -export type GetProductQueryVariables = Exact<{ - hasLocale?: Maybe - locale?: Maybe - path: Scalars['String'] -}> - -export type GetProductQuery = { __typename?: 'Query' } & { - site: { __typename?: 'Site' } & { - route: { __typename?: 'Route' } & { - node?: Maybe< - | { __typename: 'Brand' } - | { __typename: 'Category' } - | ({ __typename: 'Product' } & { - variants: { __typename?: 'VariantConnection' } & { - edges?: Maybe< - Array< - Maybe< - { __typename?: 'VariantEdge' } & { - node: { __typename?: 'Variant' } & Pick< - Variant, - 'entityId' - > & { - defaultImage?: Maybe< - { __typename?: 'Image' } & Pick< - Image, - 'urlOriginal' | 'altText' | 'isDefault' - > - > - prices?: Maybe< - { __typename?: 'Prices' } & ProductPricesFragment - > - inventory?: Maybe< - { __typename?: 'VariantInventory' } & Pick< - VariantInventory, - 'isInStock' - > & { - aggregated?: Maybe< - { __typename?: 'Aggregated' } & Pick< - Aggregated, - 'availableToSell' | 'warningLevel' - > - > - } - > - productOptions: { - __typename?: 'ProductOptionConnection' - } & { - edges?: Maybe< - Array< - Maybe< - { __typename?: 'ProductOptionEdge' } & { - node: - | ({ - __typename: 'CheckboxOption' - } & Pick< - CheckboxOption, - 'entityId' | 'displayName' - >) - | ({ - __typename: 'DateFieldOption' - } & Pick< - DateFieldOption, - 'entityId' | 'displayName' - >) - | ({ - __typename: 'FileUploadFieldOption' - } & Pick< - FileUploadFieldOption, - 'entityId' | 'displayName' - >) - | ({ - __typename: 'MultiLineTextFieldOption' - } & Pick< - MultiLineTextFieldOption, - 'entityId' | 'displayName' - >) - | ({ - __typename: 'MultipleChoiceOption' - } & Pick< - MultipleChoiceOption, - 'entityId' | 'displayName' - > & - MultipleChoiceOptionFragment) - | ({ - __typename: 'NumberFieldOption' - } & Pick< - NumberFieldOption, - 'entityId' | 'displayName' - >) - | ({ - __typename: 'TextFieldOption' - } & Pick< - TextFieldOption, - 'entityId' | 'displayName' - >) - } - > - > - > - } - } - } - > - > - > - } - } & ProductInfoFragment) - | { __typename: 'Variant' } - > - } - } -} - -export type GetSiteInfoQueryVariables = Exact<{ [key: string]: never }> - -export type GetSiteInfoQuery = { __typename?: 'Query' } & { - site: { __typename?: 'Site' } & { - categoryTree: Array< - { __typename?: 'CategoryTreeItem' } & { - children: Array< - { __typename?: 'CategoryTreeItem' } & { - children: Array< - { __typename?: 'CategoryTreeItem' } & CategoryTreeItemFragment - > - } & CategoryTreeItemFragment - > - } & CategoryTreeItemFragment - > - brands: { __typename?: 'BrandConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'startCursor' | 'endCursor' - > - edges?: Maybe< - Array< - Maybe< - { __typename?: 'BrandEdge' } & Pick & { - node: { __typename?: 'Brand' } & Pick< - Brand, - | 'entityId' - | 'name' - | 'pageTitle' - | 'metaDesc' - | 'metaKeywords' - | 'searchKeywords' - | 'path' - > & { - defaultImage?: Maybe< - { __typename?: 'Image' } & Pick< - Image, - 'urlOriginal' | 'altText' - > - > - } - } - > - > - > - } - } -} - -export type LoginMutationVariables = Exact<{ - email: Scalars['String'] - password: Scalars['String'] -}> - -export type LoginMutation = { __typename?: 'Mutation' } & { - login: { __typename?: 'LoginResult' } & Pick -} diff --git a/framework/bigcommerce/schema.graphql b/framework/bigcommerce/schema.graphql deleted file mode 100644 index 79de347fe..000000000 --- a/framework/bigcommerce/schema.graphql +++ /dev/null @@ -1,2422 +0,0 @@ -""" -Login result -""" -type LoginResult { - """ - The result of a login - """ - result: String! -} - -""" -Logout result -""" -type LogoutResult { - """ - The result of a logout - """ - result: String! -} - -type Mutation { - login(email: String!, password: String!): LoginResult! - logout: LogoutResult! -} - -""" -Aggregated -""" -type Aggregated { - """ - Number of available products in stock. This can be 'null' if inventory is not set orif the store's Inventory Settings disable displaying stock levels on the storefront. - """ - availableToSell: Long! - - """ - Indicates a threshold low-stock level. This can be 'null' if the inventory warning level is not set or if the store's Inventory Settings disable displaying stock levels on the storefront. - """ - warningLevel: Int! -} - -""" -Aggregated Product Inventory -""" -type AggregatedInventory { - """ - Number of available products in stock. This can be 'null' if inventory is not set orif the store's Inventory Settings disable displaying stock levels on the storefront. - """ - availableToSell: Int! - - """ - Indicates a threshold low-stock level. This can be 'null' if the inventory warning level is not set or if the store's Inventory Settings disable displaying stock levels on the storefront. - """ - warningLevel: Int! -} - -""" -Brand -""" -type Brand implements Node { - """ - The ID of an object - """ - id: ID! - - """ - Id of the brand. - """ - entityId: Int! - - """ - Name of the brand. - """ - name: String! - - """ - Default image for brand. - """ - defaultImage: Image - - """ - Page title for the brand. - """ - pageTitle: String! - - """ - Meta description for the brand. - """ - metaDesc: String! - - """ - Meta keywords for the brand. - """ - metaKeywords: [String!]! - - """ - Search keywords for the brand. - """ - searchKeywords: [String!]! - - """ - Path for the brand page. - """ - path: String! - products( - before: String - after: String - first: Int - last: Int - ): ProductConnection! - - """ - Metafield data related to a brand. - """ - metafields( - namespace: String! - keys: [String!] = [] - before: String - after: String - first: Int - last: Int - ): MetafieldConnection! -} - -""" -A connection to a list of items. -""" -type BrandConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [BrandEdge] -} - -""" -An edge in a connection. -""" -type BrandEdge { - """ - The item at the end of the edge. - """ - node: Brand! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Breadcrumb -""" -type Breadcrumb { - """ - Category id. - """ - entityId: Int! - - """ - Name of the category. - """ - name: String! -} - -""" -A connection to a list of items. -""" -type BreadcrumbConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [BreadcrumbEdge] -} - -""" -An edge in a connection. -""" -type BreadcrumbEdge { - """ - The item at the end of the edge. - """ - node: Breadcrumb! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Bulk pricing tier that sets a fixed price for the product or variant. -""" -type BulkPricingFixedPriceDiscount implements BulkPricingTier { - """ - This price will override the current product price. - """ - price: BigDecimal! - - """ - Minimum item quantity that applies to this bulk pricing tier. - """ - minimumQuantity: Int! - - """ - Maximum item quantity that applies to this bulk pricing tier - if not defined then the tier does not have an upper bound. - """ - maximumQuantity: Int -} - -""" -Bulk pricing tier that reduces the price of the product or variant by a percentage. -""" -type BulkPricingPercentageDiscount implements BulkPricingTier { - """ - The percentage that will be removed from the product price. - """ - percentOff: BigDecimal! - - """ - Minimum item quantity that applies to this bulk pricing tier. - """ - minimumQuantity: Int! - - """ - Maximum item quantity that applies to this bulk pricing tier - if not defined then the tier does not have an upper bound. - """ - maximumQuantity: Int -} - -""" -Bulk pricing tier that will subtract an amount from the price of the product or variant. -""" -type BulkPricingRelativePriceDiscount implements BulkPricingTier { - """ - The price of the product/variant will be reduced by this priceAdjustment. - """ - priceAdjustment: BigDecimal! - - """ - Minimum item quantity that applies to this bulk pricing tier. - """ - minimumQuantity: Int! - - """ - Maximum item quantity that applies to this bulk pricing tier - if not defined then the tier does not have an upper bound. - """ - maximumQuantity: Int -} - -""" -A set of bulk pricing tiers that define price discounts which apply when purchasing specified quantities of a product or variant. -""" -interface BulkPricingTier { - """ - Minimum item quantity that applies to this bulk pricing tier. - """ - minimumQuantity: Int! - - """ - Maximum item quantity that applies to this bulk pricing tier - if not defined then the tier does not have an upper bound. - """ - maximumQuantity: Int -} - -""" -Product Option -""" -interface CatalogProductOption { - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! -} - -""" -Product Option Value -""" -interface CatalogProductOptionValue { - """ - Unique ID for the option value. - """ - entityId: Int! - - """ - Label for the option value. - """ - label: String! - - """ - Indicates whether this value is the chosen default selected value. - """ - isDefault: Boolean! -} - -""" -Category -""" -type Category implements Node { - """ - The ID of an object - """ - id: ID! - - """ - Unique ID for the category. - """ - entityId: Int! - - """ - Category name. - """ - name: String! - - """ - Category path. - """ - path: String! - - """ - Default image for the category. - """ - defaultImage: Image - - """ - Category description. - """ - description: String! - - """ - Category breadcrumbs. - """ - breadcrumbs( - depth: Int! - before: String - after: String - first: Int - last: Int - ): BreadcrumbConnection! - products( - before: String - after: String - first: Int - last: Int - ): ProductConnection! - - """ - Metafield data related to a category. - """ - metafields( - namespace: String! - keys: [String!] = [] - before: String - after: String - first: Int - last: Int - ): MetafieldConnection! -} - -""" -A connection to a list of items. -""" -type CategoryConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [CategoryEdge] -} - -""" -An edge in a connection. -""" -type CategoryEdge { - """ - The item at the end of the edge. - """ - node: Category! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -An item in a tree of categories. -""" -type CategoryTreeItem { - """ - The id category. - """ - entityId: Int! - - """ - The name of category. - """ - name: String! - - """ - Path assigned to this category - """ - path: String! - - """ - The description of this category. - """ - description: String! - - """ - The number of products in this category. - """ - productCount: Int! - - """ - Subcategories of this category - """ - children: [CategoryTreeItem!]! -} - -""" -A simple yes/no question represented by a checkbox. -""" -type CheckboxOption implements CatalogProductOption { - """ - Indicates the default checked status. - """ - checkedByDefault: Boolean! - - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! -} - -""" -Contact field -""" -type ContactField { - """ - Store address line. - """ - address: String! - - """ - Store country. - """ - country: String! - - """ - Store address type. - """ - addressType: String! - - """ - Store email. - """ - email: String! - - """ - Store phone number. - """ - phone: String! -} - -""" -Custom field -""" -type CustomField { - """ - Custom field id. - """ - entityId: Int! - - """ - Name of the custom field. - """ - name: String! - - """ - Value of the custom field. - """ - value: String! -} - -""" -A connection to a list of items. -""" -type CustomFieldConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [CustomFieldEdge] -} - -""" -An edge in a connection. -""" -type CustomFieldEdge { - """ - The item at the end of the edge. - """ - node: CustomField! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -A customer that shops on a store -""" -type Customer { - """ - The ID of the customer. - """ - entityId: Int! - - """ - The company name of the customer. - """ - company: String! - - """ - The customer group id of the customer. - """ - customerGroupId: Int! - - """ - The email address of the customer. - """ - email: String! - - """ - The first name of the customer. - """ - firstName: String! - - """ - The last name of the customer. - """ - lastName: String! - - """ - The notes of the customer. - """ - notes: String! - - """ - The phone number of the customer. - """ - phone: String! - - """ - The tax exempt category of the customer. - """ - taxExemptCategory: String! - - """ - Customer addresses count. - """ - addressCount: Int! - - """ - Customer attributes count. - """ - attributeCount: Int! - - """ - Customer store credit. - """ - storeCredit: [Money!]! - - """ - Customer attributes. - """ - attributes: CustomerAttributes! -} - -""" -A custom, store-specific attribute for a customer -""" -type CustomerAttribute { - """ - The ID of the custom customer attribute - """ - entityId: Int! - - """ - The value of the custom customer attribute - """ - value: String - - """ - The name of the custom customer attribute - """ - name: String! -} - -""" -Custom, store-specific customer attributes -""" -type CustomerAttributes { - attribute( - """ - The ID of the customer attribute - """ - entityId: Int! - ): CustomerAttribute! -} - -""" -A calendar for allowing selection of a date. -""" -type DateFieldOption implements CatalogProductOption { - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! -} - -scalar DateTime - -""" -Date Time Extended -""" -type DateTimeExtended { - """ - ISO-8601 formatted date in UTC - """ - utc: DateTime! -} - -""" -Display field -""" -type DisplayField { - """ - Short date format. - """ - shortDateFormat: String! - - """ - Extended date format. - """ - extendedDateFormat: String! -} - -""" -A form allowing selection and uploading of a file from the user's local computer. -""" -type FileUploadFieldOption implements CatalogProductOption { - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! -} - -""" -Image -""" -type Image { - """ - Absolute path to image using store CDN. - """ - url(width: Int!, height: Int): String! - - """ - Absolute path to original image using store CDN. - """ - urlOriginal: String! - - """ - Text description of an image that can be used for SEO and/or accessibility purposes. - """ - altText: String! - - """ - Indicates whether this is the primary image. - """ - isDefault: Boolean! -} - -""" -A connection to a list of items. -""" -type ImageConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [ImageEdge] -} - -""" -An edge in a connection. -""" -type ImageEdge { - """ - The item at the end of the edge. - """ - node: Image! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -An inventory -""" -type Inventory { - """ - Locations - """ - locations( - entityIds: [Int!] - codes: [String!] - typeIds: [String!] - before: String - after: String - first: Int - last: Int - ): LocationConnection! -} - -""" -Inventory By Locations -""" -type InventoryByLocations { - """ - Location id. - """ - locationEntityId: Long! - - """ - Number of available products in stock. - """ - availableToSell: Long! - - """ - Indicates a threshold low-stock level. - """ - warningLevel: Int! - - """ - Indicates whether this product is in stock. - """ - isInStock: Boolean! -} - -""" -A connection to a list of items. -""" -type LocationConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [LocationEdge] -} - -""" -An edge in a connection. -""" -type LocationEdge { - """ - The item at the end of the edge. - """ - node: InventoryByLocations! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Logo field -""" -type LogoField { - """ - Logo title. - """ - title: String! - - """ - Store logo image. - """ - image: Image! -} - -""" -Measurement -""" -type Measurement { - """ - Unformatted weight measurement value. - """ - value: Float! - - """ - Unit of measurement. - """ - unit: String! -} - -""" -A connection to a list of items. -""" -type MetafieldConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [MetafieldEdge] -} - -""" -An edge in a connection. -""" -type MetafieldEdge { - """ - The item at the end of the edge. - """ - node: Metafields! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Key/Value pairs of data attached tied to a resource entity (product, brand, category, etc.) -""" -type Metafields { - """ - The ID of an object - """ - id: ID! - - """ - The ID of the metafield when referencing via our backend API. - """ - entityId: Int! - - """ - A label for identifying a metafield data value. - """ - key: String! - - """ - A metafield value. - """ - value: String! -} - -""" -A money object - includes currency code and a money amount -""" -type Money { - """ - Currency code of the current money. - """ - currencyCode: String! - - """ - The amount of money. - """ - value: BigDecimal! -} - -""" -A min and max pair of money objects -""" -type MoneyRange { - """ - Minimum money object. - """ - min: Money! - - """ - Maximum money object. - """ - max: Money! -} - -""" -A multi-line text input field, aka a text box. -""" -type MultiLineTextFieldOption implements CatalogProductOption { - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! -} - -""" -An option type that has a fixed list of values. -""" -type MultipleChoiceOption implements CatalogProductOption { - """ - The chosen display style for this multiple choice option. - """ - displayStyle: String! - - """ - List of option values. - """ - values( - before: String - after: String - first: Int - last: Int - ): ProductOptionValueConnection! - - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! -} - -""" -A simple multiple choice value comprised of an id and a label. -""" -type MultipleChoiceOptionValue implements CatalogProductOptionValue { - """ - Unique ID for the option value. - """ - entityId: Int! - - """ - Label for the option value. - """ - label: String! - - """ - Indicates whether this value is the chosen default selected value. - """ - isDefault: Boolean! -} - -""" -An object with an ID -""" -interface Node { - """ - The id of the object. - """ - id: ID! -} - -""" -A single line text input field that only accepts numbers. -""" -type NumberFieldOption implements CatalogProductOption { - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! -} - -""" -A connection to a list of items. -""" -type OptionConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [OptionEdge] -} - -""" -An edge in a connection. -""" -type OptionEdge { - """ - The item at the end of the edge. - """ - node: ProductOption! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -A connection to a list of items. -""" -type OptionValueConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [OptionValueEdge] -} - -""" -An edge in a connection. -""" -type OptionValueEdge { - """ - The item at the end of the edge. - """ - node: ProductOptionValue! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input OptionValueId { - optionEntityId: Int! - valueEntityId: Int! -} - -""" -Information about pagination in a connection. -""" -type PageInfo { - """ - When paginating forwards, are there more items? - """ - hasNextPage: Boolean! - - """ - When paginating backwards, are there more items? - """ - hasPreviousPage: Boolean! - - """ - When paginating backwards, the cursor to continue. - """ - startCursor: String - - """ - When paginating forwards, the cursor to continue. - """ - endCursor: String -} - -""" -The min and max range of prices that apply to this product. -""" -type PriceRanges { - """ - Product price min/max range. - """ - priceRange: MoneyRange! - - """ - Product retail price min/max range. - """ - retailPriceRange: MoneyRange -} - -""" -The various prices that can be set on a product. -""" -type Prices { - """ - Calculated price of the product. - """ - price: Money! - - """ - Sale price of the product. - """ - salePrice: Money - - """ - Original price of the product. - """ - basePrice: Money - - """ - Retail price of the product. - """ - retailPrice: Money - - """ - Minimum advertised price of the product. - """ - mapPrice: Money - - """ - Product price min/max range. - """ - priceRange: MoneyRange! - - """ - Product retail price min/max range. - """ - retailPriceRange: MoneyRange - - """ - The difference between the retail price (MSRP) and the current price, which can be presented to the shopper as their savings. - """ - saved: Money - - """ - List of bulk pricing tiers applicable to a product or variant. - """ - bulkPricing: [BulkPricingTier!]! -} - -""" -Product -""" -type Product implements Node { - """ - The ID of an object - """ - id: ID! - - """ - Id of the product. - """ - entityId: Int! - - """ - Default product variant when no options are selected. - """ - sku: String! - - """ - Relative URL path to product page. - """ - path: String! - - """ - Name of the product. - """ - name: String! - - """ - Description of the product. - """ - description: String! - - """ - Description of the product in plain text. - """ - plainTextDescription(characterLimit: Int = 120): String! - - """ - Warranty information of the product. - """ - warranty: String! - - """ - Minimum purchasable quantity for this product in a single order. - """ - minPurchaseQuantity: Int - - """ - Maximum purchasable quantity for this product in a single order. - """ - maxPurchaseQuantity: Int - - """ - Absolute URL path for adding a product to cart. - """ - addToCartUrl: String! - - """ - Absolute URL path for adding a product to customer's wishlist. - """ - addToWishlistUrl: String! - - """ - Prices object determined by supplied product ID, variant ID, and selected option IDs. - """ - prices(includeTax: Boolean = false, currencyCode: currencyCode): Prices - - """ - The minimum and maximum price of this product based on variant pricing and/or modifier price rules. - """ - priceRanges(includeTax: Boolean = false): PriceRanges - @deprecated(reason: "Use priceRanges inside prices node instead.") - - """ - Weight of the product. - """ - weight: Measurement - - """ - Height of the product. - """ - height: Measurement - - """ - Width of the product. - """ - width: Measurement - - """ - Depth of the product. - """ - depth: Measurement - - """ - Product options. - """ - options( - before: String - after: String - first: Int - last: Int - ): OptionConnection! - - """ - Product options. - """ - productOptions( - before: String - after: String - first: Int - last: Int - ): ProductOptionConnection! - - """ - Summary of the product reviews, includes the total number of reviews submitted and summation of the ratings on the reviews (ratings range from 0-5 per review). - """ - reviewSummary: Reviews! - - """ - Type of product, ex: physical, digital - """ - type: String! - - """ - The availability state of the product. - """ - availability: String! - @deprecated(reason: "Use status inside availabilityV2 instead.") - - """ - A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. - """ - availabilityDescription: String! - @deprecated(reason: "Use description inside availabilityV2 instead.") - - """ - The availability state of the product. - """ - availabilityV2: ProductAvailability! - - """ - List of categories associated with the product. - """ - categories( - before: String - after: String - first: Int - last: Int - ): CategoryConnection! - - """ - Brand associated with the product. - """ - brand: Brand - - """ - Variants associated with the product. - """ - variants( - before: String - after: String - first: Int - last: Int - entityIds: [Int!] = [] - optionValueIds: [OptionValueId!] = [] - ): VariantConnection! - - """ - Custom fields of the product. - """ - customFields( - names: [String!] = [] - before: String - after: String - first: Int - last: Int - ): CustomFieldConnection! - - """ - A list of the images for a product. - """ - images(before: String, after: String, first: Int, last: Int): ImageConnection! - - """ - Default image for a product. - """ - defaultImage: Image - - """ - Related products for this product. - """ - relatedProducts( - before: String - after: String - first: Int - last: Int - ): RelatedProductsConnection! - - """ - Inventory information of the product. - """ - inventory: ProductInventory! - - """ - Metafield data related to a product. - """ - metafields( - namespace: String! - keys: [String!] = [] - before: String - after: String - first: Int - last: Int - ): MetafieldConnection! - - """ - Product creation date - """ - createdAt: DateTimeExtended! - @deprecated(reason: "Alpha version. Do not use in production.") -} - -""" -Product availability -""" -interface ProductAvailability { - """ - The availability state of the product. - """ - status: ProductAvailabilityStatus! - - """ - A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. - """ - description: String! -} - -""" -Product availability status -""" -enum ProductAvailabilityStatus { - Available - Preorder - Unavailable -} - -""" -Available Product -""" -type ProductAvailable implements ProductAvailability { - """ - The availability state of the product. - """ - status: ProductAvailabilityStatus! - - """ - A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. - """ - description: String! -} - -""" -A connection to a list of items. -""" -type ProductConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [ProductEdge] -} - -""" -An edge in a connection. -""" -type ProductEdge { - """ - The item at the end of the edge. - """ - node: Product! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Product Inventory Information -""" -type ProductInventory { - """ - Indicates whether this product is in stock. - """ - isInStock: Boolean! - - """ - Indicates whether this product's inventory is being tracked on variant level. If true, you may wish to check the variants node to understand the true inventory of each individual variant, rather than relying on this product-level aggregate to understand how many items may be added to cart. - """ - hasVariantInventory: Boolean! - - """ - Aggregated product inventory information. This data may not be available if not set or if the store's Inventory Settings have disabled displaying stock levels on the storefront. - """ - aggregated: AggregatedInventory -} - -""" -Product Option -""" -type ProductOption { - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! - - """ - Option values. - """ - values( - before: String - after: String - first: Int - last: Int - ): OptionValueConnection! -} - -""" -A connection to a list of items. -""" -type ProductOptionConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [ProductOptionEdge] -} - -""" -An edge in a connection. -""" -type ProductOptionEdge { - """ - The item at the end of the edge. - """ - node: CatalogProductOption! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Product Option Value -""" -type ProductOptionValue { - """ - Unique ID for the option value. - """ - entityId: Int! - - """ - Label for the option value. - """ - label: String! -} - -""" -A connection to a list of items. -""" -type ProductOptionValueConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [ProductOptionValueEdge] -} - -""" -An edge in a connection. -""" -type ProductOptionValueEdge { - """ - The item at the end of the edge. - """ - node: CatalogProductOptionValue! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -A Product PickList Value - a product to be mapped to the base product if selected. -""" -type ProductPickListOptionValue implements CatalogProductOptionValue { - """ - The ID of the product associated with this option value. - """ - productId: Int! - - """ - Unique ID for the option value. - """ - entityId: Int! - - """ - Label for the option value. - """ - label: String! - - """ - Indicates whether this value is the chosen default selected value. - """ - isDefault: Boolean! -} - -""" -PreOrder Product -""" -type ProductPreOrder implements ProductAvailability { - """ - The message to be shown in the store when a product is put into the pre-order availability state, e.g. "Expected release date is %%DATE%%" - """ - message: String - - """ - Product release date - """ - willBeReleasedAt: DateTimeExtended - - """ - The availability state of the product. - """ - status: ProductAvailabilityStatus! - - """ - A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. - """ - description: String! -} - -""" -Unavailable Product -""" -type ProductUnavailable implements ProductAvailability { - """ - The message to be shown in the store when "Call for pricing" is enabled for this product, e.g. "Contact us at 555-5555" - """ - message: String - - """ - The availability state of the product. - """ - status: ProductAvailabilityStatus! - - """ - A few words telling the customer how long it will normally take to ship this product, such as 'Usually ships in 24 hours'. - """ - description: String! -} - -type Query { - site: Site! - - """ - The currently logged in customer. - """ - customer: Customer - - """ - Fetches an object given its ID - """ - node( - """ - The ID of an object - """ - id: ID! - ): Node - inventory: Inventory! - @deprecated(reason: "Alpha version. Do not use in production.") -} - -""" -A connection to a list of items. -""" -type RelatedProductsConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [RelatedProductsEdge] -} - -""" -An edge in a connection. -""" -type RelatedProductsEdge { - """ - The item at the end of the edge. - """ - node: Product! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Review Rating Summary -""" -type Reviews { - """ - Total number of reviews on product. - """ - numberOfReviews: Int! - - """ - Summation of rating scores from each review. - """ - summationOfRatings: Int! -} - -""" -route -""" -type Route { - """ - node - """ - node: Node -} - -""" -Store settings information from the control panel. -""" -type Settings { - """ - The name of the store. - """ - storeName: String! - - """ - The hash of the store. - """ - storeHash: String! - - """ - The current store status. - """ - status: StorefrontStatusType! - - """ - Logo information for the store. - """ - logo: LogoField! - - """ - Contact information for the store. - """ - contact: ContactField - - """ - Store urls. - """ - url: UrlField! - - """ - Store display format information. - """ - display: DisplayField! - - """ - Channel ID. - """ - channelId: Long! -} - -""" -A site -""" -type Site { - categoryTree: [CategoryTreeItem!]! - - """ - Details of the brand. - """ - brands( - before: String - after: String - first: Int - last: Int - productEntityIds: [Int!] = [] - ): BrandConnection! - - """ - Details of the products. - """ - products( - before: String - after: String - first: Int - last: Int - ids: [ID!] = [] - entityIds: [Int!] = [] - ): ProductConnection! - - """ - Details of the newest products. - """ - newestProducts( - before: String - after: String - first: Int - last: Int - ): ProductConnection! - - """ - Details of the best selling products. - """ - bestSellingProducts( - before: String - after: String - first: Int - last: Int - ): ProductConnection! - - """ - Details of the featured products. - """ - featuredProducts( - before: String - after: String - first: Int - last: Int - ): ProductConnection! - - """ - A single product object with variant pricing overlay capabilities. - """ - product( - id: ID - entityId: Int - variantEntityId: Int - optionValueIds: [OptionValueId!] = [] - sku: String - ): Product - - """ - Route for a node - """ - route(path: String!): Route! - - """ - Store settings. - """ - settings: Settings -} - -""" -Storefront Mode -""" -enum StorefrontStatusType { - LAUNCHED - MAINTENANCE - PRE_LAUNCH - HIBERNATION -} - -""" -A swatch option value - swatch values can be associated with a list of hexidecimal colors or an image. -""" -type SwatchOptionValue implements CatalogProductOptionValue { - """ - List of up to 3 hex encoded colors to associate with a swatch value. - """ - hexColors: [String!]! - - """ - Absolute path of a swatch texture image. - """ - imageUrl(width: Int!, height: Int): String - - """ - Unique ID for the option value. - """ - entityId: Int! - - """ - Label for the option value. - """ - label: String! - - """ - Indicates whether this value is the chosen default selected value. - """ - isDefault: Boolean! -} - -""" -A single line text input field. -""" -type TextFieldOption implements CatalogProductOption { - """ - Unique ID for the option. - """ - entityId: Int! - - """ - Display name for the option. - """ - displayName: String! - - """ - One of the option values is required to be selected for the checkout. - """ - isRequired: Boolean! -} - -""" -Url field -""" -type UrlField { - """ - Store url. - """ - vanityUrl: String! - - """ - CDN url to fetch assets. - """ - cdnUrl: String! -} - -""" -Variant -""" -type Variant implements Node { - """ - The ID of an object - """ - id: ID! - - """ - Id of the variant. - """ - entityId: Int! - - """ - Sku of the variant. - """ - sku: String! - - """ - The variant's weight. If a weight was not explicitly specified on the variant, this will be the product's weight. - """ - weight: Measurement - - """ - The variant's height. If a height was not explicitly specified on the variant, this will be the product's height. - """ - height: Measurement - - """ - The variant's width. If a width was not explicitly specified on the variant, this will be the product's width. - """ - width: Measurement - - """ - The variant's depth. If a depth was not explicitly specified on the variant, this will be the product's depth. - """ - depth: Measurement - - """ - The options which define a variant. - """ - options( - before: String - after: String - first: Int - last: Int - ): OptionConnection! - - """ - Product options that compose this variant. - """ - productOptions( - before: String - after: String - first: Int - last: Int - ): ProductOptionConnection! - - """ - Default image for a variant. - """ - defaultImage: Image - - """ - Variant prices - """ - prices(includeTax: Boolean = false, currencyCode: currencyCode): Prices - - """ - Variant inventory - """ - inventory: VariantInventory - - """ - Metafield data related to a variant. - """ - metafields( - namespace: String! - keys: [String!] = [] - before: String - after: String - first: Int - last: Int - ): MetafieldConnection! -} - -""" -A connection to a list of items. -""" -type VariantConnection { - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! - - """ - A list of edges. - """ - edges: [VariantEdge] -} - -""" -An edge in a connection. -""" -type VariantEdge { - """ - The item at the end of the edge. - """ - node: Variant! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Variant Inventory -""" -type VariantInventory { - """ - Aggregated product variant inventory information. This data may not be available if not set or if the store's Inventory Settings have disabled displaying stock levels on the storefront. - """ - aggregated: Aggregated - - """ - Indicates whether this product is in stock. - """ - isInStock: Boolean! - - """ - Inventory by locations. - """ - byLocation( - locationEntityIds: [Int!] = [] - before: String - after: String - first: Int - last: Int - ): LocationConnection -} - -""" -Please select a currency -""" -enum currencyCode { - ADP - AED - AFA - AFN - ALK - ALL - AMD - ANG - AOA - AOK - AON - AOR - ARA - ARL - ARM - ARP - ARS - ATS - AUD - AWG - AZM - AZN - BAD - BAM - BAN - BBD - BDT - BEC - BEF - BEL - BGL - BGM - BGN - BGO - BHD - BIF - BMD - BND - BOB - BOL - BOP - BOV - BRB - BRC - BRE - BRL - BRN - BRR - BRZ - BSD - BTN - BUK - BWP - BYB - BYR - BZD - CAD - CDF - CHE - CHF - CHW - CLE - CLF - CLP - CNX - CNY - COP - COU - CRC - CSD - CSK - CVE - CYP - CZK - DDM - DEM - DJF - DKK - DOP - DZD - ECS - ECV - EEK - EGP - ERN - ESA - ESB - ESP - ETB - EUR - FIM - FJD - FKP - FRF - GBP - GEK - GEL - GHC - GHS - GIP - GMD - GNF - GNS - GQE - GRD - GTQ - GWE - GWP - GYD - HKD - HNL - HRD - HRK - HTG - HUF - IDR - IEP - ILP - ILR - ILS - INR - IQD - ISJ - ISK - ITL - JMD - JOD - JPY - KES - KGS - KHR - KMF - KRH - KRO - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LTL - LTT - LUC - LUF - LUL - LVL - LVR - LYD - MAD - MAF - MCF - MDC - MDL - MGA - MGF - MKD - MKN - MLF - MMK - MNT - MOP - MRO - MTL - MTP - MUR - MVP - MVR - MWK - MXN - MXP - MXV - MYR - MZE - MZM - MZN - NAD - NGN - NIC - NIO - NLG - NOK - NPR - NZD - OMR - PAB - PEI - PEN - PES - PGK - PHP - PKR - PLN - PLZ - PTE - PYG - QAR - RHD - ROL - RON - RSD - RUB - RUR - RWF - SAR - SBD - SCR - SDD - SDG - SDP - SEK - SGD - SHP - SIT - SKK - SLL - SOS - SRD - SRG - SSP - STD - SUR - SVC - SYP - SZL - THB - TJR - TJS - TMM - TMT - TND - TOP - TPE - TRL - TRY - TTD - TWD - TZS - UAH - UAK - UGS - UGX - USD - USN - USS - UYI - UYP - UYU - UZS - VEB - VEF - VND - VNN - VUV - WST - XAF - XCD - XEU - XFO - XFU - XOF - XPF - XRE - YDD - YER - YUD - YUM - YUN - YUR - ZAL - ZAR - ZMK - ZMW - ZRN - ZRZ - ZWD - ZWL - ZWR -} - -""" -The `BigDecimal` scalar type represents signed fractional values with arbitrary precision. -""" -scalar BigDecimal - -""" -The `Long` scalar type represents non-fractional signed whole numeric values. Long can represent values between -(2^63) and 2^63 - 1. -""" -scalar Long diff --git a/framework/bigcommerce/scripts/generate-definitions.js b/framework/bigcommerce/scripts/generate-definitions.js deleted file mode 100644 index a2b830d3b..000000000 --- a/framework/bigcommerce/scripts/generate-definitions.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Generates definitions for REST API endpoints that are being - * used by ../api using https://github.com/drwpow/swagger-to-ts - */ -const { readFileSync, promises } = require('fs') -const path = require('path') -const fetch = require('node-fetch') -const swaggerToTS = require('@manifoldco/swagger-to-ts').default - -async function getSchema(filename) { - const url = `https://next-api.stoplight.io/projects/8433/files/${filename}` - const res = await fetch(url) - - if (!res.ok) { - throw new Error(`Request failed with ${res.status}: ${res.statusText}`) - } - - return res.json() -} - -const schemas = Object.entries({ - '../api/definitions/catalog.ts': - 'BigCommerce_Catalog_API.oas2.yml?ref=version%2F20.930', - '../api/definitions/store-content.ts': - 'BigCommerce_Store_Content_API.oas2.yml?ref=version%2F20.930', - '../api/definitions/wishlist.ts': - 'BigCommerce_Wishlist_API.oas2.yml?ref=version%2F20.930', - // swagger-to-ts is not working for the schema of the cart API - // '../api/definitions/cart.ts': - // 'BigCommerce_Server_to_Server_Cart_API.oas2.yml', -}) - -async function writeDefinitions() { - const ops = schemas.map(async ([dest, filename]) => { - const destination = path.join(__dirname, dest) - const schema = await getSchema(filename) - const definition = swaggerToTS(schema.content, { - prettierConfig: 'package.json', - }) - - await promises.writeFile(destination, definition) - - console.log(`✔️ Added definitions for: ${dest}`) - }) - - await Promise.all(ops) -} - -writeDefinitions() diff --git a/framework/bigcommerce/types/cart.ts b/framework/bigcommerce/types/cart.ts deleted file mode 100644 index 33c01e4c6..000000000 --- a/framework/bigcommerce/types/cart.ts +++ /dev/null @@ -1,66 +0,0 @@ -import * as Core from '@commerce/types/cart' - -export * from '@commerce/types/cart' - -// TODO: this type should match: -// https://developer.bigcommerce.com/api-reference/cart-checkout/server-server-cart-api/cart/getacart#responses -export type BigcommerceCart = { - id: string - parent_id?: string - customer_id: number - email: string - currency: { code: string } - tax_included: boolean - base_amount: number - discount_amount: number - cart_amount: number - line_items: { - custom_items: any[] - digital_items: any[] - gift_certificates: any[] - physical_items: any[] - } - created_time: string - discounts?: { id: number; discounted_amount: number }[] - // TODO: add missing fields -} - -/** - * Extend core cart types - */ - -export type Cart = Core.Cart & { - lineItems: Core.LineItem[] -} - -export type OptionSelections = { - option_id: number - option_value: number | string -} - -export type CartItemBody = Core.CartItemBody & { - productId: string // The product id is always required for BC - optionSelections?: OptionSelections[] -} - -export type CartTypes = { - cart: Cart - item: Core.LineItem - itemBody: CartItemBody -} - -export type CartHooks = Core.CartHooks - -export type GetCartHook = CartHooks['getCart'] -export type AddItemHook = CartHooks['addItem'] -export type UpdateItemHook = CartHooks['updateItem'] -export type RemoveItemHook = CartHooks['removeItem'] - -export type CartSchema = Core.CartSchema - -export type CartHandlers = Core.CartHandlers - -export type GetCartHandler = CartHandlers['getCart'] -export type AddItemHandler = CartHandlers['addItem'] -export type UpdateItemHandler = CartHandlers['updateItem'] -export type RemoveItemHandler = CartHandlers['removeItem'] diff --git a/framework/bigcommerce/types/checkout.ts b/framework/bigcommerce/types/checkout.ts deleted file mode 100644 index 4e2412ef6..000000000 --- a/framework/bigcommerce/types/checkout.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/checkout' diff --git a/framework/bigcommerce/types/common.ts b/framework/bigcommerce/types/common.ts deleted file mode 100644 index b52c33a4d..000000000 --- a/framework/bigcommerce/types/common.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/common' diff --git a/framework/bigcommerce/types/customer.ts b/framework/bigcommerce/types/customer.ts deleted file mode 100644 index 427bc0b03..000000000 --- a/framework/bigcommerce/types/customer.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as Core from '@commerce/types/customer' - -export * from '@commerce/types/customer' - -export type CustomerSchema = Core.CustomerSchema diff --git a/framework/bigcommerce/types/index.ts b/framework/bigcommerce/types/index.ts deleted file mode 100644 index 7ab0b7f64..000000000 --- a/framework/bigcommerce/types/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as Cart from './cart' -import * as Checkout from './checkout' -import * as Common from './common' -import * as Customer from './customer' -import * as Login from './login' -import * as Logout from './logout' -import * as Page from './page' -import * as Product from './product' -import * as Signup from './signup' -import * as Site from './site' -import * as Wishlist from './wishlist' - -export type { - Cart, - Checkout, - Common, - Customer, - Login, - Logout, - Page, - Product, - Signup, - Site, - Wishlist, -} diff --git a/framework/bigcommerce/types/login.ts b/framework/bigcommerce/types/login.ts deleted file mode 100644 index 24d5077ff..000000000 --- a/framework/bigcommerce/types/login.ts +++ /dev/null @@ -1,8 +0,0 @@ -import * as Core from '@commerce/types/login' -import type { LoginMutationVariables } from '../schema' - -export * from '@commerce/types/login' - -export type LoginOperation = Core.LoginOperation & { - variables: LoginMutationVariables -} diff --git a/framework/bigcommerce/types/logout.ts b/framework/bigcommerce/types/logout.ts deleted file mode 100644 index 9f0a466af..000000000 --- a/framework/bigcommerce/types/logout.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/logout' diff --git a/framework/bigcommerce/types/page.ts b/framework/bigcommerce/types/page.ts deleted file mode 100644 index 2bccfade2..000000000 --- a/framework/bigcommerce/types/page.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as Core from '@commerce/types/page' -export * from '@commerce/types/page' - -export type Page = Core.Page - -export type PageTypes = { - page: Page -} - -export type GetAllPagesOperation = Core.GetAllPagesOperation -export type GetPageOperation = Core.GetPageOperation diff --git a/framework/bigcommerce/types/product.ts b/framework/bigcommerce/types/product.ts deleted file mode 100644 index c776d58fa..000000000 --- a/framework/bigcommerce/types/product.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/product' diff --git a/framework/bigcommerce/types/signup.ts b/framework/bigcommerce/types/signup.ts deleted file mode 100644 index 58543c6f6..000000000 --- a/framework/bigcommerce/types/signup.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/signup' diff --git a/framework/bigcommerce/types/site.ts b/framework/bigcommerce/types/site.ts deleted file mode 100644 index 12dd7038c..000000000 --- a/framework/bigcommerce/types/site.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as Core from '@commerce/types/site' -import type { GetSiteInfoQuery, GetSiteInfoQueryVariables } from '../schema' - -export * from '@commerce/types/site' - -export type BCCategory = NonNullable< - GetSiteInfoQuery['site']['categoryTree'] ->[0] - -export type Brand = NonNullable< - NonNullable[0] -> - -export type SiteTypes = { - category: Core.Category - brand: Brand -} - -export type GetSiteInfoOperation = Core.GetSiteInfoOperation diff --git a/framework/bigcommerce/types/wishlist.ts b/framework/bigcommerce/types/wishlist.ts deleted file mode 100644 index 1e148b88c..000000000 --- a/framework/bigcommerce/types/wishlist.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as Core from '@commerce/types/wishlist' -import { definitions } from '../api/definitions/wishlist' -import type { ProductEdge } from '../api/operations/get-all-products' - -export * from '@commerce/types/wishlist' - -export type WishlistItem = NonNullable< - definitions['wishlist_Full']['items'] ->[0] & { - product?: ProductEdge['node'] -} - -export type Wishlist = Omit & { - items?: WishlistItem[] -} - -export type WishlistTypes = { - wishlist: Wishlist - itemBody: Core.WishlistItemBody -} - -export type WishlistSchema = Core.WishlistSchema -export type GetCustomerWishlistOperation = Core.GetCustomerWishlistOperation diff --git a/framework/bigcommerce/wishlist/index.ts b/framework/bigcommerce/wishlist/index.ts deleted file mode 100644 index 241af3c7e..000000000 --- a/framework/bigcommerce/wishlist/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as useAddItem } from './use-add-item' -export { default as useWishlist } from './use-wishlist' -export { default as useRemoveItem } from './use-remove-item' diff --git a/framework/bigcommerce/wishlist/use-add-item.tsx b/framework/bigcommerce/wishlist/use-add-item.tsx deleted file mode 100644 index 1bf086731..000000000 --- a/framework/bigcommerce/wishlist/use-add-item.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useAddItem, { UseAddItem } from '@commerce/wishlist/use-add-item' -import type { AddItemHook } from '../types/wishlist' -import useCustomer from '../customer/use-customer' -import useWishlist from './use-wishlist' - -export default useAddItem as UseAddItem - -export const handler: MutationHook = { - fetchOptions: { - url: '/api/wishlist', - method: 'POST', - }, - useHook: ({ fetch }) => () => { - const { data: customer } = useCustomer() - const { revalidate } = useWishlist() - - return useCallback( - async function addItem(item) { - if (!customer) { - // A signed customer is required in order to have a wishlist - throw new CommerceError({ - message: 'Signed customer not found', - }) - } - - // TODO: add validations before doing the fetch - const data = await fetch({ input: { item } }) - await revalidate() - return data - }, - [fetch, revalidate, customer] - ) - }, -} diff --git a/framework/bigcommerce/wishlist/use-remove-item.tsx b/framework/bigcommerce/wishlist/use-remove-item.tsx deleted file mode 100644 index 9d25c1439..000000000 --- a/framework/bigcommerce/wishlist/use-remove-item.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useRemoveItem, { - UseRemoveItem, -} from '@commerce/wishlist/use-remove-item' -import type { RemoveItemHook } from '../types/wishlist' -import useCustomer from '../customer/use-customer' -import useWishlist from './use-wishlist' - -export default useRemoveItem as UseRemoveItem - -export const handler: MutationHook = { - fetchOptions: { - url: '/api/wishlist', - method: 'DELETE', - }, - useHook: ({ fetch }) => ({ wishlist } = {}) => { - const { data: customer } = useCustomer() - const { revalidate } = useWishlist(wishlist) - - return useCallback( - async function removeItem(input) { - if (!customer) { - // A signed customer is required in order to have a wishlist - throw new CommerceError({ - message: 'Signed customer not found', - }) - } - - const data = await fetch({ input: { itemId: String(input.id) } }) - await revalidate() - return data - }, - [fetch, revalidate, customer] - ) - }, -} diff --git a/framework/bigcommerce/wishlist/use-wishlist.tsx b/framework/bigcommerce/wishlist/use-wishlist.tsx deleted file mode 100644 index b8fc946e3..000000000 --- a/framework/bigcommerce/wishlist/use-wishlist.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { useMemo } from 'react' -import { SWRHook } from '@commerce/utils/types' -import useWishlist, { UseWishlist } from '@commerce/wishlist/use-wishlist' -import type { GetWishlistHook } from '../types/wishlist' -import useCustomer from '../customer/use-customer' - -export default useWishlist as UseWishlist - -export const handler: SWRHook = { - fetchOptions: { - url: '/api/wishlist', - method: 'GET', - }, - async fetcher({ input: { customerId, includeProducts }, options, fetch }) { - if (!customerId) return null - - // Use a dummy base as we only care about the relative path - const url = new URL(options.url!, 'http://a') - - if (includeProducts) url.searchParams.set('products', '1') - - return fetch({ - url: url.pathname + url.search, - method: options.method, - }) - }, - useHook: ({ useData }) => (input) => { - const { data: customer } = useCustomer() - const response = useData({ - input: [ - ['customerId', customer?.entityId], - ['includeProducts', input?.includeProducts], - ], - swrOptions: { - revalidateOnFocus: false, - ...input?.swrOptions, - }, - }) - - return useMemo( - () => - Object.create(response, { - isEmpty: { - get() { - return (response.data?.items?.length || 0) <= 0 - }, - enumerable: true, - }, - }), - [response] - ) - }, -} diff --git a/framework/local/.env.template b/framework/local/.env.template deleted file mode 100644 index 873eea7e7..000000000 --- a/framework/local/.env.template +++ /dev/null @@ -1 +0,0 @@ -COMMERCE_PROVIDER=local \ No newline at end of file diff --git a/framework/local/README.md b/framework/local/README.md deleted file mode 100644 index a3bc1db32..000000000 --- a/framework/local/README.md +++ /dev/null @@ -1 +0,0 @@ -# Next.js Local Provider diff --git a/framework/local/api/endpoints/cart/index.ts b/framework/local/api/endpoints/cart/index.ts deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/cart/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/endpoints/catalog/index.ts b/framework/local/api/endpoints/catalog/index.ts deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/catalog/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/endpoints/catalog/products.ts b/framework/local/api/endpoints/catalog/products.ts deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/catalog/products.ts +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/endpoints/checkout/index.ts b/framework/local/api/endpoints/checkout/index.ts deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/checkout/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/endpoints/customer/index.ts b/framework/local/api/endpoints/customer/index.ts deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/customer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/endpoints/login/index.ts b/framework/local/api/endpoints/login/index.ts deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/login/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/endpoints/logout/index.ts b/framework/local/api/endpoints/logout/index.ts deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/logout/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/endpoints/signup/index.ts b/framework/local/api/endpoints/signup/index.ts deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/signup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/endpoints/wishlist/index.tsx b/framework/local/api/endpoints/wishlist/index.tsx deleted file mode 100644 index 491bf0ac9..000000000 --- a/framework/local/api/endpoints/wishlist/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export default function noopApi(...args: any[]): void {} diff --git a/framework/local/api/index.ts b/framework/local/api/index.ts deleted file mode 100644 index 9f403d2b3..000000000 --- a/framework/local/api/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { CommerceAPI, CommerceAPIConfig } from '@commerce/api' -import { getCommerceApi as commerceApi } from '@commerce/api' -import createFetcher from './utils/fetch-local' - -import getAllPages from './operations/get-all-pages' -import getPage from './operations/get-page' -import getSiteInfo from './operations/get-site-info' -import getCustomerWishlist from './operations/get-customer-wishlist' -import getAllProductPaths from './operations/get-all-product-paths' -import getAllProducts from './operations/get-all-products' -import getProduct from './operations/get-product' - -export interface LocalConfig extends CommerceAPIConfig {} -const config: LocalConfig = { - commerceUrl: '', - apiToken: '', - cartCookie: '', - customerCookie: '', - cartCookieMaxAge: 2592000, - fetch: createFetcher(() => getCommerceApi().getConfig()), -} - -const operations = { - getAllPages, - getPage, - getSiteInfo, - getCustomerWishlist, - getAllProductPaths, - getAllProducts, - getProduct, -} - -export const provider = { config, operations } - -export type Provider = typeof provider -export type LocalAPI

= CommerceAPI

- -export function getCommerceApi

( - customProvider: P = provider as any -): LocalAPI

{ - return commerceApi(customProvider as any) -} diff --git a/framework/local/api/operations/get-all-pages.ts b/framework/local/api/operations/get-all-pages.ts deleted file mode 100644 index b258fe70a..000000000 --- a/framework/local/api/operations/get-all-pages.ts +++ /dev/null @@ -1,19 +0,0 @@ -export type Page = { url: string } -export type GetAllPagesResult = { pages: Page[] } -import type { LocalConfig } from '../index' - -export default function getAllPagesOperation() { - function getAllPages({ - config, - preview, - }: { - url?: string - config?: Partial - preview?: boolean - }): Promise { - return Promise.resolve({ - pages: [], - }) - } - return getAllPages -} diff --git a/framework/local/api/operations/get-all-product-paths.ts b/framework/local/api/operations/get-all-product-paths.ts deleted file mode 100644 index fff24e791..000000000 --- a/framework/local/api/operations/get-all-product-paths.ts +++ /dev/null @@ -1,15 +0,0 @@ -import data from '../../data.json' - -export type GetAllProductPathsResult = { - products: Array<{ path: string }> -} - -export default function getAllProductPathsOperation() { - function getAllProductPaths(): Promise { - return Promise.resolve({ - products: data.products.map(({ path }) => ({ path })), - }) - } - - return getAllProductPaths -} diff --git a/framework/local/api/operations/get-all-products.ts b/framework/local/api/operations/get-all-products.ts deleted file mode 100644 index 21a04559d..000000000 --- a/framework/local/api/operations/get-all-products.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Product } from '@commerce/types/product' -import { GetAllProductsOperation } from '@commerce/types/product' -import type { OperationContext } from '@commerce/api/operations' -import type { LocalConfig, Provider } from '../index' -import data from '../../data.json' - -export default function getAllProductsOperation({ - commerce, -}: OperationContext) { - async function getAllProducts({ - query = '', - variables, - config, - }: { - query?: string - variables?: T['variables'] - config?: Partial - preview?: boolean - } = {}): Promise<{ products: Product[] | any[] }> { - return { - products: data.products, - } - } - return getAllProducts -} diff --git a/framework/local/api/operations/get-customer-wishlist.ts b/framework/local/api/operations/get-customer-wishlist.ts deleted file mode 100644 index 8c34b9e87..000000000 --- a/framework/local/api/operations/get-customer-wishlist.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default function getCustomerWishlistOperation() { - function getCustomerWishlist(): any { - return { wishlist: {} } - } - return getCustomerWishlist -} diff --git a/framework/local/api/operations/get-page.ts b/framework/local/api/operations/get-page.ts deleted file mode 100644 index b0cfdf58f..000000000 --- a/framework/local/api/operations/get-page.ts +++ /dev/null @@ -1,13 +0,0 @@ -export type Page = any -export type GetPageResult = { page?: Page } - -export type PageVariables = { - id: number -} - -export default function getPageOperation() { - function getPage(): Promise { - return Promise.resolve({}) - } - return getPage -} diff --git a/framework/local/api/operations/get-product.ts b/framework/local/api/operations/get-product.ts deleted file mode 100644 index 690b1aab9..000000000 --- a/framework/local/api/operations/get-product.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { LocalConfig } from '../index' -import { Product } from '@commerce/types/product' -import { GetProductOperation } from '@commerce/types/product' -import data from '../../data.json' -import type { OperationContext } from '@commerce/api/operations' - -export default function getProductOperation({ - commerce, -}: OperationContext) { - async function getProduct({ - query = '', - variables, - config, - }: { - query?: string - variables?: T['variables'] - config?: Partial - preview?: boolean - } = {}): Promise { - return { - product: data.products.find(({ slug }) => slug === variables!.slug), - } - } - - return getProduct -} diff --git a/framework/local/api/operations/get-site-info.ts b/framework/local/api/operations/get-site-info.ts deleted file mode 100644 index d43ed8359..000000000 --- a/framework/local/api/operations/get-site-info.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { OperationContext } from '@commerce/api/operations' -import { Category } from '@commerce/types/site' -import { LocalConfig } from '../index' - -export type GetSiteInfoResult< - T extends { categories: any[]; brands: any[] } = { - categories: Category[] - brands: any[] - } -> = T - -export default function getSiteInfoOperation({}: OperationContext) { - function getSiteInfo({ - query, - variables, - config: cfg, - }: { - query?: string - variables?: any - config?: Partial - preview?: boolean - } = {}): Promise { - return Promise.resolve({ - categories: [ - { - id: 'new-arrivals', - name: 'New Arrivals', - slug: 'new-arrivals', - path: '/new-arrivals', - }, - { - id: 'featured', - name: 'Featured', - slug: 'featured', - path: '/featured', - }, - ], - brands: [], - }) - } - - return getSiteInfo -} diff --git a/framework/local/api/operations/index.ts b/framework/local/api/operations/index.ts deleted file mode 100644 index 086fdf83a..000000000 --- a/framework/local/api/operations/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { default as getPage } from './get-page' -export { default as getSiteInfo } from './get-site-info' -export { default as getAllPages } from './get-all-pages' -export { default as getProduct } from './get-product' -export { default as getAllProducts } from './get-all-products' -export { default as getAllProductPaths } from './get-all-product-paths' diff --git a/framework/local/api/utils/fetch-local.ts b/framework/local/api/utils/fetch-local.ts deleted file mode 100644 index aa85cf27b..000000000 --- a/framework/local/api/utils/fetch-local.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { FetcherError } from '@commerce/utils/errors' -import type { GraphQLFetcher } from '@commerce/api' -import type { LocalConfig } from '../index' -import fetch from './fetch' - -const fetchGraphqlApi: (getConfig: () => LocalConfig) => GraphQLFetcher = - (getConfig) => - async (query: string, { variables, preview } = {}, fetchOptions) => { - const config = getConfig() - const res = await fetch(config.commerceUrl, { - ...fetchOptions, - method: 'POST', - headers: { - ...fetchOptions?.headers, - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - query, - variables, - }), - }) - - const json = await res.json() - if (json.errors) { - throw new FetcherError({ - errors: json.errors ?? [{ message: 'Failed to fetch for API' }], - status: res.status, - }) - } - - return { data: json.data, res } - } - -export default fetchGraphqlApi diff --git a/framework/local/api/utils/fetch.ts b/framework/local/api/utils/fetch.ts deleted file mode 100644 index 9d9fff3ed..000000000 --- a/framework/local/api/utils/fetch.ts +++ /dev/null @@ -1,3 +0,0 @@ -import zeitFetch from '@vercel/fetch' - -export default zeitFetch() diff --git a/framework/local/auth/index.ts b/framework/local/auth/index.ts deleted file mode 100644 index 36e757a89..000000000 --- a/framework/local/auth/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as useLogin } from './use-login' -export { default as useLogout } from './use-logout' -export { default as useSignup } from './use-signup' diff --git a/framework/local/auth/use-login.tsx b/framework/local/auth/use-login.tsx deleted file mode 100644 index 28351dc7f..000000000 --- a/framework/local/auth/use-login.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { MutationHook } from '@commerce/utils/types' -import useLogin, { UseLogin } from '@commerce/auth/use-login' - -export default useLogin as UseLogin - -export const handler: MutationHook = { - fetchOptions: { - query: '', - }, - async fetcher() { - return null - }, - useHook: () => () => { - return async function () {} - }, -} diff --git a/framework/local/auth/use-logout.tsx b/framework/local/auth/use-logout.tsx deleted file mode 100644 index 9b3fc3e44..000000000 --- a/framework/local/auth/use-logout.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { MutationHook } from '@commerce/utils/types' -import useLogout, { UseLogout } from '@commerce/auth/use-logout' - -export default useLogout as UseLogout - -export const handler: MutationHook = { - fetchOptions: { - query: '', - }, - async fetcher() { - return null - }, - useHook: - ({ fetch }) => - () => - async () => {}, -} diff --git a/framework/local/auth/use-signup.tsx b/framework/local/auth/use-signup.tsx deleted file mode 100644 index e9ad13458..000000000 --- a/framework/local/auth/use-signup.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { useCallback } from 'react' -import useCustomer from '../customer/use-customer' -import { MutationHook } from '@commerce/utils/types' -import useSignup, { UseSignup } from '@commerce/auth/use-signup' - -export default useSignup as UseSignup - -export const handler: MutationHook = { - fetchOptions: { - query: '', - }, - async fetcher() { - return null - }, - useHook: - ({ fetch }) => - () => - () => {}, -} diff --git a/framework/local/cart/index.ts b/framework/local/cart/index.ts deleted file mode 100644 index 3b8ba990e..000000000 --- a/framework/local/cart/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { default as useCart } from './use-cart' -export { default as useAddItem } from './use-add-item' -export { default as useRemoveItem } from './use-remove-item' -export { default as useUpdateItem } from './use-update-item' diff --git a/framework/local/cart/use-add-item.tsx b/framework/local/cart/use-add-item.tsx deleted file mode 100644 index 7f3d1061f..000000000 --- a/framework/local/cart/use-add-item.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import useAddItem, { UseAddItem } from '@commerce/cart/use-add-item' -import { MutationHook } from '@commerce/utils/types' - -export default useAddItem as UseAddItem -export const handler: MutationHook = { - fetchOptions: { - query: '', - }, - async fetcher({ input, options, fetch }) {}, - useHook: - ({ fetch }) => - () => { - return async function addItem() { - return {} - } - }, -} diff --git a/framework/local/cart/use-cart.tsx b/framework/local/cart/use-cart.tsx deleted file mode 100644 index b3e509a21..000000000 --- a/framework/local/cart/use-cart.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { useMemo } from 'react' -import { SWRHook } from '@commerce/utils/types' -import useCart, { UseCart } from '@commerce/cart/use-cart' - -export default useCart as UseCart - -export const handler: SWRHook = { - fetchOptions: { - query: '', - }, - async fetcher() { - return { - id: '', - createdAt: '', - currency: { code: '' }, - taxesIncluded: '', - lineItems: [], - lineItemsSubtotalPrice: '', - subtotalPrice: 0, - totalPrice: 0, - } - }, - useHook: - ({ useData }) => - (input) => { - return useMemo( - () => - Object.create( - {}, - { - isEmpty: { - get() { - return true - }, - enumerable: true, - }, - } - ), - [] - ) - }, -} diff --git a/framework/local/cart/use-remove-item.tsx b/framework/local/cart/use-remove-item.tsx deleted file mode 100644 index b4ed583b8..000000000 --- a/framework/local/cart/use-remove-item.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { MutationHook } from '@commerce/utils/types' -import useRemoveItem, { UseRemoveItem } from '@commerce/cart/use-remove-item' - -export default useRemoveItem as UseRemoveItem - -export const handler: MutationHook = { - fetchOptions: { - query: '', - }, - async fetcher({ input, options, fetch }) {}, - useHook: - ({ fetch }) => - () => { - return async function removeItem(input) { - return {} - } - }, -} diff --git a/framework/local/cart/use-update-item.tsx b/framework/local/cart/use-update-item.tsx deleted file mode 100644 index 06d703f70..000000000 --- a/framework/local/cart/use-update-item.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { MutationHook } from '@commerce/utils/types' -import useUpdateItem, { UseUpdateItem } from '@commerce/cart/use-update-item' - -export default useUpdateItem as UseUpdateItem - -export const handler: MutationHook = { - fetchOptions: { - query: '', - }, - async fetcher({ input, options, fetch }) {}, - useHook: - ({ fetch }) => - () => { - return async function addItem() { - return {} - } - }, -} diff --git a/framework/local/commerce.config.json b/framework/local/commerce.config.json deleted file mode 100644 index 261211527..000000000 --- a/framework/local/commerce.config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "provider": "local", - "features": { - "wishlist": false, - "cart": false, - "search": false, - "customerAuth": false - } -} diff --git a/framework/local/customer/index.ts b/framework/local/customer/index.ts deleted file mode 100644 index 6c903ecc5..000000000 --- a/framework/local/customer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as useCustomer } from './use-customer' diff --git a/framework/local/customer/use-customer.tsx b/framework/local/customer/use-customer.tsx deleted file mode 100644 index 41757cd0d..000000000 --- a/framework/local/customer/use-customer.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { SWRHook } from '@commerce/utils/types' -import useCustomer, { UseCustomer } from '@commerce/customer/use-customer' - -export default useCustomer as UseCustomer -export const handler: SWRHook = { - fetchOptions: { - query: '', - }, - async fetcher({ input, options, fetch }) {}, - useHook: () => () => { - return async function addItem() { - return {} - } - }, -} diff --git a/framework/local/data.json b/framework/local/data.json deleted file mode 100644 index 18c8ee718..000000000 --- a/framework/local/data.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "products": [ - { - "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzU0NDczMjUwMjQ0MjA=", - "name": "New Short Sleeve T-Shirt", - "vendor": "Next.js", - "path": "/new-short-sleeve-t-shirt", - "slug": "new-short-sleeve-t-shirt", - "price": { "value": 25, "currencyCode": "USD" }, - "descriptionHtml": "

Show off your love for Next.js and Vercel with this unique, limited edition t-shirt. This design is part of a limited run, numbered drop at the June 2021 Next.js Conf. It features a unique, handcrafted triangle design. Get it while supplies last – only 200 of these shirts will be made! All proceeds will be donated to charity.

", - "images": [ - { - "url": "/assets/drop-shirt-0.png", - "altText": "Shirt", - "width": 1000, - "height": 1000 - }, - { - "url": "/assets/drop-shirt-1.png", - "altText": "Shirt", - "width": 1000, - "height": 1000 - }, - { - "url": "/assets/drop-shirt-2.png", - "altText": "Shirt", - "width": 1000, - "height": 1000 - } - ], - "variants": [ - { - "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzU0NDczMjUwMjQ0MjAss=", - "options": [ - { - "__typename": "MultipleChoiceOption", - "id": "asd", - "displayName": "Size", - "values": [ - { - "label": "XL" - } - ] - } - ] - } - ], - "options": [ - { - "id": "option-color", - "displayName": "Color", - "values": [ - { - "label": "color", - "hexColors": ["#222"] - } - ] - }, - { - "id": "option-size", - "displayName": "Size", - "values": [ - { - "label": "S" - }, - { - "label": "M" - }, - { - "label": "L" - } - ] - } - ] - }, - { - "id": "Z2lkOi8vc2hvcGlmeS9Qcm9ksdWN0LzU0NDczMjUwMjQ0MjA=", - "name": "Lightweight Jacket", - "vendor": "Next.js", - "path": "/lightweight-jacket", - "slug": "lightweight-jacket", - "price": { "value": 249.99, "currencyCode": "USD" }, - "descriptionHtml": "

Show off your love for Next.js and Vercel with this unique, limited edition t-shirt. This design is part of a limited run, numbered drop at the June 2021 Next.js Conf. It features a unique, handcrafted triangle design. Get it while supplies last – only 200 of these shirts will be made! All proceeds will be donated to charity.

", - "images": [ - { - "url": "/assets/lightweight-jacket-0.png", - "altText": "Lightweight Jacket", - "width": 1000, - "height": 1000 - }, - { - "url": "/assets/lightweight-jacket-1.png", - "altText": "Lightweight Jacket", - "width": 1000, - "height": 1000 - }, - { - "url": "/assets/lightweight-jacket-2.png", - "altText": "Lightweight Jacket", - "width": 1000, - "height": 1000 - } - ], - "variants": [ - { - "id": "Z2lkOid8vc2hvcGlmeS9Qcm9kdWN0LzU0NDczMjUwMjQ0MjAss=", - "options": [ - { - "__typename": "MultipleChoiceOption", - "id": "asd", - "displayName": "Size", - "values": [ - { - "label": "XL" - } - ] - } - ] - } - ], - "options": [ - { - "id": "option-color", - "displayName": "Color", - "values": [ - { - "label": "color", - "hexColors": ["#222"] - } - ] - }, - { - "id": "option-size", - "displayName": "Size", - "values": [ - { - "label": "S" - }, - { - "label": "M" - }, - { - "label": "L" - } - ] - } - ] - }, - { - "id": "Z2lkOis8vc2hvcGlmsddeS9Qcm9kdWN0LzU0NDczMjUwMjQ0MjA=", - "name": "Shirt", - "vendor": "Next.js", - "path": "/shirt", - "slug": "shirt", - "price": { "value": 25, "currencyCode": "USD" }, - "descriptionHtml": "

Show off your love for Next.js and Vercel with this unique, limited edition t-shirt. This design is part of a limited run, numbered drop at the June 2021 Next.js Conf. It features a unique, handcrafted triangle design. Get it while supplies last – only 200 of these shirts will be made! All proceeds will be donated to charity.

", - "images": [ - { - "url": "/assets/t-shirt-0.png", - "altText": "Shirt", - "width": 1000, - "height": 1000 - }, - { - "url": "/assets/t-shirt-1.png", - "altText": "Shirt", - "width": 1000, - "height": 1000 - }, - { - "url": "/assets/t-shirt-2.png", - "altText": "Shirt", - "width": 1000, - "height": 1000 - }, - { - "url": "/assets/t-shirt-3.png", - "altText": "Shirt", - "width": 1000, - "height": 1000 - }, - { - "url": "/assets/t-shirt-4.png", - "altText": "Shirt", - "width": 1000, - "height": 1000 - } - ], - "variants": [ - { - "id": "Z2lkOi8vc2hvcGlmeS9Qcms9kdWN0LzU0NDczMjUwMjQ0MjAss=", - "options": [ - { - "__typename": "MultipleChoiceOption", - "id": "asd", - "displayName": "Size", - "values": [ - { - "label": "XL" - } - ] - } - ] - } - ], - "options": [ - { - "id": "option-color", - "displayName": "Color", - "values": [ - { - "label": "color", - "hexColors": ["#222"] - } - ] - }, - { - "id": "option-size", - "displayName": "Size", - "values": [ - { - "label": "S" - }, - { - "label": "M" - }, - { - "label": "L" - } - ] - } - ] - } - ] -} diff --git a/framework/local/fetcher.ts b/framework/local/fetcher.ts deleted file mode 100644 index 69943d1df..000000000 --- a/framework/local/fetcher.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Fetcher } from '@commerce/utils/types' - -export const fetcher: Fetcher = async () => { - console.log('FETCHER') - const res = await fetch('./data.json') - if (res.ok) { - const { data } = await res.json() - return data - } - throw res -} diff --git a/framework/local/index.tsx b/framework/local/index.tsx deleted file mode 100644 index 2ec304f63..000000000 --- a/framework/local/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import * as React from 'react' -import { ReactNode } from 'react' -import { localProvider } from './provider' -import { - CommerceConfig, - CommerceProvider as CoreCommerceProvider, - useCommerce as useCoreCommerce, -} from '@commerce' - -export const localConfig: CommerceConfig = { - locale: 'en-us', - cartCookie: 'session', -} - -export function CommerceProvider({ - children, - ...config -}: { - children?: ReactNode - locale: string -} & Partial) { - return ( - - {children} - - ) -} - -export const useCommerce = () => useCoreCommerce() diff --git a/framework/local/next.config.js b/framework/local/next.config.js deleted file mode 100644 index ce46b706f..000000000 --- a/framework/local/next.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const commerce = require('./commerce.config.json') - -module.exports = { - commerce, - images: { - domains: ['localhost'], - }, -} diff --git a/framework/local/product/index.ts b/framework/local/product/index.ts deleted file mode 100644 index 426a3edcd..000000000 --- a/framework/local/product/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as usePrice } from './use-price' -export { default as useSearch } from './use-search' diff --git a/framework/local/product/use-price.tsx b/framework/local/product/use-price.tsx deleted file mode 100644 index 0174faf5e..000000000 --- a/framework/local/product/use-price.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export * from '@commerce/product/use-price' -export { default } from '@commerce/product/use-price' diff --git a/framework/local/product/use-search.tsx b/framework/local/product/use-search.tsx deleted file mode 100644 index 30e699537..000000000 --- a/framework/local/product/use-search.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { SWRHook } from '@commerce/utils/types' -import useSearch, { UseSearch } from '@commerce/product/use-search' -export default useSearch as UseSearch - -export const handler: SWRHook = { - fetchOptions: { - query: '', - }, - async fetcher({ input, options, fetch }) {}, - useHook: () => () => { - return { - data: { - products: [], - }, - } - }, -} diff --git a/framework/local/provider.ts b/framework/local/provider.ts deleted file mode 100644 index e6a2b0a21..000000000 --- a/framework/local/provider.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { fetcher } from './fetcher' -import { handler as useCart } from './cart/use-cart' -import { handler as useAddItem } from './cart/use-add-item' -import { handler as useUpdateItem } from './cart/use-update-item' -import { handler as useRemoveItem } from './cart/use-remove-item' -import { handler as useCustomer } from './customer/use-customer' -import { handler as useSearch } from './product/use-search' -import { handler as useLogin } from './auth/use-login' -import { handler as useLogout } from './auth/use-logout' -import { handler as useSignup } from './auth/use-signup' - -export type Provider = typeof localProvider -export const localProvider = { - locale: 'en-us', - cartCookie: 'session', - fetcher: fetcher, - cart: { useCart, useAddItem, useUpdateItem, useRemoveItem }, - customer: { useCustomer }, - products: { useSearch }, - auth: { useLogin, useLogout, useSignup }, -} diff --git a/framework/local/wishlist/use-add-item.tsx b/framework/local/wishlist/use-add-item.tsx deleted file mode 100644 index 75f067c3a..000000000 --- a/framework/local/wishlist/use-add-item.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { useCallback } from 'react' - -export function emptyHook() { - const useEmptyHook = async (options = {}) => { - return useCallback(async function () { - return Promise.resolve() - }, []) - } - - return useEmptyHook -} - -export default emptyHook diff --git a/framework/local/wishlist/use-remove-item.tsx b/framework/local/wishlist/use-remove-item.tsx deleted file mode 100644 index a2d3a8a05..000000000 --- a/framework/local/wishlist/use-remove-item.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { useCallback } from 'react' - -type Options = { - includeProducts?: boolean -} - -export function emptyHook(options?: Options) { - const useEmptyHook = async ({ id }: { id: string | number }) => { - return useCallback(async function () { - return Promise.resolve() - }, []) - } - - return useEmptyHook -} - -export default emptyHook diff --git a/framework/local/wishlist/use-wishlist.tsx b/framework/local/wishlist/use-wishlist.tsx deleted file mode 100644 index 9fe0e758f..000000000 --- a/framework/local/wishlist/use-wishlist.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { HookFetcher } from '@commerce/utils/types' -import type { Product } from '@commerce/types/product' - -const defaultOpts = {} - -export type Wishlist = { - items: [ - { - product_id: number - variant_id: number - id: number - product: Product - } - ] -} - -export interface UseWishlistOptions { - includeProducts?: boolean -} - -export interface UseWishlistInput extends UseWishlistOptions { - customerId?: number -} - -export const fetcher: HookFetcher = () => { - return null -} - -export function extendHook( - customFetcher: typeof fetcher, - // swrOptions?: SwrOptions - swrOptions?: any -) { - const useWishlist = ({ includeProducts }: UseWishlistOptions = {}) => { - return { data: null } - } - - useWishlist.extend = extendHook - - return useWishlist -} - -export default extendHook(fetcher) diff --git a/framework/saleor/.env.template b/framework/saleor/.env.template deleted file mode 100644 index 715fec861..000000000 --- a/framework/saleor/.env.template +++ /dev/null @@ -1,4 +0,0 @@ -COMMERCE_PROVIDER=saleor - -NEXT_SALEOR_API_URL= -NEXT_SALEOR_CHANNEL= diff --git a/framework/saleor/README.md b/framework/saleor/README.md deleted file mode 100644 index 00af272b0..000000000 --- a/framework/saleor/README.md +++ /dev/null @@ -1,22 +0,0 @@ -## Saleor Provider - -**Demo:** https://saleor.vercel.store/ - -You need a [Saleor](https://saleor.io/) instance, either in the cloud or self-hosted. - -This provider requires Saleor **3.x** or higher. - -Copy the `.env.template` file in this directory to `.env.local` in the main directory (which will be ignored by Git): - -```bash -cp framework/saleor/.env.template .env.local -``` - -Then, set the environment following variables in your `.env.local`. Both, `NEXT_PUBLIC_SALEOR_API_URL` and `COMMERCE_IMAGE_HOST` must point to your own Saleor instance. - -``` -COMMERCE_PROVIDER=saleor -NEXT_PUBLIC_SALEOR_API_URL=https://vercel.saleor.cloud/graphql/ -NEXT_PUBLIC_SALEOR_CHANNEL=default-channel -COMMERCE_IMAGE_HOST=vercel.saleor.cloud -``` diff --git a/framework/saleor/api/cart.ts b/framework/saleor/api/cart.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/saleor/api/cart.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/saleor/api/catalog/products.ts b/framework/saleor/api/catalog/products.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/saleor/api/catalog/products.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/saleor/api/checkout.ts b/framework/saleor/api/checkout.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/saleor/api/checkout.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/saleor/api/customers/index.ts b/framework/saleor/api/customers/index.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/saleor/api/customers/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/saleor/api/customers/login.ts b/framework/saleor/api/customers/login.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/saleor/api/customers/login.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/saleor/api/customers/logout.ts b/framework/saleor/api/customers/logout.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/saleor/api/customers/logout.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/saleor/api/customers/signup.ts b/framework/saleor/api/customers/signup.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/saleor/api/customers/signup.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/saleor/api/endpoints/cart.ts b/framework/saleor/api/endpoints/cart.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/saleor/api/endpoints/cart.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/saleor/api/endpoints/catalog/products.ts b/framework/saleor/api/endpoints/catalog/products.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/saleor/api/endpoints/catalog/products.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/saleor/api/endpoints/checkout/index.ts b/framework/saleor/api/endpoints/checkout/index.ts deleted file mode 100644 index f15672435..000000000 --- a/framework/saleor/api/endpoints/checkout/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { CommerceAPI, GetAPISchema, createEndpoint } from '@commerce/api' -import checkoutEndpoint from '@commerce/api/endpoints/checkout' -import { CheckoutSchema } from '@commerce/types/checkout' - -export type CheckoutAPI = GetAPISchema - -export type CheckoutEndpoint = CheckoutAPI['endpoint'] - -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ - req, - res, - config, -}) => { - try { - const html = ` - - - - - - Checkout - - -
- - - -

Checkout not yet implemented :(

-

- See #64 -

-
- - - ` - - res.status(200) - res.setHeader('Content-Type', 'text/html') - res.write(html) - res.end() - } catch (error) { - console.error(error) - - const message = 'An unexpected error ocurred' - - res.status(500).json({ data: null, errors: [{ message }] }) - } -} - -export const handlers: CheckoutEndpoint['handlers'] = { checkout } - -const checkoutApi = createEndpoint({ - handler: checkoutEndpoint, - handlers, -}) - -export default checkoutApi diff --git a/framework/saleor/api/endpoints/customer.ts b/framework/saleor/api/endpoints/customer.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/saleor/api/endpoints/customer.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/saleor/api/endpoints/login.ts b/framework/saleor/api/endpoints/login.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/saleor/api/endpoints/login.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/saleor/api/endpoints/logout.ts b/framework/saleor/api/endpoints/logout.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/saleor/api/endpoints/logout.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/saleor/api/endpoints/signup.ts b/framework/saleor/api/endpoints/signup.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/saleor/api/endpoints/signup.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/saleor/api/endpoints/wishlist.ts b/framework/saleor/api/endpoints/wishlist.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/saleor/api/endpoints/wishlist.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/saleor/api/index.ts b/framework/saleor/api/index.ts deleted file mode 100644 index 5ae5f3a8a..000000000 --- a/framework/saleor/api/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { CommerceAPIConfig } from '@commerce/api' - -import * as Const from '../const' - -if (!Const.API_URL) { - throw new Error(`The environment variable NEXT_SALEOR_API_URL is missing and it's required to access your store`) -} - -if (!Const.API_CHANNEL) { - throw new Error(`The environment variable NEXT_SALEOR_CHANNEL is missing and it's required to access your store`) -} - -import fetchGraphqlApi from './utils/fetch-graphql-api' - -export interface SaleorConfig extends CommerceAPIConfig { - storeChannel: string -} - -const config: SaleorConfig = { - locale: 'en-US', - commerceUrl: Const.API_URL, - apiToken: Const.SALEOR_TOKEN, - cartCookie: Const.CHECKOUT_ID_COOKIE, - cartCookieMaxAge: 60 * 60 * 24 * 30, - fetch: fetchGraphqlApi, - customerCookie: '', - storeChannel: Const.API_CHANNEL, -} - -import { - CommerceAPI, - getCommerceApi as commerceApi, -} from '@commerce/api' - -import * as operations from './operations' - -export interface ShopifyConfig extends CommerceAPIConfig {} - -export const provider = { config, operations } - -export type Provider = typeof provider - -export type SaleorAPI

= CommerceAPI

- -export function getCommerceApi

( - customProvider: P = provider as any -): SaleorAPI

{ - return commerceApi(customProvider) -} diff --git a/framework/saleor/api/operations/get-all-pages.ts b/framework/saleor/api/operations/get-all-pages.ts deleted file mode 100644 index f3ed54e27..000000000 --- a/framework/saleor/api/operations/get-all-pages.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { OperationContext } from '@commerce/api/operations' - -import { QueryPagesArgs, PageCountableEdge } from '../../schema' -import type { SaleorConfig, Provider } from '..' -import * as Query from '../../utils/queries' - -export type Page = any - - export type GetAllPagesResult< - T extends { pages: any[] } = { pages: Page[] } - > = T - -export default function getAllPagesOperation({ - commerce, -}: OperationContext) { - - async function getAllPages({ - query = Query.PageMany, - config, - variables, - }: { - url?: string - config?: Partial - variables?: QueryPagesArgs - preview?: boolean - query?: string - } = {}): Promise { - const { fetch, locale, locales = ['en-US'] } = commerce.getConfig(config) - - const { data } = await fetch(query, { variables }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - const pages = data.pages?.edges?.map(({ node: { title: name, slug, ...node } }: PageCountableEdge) => ({ - ...node, - url: `/${locale}/${slug}`, - name, - })) - - return { pages } - } - - return getAllPages -} diff --git a/framework/saleor/api/operations/get-all-product-paths.ts b/framework/saleor/api/operations/get-all-product-paths.ts deleted file mode 100644 index 43ce7de94..000000000 --- a/framework/saleor/api/operations/get-all-product-paths.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { OperationContext } from '@commerce/api/operations' -import { - GetAllProductPathsQuery, - GetAllProductPathsQueryVariables, - ProductCountableEdge, -} from '../../schema' -import type { ShopifyConfig, Provider, SaleorConfig } from '..' - -import { getAllProductsPathsQuery } from '../../utils/queries' -import fetchAllProducts from '../utils/fetch-all-products' - -export type GetAllProductPathsResult = { - products: Array<{ path: string }> -} - -export default function getAllProductPathsOperation({ - commerce, -}: OperationContext) { - - async function getAllProductPaths({ - query, - config, - variables, - }: { - query?: string - config?: SaleorConfig - variables?: any - } = {}): Promise { - config = commerce.getConfig(config) - - const products = await fetchAllProducts({ - config, - query: getAllProductsPathsQuery, - variables, - }) - - return { - products: products?.map(({ node: { slug } }: ProductCountableEdge) => ({ - path: `/${slug}`, - })), - } - - } - - return getAllProductPaths -} diff --git a/framework/saleor/api/operations/get-all-products.ts b/framework/saleor/api/operations/get-all-products.ts deleted file mode 100644 index a1a7ce0c9..000000000 --- a/framework/saleor/api/operations/get-all-products.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { OperationContext } from '@commerce/api/operations' -import { Product } from '@commerce/types/product' - -import { ProductCountableEdge } from '../../schema' -import type { Provider, SaleorConfig } from '..' -import { normalizeProduct } from '../../utils' - -import * as Query from '../../utils/queries' -import { GraphQLFetcherResult } from '@commerce/api' - -type ReturnType = { - products: Product[] -} - -export default function getAllProductsOperation({ - commerce, -}: OperationContext) { - async function getAllProducts({ - query = Query.ProductMany, - variables, - config, - featured, - }: { - query?: string - variables?: any - config?: Partial - preview?: boolean - featured?: boolean - } = {}): Promise { - const { fetch, locale } = commerce.getConfig(config) - - if (featured) { - variables = { ...variables, categoryId: 'Q29sbGVjdGlvbjo0' }; - query = Query.CollectionOne - } - - - const { data }: GraphQLFetcherResult = await fetch( - query, - { variables }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - if (featured) { - const products = data.collection.products?.edges?.map(({ node: p }: ProductCountableEdge) => normalizeProduct(p)) ?? [] - - return { - products, - } - } else { - const products = data.products?.edges?.map(({ node: p }: ProductCountableEdge) => normalizeProduct(p)) ?? [] - - return { - products, - } - } - - } - - return getAllProducts -} diff --git a/framework/saleor/api/operations/get-page.ts b/framework/saleor/api/operations/get-page.ts deleted file mode 100644 index af2d5b8e6..000000000 --- a/framework/saleor/api/operations/get-page.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { OperationContext } from '@commerce/api/operations' -import type { Provider, SaleorConfig } from '..' -import { QueryPageArgs } from '../../schema' - -import * as Query from '../../utils/queries' - -export type Page = any - - export type GetPageResult = T - -export default function getPageOperation({ - commerce, -}: OperationContext) { - - async function getPage({ - query = Query.PageOne, - variables, - config, - }: { - query?: string - variables: QueryPageArgs, - config?: Partial - preview?: boolean - }): Promise { - const { fetch, locale = 'en-US' } = commerce.getConfig(config) - - const { - data: { page }, - } = await fetch(query, { variables }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - return { - page: page - ? { - ...page, - name: page.title, - url: `/${locale}/${page.slug}`, - } - : null, - } - } - - return getPage -} diff --git a/framework/saleor/api/operations/get-product.ts b/framework/saleor/api/operations/get-product.ts deleted file mode 100644 index 85fca934a..000000000 --- a/framework/saleor/api/operations/get-product.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { OperationContext } from '@commerce/api/operations' -import { normalizeProduct, } from '../../utils' -import type { Provider, SaleorConfig } from '..' - -import * as Query from '../../utils/queries' - -type Variables = { - slug: string -} - -type ReturnType = { - product: any -} - -export default function getProductOperation({ - commerce, -}: OperationContext) { - async function getProduct({ - query = Query.ProductOneBySlug, - variables, - config: cfg, - }: { - query?: string - variables: Variables - config?: Partial - preview?: boolean - }): Promise { - const { fetch, locale } = commerce.getConfig(cfg) - - const { data } = await fetch(query, { variables }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - return { - product: data?.product ? normalizeProduct(data.product) : null, - } - } - - return getProduct -} diff --git a/framework/saleor/api/operations/get-site-info.ts b/framework/saleor/api/operations/get-site-info.ts deleted file mode 100644 index eca0f2246..000000000 --- a/framework/saleor/api/operations/get-site-info.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { OperationContext } from '@commerce/api/operations' -import { Category } from '@commerce/types/site' -import type { SaleorConfig, Provider } from '..' - -import { getCategories, getVendors } from '../../utils' - -interface GetSiteInfoResult { - categories: Category[] - brands: any[] -} - -export default function getSiteInfoOperation({ commerce }: OperationContext) { - async function getSiteInfo({ - query, - config, - variables, - }: { - query?: string - config?: Partial - preview?: boolean - variables?: any - } = {}): Promise { - const cfg = commerce.getConfig(config) - - const categories = await getCategories(cfg) - const brands = await getVendors(cfg) - - return { - categories, - brands, - } - } - - return getSiteInfo -} diff --git a/framework/saleor/api/operations/index.ts b/framework/saleor/api/operations/index.ts deleted file mode 100644 index 7872a20b6..000000000 --- a/framework/saleor/api/operations/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { default as getAllPages } from './get-all-pages' -export { default as getPage } from './get-page' -export { default as getAllProducts } from './get-all-products' -export { default as getAllProductPaths } from './get-all-product-paths' -export { default as getProduct } from './get-product' -export { default as getSiteInfo } from './get-site-info' -export { default as login } from './login' diff --git a/framework/saleor/api/operations/login.ts b/framework/saleor/api/operations/login.ts deleted file mode 100644 index ca680b82c..000000000 --- a/framework/saleor/api/operations/login.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { ServerResponse } from 'http' -import type { OperationContext } from '@commerce/api/operations' -import type { Provider, SaleorConfig } from '..' -import { - throwUserErrors, -} from '../../utils' - -import * as Mutation from '../../utils/mutations' - -export default function loginOperation({ - commerce, -}: OperationContext) { - async function login({ - query = Mutation.SessionCreate, - variables, - config, - }: { - query?: string - variables: any - res: ServerResponse - config?: SaleorConfig - }): Promise { - config = commerce.getConfig(config) - - const { data: { customerAccessTokenCreate } } = await config.fetch(query, { variables }) - - throwUserErrors(customerAccessTokenCreate?.customerUserErrors) - - const customerAccessToken = customerAccessTokenCreate?.customerAccessToken - const accessToken = customerAccessToken?.accessToken - - // if (accessToken) { - // setCustomerToken(accessToken) - // } - - return { - result: customerAccessToken?.accessToken, - } - } - - return login -} diff --git a/framework/saleor/api/utils/fetch-all-products.ts b/framework/saleor/api/utils/fetch-all-products.ts deleted file mode 100644 index 1cfb3157c..000000000 --- a/framework/saleor/api/utils/fetch-all-products.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ProductCountableEdge } from '../../schema' -import { SaleorConfig } from '..' - -const fetchAllProducts = async ({ - config, - query, - variables, - acc = [], - cursor, -}: { - config: SaleorConfig - query: string - acc?: ProductCountableEdge[] - variables?: any - cursor?: string -}): Promise => { - const { data } = await config.fetch(query, { - variables: { ...variables, cursor }, - }) - - const edges: ProductCountableEdge[] = data.products?.edges ?? [] - const hasNextPage = data.products?.pageInfo?.hasNextPage - acc = acc.concat(edges) - - if (hasNextPage) { - const cursor = edges.pop()?.cursor - if (cursor) { - return fetchAllProducts({ - config, - query, - variables, - acc, - cursor, - }) - } - } - - return acc -} - -export default fetchAllProducts diff --git a/framework/saleor/api/utils/fetch-graphql-api.ts b/framework/saleor/api/utils/fetch-graphql-api.ts deleted file mode 100644 index 3145409ad..000000000 --- a/framework/saleor/api/utils/fetch-graphql-api.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { GraphQLFetcher } from '@commerce/api' -import fetch from './fetch' - -import { API_URL } from '../../const' -import { getError } from '../../utils/handle-fetch-response' -import { getCommerceApi } from '..' -import { getToken } from '../../utils/index' - -const fetchGraphqlApi: GraphQLFetcher = async (query: string, { variables } = {}, fetchOptions) => { - const config = getCommerceApi().getConfig() - const token = getToken() - - const res = await fetch(API_URL!, { - ...fetchOptions, - method: 'POST', - headers: { - ...(token && { - Authorization: `Bearer ${token}`, - }), - ...fetchOptions?.headers, - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - query, - variables, - }), - }) - - const { data, errors, status } = await res.json() - - if (errors) { - throw getError(errors, status) - } - - return { data, res } -} -export default fetchGraphqlApi diff --git a/framework/saleor/api/utils/fetch.ts b/framework/saleor/api/utils/fetch.ts deleted file mode 100644 index 0b8367102..000000000 --- a/framework/saleor/api/utils/fetch.ts +++ /dev/null @@ -1,2 +0,0 @@ -import zeitFetch from '@vercel/fetch' -export default zeitFetch() diff --git a/framework/saleor/api/utils/is-allowed-method.ts b/framework/saleor/api/utils/is-allowed-method.ts deleted file mode 100644 index cbaab2251..000000000 --- a/framework/saleor/api/utils/is-allowed-method.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { NextApiRequest, NextApiResponse } from 'next' - -export default function isAllowedMethod(req: NextApiRequest, res: NextApiResponse, allowedMethods: string[]) { - const methods = allowedMethods.includes('OPTIONS') ? allowedMethods : [...allowedMethods, 'OPTIONS'] - - if (!req.method || !methods.includes(req.method)) { - res.status(405) - res.setHeader('Allow', methods.join(', ')) - res.end() - return false - } - - if (req.method === 'OPTIONS') { - res.status(200) - res.setHeader('Allow', methods.join(', ')) - res.setHeader('Content-Length', '0') - res.end() - return false - } - - return true -} diff --git a/framework/saleor/api/wishlist.ts b/framework/saleor/api/wishlist.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/saleor/api/wishlist.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/saleor/auth/use-login.tsx b/framework/saleor/auth/use-login.tsx deleted file mode 100644 index 2a31c932b..000000000 --- a/framework/saleor/auth/use-login.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { useCallback } from 'react' - -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useCustomer from '../customer/use-customer' -import * as mutation from '../utils/mutations' -import { Mutation, MutationTokenCreateArgs } from '../schema' -import useLogin, { UseLogin } from '@commerce/auth/use-login' -import { setCSRFToken, setToken, throwUserErrors, checkoutAttach, getCheckoutId } from '../utils' -import { LoginHook } from '@commerce/types/login' - -export default useLogin as UseLogin - -export const handler: MutationHook = { - fetchOptions: { - query: mutation.SessionCreate, - }, - async fetcher({ input: { email, password }, options, fetch }) { - if (!(email && password)) { - throw new CommerceError({ - message: 'A first name, last name, email and password are required to login', - }) - } - - const { tokenCreate } = await fetch({ - ...options, - variables: { email, password }, - }) - - throwUserErrors(tokenCreate?.errors) - - const { token, csrfToken } = tokenCreate! - - if (token && csrfToken) { - setToken(token) - setCSRFToken(csrfToken) - - const { checkoutId } = getCheckoutId() - checkoutAttach(fetch, { - variables: { checkoutId }, - headers: { - Authorization: `JWT ${token}`, - }, - }) - } - - return null - }, - useHook: - ({ fetch }) => - () => { - const { revalidate } = useCustomer() - - return useCallback( - async function login(input) { - const data = await fetch({ input }) - await revalidate() - return data - }, - [fetch, revalidate] - ) - }, -} diff --git a/framework/saleor/auth/use-logout.tsx b/framework/saleor/auth/use-logout.tsx deleted file mode 100644 index fe75df84b..000000000 --- a/framework/saleor/auth/use-logout.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import useLogout, { UseLogout } from '@commerce/auth/use-logout' -import useCustomer from '../customer/use-customer' -import * as mutation from '../utils/mutations' -import { setCSRFToken, setToken, setCheckoutToken } from '../utils/customer-token' -import { LogoutHook } from '@commerce/types/logout' - -export default useLogout as UseLogout - -export const handler: MutationHook = { - fetchOptions: { - query: mutation.SessionDestroy, - }, - async fetcher({ options, fetch }) { - await fetch({ - ...options, - variables: {}, - }) - - setToken() - setCSRFToken() - setCheckoutToken() - - return null - }, - useHook: - ({ fetch }) => - () => { - const { mutate } = useCustomer() - - return useCallback( - async function logout() { - const data = await fetch() - await mutate(null, false) - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/saleor/auth/use-signup.tsx b/framework/saleor/auth/use-signup.tsx deleted file mode 100644 index d9e91b468..000000000 --- a/framework/saleor/auth/use-signup.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useSignup, { UseSignup } from '@commerce/auth/use-signup' -import useCustomer from '../customer/use-customer' -import { AccountRegisterInput, Mutation, MutationAccountRegisterArgs } from '../schema' - -import * as mutation from '../utils/mutations' -import { handleAutomaticLogin, throwUserErrors } from '../utils' -import { SignupHook } from '@commerce/types/signup' - -export default useSignup as UseSignup - -export const handler: MutationHook = { - fetchOptions: { - query: mutation.AccountCreate, - }, - async fetcher({ input: { email, password }, options, fetch }) { - if (!(email && password)) { - throw new CommerceError({ - message: 'A first name, last name, email and password are required to signup', - }) - } - - const { customerCreate } = await fetch({ - ...options, - variables: { - input: { - email, - password, - redirectUrl: 'https://localhost.com', - channel: 'default-channel' - }, - }, - }) - - throwUserErrors(customerCreate?.errors) - await handleAutomaticLogin(fetch, { email, password }) - - return null - }, - useHook: - ({ fetch }) => - () => { - const { revalidate } = useCustomer() - - return useCallback( - async function signup(input) { - const data = await fetch({ input }) - await revalidate() - return data - }, - [fetch, revalidate] - ) - }, -} diff --git a/framework/saleor/cart/index.ts b/framework/saleor/cart/index.ts deleted file mode 100644 index f6d36b443..000000000 --- a/framework/saleor/cart/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { default as useCart } from './use-cart' -export { default as useAddItem } from './use-add-item' -export { default as useUpdateItem } from './use-update-item' -export { default as useRemoveItem } from './use-remove-item' diff --git a/framework/saleor/cart/use-add-item.tsx b/framework/saleor/cart/use-add-item.tsx deleted file mode 100644 index 3af368e70..000000000 --- a/framework/saleor/cart/use-add-item.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useAddItem, { UseAddItem } from '@commerce/cart/use-add-item' -import useCart from './use-cart' - -import * as mutation from '../utils/mutations' - -import { getCheckoutId, checkoutToCart } from '../utils' - -import { Mutation, MutationCheckoutLinesAddArgs } from '../schema' -import { AddItemHook } from '@commerce/types/cart' - -export default useAddItem as UseAddItem - -export const handler: MutationHook = { - fetchOptions: { query: mutation.CheckoutLineAdd }, - async fetcher({ input: item, options, fetch }) { - if (item.quantity && (!Number.isInteger(item.quantity) || item.quantity! < 1)) { - throw new CommerceError({ - message: 'The item quantity has to be a valid integer greater than 0', - }) - } - - const { checkoutLinesAdd } = await fetch({ - ...options, - variables: { - checkoutId: getCheckoutId().checkoutId, - lineItems: [ - { - variantId: item.variantId, - quantity: item.quantity ?? 1, - }, - ], - }, - }) - - return checkoutToCart(checkoutLinesAdd) - }, - useHook: - ({ fetch }) => - () => { - const { mutate } = useCart() - - return useCallback( - async function addItem(input) { - const data = await fetch({ input }) - await mutate(data, false) - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/saleor/cart/use-cart.tsx b/framework/saleor/cart/use-cart.tsx deleted file mode 100644 index ab80ea395..000000000 --- a/framework/saleor/cart/use-cart.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { useMemo } from 'react' -import useCommerceCart, { UseCart } from '@commerce/cart/use-cart' - -import { SWRHook } from '@commerce/utils/types' -import { checkoutCreate, checkoutToCart, getCheckoutId } from '../utils' -import * as query from '../utils/queries' -import { GetCartHook } from '@commerce/types/cart' - -export default useCommerceCart as UseCart - -export const handler: SWRHook = { - fetchOptions: { - query: query.CheckoutOne, - }, - async fetcher({ input: { cartId: checkoutId }, options, fetch }) { - let checkout - - if (checkoutId) { - const checkoutId = getCheckoutId().checkoutToken - const data = await fetch({ - ...options, - variables: { checkoutId }, - }) - - checkout = data - } - - if (checkout?.completedAt || !checkoutId) { - checkout = await checkoutCreate(fetch) - } - - return checkoutToCart(checkout) - }, - useHook: - ({ useData }) => - (input) => { - const response = useData({ - swrOptions: { revalidateOnFocus: false, ...input?.swrOptions }, - }) - return useMemo( - () => - Object.create(response, { - isEmpty: { - get() { - return (response.data?.lineItems.length ?? 0) <= 0 - }, - enumerable: true, - }, - }), - [response] - ) - }, -} diff --git a/framework/saleor/cart/use-remove-item.tsx b/framework/saleor/cart/use-remove-item.tsx deleted file mode 100644 index 81f9c122f..000000000 --- a/framework/saleor/cart/use-remove-item.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHookContext, HookFetcherContext, MutationHook } from '@commerce/utils/types' -import useRemoveItem, { UseRemoveItem } from '@commerce/cart/use-remove-item' -import useCart from './use-cart' -import * as mutation from '../utils/mutations' -import { getCheckoutId, checkoutToCart } from '../utils' -import { Mutation, MutationCheckoutLineDeleteArgs } from '../schema' -import { LineItem, RemoveItemHook } from '../types/cart' - -export default useRemoveItem as UseRemoveItem - -export const handler = { - fetchOptions: { query: mutation.CheckoutLineDelete }, - async fetcher({ input: { itemId }, options, fetch }: HookFetcherContext) { - const data = await fetch({ - ...options, - variables: { - checkoutId: getCheckoutId().checkoutId, - lineId: itemId, - }, - }) - return checkoutToCart(data.checkoutLineDelete) - }, - useHook: ({ fetch }: MutationHookContext) => < - T extends LineItem | undefined = undefined - > () => { - const { mutate } = useCart() - - return useCallback( - async function removeItem(input) { - const data = await fetch({ input: { itemId: input.id } }) - await mutate(data, false) - - return data - }, - [fetch, mutate] - ); - }, -} diff --git a/framework/saleor/cart/use-update-item.tsx b/framework/saleor/cart/use-update-item.tsx deleted file mode 100644 index 361ae5cdf..000000000 --- a/framework/saleor/cart/use-update-item.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { useCallback } from 'react' -import debounce from 'lodash.debounce' -import type { HookFetcherContext, MutationHookContext } from '@commerce/utils/types' -import { ValidationError } from '@commerce/utils/errors' -import useUpdateItem, { UseUpdateItem } from '@commerce/cart/use-update-item' - -import useCart from './use-cart' -import { handler as removeItemHandler } from './use-remove-item' -import type { LineItem } from '../types' -import { checkoutToCart } from '../utils' -import { getCheckoutId } from '../utils' -import { Mutation, MutationCheckoutLinesUpdateArgs } from '../schema' - -import * as mutation from '../utils/mutations' - -import type { UpdateItemHook } from '../types/cart' - -export type UpdateItemActionInput = T extends LineItem - ? Partial - : UpdateItemHook['actionInput'] - -export default useUpdateItem as UseUpdateItem - -export const handler = { - fetchOptions: { query: mutation.CheckoutLineUpdate }, - async fetcher({ - input: { itemId, item }, - options, - fetch - }: HookFetcherContext) { - if (Number.isInteger(item.quantity)) { - // Also allow the update hook to remove an item if the quantity is lower than 1 - if (item.quantity! < 1) { - return removeItemHandler.fetcher({ - options: removeItemHandler.fetchOptions, - input: { itemId }, - fetch, - }) - } - } else if (item.quantity) { - throw new ValidationError({ - message: 'The item quantity has to be a valid integer', - }) - } - - const checkoutId = getCheckoutId().checkoutId - const { checkoutLinesUpdate } = await fetch({ - ...options, - variables: { - checkoutId, - lineItems: [ - { - variantId: item.variantId, - quantity: item.quantity, - }, - ], - }, - }) - - return checkoutToCart(checkoutLinesUpdate) - }, - useHook: ({ fetch }: MutationHookContext) => - ( - ctx: { - item?: T - wait?: number - } = {} - ) => { - const { item } = ctx - const { mutate } = useCart() as any - - return useCallback( - debounce(async (input: UpdateItemActionInput) => { - const itemId = input.id ?? item?.id - const productId = input.productId ?? item?.productId - const variantId = input.productId ?? item?.variantId - if (!itemId || !productId || !variantId) { - throw new ValidationError({ - message: 'Invalid input used for this operation', - }) - } - - const data = await fetch({ - input: { - item: { - productId, - variantId, - quantity: input.quantity, - }, - itemId, - }, - }) - await mutate(data, false) - return data - }, ctx.wait ?? 500), - [fetch, mutate] - ) - }, -} diff --git a/framework/saleor/commerce.config.json b/framework/saleor/commerce.config.json deleted file mode 100644 index d5a1ac35d..000000000 --- a/framework/saleor/commerce.config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "provider": "saleor", - "features": { - "wishlist": false, - "customCheckout": true - } -} diff --git a/framework/saleor/const.ts b/framework/saleor/const.ts deleted file mode 100644 index df348770d..000000000 --- a/framework/saleor/const.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const API_URL = process.env.NEXT_PUBLIC_SALEOR_API_URL -export const API_CHANNEL = process.env.NEXT_PUBLIC_SALEOR_CHANNEL -export const CHECKOUT_ID_COOKIE = 'saleor.CheckoutID' -export const SALEOR_TOKEN = 'saleor.Token' -export const SALEOR_CRSF_TOKEN = 'saleor.CSRFToken' diff --git a/framework/saleor/customer/index.ts b/framework/saleor/customer/index.ts deleted file mode 100644 index 6c903ecc5..000000000 --- a/framework/saleor/customer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as useCustomer } from './use-customer' diff --git a/framework/saleor/customer/use-customer.tsx b/framework/saleor/customer/use-customer.tsx deleted file mode 100644 index 1e0e63d5a..000000000 --- a/framework/saleor/customer/use-customer.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import useCustomer, { UseCustomer } from '@commerce/customer/use-customer' -import { CustomerHook } from '@commerce/types/customer' -import { SWRHook } from '@commerce/utils/types' - -import * as query from '../utils/queries' - -export default useCustomer as UseCustomer - -export const handler: SWRHook = { - fetchOptions: { - query: query.CustomerCurrent, - }, - async fetcher({ options, fetch }) { - const data = await fetch({ - ...options, - variables: {}, - }) - return data.me ?? null - }, - useHook: - ({ useData }) => - (input) => { - return useData({ - swrOptions: { - revalidateOnFocus: false, - ...input?.swrOptions, - }, - }) - }, -} diff --git a/framework/saleor/fetcher.ts b/framework/saleor/fetcher.ts deleted file mode 100644 index 9d3c0bf89..000000000 --- a/framework/saleor/fetcher.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Fetcher } from '@commerce/utils/types' -import { API_URL } from './const' -import { getToken, handleFetchResponse } from './utils' - -const fetcher: Fetcher = async ({ url = API_URL, method = 'POST', variables, query }) => { - const token = getToken() - - return handleFetchResponse( - await fetch(url!, { - method, - body: JSON.stringify({ query, variables }), - headers: { - Authorization: `JWT ${token}`, - 'Content-Type': 'application/json', - }, - }) - ) -} - -export default fetcher diff --git a/framework/saleor/index.tsx b/framework/saleor/index.tsx deleted file mode 100644 index 5c9e61ec8..000000000 --- a/framework/saleor/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import * as React from 'react' -import { ReactNode } from 'react' - -import { CommerceConfig, CommerceProvider as CoreCommerceProvider, useCommerce as useCoreCommerce } from '@commerce' - -import { saleorProvider, SaleorProvider } from './provider' -import * as Const from './const' - -export { saleorProvider } -export type { SaleorProvider } - -export const saleorConfig: CommerceConfig = { - locale: 'en-us', - cartCookie: Const.CHECKOUT_ID_COOKIE, -} - -export type SaleorConfig = Partial - -export type SaleorProps = { - children?: ReactNode - locale: string -} & SaleorConfig - -export function CommerceProvider({ children, ...config }: SaleorProps) { - return ( - - {children} - - ) -} - -export const useCommerce = () => useCoreCommerce() diff --git a/framework/saleor/next.config.js b/framework/saleor/next.config.js deleted file mode 100644 index 397a37b2a..000000000 --- a/framework/saleor/next.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const commerce = require('./commerce.config.json') - -module.exports = { - commerce, - images: { - domains: [process.env.COMMERCE_IMAGE_HOST], - }, -} diff --git a/framework/saleor/product/use-price.tsx b/framework/saleor/product/use-price.tsx deleted file mode 100644 index 0174faf5e..000000000 --- a/framework/saleor/product/use-price.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export * from '@commerce/product/use-price' -export { default } from '@commerce/product/use-price' diff --git a/framework/saleor/product/use-search.tsx b/framework/saleor/product/use-search.tsx deleted file mode 100644 index cc763c4b7..000000000 --- a/framework/saleor/product/use-search.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import { SWRHook } from '@commerce/utils/types' -import { Product } from '@commerce/types/product' -import useSearch, { UseSearch } from '@commerce/product/use-search' - -import { ProductCountableEdge } from '../schema' -import { getSearchVariables, normalizeProduct } from '../utils' - -import * as query from '../utils/queries' -import { SearchProductsHook } from '@commerce/types/product' - -export default useSearch as UseSearch - -export type SearchProductsInput = { - search?: string - categoryId?: string | number - brandId?: string | number - sort?: string -} - -export type SearchProductsData = { - products: Product[] - found: boolean -} - -export const handler: SWRHook = { - fetchOptions: { - query: query.ProductMany, - }, - async fetcher({ input, options, fetch }) { - const { categoryId, brandId } = input - - const data = await fetch({ - query: categoryId ? query.CollectionOne : options.query, - method: options?.method, - variables: getSearchVariables(input), - }) - - let edges - - if (categoryId) { - edges = data.collection?.products?.edges ?? [] - // FIXME @zaiste, no `vendor` in Saleor - // if (brandId) { - // edges = edges.filter( - // ({ node: { vendor } }: ProductCountableEdge) => - // vendor.replace(/\s+/g, '-').toLowerCase() === brandId - // ) - // } - } else { - edges = data.products?.edges ?? [] - } - - return { - products: edges.map(({ node }: ProductCountableEdge) => normalizeProduct(node)), - found: !!edges.length, - } - }, - useHook: - ({ useData }) => - (input = {}) => { - return useData({ - input: [ - ['search', input.search], - ['categoryId', input.categoryId], - ['brandId', input.brandId], - ['sort', input.sort], - ], - swrOptions: { - revalidateOnFocus: false, - ...input.swrOptions, - }, - }) - }, -} diff --git a/framework/saleor/provider.ts b/framework/saleor/provider.ts deleted file mode 100644 index 2ca96475a..000000000 --- a/framework/saleor/provider.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { handler as useCart } from './cart/use-cart' -import { handler as useAddItem } from './cart/use-add-item' -import { handler as useUpdateItem } from './cart/use-update-item' -import { handler as useRemoveItem } from './cart/use-remove-item' - -import { handler as useCustomer } from './customer/use-customer' -import { handler as useSearch } from './product/use-search' - -import { handler as useLogin } from './auth/use-login' -import { handler as useLogout } from './auth/use-logout' -import { handler as useSignup } from './auth/use-signup' - -import fetcher from './fetcher' - -export const saleorProvider = { - locale: 'en-us', - cartCookie: '', - cartCookieToken: '', - fetcher, - cart: { useCart, useAddItem, useUpdateItem, useRemoveItem }, - customer: { useCustomer }, - products: { useSearch }, - auth: { useLogin, useLogout, useSignup }, -} - -export type SaleorProvider = typeof saleorProvider diff --git a/framework/saleor/schema.d.ts b/framework/saleor/schema.d.ts deleted file mode 100644 index 339e7269d..000000000 --- a/framework/saleor/schema.d.ts +++ /dev/null @@ -1,11488 +0,0 @@ -export type Maybe = T | null -export type Exact = { - [K in keyof T]: T[K] -} -export type MakeOptional = Omit & { [SubKey in K]?: Maybe } -export type MakeMaybe = Omit & { [SubKey in K]: Maybe } -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string - String: string - Boolean: boolean - Int: number - Float: number - /** - * The `Date` scalar type represents a Date - * value as specified by - * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). - */ - Date: any - /** - * The `DateTime` scalar type represents a DateTime - * value as specified by - * [iso8601](https://en.wikipedia.org/wiki/ISO_8601). - */ - DateTime: any - /** - * The `GenericScalar` scalar type represents a generic - * GraphQL scalar value that could be: - * String, Boolean, Int, Float, List or Object. - */ - GenericScalar: any - /** - * Allows use of a JSON String for input / output from the GraphQL schema. - * - * Use of this type is *not recommended* as you lose the benefits of having a defined, static - * schema (one of the key benefits of GraphQL). - */ - JSONString: any - /** - * Positive Decimal scalar implementation. - * - * Should be used in places where value must be positive. - */ - PositiveDecimal: any - UUID: any - /** Variables of this type must be set to null in mutations. They will be replaced with a filename from a following multipart part containing a binary file. See: https://github.com/jaydenseric/graphql-multipart-request-spec. */ - Upload: any - WeightScalar: any - /** Anything */ - _Any: any -} - -/** Create a new address for the customer. */ -export type AccountAddressCreate = { - __typename?: 'AccountAddressCreate' - /** A user instance for which the address was created. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - address?: Maybe

-} - -/** Delete an address of the logged-in user. */ -export type AccountAddressDelete = { - __typename?: 'AccountAddressDelete' - /** A user instance for which the address was deleted. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - address?: Maybe
-} - -/** Updates an address of the logged-in user. */ -export type AccountAddressUpdate = { - __typename?: 'AccountAddressUpdate' - /** A user object for which the address was edited. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - address?: Maybe
-} - -/** Remove user account. */ -export type AccountDelete = { - __typename?: 'AccountDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - user?: Maybe -} - -export type AccountError = { - __typename?: 'AccountError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: AccountErrorCode - /** A type of address that causes the error. */ - addressType?: Maybe -} - -/** An enumeration. */ -export enum AccountErrorCode { - ActivateOwnAccount = 'ACTIVATE_OWN_ACCOUNT', - ActivateSuperuserAccount = 'ACTIVATE_SUPERUSER_ACCOUNT', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - DeactivateOwnAccount = 'DEACTIVATE_OWN_ACCOUNT', - DeactivateSuperuserAccount = 'DEACTIVATE_SUPERUSER_ACCOUNT', - DeleteNonStaffUser = 'DELETE_NON_STAFF_USER', - DeleteOwnAccount = 'DELETE_OWN_ACCOUNT', - DeleteStaffAccount = 'DELETE_STAFF_ACCOUNT', - DeleteSuperuserAccount = 'DELETE_SUPERUSER_ACCOUNT', - GraphqlError = 'GRAPHQL_ERROR', - Inactive = 'INACTIVE', - Invalid = 'INVALID', - InvalidPassword = 'INVALID_PASSWORD', - LeftNotManageablePermission = 'LEFT_NOT_MANAGEABLE_PERMISSION', - InvalidCredentials = 'INVALID_CREDENTIALS', - NotFound = 'NOT_FOUND', - OutOfScopeUser = 'OUT_OF_SCOPE_USER', - OutOfScopeGroup = 'OUT_OF_SCOPE_GROUP', - OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', - PasswordEntirelyNumeric = 'PASSWORD_ENTIRELY_NUMERIC', - PasswordTooCommon = 'PASSWORD_TOO_COMMON', - PasswordTooShort = 'PASSWORD_TOO_SHORT', - PasswordTooSimilar = 'PASSWORD_TOO_SIMILAR', - Required = 'REQUIRED', - Unique = 'UNIQUE', - JwtSignatureExpired = 'JWT_SIGNATURE_EXPIRED', - JwtInvalidToken = 'JWT_INVALID_TOKEN', - JwtDecodeError = 'JWT_DECODE_ERROR', - JwtMissingToken = 'JWT_MISSING_TOKEN', - JwtInvalidCsrfToken = 'JWT_INVALID_CSRF_TOKEN', - ChannelInactive = 'CHANNEL_INACTIVE', - MissingChannelSlug = 'MISSING_CHANNEL_SLUG', -} - -export type AccountInput = { - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** Billing address of the customer. */ - defaultBillingAddress?: Maybe - /** Shipping address of the customer. */ - defaultShippingAddress?: Maybe - /** User language code. */ - languageCode?: Maybe -} - -/** Register a new user. */ -export type AccountRegister = { - __typename?: 'AccountRegister' - /** Informs whether users need to confirm their email address. */ - requiresConfirmation?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - user?: Maybe -} - -export type AccountRegisterInput = { - /** The email address of the user. */ - email: Scalars['String'] - /** Password. */ - password: Scalars['String'] - /** Base of frontend URL that will be needed to create confirmation URL. */ - redirectUrl?: Maybe - /** User language code. */ - languageCode?: Maybe - /** User public metadata. */ - metadata?: Maybe> - /** Slug of a channel which will be used to notify users. Optional when only one channel exists. */ - channel?: Maybe -} - -/** Sends an email with the account removal link for the logged-in user. */ -export type AccountRequestDeletion = { - __typename?: 'AccountRequestDeletion' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Sets a default address for the authenticated user. */ -export type AccountSetDefaultAddress = { - __typename?: 'AccountSetDefaultAddress' - /** An updated user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Updates the account of the logged-in user. */ -export type AccountUpdate = { - __typename?: 'AccountUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - user?: Maybe -} - -/** Represents user address data. */ -export type Address = Node & { - __typename?: 'Address' - /** The ID of the object. */ - id: Scalars['ID'] - firstName: Scalars['String'] - lastName: Scalars['String'] - companyName: Scalars['String'] - streetAddress1: Scalars['String'] - streetAddress2: Scalars['String'] - city: Scalars['String'] - cityArea: Scalars['String'] - postalCode: Scalars['String'] - /** Shop's default country. */ - country: CountryDisplay - countryArea: Scalars['String'] - phone?: Maybe - /** Address is user's default shipping address. */ - isDefaultShippingAddress?: Maybe - /** Address is user's default billing address. */ - isDefaultBillingAddress?: Maybe -} - -/** Creates user address. */ -export type AddressCreate = { - __typename?: 'AddressCreate' - /** A user instance for which the address was created. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - address?: Maybe
-} - -/** Deletes an address. */ -export type AddressDelete = { - __typename?: 'AddressDelete' - /** A user instance for which the address was deleted. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - address?: Maybe
-} - -export type AddressInput = { - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** Company or organization. */ - companyName?: Maybe - /** Address. */ - streetAddress1?: Maybe - /** Address. */ - streetAddress2?: Maybe - /** City. */ - city?: Maybe - /** District. */ - cityArea?: Maybe - /** Postal code. */ - postalCode?: Maybe - /** Country. */ - country?: Maybe - /** State or province. */ - countryArea?: Maybe - /** Phone number. */ - phone?: Maybe -} - -/** Sets a default address for the given user. */ -export type AddressSetDefault = { - __typename?: 'AddressSetDefault' - /** An updated user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** An enumeration. */ -export enum AddressTypeEnum { - Billing = 'BILLING', - Shipping = 'SHIPPING', -} - -/** Updates an address. */ -export type AddressUpdate = { - __typename?: 'AddressUpdate' - /** A user object for which the address was edited. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - address?: Maybe
-} - -export type AddressValidationData = { - __typename?: 'AddressValidationData' - countryCode?: Maybe - countryName?: Maybe - addressFormat?: Maybe - addressLatinFormat?: Maybe - allowedFields?: Maybe>> - requiredFields?: Maybe>> - upperFields?: Maybe>> - countryAreaType?: Maybe - countryAreaChoices?: Maybe>> - cityType?: Maybe - cityChoices?: Maybe>> - cityAreaType?: Maybe - cityAreaChoices?: Maybe>> - postalCodeType?: Maybe - postalCodeMatchers?: Maybe>> - postalCodeExamples?: Maybe>> - postalCodePrefix?: Maybe -} - -/** Represents allocation. */ -export type Allocation = Node & { - __typename?: 'Allocation' - /** The ID of the object. */ - id: Scalars['ID'] - /** Quantity allocated for orders. */ - quantity: Scalars['Int'] - /** The warehouse were items were allocated. */ - warehouse: Warehouse -} - -/** Represents app data. */ -export type App = Node & - ObjectWithMetadata & { - __typename?: 'App' - /** The ID of the object. */ - id: Scalars['ID'] - /** Name of the app. */ - name?: Maybe - /** The date and time when the app was created. */ - created?: Maybe - /** Determine if app will be set active or not. */ - isActive?: Maybe - /** List of the app's permissions. */ - permissions?: Maybe>> - /** Last 4 characters of the tokens. */ - tokens?: Maybe>> - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Type of the app. */ - type?: Maybe - /** List of webhooks assigned to this app. */ - webhooks?: Maybe>> - /** Description of this app. */ - aboutApp?: Maybe - /** Description of the data privacy defined for this app. */ - dataPrivacy?: Maybe - /** Url to details about the privacy policy on the app owner page. */ - dataPrivacyUrl?: Maybe - /** Homepage of the app. */ - homepageUrl?: Maybe - /** Support page for the app. */ - supportUrl?: Maybe - /** Url to iframe with the configuration for the app. */ - configurationUrl?: Maybe - /** Url to iframe with the app. */ - appUrl?: Maybe - /** Version number of the app. */ - version?: Maybe - /** JWT token used to authenticate by thridparty app. */ - accessToken?: Maybe - } - -/** Activate the app. */ -export type AppActivate = { - __typename?: 'AppActivate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - app?: Maybe -} - -export type AppCountableConnection = { - __typename?: 'AppCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type AppCountableEdge = { - __typename?: 'AppCountableEdge' - /** The item at the end of the edge. */ - node: App - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new app. */ -export type AppCreate = { - __typename?: 'AppCreate' - /** The newly created authentication token. */ - authToken?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - app?: Maybe -} - -/** Deactivate the app. */ -export type AppDeactivate = { - __typename?: 'AppDeactivate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - app?: Maybe -} - -/** Deletes an app. */ -export type AppDelete = { - __typename?: 'AppDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - app?: Maybe -} - -/** Delete failed installation. */ -export type AppDeleteFailedInstallation = { - __typename?: 'AppDeleteFailedInstallation' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - appInstallation?: Maybe -} - -export type AppError = { - __typename?: 'AppError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: AppErrorCode - /** List of permissions which causes the error. */ - permissions?: Maybe> -} - -/** An enumeration. */ -export enum AppErrorCode { - Forbidden = 'FORBIDDEN', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - InvalidStatus = 'INVALID_STATUS', - InvalidPermission = 'INVALID_PERMISSION', - InvalidUrlFormat = 'INVALID_URL_FORMAT', - InvalidManifestFormat = 'INVALID_MANIFEST_FORMAT', - ManifestUrlCantConnect = 'MANIFEST_URL_CANT_CONNECT', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - OutOfScopeApp = 'OUT_OF_SCOPE_APP', - OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', -} - -/** Fetch and validate manifest. */ -export type AppFetchManifest = { - __typename?: 'AppFetchManifest' - manifest?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array -} - -export type AppFilterInput = { - search?: Maybe - isActive?: Maybe - type?: Maybe -} - -export type AppInput = { - /** Name of the app. */ - name?: Maybe - /** List of permission code names to assign to this app. */ - permissions?: Maybe>> -} - -/** Install new app by using app manifest. */ -export type AppInstall = { - __typename?: 'AppInstall' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - appInstallation?: Maybe -} - -export type AppInstallInput = { - /** Name of the app to install. */ - appName?: Maybe - /** Url to app's manifest in JSON format. */ - manifestUrl?: Maybe - /** Determine if app will be set active or not. */ - activateAfterInstallation?: Maybe - /** List of permission code names to assign to this app. */ - permissions?: Maybe>> -} - -/** Represents ongoing installation of app. */ -export type AppInstallation = Node & - Job & { - __typename?: 'AppInstallation' - appName: Scalars['String'] - manifestUrl: Scalars['String'] - /** The ID of the object. */ - id: Scalars['ID'] - /** Job status. */ - status: JobStatusEnum - /** Created date time of job in ISO 8601 format. */ - createdAt: Scalars['DateTime'] - /** Date time of job last update in ISO 8601 format. */ - updatedAt: Scalars['DateTime'] - /** Job message. */ - message?: Maybe - } - -/** Retry failed installation of new app. */ -export type AppRetryInstall = { - __typename?: 'AppRetryInstall' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - appInstallation?: Maybe -} - -export enum AppSortField { - /** Sort apps by name. */ - Name = 'NAME', - /** Sort apps by creation date. */ - CreationDate = 'CREATION_DATE', -} - -export type AppSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort apps by the selected field. */ - field: AppSortField -} - -/** Represents token data. */ -export type AppToken = Node & { - __typename?: 'AppToken' - /** Name of the authenticated token. */ - name?: Maybe - /** Last 4 characters of the token. */ - authToken?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] -} - -/** Creates a new token. */ -export type AppTokenCreate = { - __typename?: 'AppTokenCreate' - /** The newly created authentication token. */ - authToken?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - appToken?: Maybe -} - -/** Deletes an authentication token assigned to app. */ -export type AppTokenDelete = { - __typename?: 'AppTokenDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - appToken?: Maybe -} - -export type AppTokenInput = { - /** Name of the token. */ - name?: Maybe - /** ID of app. */ - app: Scalars['ID'] -} - -/** Verify provided app token. */ -export type AppTokenVerify = { - __typename?: 'AppTokenVerify' - /** Determine if token is valid or not. */ - valid: Scalars['Boolean'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array -} - -/** Enum determining type of your App. */ -export enum AppTypeEnum { - /** Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token */ - Local = 'LOCAL', - /** Third party external App. Installation is fully automated. Saleor uses a defined App manifest to gather all required information. */ - Thirdparty = 'THIRDPARTY', -} - -/** Updates an existing app. */ -export type AppUpdate = { - __typename?: 'AppUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - appErrors: Array - errors: Array - app?: Maybe -} - -/** An enumeration. */ -export enum AreaUnitsEnum { - SqCm = 'SQ_CM', - SqM = 'SQ_M', - SqKm = 'SQ_KM', - SqFt = 'SQ_FT', - SqYd = 'SQ_YD', - SqInch = 'SQ_INCH', -} - -/** Assigns storefront's navigation menus. */ -export type AssignNavigation = { - __typename?: 'AssignNavigation' - /** Assigned navigation menu. */ - menu?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array -} - -/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ -export type Attribute = Node & - ObjectWithMetadata & { - __typename?: 'Attribute' - /** The ID of the object. */ - id: Scalars['ID'] - productTypes: ProductTypeCountableConnection - productVariantTypes: ProductTypeCountableConnection - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** The input type to use for entering attribute values in the dashboard. */ - inputType?: Maybe - /** The entity type which can be used as a reference. */ - entityType?: Maybe - /** Name of an attribute displayed in the interface. */ - name?: Maybe - /** Internal representation of an attribute name. */ - slug?: Maybe - /** The attribute type. */ - type?: Maybe - /** The unit of attribute values. */ - unit?: Maybe - /** List of attribute's values. */ - values?: Maybe>> - /** Whether the attribute requires values to be passed or not. */ - valueRequired: Scalars['Boolean'] - /** Whether the attribute should be visible or not in storefront. */ - visibleInStorefront: Scalars['Boolean'] - /** Whether the attribute can be filtered in storefront. */ - filterableInStorefront: Scalars['Boolean'] - /** Whether the attribute can be filtered in dashboard. */ - filterableInDashboard: Scalars['Boolean'] - /** Whether the attribute can be displayed in the admin product list. */ - availableInGrid: Scalars['Boolean'] - /** Returns translated attribute fields for the given language code. */ - translation?: Maybe - /** The position of the attribute in the storefront navigation (0 by default). */ - storefrontSearchPosition: Scalars['Int'] - } - -/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ -export type AttributeProductTypesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ -export type AttributeProductVariantTypesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. */ -export type AttributeTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Deletes attributes. */ -export type AttributeBulkDelete = { - __typename?: 'AttributeBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array -} - -export type AttributeCountableConnection = { - __typename?: 'AttributeCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type AttributeCountableEdge = { - __typename?: 'AttributeCountableEdge' - /** The item at the end of the edge. */ - node: Attribute - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates an attribute. */ -export type AttributeCreate = { - __typename?: 'AttributeCreate' - attribute?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array -} - -export type AttributeCreateInput = { - /** The input type to use for entering attribute values in the dashboard. */ - inputType?: Maybe - /** The entity type which can be used as a reference. */ - entityType?: Maybe - /** Name of an attribute displayed in the interface. */ - name: Scalars['String'] - /** Internal representation of an attribute name. */ - slug?: Maybe - /** The attribute type. */ - type: AttributeTypeEnum - /** The unit of attribute values. */ - unit?: Maybe - /** List of attribute's values. */ - values?: Maybe>> - /** Whether the attribute requires values to be passed or not. */ - valueRequired?: Maybe - /** Whether the attribute is for variants only. */ - isVariantOnly?: Maybe - /** Whether the attribute should be visible or not in storefront. */ - visibleInStorefront?: Maybe - /** Whether the attribute can be filtered in storefront. */ - filterableInStorefront?: Maybe - /** Whether the attribute can be filtered in dashboard. */ - filterableInDashboard?: Maybe - /** The position of the attribute in the storefront navigation (0 by default). */ - storefrontSearchPosition?: Maybe - /** Whether the attribute can be displayed in the admin product list. */ - availableInGrid?: Maybe -} - -/** Deletes an attribute. */ -export type AttributeDelete = { - __typename?: 'AttributeDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array - attribute?: Maybe -} - -/** An enumeration. */ -export enum AttributeEntityTypeEnum { - Page = 'PAGE', - Product = 'PRODUCT', -} - -export type AttributeError = { - __typename?: 'AttributeError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: AttributeErrorCode -} - -/** An enumeration. */ -export enum AttributeErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type AttributeFilterInput = { - valueRequired?: Maybe - isVariantOnly?: Maybe - visibleInStorefront?: Maybe - filterableInStorefront?: Maybe - filterableInDashboard?: Maybe - availableInGrid?: Maybe - metadata?: Maybe>> - search?: Maybe - ids?: Maybe>> - type?: Maybe - inCollection?: Maybe - inCategory?: Maybe - /** Specifies the channel by which the data should be sorted. */ - channel?: Maybe -} - -export type AttributeInput = { - /** Internal representation of an attribute name. */ - slug: Scalars['String'] - /** Internal representation of a value (unique per attribute). */ - values?: Maybe>> - /** The range that the returned values should be in. */ - valuesRange?: Maybe -} - -/** An enumeration. */ -export enum AttributeInputTypeEnum { - Dropdown = 'DROPDOWN', - Multiselect = 'MULTISELECT', - File = 'FILE', - Reference = 'REFERENCE', - Numeric = 'NUMERIC', - RichText = 'RICH_TEXT', -} - -/** Reorder the values of an attribute. */ -export type AttributeReorderValues = { - __typename?: 'AttributeReorderValues' - /** Attribute from which values are reordered. */ - attribute?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array -} - -export enum AttributeSortField { - /** Sort attributes by name */ - Name = 'NAME', - /** Sort attributes by slug */ - Slug = 'SLUG', - /** Sort attributes by the value required flag */ - ValueRequired = 'VALUE_REQUIRED', - /** Sort attributes by the variant only flag */ - IsVariantOnly = 'IS_VARIANT_ONLY', - /** Sort attributes by visibility in the storefront */ - VisibleInStorefront = 'VISIBLE_IN_STOREFRONT', - /** Sort attributes by the filterable in storefront flag */ - FilterableInStorefront = 'FILTERABLE_IN_STOREFRONT', - /** Sort attributes by the filterable in dashboard flag */ - FilterableInDashboard = 'FILTERABLE_IN_DASHBOARD', - /** Sort attributes by their position in storefront */ - StorefrontSearchPosition = 'STOREFRONT_SEARCH_POSITION', - /** Sort attributes based on whether they can be displayed or not in a product grid. */ - AvailableInGrid = 'AVAILABLE_IN_GRID', -} - -export type AttributeSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort attributes by the selected field. */ - field: AttributeSortField -} - -export type AttributeTranslatableContent = Node & { - __typename?: 'AttributeTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated attribute fields for the given language code. */ - translation?: Maybe - /** Custom attribute of a product. */ - attribute?: Maybe -} - -export type AttributeTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for attribute. */ -export type AttributeTranslate = { - __typename?: 'AttributeTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - attribute?: Maybe -} - -export type AttributeTranslation = Node & { - __typename?: 'AttributeTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Translation language. */ - language: LanguageDisplay -} - -/** An enumeration. */ -export enum AttributeTypeEnum { - ProductType = 'PRODUCT_TYPE', - PageType = 'PAGE_TYPE', -} - -/** Updates attribute. */ -export type AttributeUpdate = { - __typename?: 'AttributeUpdate' - attribute?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array -} - -export type AttributeUpdateInput = { - /** Name of an attribute displayed in the interface. */ - name?: Maybe - /** Internal representation of an attribute name. */ - slug?: Maybe - /** The unit of attribute values. */ - unit?: Maybe - /** IDs of values to be removed from this attribute. */ - removeValues?: Maybe>> - /** New values to be created for this attribute. */ - addValues?: Maybe>> - /** Whether the attribute requires values to be passed or not. */ - valueRequired?: Maybe - /** Whether the attribute is for variants only. */ - isVariantOnly?: Maybe - /** Whether the attribute should be visible or not in storefront. */ - visibleInStorefront?: Maybe - /** Whether the attribute can be filtered in storefront. */ - filterableInStorefront?: Maybe - /** Whether the attribute can be filtered in dashboard. */ - filterableInDashboard?: Maybe - /** The position of the attribute in the storefront navigation (0 by default). */ - storefrontSearchPosition?: Maybe - /** Whether the attribute can be displayed in the admin product list. */ - availableInGrid?: Maybe -} - -/** Represents a value of an attribute. */ -export type AttributeValue = Node & { - __typename?: 'AttributeValue' - /** The ID of the object. */ - id: Scalars['ID'] - /** Name of a value displayed in the interface. */ - name?: Maybe - /** Internal representation of a value (unique per attribute). */ - slug?: Maybe - /** Represents the value of the attribute value. */ - value?: Maybe - /** Returns translated attribute value fields for the given language code. */ - translation?: Maybe - /** The input type to use for entering attribute values in the dashboard. */ - inputType?: Maybe - /** The ID of the attribute reference. */ - reference?: Maybe - /** Represents file URL and content type (if attribute value is a file). */ - file?: Maybe - /** Represents the text (JSON) of the attribute value. */ - richText?: Maybe -} - -/** Represents a value of an attribute. */ -export type AttributeValueTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Deletes values of attributes. */ -export type AttributeValueBulkDelete = { - __typename?: 'AttributeValueBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array -} - -/** Creates a value for an attribute. */ -export type AttributeValueCreate = { - __typename?: 'AttributeValueCreate' - /** The updated attribute. */ - attribute?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array - attributeValue?: Maybe -} - -export type AttributeValueCreateInput = { - /** Name of a value displayed in the interface. */ - name: Scalars['String'] - /** Represents the value of the attribute value. */ - value?: Maybe - /** Represents the text (JSON) of the attribute value. */ - richText?: Maybe -} - -/** Deletes a value of an attribute. */ -export type AttributeValueDelete = { - __typename?: 'AttributeValueDelete' - /** The updated attribute. */ - attribute?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array - attributeValue?: Maybe -} - -export type AttributeValueInput = { - /** ID of the selected attribute. */ - id?: Maybe - /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ - values?: Maybe>> - /** URL of the file attribute. Every time, a new value is created. */ - file?: Maybe - /** File content type. */ - contentType?: Maybe - /** List of entity IDs that will be used as references. */ - references?: Maybe> - /** Text content in JSON format. */ - richText?: Maybe -} - -export type AttributeValueTranslatableContent = Node & { - __typename?: 'AttributeValueTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated attribute value fields for the given language code. */ - translation?: Maybe - /** Represents a value of an attribute. */ - attributeValue?: Maybe -} - -export type AttributeValueTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for attribute value. */ -export type AttributeValueTranslate = { - __typename?: 'AttributeValueTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - attributeValue?: Maybe -} - -export type AttributeValueTranslation = Node & { - __typename?: 'AttributeValueTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - richText?: Maybe - /** Translation language. */ - language: LanguageDisplay -} - -export type AttributeValueTranslationInput = { - name?: Maybe - richText?: Maybe -} - -/** Updates value of an attribute. */ -export type AttributeValueUpdate = { - __typename?: 'AttributeValueUpdate' - /** The updated attribute. */ - attribute?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - attributeErrors: Array - errors: Array - attributeValue?: Maybe -} - -export type BulkAttributeValueInput = { - /** ID of the selected attribute. */ - id?: Maybe - /** The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. */ - values: Array> -} - -export type BulkProductError = { - __typename?: 'BulkProductError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> - /** Index of an input list item that caused the error. */ - index?: Maybe - /** List of warehouse IDs which causes the error. */ - warehouses?: Maybe> - /** List of channel IDs which causes the error. */ - channels?: Maybe> -} - -export type BulkStockError = { - __typename?: 'BulkStockError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> - /** Index of an input list item that caused the error. */ - index?: Maybe -} - -export type CatalogueInput = { - /** Products related to the discount. */ - products?: Maybe>> - /** Categories related to the discount. */ - categories?: Maybe>> - /** Collections related to the discount. */ - collections?: Maybe>> -} - -/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ -export type Category = Node & - ObjectWithMetadata & { - __typename?: 'Category' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - slug: Scalars['String'] - parent?: Maybe - level: Scalars['Int'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * Description of the category (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** List of ancestors of the category. */ - ancestors?: Maybe - /** List of products in the category. */ - products?: Maybe - /** List of children of the category. */ - children?: Maybe - backgroundImage?: Maybe - /** Returns translated category fields for the given language code. */ - translation?: Maybe - } - -/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ -export type CategoryAncestorsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ -export type CategoryProductsArgs = { - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ -export type CategoryChildrenArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ -export type CategoryBackgroundImageArgs = { - size?: Maybe -} - -/** Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. */ -export type CategoryTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Deletes categories. */ -export type CategoryBulkDelete = { - __typename?: 'CategoryBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export type CategoryCountableConnection = { - __typename?: 'CategoryCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type CategoryCountableEdge = { - __typename?: 'CategoryCountableEdge' - /** The item at the end of the edge. */ - node: Category - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new category. */ -export type CategoryCreate = { - __typename?: 'CategoryCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - category?: Maybe -} - -/** Deletes a category. */ -export type CategoryDelete = { - __typename?: 'CategoryDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - category?: Maybe -} - -export type CategoryFilterInput = { - search?: Maybe - metadata?: Maybe>> - ids?: Maybe>> -} - -export type CategoryInput = { - /** Category description (JSON). */ - description?: Maybe - /** Category name. */ - name?: Maybe - /** Category slug. */ - slug?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Background image file. */ - backgroundImage?: Maybe - /** Alt text for a product media. */ - backgroundImageAlt?: Maybe -} - -export enum CategorySortField { - /** Sort categories by name. */ - Name = 'NAME', - /** Sort categories by product count. */ - ProductCount = 'PRODUCT_COUNT', - /** Sort categories by subcategory count. */ - SubcategoryCount = 'SUBCATEGORY_COUNT', -} - -export type CategorySortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** Sort categories by the selected field. */ - field: CategorySortField -} - -export type CategoryTranslatableContent = Node & { - __typename?: 'CategoryTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - /** - * Description of the category (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** Returns translated category fields for the given language code. */ - translation?: Maybe - /** Represents a single category of products. */ - category?: Maybe -} - -export type CategoryTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for Category. */ -export type CategoryTranslate = { - __typename?: 'CategoryTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - category?: Maybe -} - -export type CategoryTranslation = Node & { - __typename?: 'CategoryTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - /** Translation language. */ - language: LanguageDisplay - /** - * Translated description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe -} - -/** Updates a category. */ -export type CategoryUpdate = { - __typename?: 'CategoryUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - category?: Maybe -} - -/** Represents channel. */ -export type Channel = Node & { - __typename?: 'Channel' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - isActive: Scalars['Boolean'] - slug: Scalars['String'] - currencyCode: Scalars['String'] - /** Whether a channel has associated orders. */ - hasOrders: Scalars['Boolean'] -} - -/** Activate a channel. */ -export type ChannelActivate = { - __typename?: 'ChannelActivate' - /** Activated channel. */ - channel?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - channelErrors: Array - errors: Array -} - -/** Creates new channel. */ -export type ChannelCreate = { - __typename?: 'ChannelCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - channelErrors: Array - errors: Array - channel?: Maybe -} - -export type ChannelCreateInput = { - /** isActive flag. */ - isActive?: Maybe - /** Name of the channel. */ - name: Scalars['String'] - /** Slug of the channel. */ - slug: Scalars['String'] - /** Currency of the channel. */ - currencyCode: Scalars['String'] - /** List of shipping zones to assign to the channel. */ - addShippingZones?: Maybe> -} - -/** Deactivate a channel. */ -export type ChannelDeactivate = { - __typename?: 'ChannelDeactivate' - /** Deactivated channel. */ - channel?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - channelErrors: Array - errors: Array -} - -/** Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. */ -export type ChannelDelete = { - __typename?: 'ChannelDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - channelErrors: Array - errors: Array - channel?: Maybe -} - -export type ChannelDeleteInput = { - /** ID of channel to migrate orders from origin channel. */ - targetChannel: Scalars['ID'] -} - -export type ChannelError = { - __typename?: 'ChannelError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ChannelErrorCode - /** List of shipping zone IDs which causes the error. */ - shippingZones?: Maybe> -} - -/** An enumeration. */ -export enum ChannelErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - ChannelTargetIdMustBeDifferent = 'CHANNEL_TARGET_ID_MUST_BE_DIFFERENT', - ChannelsCurrencyMustBeTheSame = 'CHANNELS_CURRENCY_MUST_BE_THE_SAME', - ChannelWithOrders = 'CHANNEL_WITH_ORDERS', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', -} - -/** Update a channel. */ -export type ChannelUpdate = { - __typename?: 'ChannelUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - channelErrors: Array - errors: Array - channel?: Maybe -} - -export type ChannelUpdateInput = { - /** isActive flag. */ - isActive?: Maybe - /** Name of the channel. */ - name?: Maybe - /** Slug of the channel. */ - slug?: Maybe - /** List of shipping zones to assign to the channel. */ - addShippingZones?: Maybe> - /** List of shipping zones to unassign from the channel. */ - removeShippingZones?: Maybe> -} - -/** Checkout object. */ -export type Checkout = Node & - ObjectWithMetadata & { - __typename?: 'Checkout' - created: Scalars['DateTime'] - lastChange: Scalars['DateTime'] - user?: Maybe - channel: Channel - billingAddress?: Maybe
- shippingAddress?: Maybe
- note: Scalars['String'] - discount?: Maybe - discountName?: Maybe - translatedDiscountName?: Maybe - voucherCode?: Maybe - /** List of gift cards associated with this checkout. */ - giftCards?: Maybe>> - /** The ID of the object. */ - id: Scalars['ID'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Shipping methods that can be used with this order. */ - availableShippingMethods: Array> - /** List of available payment gateways. */ - availablePaymentGateways: Array - /** Email of a customer. */ - email: Scalars['String'] - /** Returns True, if checkout requires shipping. */ - isShippingRequired: Scalars['Boolean'] - /** The number of items purchased. */ - quantity: Scalars['Int'] - /** A list of checkout lines, each containing information about an item in the checkout. */ - lines?: Maybe>> - /** The price of the shipping, with all the taxes included. */ - shippingPrice?: Maybe - /** The shipping method related with checkout. */ - shippingMethod?: Maybe - /** The price of the checkout before shipping, with taxes included. */ - subtotalPrice?: Maybe - /** The checkout's token. */ - token: Scalars['UUID'] - /** The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included. */ - totalPrice?: Maybe - /** Checkout language code. */ - languageCode: LanguageCodeEnum - } - -/** Adds a gift card or a voucher to a checkout. */ -export type CheckoutAddPromoCode = { - __typename?: 'CheckoutAddPromoCode' - /** The checkout with the added gift card or voucher. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Update billing address in the existing checkout. */ -export type CheckoutBillingAddressUpdate = { - __typename?: 'CheckoutBillingAddressUpdate' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation. */ -export type CheckoutComplete = { - __typename?: 'CheckoutComplete' - /** Placed order. */ - order?: Maybe - /** Set to true if payment needs to be confirmed before checkout is complete. */ - confirmationNeeded: Scalars['Boolean'] - /** Confirmation data used to process additional authorization steps. */ - confirmationData?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -export type CheckoutCountableConnection = { - __typename?: 'CheckoutCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type CheckoutCountableEdge = { - __typename?: 'CheckoutCountableEdge' - /** The item at the end of the edge. */ - node: Checkout - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Create a new checkout. */ -export type CheckoutCreate = { - __typename?: 'CheckoutCreate' - /** Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout.DEPRECATED: Will be removed in Saleor 4.0. Always returns True. */ - created?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array - checkout?: Maybe -} - -export type CheckoutCreateInput = { - /** Slug of a channel in which to create a checkout. */ - channel?: Maybe - /** A list of checkout lines, each containing information about an item in the checkout. */ - lines: Array> - /** The customer's email address. */ - email?: Maybe - /** The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. */ - shippingAddress?: Maybe - /** Billing address of the customer. */ - billingAddress?: Maybe - /** Checkout language code. */ - languageCode?: Maybe -} - -/** Sets the customer as the owner of the checkout. */ -export type CheckoutCustomerAttach = { - __typename?: 'CheckoutCustomerAttach' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Removes the user assigned as the owner of the checkout. */ -export type CheckoutCustomerDetach = { - __typename?: 'CheckoutCustomerDetach' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Updates email address in the existing checkout object. */ -export type CheckoutEmailUpdate = { - __typename?: 'CheckoutEmailUpdate' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -export type CheckoutError = { - __typename?: 'CheckoutError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: CheckoutErrorCode - /** List of varint IDs which causes the error. */ - variants?: Maybe> - /** A type of address that causes the error. */ - addressType?: Maybe -} - -/** An enumeration. */ -export enum CheckoutErrorCode { - BillingAddressNotSet = 'BILLING_ADDRESS_NOT_SET', - CheckoutNotFullyPaid = 'CHECKOUT_NOT_FULLY_PAID', - GraphqlError = 'GRAPHQL_ERROR', - ProductNotPublished = 'PRODUCT_NOT_PUBLISHED', - ProductUnavailableForPurchase = 'PRODUCT_UNAVAILABLE_FOR_PURCHASE', - InsufficientStock = 'INSUFFICIENT_STOCK', - Invalid = 'INVALID', - InvalidShippingMethod = 'INVALID_SHIPPING_METHOD', - NotFound = 'NOT_FOUND', - PaymentError = 'PAYMENT_ERROR', - QuantityGreaterThanLimit = 'QUANTITY_GREATER_THAN_LIMIT', - Required = 'REQUIRED', - ShippingAddressNotSet = 'SHIPPING_ADDRESS_NOT_SET', - ShippingMethodNotApplicable = 'SHIPPING_METHOD_NOT_APPLICABLE', - ShippingMethodNotSet = 'SHIPPING_METHOD_NOT_SET', - ShippingNotRequired = 'SHIPPING_NOT_REQUIRED', - TaxError = 'TAX_ERROR', - Unique = 'UNIQUE', - VoucherNotApplicable = 'VOUCHER_NOT_APPLICABLE', - ZeroQuantity = 'ZERO_QUANTITY', - MissingChannelSlug = 'MISSING_CHANNEL_SLUG', - ChannelInactive = 'CHANNEL_INACTIVE', - UnavailableVariantInChannel = 'UNAVAILABLE_VARIANT_IN_CHANNEL', -} - -/** Update language code in the existing checkout. */ -export type CheckoutLanguageCodeUpdate = { - __typename?: 'CheckoutLanguageCodeUpdate' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Represents an item in the checkout. */ -export type CheckoutLine = Node & { - __typename?: 'CheckoutLine' - /** The ID of the object. */ - id: Scalars['ID'] - variant: ProductVariant - quantity: Scalars['Int'] - /** The sum of the checkout line price, taxes and discounts. */ - totalPrice?: Maybe - /** Indicates whether the item need to be delivered. */ - requiresShipping?: Maybe -} - -export type CheckoutLineCountableConnection = { - __typename?: 'CheckoutLineCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type CheckoutLineCountableEdge = { - __typename?: 'CheckoutLineCountableEdge' - /** The item at the end of the edge. */ - node: CheckoutLine - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Deletes a CheckoutLine. */ -export type CheckoutLineDelete = { - __typename?: 'CheckoutLineDelete' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -export type CheckoutLineInput = { - /** The number of items purchased. */ - quantity: Scalars['Int'] - /** ID of the product variant. */ - variantId: Scalars['ID'] -} - -/** Adds a checkout line to the existing checkout. */ -export type CheckoutLinesAdd = { - __typename?: 'CheckoutLinesAdd' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Updates checkout line in the existing checkout. */ -export type CheckoutLinesUpdate = { - __typename?: 'CheckoutLinesUpdate' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Create a new payment for given checkout. */ -export type CheckoutPaymentCreate = { - __typename?: 'CheckoutPaymentCreate' - /** Related checkout object. */ - checkout?: Maybe - /** A newly created payment. */ - payment?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - paymentErrors: Array - errors: Array -} - -/** Remove a gift card or a voucher from a checkout. */ -export type CheckoutRemovePromoCode = { - __typename?: 'CheckoutRemovePromoCode' - /** The checkout with the removed gift card or voucher. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Update shipping address in the existing checkout. */ -export type CheckoutShippingAddressUpdate = { - __typename?: 'CheckoutShippingAddressUpdate' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -/** Updates the shipping address of the checkout. */ -export type CheckoutShippingMethodUpdate = { - __typename?: 'CheckoutShippingMethodUpdate' - /** An updated checkout. */ - checkout?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - checkoutErrors: Array - errors: Array -} - -export type ChoiceValue = { - __typename?: 'ChoiceValue' - raw?: Maybe - verbose?: Maybe -} - -/** Represents a collection of products. */ -export type Collection = Node & - ObjectWithMetadata & { - __typename?: 'Collection' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - slug: Scalars['String'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * Description of the collection (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** List of products in this collection. */ - products?: Maybe - backgroundImage?: Maybe - /** Returns translated collection fields for the given language code. */ - translation?: Maybe - /** List of channels in which the collection is available. */ - channelListings?: Maybe> - } - -/** Represents a collection of products. */ -export type CollectionProductsArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents a collection of products. */ -export type CollectionBackgroundImageArgs = { - size?: Maybe -} - -/** Represents a collection of products. */ -export type CollectionTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Adds products to a collection. */ -export type CollectionAddProducts = { - __typename?: 'CollectionAddProducts' - /** Collection to which products will be added. */ - collection?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - collectionErrors: Array - errors: Array -} - -/** Deletes collections. */ -export type CollectionBulkDelete = { - __typename?: 'CollectionBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - collectionErrors: Array - errors: Array -} - -/** Represents collection channel listing. */ -export type CollectionChannelListing = Node & { - __typename?: 'CollectionChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - publicationDate?: Maybe - isPublished: Scalars['Boolean'] - channel: Channel -} - -export type CollectionChannelListingError = { - __typename?: 'CollectionChannelListingError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> - /** List of channels IDs which causes the error. */ - channels?: Maybe> -} - -/** Manage collection's availability in channels. */ -export type CollectionChannelListingUpdate = { - __typename?: 'CollectionChannelListingUpdate' - /** An updated collection instance. */ - collection?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - collectionChannelListingErrors: Array - errors: Array -} - -export type CollectionChannelListingUpdateInput = { - /** List of channels to which the collection should be assigned. */ - addChannels?: Maybe> - /** List of channels from which the collection should be unassigned. */ - removeChannels?: Maybe> -} - -export type CollectionCountableConnection = { - __typename?: 'CollectionCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type CollectionCountableEdge = { - __typename?: 'CollectionCountableEdge' - /** The item at the end of the edge. */ - node: Collection - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new collection. */ -export type CollectionCreate = { - __typename?: 'CollectionCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - collectionErrors: Array - errors: Array - collection?: Maybe -} - -export type CollectionCreateInput = { - /** Informs whether a collection is published. */ - isPublished?: Maybe - /** Name of the collection. */ - name?: Maybe - /** Slug of the collection. */ - slug?: Maybe - /** Description of the collection (JSON). */ - description?: Maybe - /** Background image file. */ - backgroundImage?: Maybe - /** Alt text for an image. */ - backgroundImageAlt?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe - /** List of products to be added to the collection. */ - products?: Maybe>> -} - -/** Deletes a collection. */ -export type CollectionDelete = { - __typename?: 'CollectionDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - collectionErrors: Array - errors: Array - collection?: Maybe -} - -export type CollectionError = { - __typename?: 'CollectionError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** List of products IDs which causes the error. */ - products?: Maybe> - /** The error code. */ - code: CollectionErrorCode -} - -/** An enumeration. */ -export enum CollectionErrorCode { - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', -} - -export type CollectionFilterInput = { - published?: Maybe - search?: Maybe - metadata?: Maybe>> - ids?: Maybe>> - /** Specifies the channel by which the data should be sorted. */ - channel?: Maybe -} - -export type CollectionInput = { - /** Informs whether a collection is published. */ - isPublished?: Maybe - /** Name of the collection. */ - name?: Maybe - /** Slug of the collection. */ - slug?: Maybe - /** Description of the collection (JSON). */ - description?: Maybe - /** Background image file. */ - backgroundImage?: Maybe - /** Alt text for an image. */ - backgroundImageAlt?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe -} - -export enum CollectionPublished { - Published = 'PUBLISHED', - Hidden = 'HIDDEN', -} - -/** Remove products from a collection. */ -export type CollectionRemoveProducts = { - __typename?: 'CollectionRemoveProducts' - /** Collection from which products will be removed. */ - collection?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - collectionErrors: Array - errors: Array -} - -/** Reorder the products of a collection. */ -export type CollectionReorderProducts = { - __typename?: 'CollectionReorderProducts' - /** Collection from which products are reordered. */ - collection?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - collectionErrors: Array - errors: Array -} - -export enum CollectionSortField { - /** Sort collections by name. */ - Name = 'NAME', - /** Sort collections by availability. */ - Availability = 'AVAILABILITY', - /** Sort collections by product count. */ - ProductCount = 'PRODUCT_COUNT', - /** Sort collections by publication date. */ - PublicationDate = 'PUBLICATION_DATE', -} - -export type CollectionSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** Sort collections by the selected field. */ - field: CollectionSortField -} - -export type CollectionTranslatableContent = Node & { - __typename?: 'CollectionTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - /** - * Description of the collection (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** Returns translated collection fields for the given language code. */ - translation?: Maybe - /** Represents a collection of products. */ - collection?: Maybe -} - -export type CollectionTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for collection. */ -export type CollectionTranslate = { - __typename?: 'CollectionTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - collection?: Maybe -} - -export type CollectionTranslation = Node & { - __typename?: 'CollectionTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - /** Translation language. */ - language: LanguageDisplay - /** - * Translated description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe -} - -/** Updates a collection. */ -export type CollectionUpdate = { - __typename?: 'CollectionUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - collectionErrors: Array - errors: Array - collection?: Maybe -} - -/** Stores information about a single configuration field. */ -export type ConfigurationItem = { - __typename?: 'ConfigurationItem' - /** Name of the field. */ - name: Scalars['String'] - /** Current value of the field. */ - value?: Maybe - /** Type of the field. */ - type?: Maybe - /** Help text for the field. */ - helpText?: Maybe - /** Label for the field. */ - label?: Maybe -} - -export type ConfigurationItemInput = { - /** Name of the field to update. */ - name: Scalars['String'] - /** Value of the given field to update. */ - value?: Maybe -} - -/** An enumeration. */ -export enum ConfigurationTypeFieldEnum { - String = 'STRING', - Multiline = 'MULTILINE', - Boolean = 'BOOLEAN', - Secret = 'SECRET', - Password = 'PASSWORD', - Secretmultiline = 'SECRETMULTILINE', - Output = 'OUTPUT', -} - -/** Confirm user account with token sent by email during registration. */ -export type ConfirmAccount = { - __typename?: 'ConfirmAccount' - /** An activated user account. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Confirm the email change of the logged-in user. */ -export type ConfirmEmailChange = { - __typename?: 'ConfirmEmailChange' - /** A user instance with a new email. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** An enumeration. */ -export enum CountryCode { - Af = 'AF', - Ax = 'AX', - Al = 'AL', - Dz = 'DZ', - As = 'AS', - Ad = 'AD', - Ao = 'AO', - Ai = 'AI', - Aq = 'AQ', - Ag = 'AG', - Ar = 'AR', - Am = 'AM', - Aw = 'AW', - Au = 'AU', - At = 'AT', - Az = 'AZ', - Bs = 'BS', - Bh = 'BH', - Bd = 'BD', - Bb = 'BB', - By = 'BY', - Be = 'BE', - Bz = 'BZ', - Bj = 'BJ', - Bm = 'BM', - Bt = 'BT', - Bo = 'BO', - Bq = 'BQ', - Ba = 'BA', - Bw = 'BW', - Bv = 'BV', - Br = 'BR', - Io = 'IO', - Bn = 'BN', - Bg = 'BG', - Bf = 'BF', - Bi = 'BI', - Cv = 'CV', - Kh = 'KH', - Cm = 'CM', - Ca = 'CA', - Ky = 'KY', - Cf = 'CF', - Td = 'TD', - Cl = 'CL', - Cn = 'CN', - Cx = 'CX', - Cc = 'CC', - Co = 'CO', - Km = 'KM', - Cg = 'CG', - Cd = 'CD', - Ck = 'CK', - Cr = 'CR', - Ci = 'CI', - Hr = 'HR', - Cu = 'CU', - Cw = 'CW', - Cy = 'CY', - Cz = 'CZ', - Dk = 'DK', - Dj = 'DJ', - Dm = 'DM', - Do = 'DO', - Ec = 'EC', - Eg = 'EG', - Sv = 'SV', - Gq = 'GQ', - Er = 'ER', - Ee = 'EE', - Sz = 'SZ', - Et = 'ET', - Eu = 'EU', - Fk = 'FK', - Fo = 'FO', - Fj = 'FJ', - Fi = 'FI', - Fr = 'FR', - Gf = 'GF', - Pf = 'PF', - Tf = 'TF', - Ga = 'GA', - Gm = 'GM', - Ge = 'GE', - De = 'DE', - Gh = 'GH', - Gi = 'GI', - Gr = 'GR', - Gl = 'GL', - Gd = 'GD', - Gp = 'GP', - Gu = 'GU', - Gt = 'GT', - Gg = 'GG', - Gn = 'GN', - Gw = 'GW', - Gy = 'GY', - Ht = 'HT', - Hm = 'HM', - Va = 'VA', - Hn = 'HN', - Hk = 'HK', - Hu = 'HU', - Is = 'IS', - In = 'IN', - Id = 'ID', - Ir = 'IR', - Iq = 'IQ', - Ie = 'IE', - Im = 'IM', - Il = 'IL', - It = 'IT', - Jm = 'JM', - Jp = 'JP', - Je = 'JE', - Jo = 'JO', - Kz = 'KZ', - Ke = 'KE', - Ki = 'KI', - Kw = 'KW', - Kg = 'KG', - La = 'LA', - Lv = 'LV', - Lb = 'LB', - Ls = 'LS', - Lr = 'LR', - Ly = 'LY', - Li = 'LI', - Lt = 'LT', - Lu = 'LU', - Mo = 'MO', - Mg = 'MG', - Mw = 'MW', - My = 'MY', - Mv = 'MV', - Ml = 'ML', - Mt = 'MT', - Mh = 'MH', - Mq = 'MQ', - Mr = 'MR', - Mu = 'MU', - Yt = 'YT', - Mx = 'MX', - Fm = 'FM', - Md = 'MD', - Mc = 'MC', - Mn = 'MN', - Me = 'ME', - Ms = 'MS', - Ma = 'MA', - Mz = 'MZ', - Mm = 'MM', - Na = 'NA', - Nr = 'NR', - Np = 'NP', - Nl = 'NL', - Nc = 'NC', - Nz = 'NZ', - Ni = 'NI', - Ne = 'NE', - Ng = 'NG', - Nu = 'NU', - Nf = 'NF', - Kp = 'KP', - Mk = 'MK', - Mp = 'MP', - No = 'NO', - Om = 'OM', - Pk = 'PK', - Pw = 'PW', - Ps = 'PS', - Pa = 'PA', - Pg = 'PG', - Py = 'PY', - Pe = 'PE', - Ph = 'PH', - Pn = 'PN', - Pl = 'PL', - Pt = 'PT', - Pr = 'PR', - Qa = 'QA', - Re = 'RE', - Ro = 'RO', - Ru = 'RU', - Rw = 'RW', - Bl = 'BL', - Sh = 'SH', - Kn = 'KN', - Lc = 'LC', - Mf = 'MF', - Pm = 'PM', - Vc = 'VC', - Ws = 'WS', - Sm = 'SM', - St = 'ST', - Sa = 'SA', - Sn = 'SN', - Rs = 'RS', - Sc = 'SC', - Sl = 'SL', - Sg = 'SG', - Sx = 'SX', - Sk = 'SK', - Si = 'SI', - Sb = 'SB', - So = 'SO', - Za = 'ZA', - Gs = 'GS', - Kr = 'KR', - Ss = 'SS', - Es = 'ES', - Lk = 'LK', - Sd = 'SD', - Sr = 'SR', - Sj = 'SJ', - Se = 'SE', - Ch = 'CH', - Sy = 'SY', - Tw = 'TW', - Tj = 'TJ', - Tz = 'TZ', - Th = 'TH', - Tl = 'TL', - Tg = 'TG', - Tk = 'TK', - To = 'TO', - Tt = 'TT', - Tn = 'TN', - Tr = 'TR', - Tm = 'TM', - Tc = 'TC', - Tv = 'TV', - Ug = 'UG', - Ua = 'UA', - Ae = 'AE', - Gb = 'GB', - Um = 'UM', - Us = 'US', - Uy = 'UY', - Uz = 'UZ', - Vu = 'VU', - Ve = 'VE', - Vn = 'VN', - Vg = 'VG', - Vi = 'VI', - Wf = 'WF', - Eh = 'EH', - Ye = 'YE', - Zm = 'ZM', - Zw = 'ZW', -} - -export type CountryDisplay = { - __typename?: 'CountryDisplay' - /** Country code. */ - code: Scalars['String'] - /** Country name. */ - country: Scalars['String'] - /** Country tax. */ - vat?: Maybe -} - -/** Create JWT token. */ -export type CreateToken = { - __typename?: 'CreateToken' - /** JWT token, required to authenticate. */ - token?: Maybe - /** JWT refresh token, required to re-generate access token. */ - refreshToken?: Maybe - /** CSRF token required to re-generate access token. */ - csrfToken?: Maybe - /** A user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -export type CreditCard = { - __typename?: 'CreditCard' - /** Card brand. */ - brand: Scalars['String'] - /** First 4 digits of the card number. */ - firstDigits?: Maybe - /** Last 4 digits of the card number. */ - lastDigits: Scalars['String'] - /** Two-digit number representing the card’s expiration month. */ - expMonth?: Maybe - /** Four-digit number representing the card’s expiration year. */ - expYear?: Maybe -} - -/** Deletes customers. */ -export type CustomerBulkDelete = { - __typename?: 'CustomerBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Creates a new customer. */ -export type CustomerCreate = { - __typename?: 'CustomerCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - user?: Maybe -} - -/** Deletes a customer. */ -export type CustomerDelete = { - __typename?: 'CustomerDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - user?: Maybe -} - -/** History log of the customer. */ -export type CustomerEvent = Node & { - __typename?: 'CustomerEvent' - /** The ID of the object. */ - id: Scalars['ID'] - /** Date when event happened at in ISO 8601 format. */ - date?: Maybe - /** Customer event type. */ - type?: Maybe - /** User who performed the action. */ - user?: Maybe - /** Content of the event. */ - message?: Maybe - /** Number of objects concerned by the event. */ - count?: Maybe - /** The concerned order. */ - order?: Maybe - /** The concerned order line. */ - orderLine?: Maybe -} - -/** An enumeration. */ -export enum CustomerEventsEnum { - AccountCreated = 'ACCOUNT_CREATED', - PasswordResetLinkSent = 'PASSWORD_RESET_LINK_SENT', - PasswordReset = 'PASSWORD_RESET', - EmailChangedRequest = 'EMAIL_CHANGED_REQUEST', - PasswordChanged = 'PASSWORD_CHANGED', - EmailChanged = 'EMAIL_CHANGED', - PlacedOrder = 'PLACED_ORDER', - NoteAddedToOrder = 'NOTE_ADDED_TO_ORDER', - DigitalLinkDownloaded = 'DIGITAL_LINK_DOWNLOADED', - CustomerDeleted = 'CUSTOMER_DELETED', - NameAssigned = 'NAME_ASSIGNED', - EmailAssigned = 'EMAIL_ASSIGNED', - NoteAdded = 'NOTE_ADDED', -} - -export type CustomerFilterInput = { - dateJoined?: Maybe - numberOfOrders?: Maybe - placedOrders?: Maybe - search?: Maybe -} - -export type CustomerInput = { - /** Billing address of the customer. */ - defaultBillingAddress?: Maybe - /** Shipping address of the customer. */ - defaultShippingAddress?: Maybe - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** The unique email address of the user. */ - email?: Maybe - /** User account is active. */ - isActive?: Maybe - /** A note about the user. */ - note?: Maybe - /** User language code. */ - languageCode?: Maybe -} - -/** Updates an existing customer. */ -export type CustomerUpdate = { - __typename?: 'CustomerUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array - user?: Maybe -} - -export type DateRangeInput = { - /** Start date. */ - gte?: Maybe - /** End date. */ - lte?: Maybe -} - -export type DateTimeRangeInput = { - /** Start date. */ - gte?: Maybe - /** End date. */ - lte?: Maybe -} - -/** Deactivate all JWT tokens of the currently authenticated user. */ -export type DeactivateAllUserTokens = { - __typename?: 'DeactivateAllUserTokens' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Delete metadata of an object. */ -export type DeleteMetadata = { - __typename?: 'DeleteMetadata' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - metadataErrors: Array - errors: Array - item?: Maybe -} - -/** Delete object's private metadata. */ -export type DeletePrivateMetadata = { - __typename?: 'DeletePrivateMetadata' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - metadataErrors: Array - errors: Array - item?: Maybe -} - -export type DigitalContent = Node & - ObjectWithMetadata & { - __typename?: 'DigitalContent' - useDefaultSettings: Scalars['Boolean'] - automaticFulfillment: Scalars['Boolean'] - contentFile: Scalars['String'] - maxDownloads?: Maybe - urlValidDays?: Maybe - /** List of URLs for the digital variant. */ - urls?: Maybe>> - /** The ID of the object. */ - id: Scalars['ID'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Product variant assigned to digital content. */ - productVariant: ProductVariant - } - -export type DigitalContentCountableConnection = { - __typename?: 'DigitalContentCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type DigitalContentCountableEdge = { - __typename?: 'DigitalContentCountableEdge' - /** The item at the end of the edge. */ - node: DigitalContent - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ -export type DigitalContentCreate = { - __typename?: 'DigitalContentCreate' - variant?: Maybe - content?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Remove digital content assigned to given variant. */ -export type DigitalContentDelete = { - __typename?: 'DigitalContentDelete' - variant?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export type DigitalContentInput = { - /** Use default digital content settings for this product. */ - useDefaultSettings: Scalars['Boolean'] - /** Determines how many times a download link can be accessed by a customer. */ - maxDownloads?: Maybe - /** Determines for how many days a download link is active since it was generated. */ - urlValidDays?: Maybe - /** Overwrite default automatic_fulfillment setting for variant. */ - automaticFulfillment?: Maybe -} - -/** Update digital content. */ -export type DigitalContentUpdate = { - __typename?: 'DigitalContentUpdate' - variant?: Maybe - content?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export type DigitalContentUploadInput = { - /** Use default digital content settings for this product. */ - useDefaultSettings: Scalars['Boolean'] - /** Determines how many times a download link can be accessed by a customer. */ - maxDownloads?: Maybe - /** Determines for how many days a download link is active since it was generated. */ - urlValidDays?: Maybe - /** Overwrite default automatic_fulfillment setting for variant. */ - automaticFulfillment?: Maybe - /** Represents an file in a multipart request. */ - contentFile: Scalars['Upload'] -} - -export type DigitalContentUrl = Node & { - __typename?: 'DigitalContentUrl' - content: DigitalContent - created: Scalars['DateTime'] - downloadNum: Scalars['Int'] - /** The ID of the object. */ - id: Scalars['ID'] - /** URL for digital content. */ - url?: Maybe - /** UUID of digital content. */ - token: Scalars['UUID'] -} - -/** Generate new URL to digital content. */ -export type DigitalContentUrlCreate = { - __typename?: 'DigitalContentUrlCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - digitalContentUrl?: Maybe -} - -export type DigitalContentUrlCreateInput = { - /** Digital content ID which URL will belong to. */ - content: Scalars['ID'] -} - -export type DiscountError = { - __typename?: 'DiscountError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** List of products IDs which causes the error. */ - products?: Maybe> - /** The error code. */ - code: DiscountErrorCode - /** List of channels IDs which causes the error. */ - channels?: Maybe> -} - -/** An enumeration. */ -export enum DiscountErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', -} - -export enum DiscountStatusEnum { - Active = 'ACTIVE', - Expired = 'EXPIRED', - Scheduled = 'SCHEDULED', -} - -export enum DiscountValueTypeEnum { - Fixed = 'FIXED', - Percentage = 'PERCENTAGE', -} - -/** An enumeration. */ -export enum DistanceUnitsEnum { - Cm = 'CM', - M = 'M', - Km = 'KM', - Ft = 'FT', - Yd = 'YD', - Inch = 'INCH', -} - -/** Represents shop's domain. */ -export type Domain = { - __typename?: 'Domain' - /** The host name of the domain. */ - host: Scalars['String'] - /** Inform if SSL is enabled. */ - sslEnabled: Scalars['Boolean'] - /** Shop's absolute URL. */ - url: Scalars['String'] -} - -/** Deletes draft orders. */ -export type DraftOrderBulkDelete = { - __typename?: 'DraftOrderBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Completes creating an order. */ -export type DraftOrderComplete = { - __typename?: 'DraftOrderComplete' - /** Completed order. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Creates a new draft order. */ -export type DraftOrderCreate = { - __typename?: 'DraftOrderCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array - order?: Maybe -} - -export type DraftOrderCreateInput = { - /** Billing address of the customer. */ - billingAddress?: Maybe - user?: Maybe - /** Email address of the customer. */ - userEmail?: Maybe - /** Discount amount for the order. */ - discount?: Maybe - /** Shipping address of the customer. */ - shippingAddress?: Maybe - /** ID of a selected shipping method. */ - shippingMethod?: Maybe - /** ID of the voucher associated with the order. */ - voucher?: Maybe - /** A note from a customer. Visible by customers in the order summary. */ - customerNote?: Maybe - /** ID of the channel associated with the order. */ - channel?: Maybe - /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ - redirectUrl?: Maybe - /** Variant line input consisting of variant ID and quantity of products. */ - lines?: Maybe>> -} - -/** Deletes a draft order. */ -export type DraftOrderDelete = { - __typename?: 'DraftOrderDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array - order?: Maybe -} - -export type DraftOrderInput = { - /** Billing address of the customer. */ - billingAddress?: Maybe - user?: Maybe - /** Email address of the customer. */ - userEmail?: Maybe - /** Discount amount for the order. */ - discount?: Maybe - /** Shipping address of the customer. */ - shippingAddress?: Maybe - /** ID of a selected shipping method. */ - shippingMethod?: Maybe - /** ID of the voucher associated with the order. */ - voucher?: Maybe - /** A note from a customer. Visible by customers in the order summary. */ - customerNote?: Maybe - /** ID of the channel associated with the order. */ - channel?: Maybe - /** URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. */ - redirectUrl?: Maybe -} - -/** Deletes order lines. */ -export type DraftOrderLinesBulkDelete = { - __typename?: 'DraftOrderLinesBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Updates a draft order. */ -export type DraftOrderUpdate = { - __typename?: 'DraftOrderUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array - order?: Maybe -} - -export type ExportError = { - __typename?: 'ExportError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ExportErrorCode -} - -/** An enumeration. */ -export enum ExportErrorCode { - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', -} - -/** History log of export file. */ -export type ExportEvent = Node & { - __typename?: 'ExportEvent' - /** The ID of the object. */ - id: Scalars['ID'] - /** Date when event happened at in ISO 8601 format. */ - date: Scalars['DateTime'] - /** Export event type. */ - type: ExportEventsEnum - /** User who performed the action. */ - user?: Maybe - /** App which performed the action. */ - app?: Maybe - /** Content of the event. */ - message: Scalars['String'] -} - -/** An enumeration. */ -export enum ExportEventsEnum { - ExportPending = 'EXPORT_PENDING', - ExportSuccess = 'EXPORT_SUCCESS', - ExportFailed = 'EXPORT_FAILED', - ExportDeleted = 'EXPORT_DELETED', - ExportedFileSent = 'EXPORTED_FILE_SENT', - ExportFailedInfoSent = 'EXPORT_FAILED_INFO_SENT', -} - -/** Represents a job data of exported file. */ -export type ExportFile = Node & - Job & { - __typename?: 'ExportFile' - /** The ID of the object. */ - id: Scalars['ID'] - user?: Maybe - app?: Maybe - /** Job status. */ - status: JobStatusEnum - /** Created date time of job in ISO 8601 format. */ - createdAt: Scalars['DateTime'] - /** Date time of job last update in ISO 8601 format. */ - updatedAt: Scalars['DateTime'] - /** Job message. */ - message?: Maybe - /** The URL of field to download. */ - url?: Maybe - /** List of events associated with the export. */ - events?: Maybe> - } - -export type ExportFileCountableConnection = { - __typename?: 'ExportFileCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type ExportFileCountableEdge = { - __typename?: 'ExportFileCountableEdge' - /** The item at the end of the edge. */ - node: ExportFile - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type ExportFileFilterInput = { - createdAt?: Maybe - updatedAt?: Maybe - status?: Maybe - user?: Maybe - app?: Maybe -} - -export enum ExportFileSortField { - /** Sort export file by status. */ - Status = 'STATUS', - /** Sort export file by created at. */ - CreatedAt = 'CREATED_AT', - /** Sort export file by updated at. */ - UpdatedAt = 'UPDATED_AT', -} - -export type ExportFileSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort export file by the selected field. */ - field: ExportFileSortField -} - -export type ExportInfoInput = { - /** List of attribute ids witch should be exported. */ - attributes?: Maybe> - /** List of warehouse ids witch should be exported. */ - warehouses?: Maybe> - /** List of channels ids which should be exported. */ - channels?: Maybe> - /** List of product fields witch should be exported. */ - fields?: Maybe> -} - -/** Export products to csv file. */ -export type ExportProducts = { - __typename?: 'ExportProducts' - /** The newly created export file job which is responsible for export data. */ - exportFile?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - exportErrors: Array - errors: Array -} - -export type ExportProductsInput = { - /** Determine which products should be exported. */ - scope: ExportScope - /** Filtering options for products. */ - filter?: Maybe - /** List of products IDS to export. */ - ids?: Maybe> - /** Input with info about fields which should be exported. */ - exportInfo?: Maybe - /** Type of exported file. */ - fileType: FileTypesEnum -} - -export enum ExportScope { - /** Export all products. */ - All = 'ALL', - /** Export products with given ids. */ - Ids = 'IDS', - /** Export the filtered products. */ - Filter = 'FILTER', -} - -export type ExternalAuthentication = { - __typename?: 'ExternalAuthentication' - /** ID of external authentication plugin. */ - id: Scalars['String'] - /** Name of external authentication plugin. */ - name?: Maybe -} - -/** Prepare external authentication url for user by custom plugin. */ -export type ExternalAuthenticationUrl = { - __typename?: 'ExternalAuthenticationUrl' - /** The data returned by authentication plugin. */ - authenticationData?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Logout user by custom plugin. */ -export type ExternalLogout = { - __typename?: 'ExternalLogout' - /** The data returned by authentication plugin. */ - logoutData?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Obtain external access tokens for user by custom plugin. */ -export type ExternalObtainAccessTokens = { - __typename?: 'ExternalObtainAccessTokens' - /** The token, required to authenticate. */ - token?: Maybe - /** The refresh token, required to re-generate external access token. */ - refreshToken?: Maybe - /** CSRF token required to re-generate external access token. */ - csrfToken?: Maybe - /** A user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Refresh user's access by custom plugin. */ -export type ExternalRefresh = { - __typename?: 'ExternalRefresh' - /** The token, required to authenticate. */ - token?: Maybe - /** The refresh token, required to re-generate external access token. */ - refreshToken?: Maybe - /** CSRF token required to re-generate external access token. */ - csrfToken?: Maybe - /** A user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Verify external authentication data by plugin. */ -export type ExternalVerify = { - __typename?: 'ExternalVerify' - /** User assigned to data. */ - user?: Maybe - /** Determine if authentication data is valid or not. */ - isValid: Scalars['Boolean'] - /** External data. */ - verifyData?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -export type File = { - __typename?: 'File' - /** The URL of the file. */ - url: Scalars['String'] - /** Content type of the file. */ - contentType?: Maybe -} - -/** An enumeration. */ -export enum FileTypesEnum { - Csv = 'CSV', - Xlsx = 'XLSX', -} - -/** Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ -export type FileUpload = { - __typename?: 'FileUpload' - uploadedFile?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - uploadErrors: Array - errors: Array -} - -/** Represents order fulfillment. */ -export type Fulfillment = Node & - ObjectWithMetadata & { - __typename?: 'Fulfillment' - /** The ID of the object. */ - id: Scalars['ID'] - fulfillmentOrder: Scalars['Int'] - status: FulfillmentStatus - trackingNumber: Scalars['String'] - created: Scalars['DateTime'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** List of lines for the fulfillment. */ - lines?: Maybe>> - /** User-friendly fulfillment status. */ - statusDisplay?: Maybe - /** Warehouse from fulfillment was fulfilled. */ - warehouse?: Maybe - } - -/** Cancels existing fulfillment and optionally restocks items. */ -export type FulfillmentCancel = { - __typename?: 'FulfillmentCancel' - /** A canceled fulfillment. */ - fulfillment?: Maybe - /** Order which fulfillment was cancelled. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type FulfillmentCancelInput = { - /** ID of warehouse where items will be restock. */ - warehouseId: Scalars['ID'] -} - -/** Represents line of the fulfillment. */ -export type FulfillmentLine = Node & { - __typename?: 'FulfillmentLine' - /** The ID of the object. */ - id: Scalars['ID'] - quantity: Scalars['Int'] - orderLine?: Maybe -} - -/** Refund products. */ -export type FulfillmentRefundProducts = { - __typename?: 'FulfillmentRefundProducts' - /** A refunded fulfillment. */ - fulfillment?: Maybe - /** Order which fulfillment was refunded. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Return products. */ -export type FulfillmentReturnProducts = { - __typename?: 'FulfillmentReturnProducts' - /** A return fulfillment. */ - returnFulfillment?: Maybe - /** A replace fulfillment. */ - replaceFulfillment?: Maybe - /** Order which fulfillment was returned. */ - order?: Maybe - /** A draft order which was created for products with replace flag. */ - replaceOrder?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** An enumeration. */ -export enum FulfillmentStatus { - /** Fulfilled */ - Fulfilled = 'FULFILLED', - /** Refunded */ - Refunded = 'REFUNDED', - /** Returned */ - Returned = 'RETURNED', - /** Replaced */ - Replaced = 'REPLACED', - /** Refunded and returned */ - RefundedAndReturned = 'REFUNDED_AND_RETURNED', - /** Canceled */ - Canceled = 'CANCELED', -} - -/** Updates a fulfillment for an order. */ -export type FulfillmentUpdateTracking = { - __typename?: 'FulfillmentUpdateTracking' - /** A fulfillment with updated tracking. */ - fulfillment?: Maybe - /** Order for which fulfillment was updated. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type FulfillmentUpdateTrackingInput = { - /** Fulfillment tracking number. */ - trackingNumber?: Maybe - /** If true, send an email notification to the customer. */ - notifyCustomer?: Maybe -} - -/** Payment gateway client configuration key and value pair. */ -export type GatewayConfigLine = { - __typename?: 'GatewayConfigLine' - /** Gateway config key. */ - field: Scalars['String'] - /** Gateway config value for key. */ - value?: Maybe -} - -/** A gift card is a prepaid electronic payment card accepted in stores. They can be used during checkout by providing a valid gift card codes. */ -export type GiftCard = Node & { - __typename?: 'GiftCard' - /** Gift card code. */ - code?: Maybe - /** The customer who bought a gift card. */ - user?: Maybe - created: Scalars['DateTime'] - startDate: Scalars['Date'] - endDate?: Maybe - lastUsedOn?: Maybe - isActive: Scalars['Boolean'] - initialBalance?: Maybe - currentBalance?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - /** Code in format which allows displaying in a user interface. */ - displayCode?: Maybe -} - -/** Activate a gift card. */ -export type GiftCardActivate = { - __typename?: 'GiftCardActivate' - /** A gift card to activate. */ - giftCard?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - giftCardErrors: Array - errors: Array -} - -export type GiftCardCountableConnection = { - __typename?: 'GiftCardCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type GiftCardCountableEdge = { - __typename?: 'GiftCardCountableEdge' - /** The item at the end of the edge. */ - node: GiftCard - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new gift card. */ -export type GiftCardCreate = { - __typename?: 'GiftCardCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - giftCardErrors: Array - errors: Array - giftCard?: Maybe -} - -export type GiftCardCreateInput = { - /** Start date of the gift card in ISO 8601 format. */ - startDate?: Maybe - /** End date of the gift card in ISO 8601 format. */ - endDate?: Maybe - /** Value of the gift card. */ - balance?: Maybe - /** The customer's email of the gift card buyer. */ - userEmail?: Maybe - /** Code to use the gift card. */ - code?: Maybe -} - -/** Deactivate a gift card. */ -export type GiftCardDeactivate = { - __typename?: 'GiftCardDeactivate' - /** A gift card to deactivate. */ - giftCard?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - giftCardErrors: Array - errors: Array -} - -export type GiftCardError = { - __typename?: 'GiftCardError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: GiftCardErrorCode -} - -/** An enumeration. */ -export enum GiftCardErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -/** Update a gift card. */ -export type GiftCardUpdate = { - __typename?: 'GiftCardUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - giftCardErrors: Array - errors: Array - giftCard?: Maybe -} - -export type GiftCardUpdateInput = { - /** Start date of the gift card in ISO 8601 format. */ - startDate?: Maybe - /** End date of the gift card in ISO 8601 format. */ - endDate?: Maybe - /** Value of the gift card. */ - balance?: Maybe - /** The customer's email of the gift card buyer. */ - userEmail?: Maybe -} - -/** Represents permission group data. */ -export type Group = Node & { - __typename?: 'Group' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** List of group permissions */ - permissions?: Maybe>> - /** List of group users */ - users?: Maybe>> - /** True, if the currently authenticated user has rights to manage a group. */ - userCanManage: Scalars['Boolean'] -} - -export type GroupCountableConnection = { - __typename?: 'GroupCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type GroupCountableEdge = { - __typename?: 'GroupCountableEdge' - /** The item at the end of the edge. */ - node: Group - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Represents an image. */ -export type Image = { - __typename?: 'Image' - /** The URL of the image. */ - url: Scalars['String'] - /** Alt text for an image. */ - alt?: Maybe -} - -export type IntRangeInput = { - /** Value greater than or equal to. */ - gte?: Maybe - /** Value less than or equal to. */ - lte?: Maybe -} - -/** Represents an Invoice. */ -export type Invoice = ObjectWithMetadata & - Job & - Node & { - __typename?: 'Invoice' - /** The ID of the object. */ - id: Scalars['ID'] - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Job status. */ - status: JobStatusEnum - number?: Maybe - externalUrl?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** Created date time of job in ISO 8601 format. */ - createdAt: Scalars['DateTime'] - /** Date time of job last update in ISO 8601 format. */ - updatedAt: Scalars['DateTime'] - /** Job message. */ - message?: Maybe - /** URL to download an invoice. */ - url?: Maybe - } - -/** Creates a ready to send invoice. */ -export type InvoiceCreate = { - __typename?: 'InvoiceCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - invoiceErrors: Array - errors: Array - invoice?: Maybe -} - -export type InvoiceCreateInput = { - /** Invoice number. */ - number: Scalars['String'] - /** URL of an invoice to download. */ - url: Scalars['String'] -} - -/** Deletes an invoice. */ -export type InvoiceDelete = { - __typename?: 'InvoiceDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - invoiceErrors: Array - errors: Array - invoice?: Maybe -} - -export type InvoiceError = { - __typename?: 'InvoiceError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: InvoiceErrorCode -} - -/** An enumeration. */ -export enum InvoiceErrorCode { - Required = 'REQUIRED', - NotReady = 'NOT_READY', - UrlNotSet = 'URL_NOT_SET', - EmailNotSet = 'EMAIL_NOT_SET', - NumberNotSet = 'NUMBER_NOT_SET', - NotFound = 'NOT_FOUND', - InvalidStatus = 'INVALID_STATUS', -} - -/** Request an invoice for the order using plugin. */ -export type InvoiceRequest = { - __typename?: 'InvoiceRequest' - /** Order related to an invoice. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - invoiceErrors: Array - errors: Array - invoice?: Maybe -} - -/** Requests deletion of an invoice. */ -export type InvoiceRequestDelete = { - __typename?: 'InvoiceRequestDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - invoiceErrors: Array - errors: Array - invoice?: Maybe -} - -/** Send an invoice notification to the customer. */ -export type InvoiceSendNotification = { - __typename?: 'InvoiceSendNotification' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - invoiceErrors: Array - errors: Array - invoice?: Maybe -} - -/** Updates an invoice. */ -export type InvoiceUpdate = { - __typename?: 'InvoiceUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - invoiceErrors: Array - errors: Array - invoice?: Maybe -} - -export type Job = { - /** Job status. */ - status: JobStatusEnum - /** Created date time of job in ISO 8601 format. */ - createdAt: Scalars['DateTime'] - /** Date time of job last update in ISO 8601 format. */ - updatedAt: Scalars['DateTime'] - /** Job message. */ - message?: Maybe -} - -/** An enumeration. */ -export enum JobStatusEnum { - Pending = 'PENDING', - Success = 'SUCCESS', - Failed = 'FAILED', - Deleted = 'DELETED', -} - -/** An enumeration. */ -export enum LanguageCodeEnum { - Ar = 'AR', - Az = 'AZ', - Bg = 'BG', - Bn = 'BN', - Ca = 'CA', - Cs = 'CS', - Da = 'DA', - De = 'DE', - El = 'EL', - En = 'EN', - Es = 'ES', - EsCo = 'ES_CO', - Et = 'ET', - Fa = 'FA', - Fi = 'FI', - Fr = 'FR', - Hi = 'HI', - Hu = 'HU', - Hy = 'HY', - Id = 'ID', - Is = 'IS', - It = 'IT', - Ja = 'JA', - Ka = 'KA', - Km = 'KM', - Ko = 'KO', - Lt = 'LT', - Mn = 'MN', - My = 'MY', - Nb = 'NB', - Nl = 'NL', - Pl = 'PL', - Pt = 'PT', - PtBr = 'PT_BR', - Ro = 'RO', - Ru = 'RU', - Sk = 'SK', - Sl = 'SL', - Sq = 'SQ', - Sr = 'SR', - Sv = 'SV', - Sw = 'SW', - Ta = 'TA', - Th = 'TH', - Tr = 'TR', - Uk = 'UK', - Vi = 'VI', - ZhHans = 'ZH_HANS', - ZhHant = 'ZH_HANT', -} - -export type LanguageDisplay = { - __typename?: 'LanguageDisplay' - /** ISO 639 representation of the language name. */ - code: LanguageCodeEnum - /** Full name of the language. */ - language: Scalars['String'] -} - -export type LimitInfo = { - __typename?: 'LimitInfo' - /** Defines the current resource usage. */ - currentUsage: Limits - /** Defines the allowed maximum resource usage, null means unlimited. */ - allowedUsage: Limits -} - -export type Limits = { - __typename?: 'Limits' - channels?: Maybe - orders?: Maybe - productVariants?: Maybe - staffUsers?: Maybe - warehouses?: Maybe -} - -/** The manifest definition. */ -export type Manifest = { - __typename?: 'Manifest' - identifier: Scalars['String'] - version: Scalars['String'] - name: Scalars['String'] - about?: Maybe - permissions?: Maybe>> - appUrl?: Maybe - configurationUrl?: Maybe - tokenTargetUrl?: Maybe - dataPrivacy?: Maybe - dataPrivacyUrl?: Maybe - homepageUrl?: Maybe - supportUrl?: Maybe -} - -export type Margin = { - __typename?: 'Margin' - start?: Maybe - stop?: Maybe -} - -/** An enumeration. */ -export enum MeasurementUnitsEnum { - Cm = 'CM', - M = 'M', - Km = 'KM', - Ft = 'FT', - Yd = 'YD', - Inch = 'INCH', - SqCm = 'SQ_CM', - SqM = 'SQ_M', - SqKm = 'SQ_KM', - SqFt = 'SQ_FT', - SqYd = 'SQ_YD', - SqInch = 'SQ_INCH', - CubicMillimeter = 'CUBIC_MILLIMETER', - CubicCentimeter = 'CUBIC_CENTIMETER', - CubicDecimeter = 'CUBIC_DECIMETER', - CubicMeter = 'CUBIC_METER', - Liter = 'LITER', - CubicFoot = 'CUBIC_FOOT', - CubicInch = 'CUBIC_INCH', - CubicYard = 'CUBIC_YARD', - Qt = 'QT', - Pint = 'PINT', - FlOz = 'FL_OZ', - AcreIn = 'ACRE_IN', - AcreFt = 'ACRE_FT', - G = 'G', - Lb = 'LB', - Oz = 'OZ', - Kg = 'KG', - Tonne = 'TONNE', -} - -/** Represents a single menu - an object that is used to help navigate through the store. */ -export type Menu = Node & - ObjectWithMetadata & { - __typename?: 'Menu' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - items?: Maybe>> - } - -/** Deletes menus. */ -export type MenuBulkDelete = { - __typename?: 'MenuBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array -} - -export type MenuCountableConnection = { - __typename?: 'MenuCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type MenuCountableEdge = { - __typename?: 'MenuCountableEdge' - /** The item at the end of the edge. */ - node: Menu - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new Menu. */ -export type MenuCreate = { - __typename?: 'MenuCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array - menu?: Maybe -} - -export type MenuCreateInput = { - /** Name of the menu. */ - name: Scalars['String'] - /** Slug of the menu. Will be generated if not provided. */ - slug?: Maybe - /** List of menu items. */ - items?: Maybe>> -} - -/** Deletes a menu. */ -export type MenuDelete = { - __typename?: 'MenuDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array - menu?: Maybe -} - -export type MenuError = { - __typename?: 'MenuError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: MenuErrorCode -} - -/** An enumeration. */ -export enum MenuErrorCode { - CannotAssignNode = 'CANNOT_ASSIGN_NODE', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - InvalidMenuItem = 'INVALID_MENU_ITEM', - NoMenuItemProvided = 'NO_MENU_ITEM_PROVIDED', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - TooManyMenuItems = 'TOO_MANY_MENU_ITEMS', - Unique = 'UNIQUE', -} - -export type MenuFilterInput = { - search?: Maybe - slug?: Maybe>> - metadata?: Maybe>> -} - -export type MenuInput = { - /** Name of the menu. */ - name?: Maybe - /** Slug of the menu. */ - slug?: Maybe -} - -/** Represents a single item of the related menu. Can store categories, collection or pages. */ -export type MenuItem = Node & - ObjectWithMetadata & { - __typename?: 'MenuItem' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - menu: Menu - parent?: Maybe - category?: Maybe - collection?: Maybe - page?: Maybe - level: Scalars['Int'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - children?: Maybe>> - /** URL to the menu item. */ - url?: Maybe - /** Returns translated menu item fields for the given language code. */ - translation?: Maybe - } - -/** Represents a single item of the related menu. Can store categories, collection or pages. */ -export type MenuItemTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Deletes menu items. */ -export type MenuItemBulkDelete = { - __typename?: 'MenuItemBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array -} - -export type MenuItemCountableConnection = { - __typename?: 'MenuItemCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type MenuItemCountableEdge = { - __typename?: 'MenuItemCountableEdge' - /** The item at the end of the edge. */ - node: MenuItem - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new menu item. */ -export type MenuItemCreate = { - __typename?: 'MenuItemCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array - menuItem?: Maybe -} - -export type MenuItemCreateInput = { - /** Name of the menu item. */ - name: Scalars['String'] - /** URL of the pointed item. */ - url?: Maybe - /** Category to which item points. */ - category?: Maybe - /** Collection to which item points. */ - collection?: Maybe - /** Page to which item points. */ - page?: Maybe - /** Menu to which item belongs. */ - menu: Scalars['ID'] - /** ID of the parent menu. If empty, menu will be top level menu. */ - parent?: Maybe -} - -/** Deletes a menu item. */ -export type MenuItemDelete = { - __typename?: 'MenuItemDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array - menuItem?: Maybe -} - -export type MenuItemFilterInput = { - search?: Maybe - metadata?: Maybe>> -} - -export type MenuItemInput = { - /** Name of the menu item. */ - name?: Maybe - /** URL of the pointed item. */ - url?: Maybe - /** Category to which item points. */ - category?: Maybe - /** Collection to which item points. */ - collection?: Maybe - /** Page to which item points. */ - page?: Maybe -} - -/** Moves items of menus. */ -export type MenuItemMove = { - __typename?: 'MenuItemMove' - /** Assigned menu to move within. */ - menu?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array -} - -export type MenuItemMoveInput = { - /** The menu item ID to move. */ - itemId: Scalars['ID'] - /** ID of the parent menu. If empty, menu will be top level menu. */ - parentId?: Maybe - /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ - sortOrder?: Maybe -} - -export type MenuItemSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort menu items by the selected field. */ - field: MenuItemsSortField -} - -export type MenuItemTranslatableContent = Node & { - __typename?: 'MenuItemTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated menu item fields for the given language code. */ - translation?: Maybe - /** Represents a single item of the related menu. Can store categories, collection or pages. */ - menuItem?: Maybe -} - -export type MenuItemTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for Menu Item. */ -export type MenuItemTranslate = { - __typename?: 'MenuItemTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - menuItem?: Maybe -} - -export type MenuItemTranslation = Node & { - __typename?: 'MenuItemTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Translation language. */ - language: LanguageDisplay -} - -/** Updates a menu item. */ -export type MenuItemUpdate = { - __typename?: 'MenuItemUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array - menuItem?: Maybe -} - -export enum MenuItemsSortField { - /** Sort menu items by name. */ - Name = 'NAME', -} - -export enum MenuSortField { - /** Sort menus by name. */ - Name = 'NAME', - /** Sort menus by items count. */ - ItemsCount = 'ITEMS_COUNT', -} - -export type MenuSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort menus by the selected field. */ - field: MenuSortField -} - -/** Updates a menu. */ -export type MenuUpdate = { - __typename?: 'MenuUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - menuErrors: Array - errors: Array - menu?: Maybe -} - -export type MetadataError = { - __typename?: 'MetadataError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: MetadataErrorCode -} - -/** An enumeration. */ -export enum MetadataErrorCode { - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', -} - -export type MetadataInput = { - /** Key of a metadata item. */ - key: Scalars['String'] - /** Value of a metadata item. */ - value: Scalars['String'] -} - -export type MetadataItem = { - __typename?: 'MetadataItem' - /** Key of a metadata item. */ - key: Scalars['String'] - /** Value of a metadata item. */ - value: Scalars['String'] -} - -/** Represents amount of money in specific currency. */ -export type Money = { - __typename?: 'Money' - /** Currency code. */ - currency: Scalars['String'] - /** Amount of money. */ - amount: Scalars['Float'] -} - -/** Represents a range of amounts of money. */ -export type MoneyRange = { - __typename?: 'MoneyRange' - /** Lower bound of a price range. */ - start?: Maybe - /** Upper bound of a price range. */ - stop?: Maybe -} - -export type MoveProductInput = { - /** The ID of the product to move. */ - productId: Scalars['ID'] - /** The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ - sortOrder?: Maybe -} - -export type Mutation = { - __typename?: 'Mutation' - /** Creates a new webhook subscription. */ - webhookCreate?: Maybe - /** Deletes a webhook subscription. */ - webhookDelete?: Maybe - /** Updates a webhook subscription. */ - webhookUpdate?: Maybe - /** Creates new warehouse. */ - createWarehouse?: Maybe - /** Updates given warehouse. */ - updateWarehouse?: Maybe - /** Deletes selected warehouse. */ - deleteWarehouse?: Maybe - /** Add shipping zone to given warehouse. */ - assignWarehouseShippingZone?: Maybe - /** Remove shipping zone from given warehouse. */ - unassignWarehouseShippingZone?: Maybe - /** Creates a new staff notification recipient. */ - staffNotificationRecipientCreate?: Maybe - /** Updates a staff notification recipient. */ - staffNotificationRecipientUpdate?: Maybe - /** Delete staff notification recipient. */ - staffNotificationRecipientDelete?: Maybe - /** Updates site domain of the shop. */ - shopDomainUpdate?: Maybe - /** Updates shop settings. */ - shopSettingsUpdate?: Maybe - /** Fetch tax rates. */ - shopFetchTaxRates?: Maybe - /** Creates/Updates translations for Shop Settings. */ - shopSettingsTranslate?: Maybe - /** Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. */ - shopAddressUpdate?: Maybe - /** Update shop order settings. */ - orderSettingsUpdate?: Maybe - /** Manage shipping method's availability in channels. */ - shippingMethodChannelListingUpdate?: Maybe - /** Creates a new shipping price. */ - shippingPriceCreate?: Maybe - /** Deletes a shipping price. */ - shippingPriceDelete?: Maybe - /** Deletes shipping prices. */ - shippingPriceBulkDelete?: Maybe - /** Updates a new shipping price. */ - shippingPriceUpdate?: Maybe - /** Creates/Updates translations for shipping method. */ - shippingPriceTranslate?: Maybe - /** Exclude products from shipping price. */ - shippingPriceExcludeProducts?: Maybe - /** Remove product from excluded list for shipping price. */ - shippingPriceRemoveProductFromExclude?: Maybe - /** Creates a new shipping zone. */ - shippingZoneCreate?: Maybe - /** Deletes a shipping zone. */ - shippingZoneDelete?: Maybe - /** Deletes shipping zones. */ - shippingZoneBulkDelete?: Maybe - /** Updates a new shipping zone. */ - shippingZoneUpdate?: Maybe - /** Assign attributes to a given product type. */ - productAttributeAssign?: Maybe - /** Un-assign attributes from a given product type. */ - productAttributeUnassign?: Maybe - /** Creates a new category. */ - categoryCreate?: Maybe - /** Deletes a category. */ - categoryDelete?: Maybe - /** Deletes categories. */ - categoryBulkDelete?: Maybe - /** Updates a category. */ - categoryUpdate?: Maybe - /** Creates/Updates translations for Category. */ - categoryTranslate?: Maybe - /** Adds products to a collection. */ - collectionAddProducts?: Maybe - /** Creates a new collection. */ - collectionCreate?: Maybe - /** Deletes a collection. */ - collectionDelete?: Maybe - /** Reorder the products of a collection. */ - collectionReorderProducts?: Maybe - /** Deletes collections. */ - collectionBulkDelete?: Maybe - /** Remove products from a collection. */ - collectionRemoveProducts?: Maybe - /** Updates a collection. */ - collectionUpdate?: Maybe - /** Creates/Updates translations for collection. */ - collectionTranslate?: Maybe - /** Manage collection's availability in channels. */ - collectionChannelListingUpdate?: Maybe - /** Creates a new product. */ - productCreate?: Maybe - /** Deletes a product. */ - productDelete?: Maybe - /** Deletes products. */ - productBulkDelete?: Maybe - /** Updates an existing product. */ - productUpdate?: Maybe - /** Creates/Updates translations for Product. */ - productTranslate?: Maybe - /** Manage product's availability in channels. */ - productChannelListingUpdate?: Maybe - /** Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ - productMediaCreate?: Maybe - /** Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. */ - productVariantReorder?: Maybe - /** Deletes a product media. */ - productMediaDelete?: Maybe - /** Deletes product media. */ - productMediaBulkDelete?: Maybe - /** Changes ordering of the product media. */ - productMediaReorder?: Maybe - /** Updates a product media. */ - productMediaUpdate?: Maybe - /** Creates a new product type. */ - productTypeCreate?: Maybe - /** Deletes a product type. */ - productTypeDelete?: Maybe - /** Deletes product types. */ - productTypeBulkDelete?: Maybe - /** Updates an existing product type. */ - productTypeUpdate?: Maybe - /** Reorder the attributes of a product type. */ - productTypeReorderAttributes?: Maybe - /** Reorder product attribute values. */ - productReorderAttributeValues?: Maybe - /** Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ - digitalContentCreate?: Maybe - /** Remove digital content assigned to given variant. */ - digitalContentDelete?: Maybe - /** Update digital content. */ - digitalContentUpdate?: Maybe - /** Generate new URL to digital content. */ - digitalContentUrlCreate?: Maybe - /** Creates a new variant for a product. */ - productVariantCreate?: Maybe - /** Deletes a product variant. */ - productVariantDelete?: Maybe - /** Creates product variants for a given product. */ - productVariantBulkCreate?: Maybe - /** Deletes product variants. */ - productVariantBulkDelete?: Maybe - /** Creates stocks for product variant. */ - productVariantStocksCreate?: Maybe - /** Delete stocks from product variant. */ - productVariantStocksDelete?: Maybe - /** Update stocks for product variant. */ - productVariantStocksUpdate?: Maybe - /** Updates an existing variant for product. */ - productVariantUpdate?: Maybe - /** Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. */ - productVariantSetDefault?: Maybe - /** Creates/Updates translations for Product Variant. */ - productVariantTranslate?: Maybe - /** Manage product variant prices in channels. */ - productVariantChannelListingUpdate?: Maybe - /** Reorder product variant attribute values. */ - productVariantReorderAttributeValues?: Maybe - /** Assign an media to a product variant. */ - variantMediaAssign?: Maybe - /** Unassign an media from a product variant. */ - variantMediaUnassign?: Maybe - /** Captures the authorized payment amount. */ - paymentCapture?: Maybe - /** Refunds the captured payment amount. */ - paymentRefund?: Maybe - /** Voids the authorized payment. */ - paymentVoid?: Maybe - /** Initializes payment process when it is required by gateway. */ - paymentInitialize?: Maybe - /** Creates a new page. */ - pageCreate?: Maybe - /** Deletes a page. */ - pageDelete?: Maybe - /** Deletes pages. */ - pageBulkDelete?: Maybe - /** Publish pages. */ - pageBulkPublish?: Maybe - /** Updates an existing page. */ - pageUpdate?: Maybe - /** Creates/Updates translations for Page. */ - pageTranslate?: Maybe - /** Create a new page type. */ - pageTypeCreate?: Maybe - /** Update page type. */ - pageTypeUpdate?: Maybe - /** Delete a page type. */ - pageTypeDelete?: Maybe - /** Delete page types. */ - pageTypeBulkDelete?: Maybe - /** Assign attributes to a given page type. */ - pageAttributeAssign?: Maybe - /** Unassign attributes from a given page type. */ - pageAttributeUnassign?: Maybe - /** Reorder the attributes of a page type. */ - pageTypeReorderAttributes?: Maybe - /** Reorder page attribute values. */ - pageReorderAttributeValues?: Maybe - /** Completes creating an order. */ - draftOrderComplete?: Maybe - /** Creates a new draft order. */ - draftOrderCreate?: Maybe - /** Deletes a draft order. */ - draftOrderDelete?: Maybe - /** Deletes draft orders. */ - draftOrderBulkDelete?: Maybe - /** Deletes order lines. */ - draftOrderLinesBulkDelete?: Maybe - /** Updates a draft order. */ - draftOrderUpdate?: Maybe - /** Adds note to the order. */ - orderAddNote?: Maybe - /** Cancel an order. */ - orderCancel?: Maybe - /** Capture an order. */ - orderCapture?: Maybe - /** Confirms an unconfirmed order by changing status to unfulfilled. */ - orderConfirm?: Maybe - /** Creates new fulfillments for an order. */ - orderFulfill?: Maybe - /** Cancels existing fulfillment and optionally restocks items. */ - orderFulfillmentCancel?: Maybe - /** Updates a fulfillment for an order. */ - orderFulfillmentUpdateTracking?: Maybe - /** Refund products. */ - orderFulfillmentRefundProducts?: Maybe - /** Return products. */ - orderFulfillmentReturnProducts?: Maybe - /** Create order lines for an order. */ - orderLinesCreate?: Maybe - /** Deletes an order line from an order. */ - orderLineDelete?: Maybe - /** Updates an order line of an order. */ - orderLineUpdate?: Maybe - /** Adds discount to the order. */ - orderDiscountAdd?: Maybe - /** Update discount for the order. */ - orderDiscountUpdate?: Maybe - /** Remove discount from the order. */ - orderDiscountDelete?: Maybe - /** Update discount for the order line. */ - orderLineDiscountUpdate?: Maybe - /** Remove discount applied to the order line. */ - orderLineDiscountRemove?: Maybe - /** Mark order as manually paid. */ - orderMarkAsPaid?: Maybe - /** Refund an order. */ - orderRefund?: Maybe - /** Updates an order. */ - orderUpdate?: Maybe - /** Updates a shipping method of the order. */ - orderUpdateShipping?: Maybe - /** Void an order. */ - orderVoid?: Maybe - /** Cancels orders. */ - orderBulkCancel?: Maybe - /** Delete metadata of an object. */ - deleteMetadata?: Maybe - /** Delete object's private metadata. */ - deletePrivateMetadata?: Maybe - /** Updates metadata of an object. */ - updateMetadata?: Maybe - /** Updates private metadata of an object. */ - updatePrivateMetadata?: Maybe - /** Assigns storefront's navigation menus. */ - assignNavigation?: Maybe - /** Creates a new Menu. */ - menuCreate?: Maybe - /** Deletes a menu. */ - menuDelete?: Maybe - /** Deletes menus. */ - menuBulkDelete?: Maybe - /** Updates a menu. */ - menuUpdate?: Maybe - /** Creates a new menu item. */ - menuItemCreate?: Maybe - /** Deletes a menu item. */ - menuItemDelete?: Maybe - /** Deletes menu items. */ - menuItemBulkDelete?: Maybe - /** Updates a menu item. */ - menuItemUpdate?: Maybe - /** Creates/Updates translations for Menu Item. */ - menuItemTranslate?: Maybe - /** Moves items of menus. */ - menuItemMove?: Maybe - /** Request an invoice for the order using plugin. */ - invoiceRequest?: Maybe - /** Requests deletion of an invoice. */ - invoiceRequestDelete?: Maybe - /** Creates a ready to send invoice. */ - invoiceCreate?: Maybe - /** Deletes an invoice. */ - invoiceDelete?: Maybe - /** Updates an invoice. */ - invoiceUpdate?: Maybe - /** Send an invoice notification to the customer. */ - invoiceSendNotification?: Maybe - /** Activate a gift card. */ - giftCardActivate?: Maybe - /** Creates a new gift card. */ - giftCardCreate?: Maybe - /** Deactivate a gift card. */ - giftCardDeactivate?: Maybe - /** Update a gift card. */ - giftCardUpdate?: Maybe - /** Update plugin configuration. */ - pluginUpdate?: Maybe - /** Creates a new sale. */ - saleCreate?: Maybe - /** Deletes a sale. */ - saleDelete?: Maybe - /** Deletes sales. */ - saleBulkDelete?: Maybe - /** Updates a sale. */ - saleUpdate?: Maybe - /** Adds products, categories, collections to a voucher. */ - saleCataloguesAdd?: Maybe - /** Removes products, categories, collections from a sale. */ - saleCataloguesRemove?: Maybe - /** Creates/updates translations for a sale. */ - saleTranslate?: Maybe - /** Manage sale's availability in channels. */ - saleChannelListingUpdate?: Maybe - /** Creates a new voucher. */ - voucherCreate?: Maybe - /** Deletes a voucher. */ - voucherDelete?: Maybe - /** Deletes vouchers. */ - voucherBulkDelete?: Maybe - /** Updates a voucher. */ - voucherUpdate?: Maybe - /** Adds products, categories, collections to a voucher. */ - voucherCataloguesAdd?: Maybe - /** Removes products, categories, collections from a voucher. */ - voucherCataloguesRemove?: Maybe - /** Creates/Updates translations for Voucher. */ - voucherTranslate?: Maybe - /** Manage voucher's availability in channels. */ - voucherChannelListingUpdate?: Maybe - /** Export products to csv file. */ - exportProducts?: Maybe - /** Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ - fileUpload?: Maybe - /** Adds a gift card or a voucher to a checkout. */ - checkoutAddPromoCode?: Maybe - /** Update billing address in the existing checkout. */ - checkoutBillingAddressUpdate?: Maybe - /** Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation. */ - checkoutComplete?: Maybe - /** Create a new checkout. */ - checkoutCreate?: Maybe - /** Sets the customer as the owner of the checkout. */ - checkoutCustomerAttach?: Maybe - /** Removes the user assigned as the owner of the checkout. */ - checkoutCustomerDetach?: Maybe - /** Updates email address in the existing checkout object. */ - checkoutEmailUpdate?: Maybe - /** Deletes a CheckoutLine. */ - checkoutLineDelete?: Maybe - /** Adds a checkout line to the existing checkout. */ - checkoutLinesAdd?: Maybe - /** Updates checkout line in the existing checkout. */ - checkoutLinesUpdate?: Maybe - /** Remove a gift card or a voucher from a checkout. */ - checkoutRemovePromoCode?: Maybe - /** Create a new payment for given checkout. */ - checkoutPaymentCreate?: Maybe - /** Update shipping address in the existing checkout. */ - checkoutShippingAddressUpdate?: Maybe - /** Updates the shipping address of the checkout. */ - checkoutShippingMethodUpdate?: Maybe - /** Update language code in the existing checkout. */ - checkoutLanguageCodeUpdate?: Maybe - /** Creates new channel. */ - channelCreate?: Maybe - /** Update a channel. */ - channelUpdate?: Maybe - /** Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. */ - channelDelete?: Maybe - /** Activate a channel. */ - channelActivate?: Maybe - /** Deactivate a channel. */ - channelDeactivate?: Maybe - /** Creates an attribute. */ - attributeCreate?: Maybe - /** Deletes an attribute. */ - attributeDelete?: Maybe - /** Updates attribute. */ - attributeUpdate?: Maybe - /** Creates/Updates translations for attribute. */ - attributeTranslate?: Maybe - /** Deletes attributes. */ - attributeBulkDelete?: Maybe - /** Deletes values of attributes. */ - attributeValueBulkDelete?: Maybe - /** Creates a value for an attribute. */ - attributeValueCreate?: Maybe - /** Deletes a value of an attribute. */ - attributeValueDelete?: Maybe - /** Updates value of an attribute. */ - attributeValueUpdate?: Maybe - /** Creates/Updates translations for attribute value. */ - attributeValueTranslate?: Maybe - /** Reorder the values of an attribute. */ - attributeReorderValues?: Maybe - /** Creates a new app. */ - appCreate?: Maybe - /** Updates an existing app. */ - appUpdate?: Maybe - /** Deletes an app. */ - appDelete?: Maybe - /** Creates a new token. */ - appTokenCreate?: Maybe - /** Deletes an authentication token assigned to app. */ - appTokenDelete?: Maybe - /** Verify provided app token. */ - appTokenVerify?: Maybe - /** Install new app by using app manifest. */ - appInstall?: Maybe - /** Retry failed installation of new app. */ - appRetryInstall?: Maybe - /** Delete failed installation. */ - appDeleteFailedInstallation?: Maybe - /** Fetch and validate manifest. */ - appFetchManifest?: Maybe - /** Activate the app. */ - appActivate?: Maybe - /** Deactivate the app. */ - appDeactivate?: Maybe - /** Create JWT token. */ - tokenCreate?: Maybe - /** Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie. */ - tokenRefresh?: Maybe - /** Verify JWT token. */ - tokenVerify?: Maybe - /** Deactivate all JWT tokens of the currently authenticated user. */ - tokensDeactivateAll?: Maybe - /** Prepare external authentication url for user by custom plugin. */ - externalAuthenticationUrl?: Maybe - /** Obtain external access tokens for user by custom plugin. */ - externalObtainAccessTokens?: Maybe - /** Refresh user's access by custom plugin. */ - externalRefresh?: Maybe - /** Logout user by custom plugin. */ - externalLogout?: Maybe - /** Verify external authentication data by plugin. */ - externalVerify?: Maybe - /** Sends an email with the account password modification link. */ - requestPasswordReset?: Maybe - /** Confirm user account with token sent by email during registration. */ - confirmAccount?: Maybe - /** Sets the user's password from the token sent by email using the RequestPasswordReset mutation. */ - setPassword?: Maybe - /** Change the password of the logged in user. */ - passwordChange?: Maybe - /** Request email change of the logged in user. */ - requestEmailChange?: Maybe - /** Confirm the email change of the logged-in user. */ - confirmEmailChange?: Maybe - /** Create a new address for the customer. */ - accountAddressCreate?: Maybe - /** Updates an address of the logged-in user. */ - accountAddressUpdate?: Maybe - /** Delete an address of the logged-in user. */ - accountAddressDelete?: Maybe - /** Sets a default address for the authenticated user. */ - accountSetDefaultAddress?: Maybe - /** Register a new user. */ - accountRegister?: Maybe - /** Updates the account of the logged-in user. */ - accountUpdate?: Maybe - /** Sends an email with the account removal link for the logged-in user. */ - accountRequestDeletion?: Maybe - /** Remove user account. */ - accountDelete?: Maybe - /** Creates user address. */ - addressCreate?: Maybe - /** Updates an address. */ - addressUpdate?: Maybe - /** Deletes an address. */ - addressDelete?: Maybe - /** Sets a default address for the given user. */ - addressSetDefault?: Maybe - /** Creates a new customer. */ - customerCreate?: Maybe - /** Updates an existing customer. */ - customerUpdate?: Maybe - /** Deletes a customer. */ - customerDelete?: Maybe - /** Deletes customers. */ - customerBulkDelete?: Maybe - /** Creates a new staff user. */ - staffCreate?: Maybe - /** Updates an existing staff user. */ - staffUpdate?: Maybe - /** Deletes a staff user. */ - staffDelete?: Maybe - /** Deletes staff users. */ - staffBulkDelete?: Maybe - /** Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ - userAvatarUpdate?: Maybe - /** Deletes a user avatar. Only for staff members. */ - userAvatarDelete?: Maybe - /** Activate or deactivate users. */ - userBulkSetActive?: Maybe - /** Create new permission group. */ - permissionGroupCreate?: Maybe - /** Update permission group. */ - permissionGroupUpdate?: Maybe - /** Delete permission group. */ - permissionGroupDelete?: Maybe -} - -export type MutationWebhookCreateArgs = { - input: WebhookCreateInput -} - -export type MutationWebhookDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationWebhookUpdateArgs = { - id: Scalars['ID'] - input: WebhookUpdateInput -} - -export type MutationCreateWarehouseArgs = { - input: WarehouseCreateInput -} - -export type MutationUpdateWarehouseArgs = { - id: Scalars['ID'] - input: WarehouseUpdateInput -} - -export type MutationDeleteWarehouseArgs = { - id: Scalars['ID'] -} - -export type MutationAssignWarehouseShippingZoneArgs = { - id: Scalars['ID'] - shippingZoneIds: Array -} - -export type MutationUnassignWarehouseShippingZoneArgs = { - id: Scalars['ID'] - shippingZoneIds: Array -} - -export type MutationStaffNotificationRecipientCreateArgs = { - input: StaffNotificationRecipientInput -} - -export type MutationStaffNotificationRecipientUpdateArgs = { - id: Scalars['ID'] - input: StaffNotificationRecipientInput -} - -export type MutationStaffNotificationRecipientDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationShopDomainUpdateArgs = { - input?: Maybe -} - -export type MutationShopSettingsUpdateArgs = { - input: ShopSettingsInput -} - -export type MutationShopSettingsTranslateArgs = { - input: ShopSettingsTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationShopAddressUpdateArgs = { - input?: Maybe -} - -export type MutationOrderSettingsUpdateArgs = { - input: OrderSettingsUpdateInput -} - -export type MutationShippingMethodChannelListingUpdateArgs = { - id: Scalars['ID'] - input: ShippingMethodChannelListingInput -} - -export type MutationShippingPriceCreateArgs = { - input: ShippingPriceInput -} - -export type MutationShippingPriceDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationShippingPriceBulkDeleteArgs = { - ids: Array> -} - -export type MutationShippingPriceUpdateArgs = { - id: Scalars['ID'] - input: ShippingPriceInput -} - -export type MutationShippingPriceTranslateArgs = { - id: Scalars['ID'] - input: ShippingPriceTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationShippingPriceExcludeProductsArgs = { - id: Scalars['ID'] - input: ShippingPriceExcludeProductsInput -} - -export type MutationShippingPriceRemoveProductFromExcludeArgs = { - id: Scalars['ID'] - products: Array> -} - -export type MutationShippingZoneCreateArgs = { - input: ShippingZoneCreateInput -} - -export type MutationShippingZoneDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationShippingZoneBulkDeleteArgs = { - ids: Array> -} - -export type MutationShippingZoneUpdateArgs = { - id: Scalars['ID'] - input: ShippingZoneUpdateInput -} - -export type MutationProductAttributeAssignArgs = { - operations: Array> - productTypeId: Scalars['ID'] -} - -export type MutationProductAttributeUnassignArgs = { - attributeIds: Array> - productTypeId: Scalars['ID'] -} - -export type MutationCategoryCreateArgs = { - input: CategoryInput - parent?: Maybe -} - -export type MutationCategoryDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationCategoryBulkDeleteArgs = { - ids: Array> -} - -export type MutationCategoryUpdateArgs = { - id: Scalars['ID'] - input: CategoryInput -} - -export type MutationCategoryTranslateArgs = { - id: Scalars['ID'] - input: TranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationCollectionAddProductsArgs = { - collectionId: Scalars['ID'] - products: Array> -} - -export type MutationCollectionCreateArgs = { - input: CollectionCreateInput -} - -export type MutationCollectionDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationCollectionReorderProductsArgs = { - collectionId: Scalars['ID'] - moves: Array> -} - -export type MutationCollectionBulkDeleteArgs = { - ids: Array> -} - -export type MutationCollectionRemoveProductsArgs = { - collectionId: Scalars['ID'] - products: Array> -} - -export type MutationCollectionUpdateArgs = { - id: Scalars['ID'] - input: CollectionInput -} - -export type MutationCollectionTranslateArgs = { - id: Scalars['ID'] - input: TranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationCollectionChannelListingUpdateArgs = { - id: Scalars['ID'] - input: CollectionChannelListingUpdateInput -} - -export type MutationProductCreateArgs = { - input: ProductCreateInput -} - -export type MutationProductDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationProductBulkDeleteArgs = { - ids: Array> -} - -export type MutationProductUpdateArgs = { - id: Scalars['ID'] - input: ProductInput -} - -export type MutationProductTranslateArgs = { - id: Scalars['ID'] - input: TranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationProductChannelListingUpdateArgs = { - id: Scalars['ID'] - input: ProductChannelListingUpdateInput -} - -export type MutationProductMediaCreateArgs = { - input: ProductMediaCreateInput -} - -export type MutationProductVariantReorderArgs = { - moves: Array> - productId: Scalars['ID'] -} - -export type MutationProductMediaDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationProductMediaBulkDeleteArgs = { - ids: Array> -} - -export type MutationProductMediaReorderArgs = { - mediaIds: Array> - productId: Scalars['ID'] -} - -export type MutationProductMediaUpdateArgs = { - id: Scalars['ID'] - input: ProductMediaUpdateInput -} - -export type MutationProductTypeCreateArgs = { - input: ProductTypeInput -} - -export type MutationProductTypeDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationProductTypeBulkDeleteArgs = { - ids: Array> -} - -export type MutationProductTypeUpdateArgs = { - id: Scalars['ID'] - input: ProductTypeInput -} - -export type MutationProductTypeReorderAttributesArgs = { - moves: Array> - productTypeId: Scalars['ID'] - type: ProductAttributeType -} - -export type MutationProductReorderAttributeValuesArgs = { - attributeId: Scalars['ID'] - moves: Array> - productId: Scalars['ID'] -} - -export type MutationDigitalContentCreateArgs = { - input: DigitalContentUploadInput - variantId: Scalars['ID'] -} - -export type MutationDigitalContentDeleteArgs = { - variantId: Scalars['ID'] -} - -export type MutationDigitalContentUpdateArgs = { - input: DigitalContentInput - variantId: Scalars['ID'] -} - -export type MutationDigitalContentUrlCreateArgs = { - input: DigitalContentUrlCreateInput -} - -export type MutationProductVariantCreateArgs = { - input: ProductVariantCreateInput -} - -export type MutationProductVariantDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationProductVariantBulkCreateArgs = { - product: Scalars['ID'] - variants: Array> -} - -export type MutationProductVariantBulkDeleteArgs = { - ids: Array> -} - -export type MutationProductVariantStocksCreateArgs = { - stocks: Array - variantId: Scalars['ID'] -} - -export type MutationProductVariantStocksDeleteArgs = { - variantId: Scalars['ID'] - warehouseIds?: Maybe> -} - -export type MutationProductVariantStocksUpdateArgs = { - stocks: Array - variantId: Scalars['ID'] -} - -export type MutationProductVariantUpdateArgs = { - id: Scalars['ID'] - input: ProductVariantInput -} - -export type MutationProductVariantSetDefaultArgs = { - productId: Scalars['ID'] - variantId: Scalars['ID'] -} - -export type MutationProductVariantTranslateArgs = { - id: Scalars['ID'] - input: NameTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationProductVariantChannelListingUpdateArgs = { - id: Scalars['ID'] - input: Array -} - -export type MutationProductVariantReorderAttributeValuesArgs = { - attributeId: Scalars['ID'] - moves: Array> - variantId: Scalars['ID'] -} - -export type MutationVariantMediaAssignArgs = { - mediaId: Scalars['ID'] - variantId: Scalars['ID'] -} - -export type MutationVariantMediaUnassignArgs = { - mediaId: Scalars['ID'] - variantId: Scalars['ID'] -} - -export type MutationPaymentCaptureArgs = { - amount?: Maybe - paymentId: Scalars['ID'] -} - -export type MutationPaymentRefundArgs = { - amount?: Maybe - paymentId: Scalars['ID'] -} - -export type MutationPaymentVoidArgs = { - paymentId: Scalars['ID'] -} - -export type MutationPaymentInitializeArgs = { - channel?: Maybe - gateway: Scalars['String'] - paymentData?: Maybe -} - -export type MutationPageCreateArgs = { - input: PageCreateInput -} - -export type MutationPageDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationPageBulkDeleteArgs = { - ids: Array> -} - -export type MutationPageBulkPublishArgs = { - ids: Array> - isPublished: Scalars['Boolean'] -} - -export type MutationPageUpdateArgs = { - id: Scalars['ID'] - input: PageInput -} - -export type MutationPageTranslateArgs = { - id: Scalars['ID'] - input: PageTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationPageTypeCreateArgs = { - input: PageTypeCreateInput -} - -export type MutationPageTypeUpdateArgs = { - id?: Maybe - input: PageTypeUpdateInput -} - -export type MutationPageTypeDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationPageTypeBulkDeleteArgs = { - ids: Array -} - -export type MutationPageAttributeAssignArgs = { - attributeIds: Array - pageTypeId: Scalars['ID'] -} - -export type MutationPageAttributeUnassignArgs = { - attributeIds: Array - pageTypeId: Scalars['ID'] -} - -export type MutationPageTypeReorderAttributesArgs = { - moves: Array - pageTypeId: Scalars['ID'] -} - -export type MutationPageReorderAttributeValuesArgs = { - attributeId: Scalars['ID'] - moves: Array> - pageId: Scalars['ID'] -} - -export type MutationDraftOrderCompleteArgs = { - id: Scalars['ID'] -} - -export type MutationDraftOrderCreateArgs = { - input: DraftOrderCreateInput -} - -export type MutationDraftOrderDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationDraftOrderBulkDeleteArgs = { - ids: Array> -} - -export type MutationDraftOrderLinesBulkDeleteArgs = { - ids: Array> -} - -export type MutationDraftOrderUpdateArgs = { - id: Scalars['ID'] - input: DraftOrderInput -} - -export type MutationOrderAddNoteArgs = { - order: Scalars['ID'] - input: OrderAddNoteInput -} - -export type MutationOrderCancelArgs = { - id: Scalars['ID'] -} - -export type MutationOrderCaptureArgs = { - amount: Scalars['PositiveDecimal'] - id: Scalars['ID'] -} - -export type MutationOrderConfirmArgs = { - id: Scalars['ID'] -} - -export type MutationOrderFulfillArgs = { - input: OrderFulfillInput - order?: Maybe -} - -export type MutationOrderFulfillmentCancelArgs = { - id: Scalars['ID'] - input: FulfillmentCancelInput -} - -export type MutationOrderFulfillmentUpdateTrackingArgs = { - id: Scalars['ID'] - input: FulfillmentUpdateTrackingInput -} - -export type MutationOrderFulfillmentRefundProductsArgs = { - input: OrderRefundProductsInput - order: Scalars['ID'] -} - -export type MutationOrderFulfillmentReturnProductsArgs = { - input: OrderReturnProductsInput - order: Scalars['ID'] -} - -export type MutationOrderLinesCreateArgs = { - id: Scalars['ID'] - input: Array> -} - -export type MutationOrderLineDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationOrderLineUpdateArgs = { - id: Scalars['ID'] - input: OrderLineInput -} - -export type MutationOrderDiscountAddArgs = { - input: OrderDiscountCommonInput - orderId: Scalars['ID'] -} - -export type MutationOrderDiscountUpdateArgs = { - discountId: Scalars['ID'] - input: OrderDiscountCommonInput -} - -export type MutationOrderDiscountDeleteArgs = { - discountId: Scalars['ID'] -} - -export type MutationOrderLineDiscountUpdateArgs = { - input: OrderDiscountCommonInput - orderLineId: Scalars['ID'] -} - -export type MutationOrderLineDiscountRemoveArgs = { - orderLineId: Scalars['ID'] -} - -export type MutationOrderMarkAsPaidArgs = { - id: Scalars['ID'] - transactionReference?: Maybe -} - -export type MutationOrderRefundArgs = { - amount: Scalars['PositiveDecimal'] - id: Scalars['ID'] -} - -export type MutationOrderUpdateArgs = { - id: Scalars['ID'] - input: OrderUpdateInput -} - -export type MutationOrderUpdateShippingArgs = { - order: Scalars['ID'] - input?: Maybe -} - -export type MutationOrderVoidArgs = { - id: Scalars['ID'] -} - -export type MutationOrderBulkCancelArgs = { - ids: Array> -} - -export type MutationDeleteMetadataArgs = { - id: Scalars['ID'] - keys: Array -} - -export type MutationDeletePrivateMetadataArgs = { - id: Scalars['ID'] - keys: Array -} - -export type MutationUpdateMetadataArgs = { - id: Scalars['ID'] - input: Array -} - -export type MutationUpdatePrivateMetadataArgs = { - id: Scalars['ID'] - input: Array -} - -export type MutationAssignNavigationArgs = { - menu?: Maybe - navigationType: NavigationType -} - -export type MutationMenuCreateArgs = { - input: MenuCreateInput -} - -export type MutationMenuDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationMenuBulkDeleteArgs = { - ids: Array> -} - -export type MutationMenuUpdateArgs = { - id: Scalars['ID'] - input: MenuInput -} - -export type MutationMenuItemCreateArgs = { - input: MenuItemCreateInput -} - -export type MutationMenuItemDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationMenuItemBulkDeleteArgs = { - ids: Array> -} - -export type MutationMenuItemUpdateArgs = { - id: Scalars['ID'] - input: MenuItemInput -} - -export type MutationMenuItemTranslateArgs = { - id: Scalars['ID'] - input: NameTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationMenuItemMoveArgs = { - menu: Scalars['ID'] - moves: Array> -} - -export type MutationInvoiceRequestArgs = { - number?: Maybe - orderId: Scalars['ID'] -} - -export type MutationInvoiceRequestDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationInvoiceCreateArgs = { - input: InvoiceCreateInput - orderId: Scalars['ID'] -} - -export type MutationInvoiceDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationInvoiceUpdateArgs = { - id: Scalars['ID'] - input: UpdateInvoiceInput -} - -export type MutationInvoiceSendNotificationArgs = { - id: Scalars['ID'] -} - -export type MutationGiftCardActivateArgs = { - id: Scalars['ID'] -} - -export type MutationGiftCardCreateArgs = { - input: GiftCardCreateInput -} - -export type MutationGiftCardDeactivateArgs = { - id: Scalars['ID'] -} - -export type MutationGiftCardUpdateArgs = { - id: Scalars['ID'] - input: GiftCardUpdateInput -} - -export type MutationPluginUpdateArgs = { - channel?: Maybe - id: Scalars['ID'] - input: PluginUpdateInput -} - -export type MutationSaleCreateArgs = { - input: SaleInput -} - -export type MutationSaleDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationSaleBulkDeleteArgs = { - ids: Array> -} - -export type MutationSaleUpdateArgs = { - id: Scalars['ID'] - input: SaleInput -} - -export type MutationSaleCataloguesAddArgs = { - id: Scalars['ID'] - input: CatalogueInput -} - -export type MutationSaleCataloguesRemoveArgs = { - id: Scalars['ID'] - input: CatalogueInput -} - -export type MutationSaleTranslateArgs = { - id: Scalars['ID'] - input: NameTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationSaleChannelListingUpdateArgs = { - id: Scalars['ID'] - input: SaleChannelListingInput -} - -export type MutationVoucherCreateArgs = { - input: VoucherInput -} - -export type MutationVoucherDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationVoucherBulkDeleteArgs = { - ids: Array> -} - -export type MutationVoucherUpdateArgs = { - id: Scalars['ID'] - input: VoucherInput -} - -export type MutationVoucherCataloguesAddArgs = { - id: Scalars['ID'] - input: CatalogueInput -} - -export type MutationVoucherCataloguesRemoveArgs = { - id: Scalars['ID'] - input: CatalogueInput -} - -export type MutationVoucherTranslateArgs = { - id: Scalars['ID'] - input: NameTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationVoucherChannelListingUpdateArgs = { - id: Scalars['ID'] - input: VoucherChannelListingInput -} - -export type MutationExportProductsArgs = { - input: ExportProductsInput -} - -export type MutationFileUploadArgs = { - file: Scalars['Upload'] -} - -export type MutationCheckoutAddPromoCodeArgs = { - checkoutId: Scalars['ID'] - promoCode: Scalars['String'] -} - -export type MutationCheckoutBillingAddressUpdateArgs = { - billingAddress: AddressInput - checkoutId: Scalars['ID'] -} - -export type MutationCheckoutCompleteArgs = { - checkoutId: Scalars['ID'] - paymentData?: Maybe - redirectUrl?: Maybe - storeSource?: Maybe -} - -export type MutationCheckoutCreateArgs = { - input: CheckoutCreateInput -} - -export type MutationCheckoutCustomerAttachArgs = { - checkoutId: Scalars['ID'] -} - -export type MutationCheckoutCustomerDetachArgs = { - checkoutId: Scalars['ID'] -} - -export type MutationCheckoutEmailUpdateArgs = { - checkoutId?: Maybe - email: Scalars['String'] -} - -export type MutationCheckoutLineDeleteArgs = { - checkoutId: Scalars['ID'] - lineId?: Maybe -} - -export type MutationCheckoutLinesAddArgs = { - checkoutId: Scalars['ID'] - lines: Array> -} - -export type MutationCheckoutLinesUpdateArgs = { - checkoutId: Scalars['ID'] - lines: Array> -} - -export type MutationCheckoutRemovePromoCodeArgs = { - checkoutId: Scalars['ID'] - promoCode: Scalars['String'] -} - -export type MutationCheckoutPaymentCreateArgs = { - checkoutId: Scalars['ID'] - input: PaymentInput -} - -export type MutationCheckoutShippingAddressUpdateArgs = { - checkoutId: Scalars['ID'] - shippingAddress: AddressInput -} - -export type MutationCheckoutShippingMethodUpdateArgs = { - checkoutId?: Maybe - shippingMethodId: Scalars['ID'] -} - -export type MutationCheckoutLanguageCodeUpdateArgs = { - checkoutId: Scalars['ID'] - languageCode: LanguageCodeEnum -} - -export type MutationChannelCreateArgs = { - input: ChannelCreateInput -} - -export type MutationChannelUpdateArgs = { - id: Scalars['ID'] - input: ChannelUpdateInput -} - -export type MutationChannelDeleteArgs = { - id: Scalars['ID'] - input?: Maybe -} - -export type MutationChannelActivateArgs = { - id: Scalars['ID'] -} - -export type MutationChannelDeactivateArgs = { - id: Scalars['ID'] -} - -export type MutationAttributeCreateArgs = { - input: AttributeCreateInput -} - -export type MutationAttributeDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationAttributeUpdateArgs = { - id: Scalars['ID'] - input: AttributeUpdateInput -} - -export type MutationAttributeTranslateArgs = { - id: Scalars['ID'] - input: NameTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationAttributeBulkDeleteArgs = { - ids: Array> -} - -export type MutationAttributeValueBulkDeleteArgs = { - ids: Array> -} - -export type MutationAttributeValueCreateArgs = { - attribute: Scalars['ID'] - input: AttributeValueCreateInput -} - -export type MutationAttributeValueDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationAttributeValueUpdateArgs = { - id: Scalars['ID'] - input: AttributeValueCreateInput -} - -export type MutationAttributeValueTranslateArgs = { - id: Scalars['ID'] - input: AttributeValueTranslationInput - languageCode: LanguageCodeEnum -} - -export type MutationAttributeReorderValuesArgs = { - attributeId: Scalars['ID'] - moves: Array> -} - -export type MutationAppCreateArgs = { - input: AppInput -} - -export type MutationAppUpdateArgs = { - id: Scalars['ID'] - input: AppInput -} - -export type MutationAppDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationAppTokenCreateArgs = { - input: AppTokenInput -} - -export type MutationAppTokenDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationAppTokenVerifyArgs = { - token: Scalars['String'] -} - -export type MutationAppInstallArgs = { - input: AppInstallInput -} - -export type MutationAppRetryInstallArgs = { - activateAfterInstallation?: Maybe - id: Scalars['ID'] -} - -export type MutationAppDeleteFailedInstallationArgs = { - id: Scalars['ID'] -} - -export type MutationAppFetchManifestArgs = { - manifestUrl: Scalars['String'] -} - -export type MutationAppActivateArgs = { - id: Scalars['ID'] -} - -export type MutationAppDeactivateArgs = { - id: Scalars['ID'] -} - -export type MutationTokenCreateArgs = { - email: Scalars['String'] - password: Scalars['String'] -} - -export type MutationTokenRefreshArgs = { - csrfToken?: Maybe - refreshToken?: Maybe -} - -export type MutationTokenVerifyArgs = { - token: Scalars['String'] -} - -export type MutationExternalAuthenticationUrlArgs = { - input: Scalars['JSONString'] - pluginId: Scalars['String'] -} - -export type MutationExternalObtainAccessTokensArgs = { - input: Scalars['JSONString'] - pluginId: Scalars['String'] -} - -export type MutationExternalRefreshArgs = { - input: Scalars['JSONString'] - pluginId: Scalars['String'] -} - -export type MutationExternalLogoutArgs = { - input: Scalars['JSONString'] - pluginId: Scalars['String'] -} - -export type MutationExternalVerifyArgs = { - input: Scalars['JSONString'] - pluginId: Scalars['String'] -} - -export type MutationRequestPasswordResetArgs = { - channel?: Maybe - email: Scalars['String'] - redirectUrl: Scalars['String'] -} - -export type MutationConfirmAccountArgs = { - email: Scalars['String'] - token: Scalars['String'] -} - -export type MutationSetPasswordArgs = { - email: Scalars['String'] - password: Scalars['String'] - token: Scalars['String'] -} - -export type MutationPasswordChangeArgs = { - newPassword: Scalars['String'] - oldPassword: Scalars['String'] -} - -export type MutationRequestEmailChangeArgs = { - channel?: Maybe - newEmail: Scalars['String'] - password: Scalars['String'] - redirectUrl: Scalars['String'] -} - -export type MutationConfirmEmailChangeArgs = { - channel?: Maybe - token: Scalars['String'] -} - -export type MutationAccountAddressCreateArgs = { - input: AddressInput - type?: Maybe -} - -export type MutationAccountAddressUpdateArgs = { - id: Scalars['ID'] - input: AddressInput -} - -export type MutationAccountAddressDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationAccountSetDefaultAddressArgs = { - id: Scalars['ID'] - type: AddressTypeEnum -} - -export type MutationAccountRegisterArgs = { - input: AccountRegisterInput -} - -export type MutationAccountUpdateArgs = { - input: AccountInput -} - -export type MutationAccountRequestDeletionArgs = { - channel?: Maybe - redirectUrl: Scalars['String'] -} - -export type MutationAccountDeleteArgs = { - token: Scalars['String'] -} - -export type MutationAddressCreateArgs = { - input: AddressInput - userId: Scalars['ID'] -} - -export type MutationAddressUpdateArgs = { - id: Scalars['ID'] - input: AddressInput -} - -export type MutationAddressDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationAddressSetDefaultArgs = { - addressId: Scalars['ID'] - type: AddressTypeEnum - userId: Scalars['ID'] -} - -export type MutationCustomerCreateArgs = { - input: UserCreateInput -} - -export type MutationCustomerUpdateArgs = { - id: Scalars['ID'] - input: CustomerInput -} - -export type MutationCustomerDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationCustomerBulkDeleteArgs = { - ids: Array> -} - -export type MutationStaffCreateArgs = { - input: StaffCreateInput -} - -export type MutationStaffUpdateArgs = { - id: Scalars['ID'] - input: StaffUpdateInput -} - -export type MutationStaffDeleteArgs = { - id: Scalars['ID'] -} - -export type MutationStaffBulkDeleteArgs = { - ids: Array> -} - -export type MutationUserAvatarUpdateArgs = { - image: Scalars['Upload'] -} - -export type MutationUserBulkSetActiveArgs = { - ids: Array> - isActive: Scalars['Boolean'] -} - -export type MutationPermissionGroupCreateArgs = { - input: PermissionGroupCreateInput -} - -export type MutationPermissionGroupUpdateArgs = { - id: Scalars['ID'] - input: PermissionGroupUpdateInput -} - -export type MutationPermissionGroupDeleteArgs = { - id: Scalars['ID'] -} - -export type NameTranslationInput = { - name?: Maybe -} - -export enum NavigationType { - /** Main storefront navigation. */ - Main = 'MAIN', - /** Secondary storefront navigation. */ - Secondary = 'SECONDARY', -} - -/** An object with an ID */ -export type Node = { - /** The ID of the object. */ - id: Scalars['ID'] -} - -export type ObjectWithMetadata = { - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> -} - -/** Represents an order in the shop. */ -export type Order = Node & - ObjectWithMetadata & { - __typename?: 'Order' - /** The ID of the object. */ - id: Scalars['ID'] - created: Scalars['DateTime'] - status: OrderStatus - user?: Maybe - trackingClientId: Scalars['String'] - billingAddress?: Maybe
- shippingAddress?: Maybe
- shippingMethod?: Maybe - shippingMethodName?: Maybe - channel: Channel - /** Total price of shipping. */ - shippingPrice: TaxedMoney - shippingTaxRate: Scalars['Float'] - token: Scalars['String'] - voucher?: Maybe - /** List of user gift cards. */ - giftCards?: Maybe>> - displayGrossPrices: Scalars['Boolean'] - customerNote: Scalars['String'] - weight?: Maybe - redirectUrl?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** List of shipments for the order. */ - fulfillments: Array> - /** List of order lines. */ - lines: Array> - /** List of actions that can be performed in the current state of an order. */ - actions: Array> - /** Shipping methods that can be used with this order. */ - availableShippingMethods?: Maybe>> - /** List of order invoices. */ - invoices?: Maybe>> - /** User-friendly number of an order. */ - number?: Maybe - /** The ID of the order that was the base for this order. */ - original?: Maybe - /** The order origin. */ - origin: OrderOriginEnum - /** Informs if an order is fully paid. */ - isPaid: Scalars['Boolean'] - /** Internal payment status. */ - paymentStatus: PaymentChargeStatusEnum - /** User-friendly payment status. */ - paymentStatusDisplay: Scalars['String'] - /** List of payments for the order. */ - payments?: Maybe>> - /** Total amount of the order. */ - total: TaxedMoney - /** Undiscounted total amount of the order. */ - undiscountedTotal: TaxedMoney - /** The sum of line prices not including shipping. */ - subtotal: TaxedMoney - /** User-friendly order status. */ - statusDisplay?: Maybe - /** Informs whether a draft order can be finalized(turned into a regular order). */ - canFinalize: Scalars['Boolean'] - /** Amount authorized for the order. */ - totalAuthorized: Money - /** Amount captured by payment. */ - totalCaptured: Money - /** List of events associated with the order. */ - events?: Maybe>> - /** The difference between the paid and the order total amount. */ - totalBalance: Money - /** Email address of the customer. */ - userEmail?: Maybe - /** Returns True, if order requires shipping. */ - isShippingRequired: Scalars['Boolean'] - /** @deprecated Use the `languageCodeEnum` field to fetch the language code. This field will be removed in Saleor 4.0. */ - languageCode: Scalars['String'] - /** Order language code. */ - languageCodeEnum: LanguageCodeEnum - /** - * Returns applied discount. - * @deprecated Use discounts field. This field will be removed in Saleor 4.0. - */ - discount?: Maybe - /** - * Discount name. - * @deprecated Use discounts field. This field will be removed in Saleor 4.0. - */ - discountName?: Maybe - /** - * Translated discount name. - * @deprecated Use discounts field. This field will be removed in Saleor 4.0. - */ - translatedDiscountName?: Maybe - /** List of all discounts assigned to the order. */ - discounts?: Maybe> - } - -export enum OrderAction { - /** Represents the capture action. */ - Capture = 'CAPTURE', - /** Represents a mark-as-paid action. */ - MarkAsPaid = 'MARK_AS_PAID', - /** Represents a refund action. */ - Refund = 'REFUND', - /** Represents a void action. */ - Void = 'VOID', -} - -/** Adds note to the order. */ -export type OrderAddNote = { - __typename?: 'OrderAddNote' - /** Order with the note added. */ - order?: Maybe - /** Order note created. */ - event?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type OrderAddNoteInput = { - /** Note message. */ - message: Scalars['String'] -} - -/** Cancels orders. */ -export type OrderBulkCancel = { - __typename?: 'OrderBulkCancel' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Cancel an order. */ -export type OrderCancel = { - __typename?: 'OrderCancel' - /** Canceled order. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Capture an order. */ -export type OrderCapture = { - __typename?: 'OrderCapture' - /** Captured order. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Confirms an unconfirmed order by changing status to unfulfilled. */ -export type OrderConfirm = { - __typename?: 'OrderConfirm' - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type OrderCountableConnection = { - __typename?: 'OrderCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type OrderCountableEdge = { - __typename?: 'OrderCountableEdge' - /** The item at the end of the edge. */ - node: Order - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export enum OrderDirection { - /** Specifies an ascending sort order. */ - Asc = 'ASC', - /** Specifies a descending sort order. */ - Desc = 'DESC', -} - -/** Contains all details related to the applied discount to the order. */ -export type OrderDiscount = Node & { - __typename?: 'OrderDiscount' - /** The ID of the object. */ - id: Scalars['ID'] - type: OrderDiscountType - /** Type of the discount: fixed or percent */ - valueType: DiscountValueTypeEnum - /** Value of the discount. Can store fixed value or percent value */ - value: Scalars['PositiveDecimal'] - name?: Maybe - translatedName?: Maybe - /** Explanation for the applied discount. */ - reason?: Maybe - /** Returns amount of discount. */ - amount: Money -} - -/** Adds discount to the order. */ -export type OrderDiscountAdd = { - __typename?: 'OrderDiscountAdd' - /** Order which has been discounted. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type OrderDiscountCommonInput = { - /** Type of the discount: fixed or percent */ - valueType: DiscountValueTypeEnum - /** Value of the discount. Can store fixed value or percent value */ - value: Scalars['PositiveDecimal'] - /** Explanation for the applied discount. */ - reason?: Maybe -} - -/** Remove discount from the order. */ -export type OrderDiscountDelete = { - __typename?: 'OrderDiscountDelete' - /** Order which has removed discount. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** An enumeration. */ -export enum OrderDiscountType { - /** Voucher */ - Voucher = 'VOUCHER', - /** Manual */ - Manual = 'MANUAL', -} - -/** Update discount for the order. */ -export type OrderDiscountUpdate = { - __typename?: 'OrderDiscountUpdate' - /** Order which has been discounted. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type OrderDraftFilterInput = { - customer?: Maybe - created?: Maybe - search?: Maybe - metadata?: Maybe>> - channels?: Maybe>> -} - -export type OrderError = { - __typename?: 'OrderError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: OrderErrorCode - /** Warehouse ID which causes the error. */ - warehouse?: Maybe - /** Order line ID which causes the error. */ - orderLine?: Maybe - /** List of product variants that are associated with the error */ - variants?: Maybe> - /** A type of address that causes the error. */ - addressType?: Maybe -} - -/** An enumeration. */ -export enum OrderErrorCode { - BillingAddressNotSet = 'BILLING_ADDRESS_NOT_SET', - CannotCancelFulfillment = 'CANNOT_CANCEL_FULFILLMENT', - CannotCancelOrder = 'CANNOT_CANCEL_ORDER', - CannotDelete = 'CANNOT_DELETE', - CannotDiscount = 'CANNOT_DISCOUNT', - CannotRefund = 'CANNOT_REFUND', - CaptureInactivePayment = 'CAPTURE_INACTIVE_PAYMENT', - NotEditable = 'NOT_EDITABLE', - FulfillOrderLine = 'FULFILL_ORDER_LINE', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - ProductNotPublished = 'PRODUCT_NOT_PUBLISHED', - ProductUnavailableForPurchase = 'PRODUCT_UNAVAILABLE_FOR_PURCHASE', - NotFound = 'NOT_FOUND', - OrderNoShippingAddress = 'ORDER_NO_SHIPPING_ADDRESS', - PaymentError = 'PAYMENT_ERROR', - PaymentMissing = 'PAYMENT_MISSING', - Required = 'REQUIRED', - ShippingMethodNotApplicable = 'SHIPPING_METHOD_NOT_APPLICABLE', - ShippingMethodRequired = 'SHIPPING_METHOD_REQUIRED', - TaxError = 'TAX_ERROR', - Unique = 'UNIQUE', - VoidInactivePayment = 'VOID_INACTIVE_PAYMENT', - ZeroQuantity = 'ZERO_QUANTITY', - InvalidQuantity = 'INVALID_QUANTITY', - InsufficientStock = 'INSUFFICIENT_STOCK', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - NotAvailableInChannel = 'NOT_AVAILABLE_IN_CHANNEL', - ChannelInactive = 'CHANNEL_INACTIVE', -} - -/** History log of the order. */ -export type OrderEvent = Node & { - __typename?: 'OrderEvent' - /** The ID of the object. */ - id: Scalars['ID'] - /** Date when event happened at in ISO 8601 format. */ - date?: Maybe - /** Order event type. */ - type?: Maybe - /** User who performed the action. */ - user?: Maybe - /** Content of the event. */ - message?: Maybe - /** Email of the customer. */ - email?: Maybe - /** Type of an email sent to the customer. */ - emailType?: Maybe - /** Amount of money. */ - amount?: Maybe - /** The payment ID from the payment gateway. */ - paymentId?: Maybe - /** The payment gateway of the payment. */ - paymentGateway?: Maybe - /** Number of items. */ - quantity?: Maybe - /** Composed ID of the Fulfillment. */ - composedId?: Maybe - /** User-friendly number of an order. */ - orderNumber?: Maybe - /** Number of an invoice related to the order. */ - invoiceNumber?: Maybe - /** List of oversold lines names. */ - oversoldItems?: Maybe>> - /** The concerned lines. */ - lines?: Maybe>> - /** The lines fulfilled. */ - fulfilledItems?: Maybe>> - /** The warehouse were items were restocked. */ - warehouse?: Maybe - /** The transaction reference of captured payment. */ - transactionReference?: Maybe - /** Define if shipping costs were included to the refund. */ - shippingCostsIncluded?: Maybe - /** The order which is related to this order. */ - relatedOrder?: Maybe - /** The discount applied to the order. */ - discount?: Maybe -} - -export type OrderEventCountableConnection = { - __typename?: 'OrderEventCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type OrderEventCountableEdge = { - __typename?: 'OrderEventCountableEdge' - /** The item at the end of the edge. */ - node: OrderEvent - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type OrderEventDiscountObject = { - __typename?: 'OrderEventDiscountObject' - /** Type of the discount: fixed or percent. */ - valueType: DiscountValueTypeEnum - /** Value of the discount. Can store fixed value or percent value. */ - value: Scalars['PositiveDecimal'] - /** Explanation for the applied discount. */ - reason?: Maybe - /** Returns amount of discount. */ - amount?: Maybe - /** Type of the discount: fixed or percent. */ - oldValueType?: Maybe - /** Value of the discount. Can store fixed value or percent value. */ - oldValue?: Maybe - /** Returns amount of discount. */ - oldAmount?: Maybe -} - -export type OrderEventOrderLineObject = { - __typename?: 'OrderEventOrderLineObject' - /** The variant quantity. */ - quantity?: Maybe - /** The order line. */ - orderLine?: Maybe - /** The variant name. */ - itemName?: Maybe - /** The discount applied to the order line. */ - discount?: Maybe -} - -/** An enumeration. */ -export enum OrderEventsEmailsEnum { - PaymentConfirmation = 'PAYMENT_CONFIRMATION', - Confirmed = 'CONFIRMED', - ShippingConfirmation = 'SHIPPING_CONFIRMATION', - TrackingUpdated = 'TRACKING_UPDATED', - OrderConfirmation = 'ORDER_CONFIRMATION', - OrderCancel = 'ORDER_CANCEL', - OrderRefund = 'ORDER_REFUND', - FulfillmentConfirmation = 'FULFILLMENT_CONFIRMATION', - DigitalLinks = 'DIGITAL_LINKS', -} - -/** An enumeration. */ -export enum OrderEventsEnum { - DraftCreated = 'DRAFT_CREATED', - DraftCreatedFromReplace = 'DRAFT_CREATED_FROM_REPLACE', - AddedProducts = 'ADDED_PRODUCTS', - RemovedProducts = 'REMOVED_PRODUCTS', - Placed = 'PLACED', - PlacedFromDraft = 'PLACED_FROM_DRAFT', - OversoldItems = 'OVERSOLD_ITEMS', - Canceled = 'CANCELED', - OrderMarkedAsPaid = 'ORDER_MARKED_AS_PAID', - OrderFullyPaid = 'ORDER_FULLY_PAID', - OrderReplacementCreated = 'ORDER_REPLACEMENT_CREATED', - OrderDiscountAdded = 'ORDER_DISCOUNT_ADDED', - OrderDiscountAutomaticallyUpdated = 'ORDER_DISCOUNT_AUTOMATICALLY_UPDATED', - OrderDiscountUpdated = 'ORDER_DISCOUNT_UPDATED', - OrderDiscountDeleted = 'ORDER_DISCOUNT_DELETED', - OrderLineDiscountUpdated = 'ORDER_LINE_DISCOUNT_UPDATED', - OrderLineDiscountRemoved = 'ORDER_LINE_DISCOUNT_REMOVED', - UpdatedAddress = 'UPDATED_ADDRESS', - EmailSent = 'EMAIL_SENT', - Confirmed = 'CONFIRMED', - PaymentAuthorized = 'PAYMENT_AUTHORIZED', - PaymentCaptured = 'PAYMENT_CAPTURED', - ExternalServiceNotification = 'EXTERNAL_SERVICE_NOTIFICATION', - PaymentRefunded = 'PAYMENT_REFUNDED', - PaymentVoided = 'PAYMENT_VOIDED', - PaymentFailed = 'PAYMENT_FAILED', - InvoiceRequested = 'INVOICE_REQUESTED', - InvoiceGenerated = 'INVOICE_GENERATED', - InvoiceUpdated = 'INVOICE_UPDATED', - InvoiceSent = 'INVOICE_SENT', - FulfillmentCanceled = 'FULFILLMENT_CANCELED', - FulfillmentRestockedItems = 'FULFILLMENT_RESTOCKED_ITEMS', - FulfillmentFulfilledItems = 'FULFILLMENT_FULFILLED_ITEMS', - FulfillmentRefunded = 'FULFILLMENT_REFUNDED', - FulfillmentReturned = 'FULFILLMENT_RETURNED', - FulfillmentReplaced = 'FULFILLMENT_REPLACED', - TrackingUpdated = 'TRACKING_UPDATED', - NoteAdded = 'NOTE_ADDED', - Other = 'OTHER', -} - -export type OrderFilterInput = { - paymentStatus?: Maybe>> - status?: Maybe>> - customer?: Maybe - created?: Maybe - search?: Maybe - metadata?: Maybe>> - channels?: Maybe>> -} - -/** Creates new fulfillments for an order. */ -export type OrderFulfill = { - __typename?: 'OrderFulfill' - /** List of created fulfillments. */ - fulfillments?: Maybe>> - /** Fulfilled order. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type OrderFulfillInput = { - /** List of items informing how to fulfill the order. */ - lines: Array - /** If true, send an email notification to the customer. */ - notifyCustomer?: Maybe -} - -export type OrderFulfillLineInput = { - /** The ID of the order line. */ - orderLineId?: Maybe - /** List of stock items to create. */ - stocks: Array -} - -export type OrderFulfillStockInput = { - /** The number of line items to be fulfilled from given warehouse. */ - quantity: Scalars['Int'] - /** ID of the warehouse from which the item will be fulfilled. */ - warehouse: Scalars['ID'] -} - -/** Represents order line of particular order. */ -export type OrderLine = Node & { - __typename?: 'OrderLine' - /** The ID of the object. */ - id: Scalars['ID'] - productName: Scalars['String'] - variantName: Scalars['String'] - productSku: Scalars['String'] - isShippingRequired: Scalars['Boolean'] - quantity: Scalars['Int'] - quantityFulfilled: Scalars['Int'] - unitDiscountReason?: Maybe - taxRate: Scalars['Float'] - digitalContentUrl?: Maybe - /** The main thumbnail for the ordered product. */ - thumbnail?: Maybe - /** Price of the single item in the order line. */ - unitPrice: TaxedMoney - /** Price of the single item in the order line without applied an order line discount. */ - undiscountedUnitPrice: TaxedMoney - /** The discount applied to the single order line. */ - unitDiscount: Money - /** Value of the discount. Can store fixed value or percent value */ - unitDiscountValue: Scalars['PositiveDecimal'] - /** Price of the order line. */ - totalPrice: TaxedMoney - /** A purchased product variant. Note: this field may be null if the variant has been removed from stock at all. */ - variant?: Maybe - /** Product name in the customer's language */ - translatedProductName: Scalars['String'] - /** Variant name in the customer's language */ - translatedVariantName: Scalars['String'] - /** List of allocations across warehouses. */ - allocations?: Maybe> - /** Type of the discount: fixed or percent */ - unitDiscountType?: Maybe -} - -/** Represents order line of particular order. */ -export type OrderLineThumbnailArgs = { - size?: Maybe -} - -export type OrderLineCreateInput = { - /** Number of variant items ordered. */ - quantity: Scalars['Int'] - /** Product variant ID. */ - variantId: Scalars['ID'] -} - -/** Deletes an order line from an order. */ -export type OrderLineDelete = { - __typename?: 'OrderLineDelete' - /** A related order. */ - order?: Maybe - /** An order line that was deleted. */ - orderLine?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Remove discount applied to the order line. */ -export type OrderLineDiscountRemove = { - __typename?: 'OrderLineDiscountRemove' - /** Order line which has removed discount. */ - orderLine?: Maybe - /** Order which is related to line which has removed discount. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Update discount for the order line. */ -export type OrderLineDiscountUpdate = { - __typename?: 'OrderLineDiscountUpdate' - /** Order line which has been discounted. */ - orderLine?: Maybe - /** Order which is related to the discounted line. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type OrderLineInput = { - /** Number of variant items ordered. */ - quantity: Scalars['Int'] -} - -/** Updates an order line of an order. */ -export type OrderLineUpdate = { - __typename?: 'OrderLineUpdate' - /** Related order. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array - orderLine?: Maybe -} - -/** Create order lines for an order. */ -export type OrderLinesCreate = { - __typename?: 'OrderLinesCreate' - /** Related order. */ - order?: Maybe - /** List of added order lines. */ - orderLines?: Maybe> - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** Mark order as manually paid. */ -export type OrderMarkAsPaid = { - __typename?: 'OrderMarkAsPaid' - /** Order marked as paid. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** An enumeration. */ -export enum OrderOriginEnum { - Checkout = 'CHECKOUT', - Draft = 'DRAFT', - Reissue = 'REISSUE', -} - -/** Refund an order. */ -export type OrderRefund = { - __typename?: 'OrderRefund' - /** A refunded order. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type OrderRefundFulfillmentLineInput = { - /** The ID of the fulfillment line to refund. */ - fulfillmentLineId: Scalars['ID'] - /** The number of items to be refunded. */ - quantity: Scalars['Int'] -} - -export type OrderRefundLineInput = { - /** The ID of the order line to refund. */ - orderLineId: Scalars['ID'] - /** The number of items to be refunded. */ - quantity: Scalars['Int'] -} - -export type OrderRefundProductsInput = { - /** List of unfulfilled lines to refund. */ - orderLines?: Maybe> - /** List of fulfilled lines to refund. */ - fulfillmentLines?: Maybe> - /** The total amount of refund when the value is provided manually. */ - amountToRefund?: Maybe - /** If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. */ - includeShippingCosts?: Maybe -} - -export type OrderReturnFulfillmentLineInput = { - /** The ID of the fulfillment line to return. */ - fulfillmentLineId: Scalars['ID'] - /** The number of items to be returned. */ - quantity: Scalars['Int'] - /** Determines, if the line should be added to replace order. */ - replace?: Maybe -} - -export type OrderReturnLineInput = { - /** The ID of the order line to return. */ - orderLineId: Scalars['ID'] - /** The number of items to be returned. */ - quantity: Scalars['Int'] - /** Determines, if the line should be added to replace order. */ - replace?: Maybe -} - -export type OrderReturnProductsInput = { - /** List of unfulfilled lines to return. */ - orderLines?: Maybe> - /** List of fulfilled lines to return. */ - fulfillmentLines?: Maybe> - /** The total amount of refund when the value is provided manually. */ - amountToRefund?: Maybe - /** If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. */ - includeShippingCosts?: Maybe - /** If true, Saleor will call refund action for all lines. */ - refund?: Maybe -} - -/** Order related settings from site settings. */ -export type OrderSettings = { - __typename?: 'OrderSettings' - automaticallyConfirmAllNewOrders: Scalars['Boolean'] -} - -export type OrderSettingsError = { - __typename?: 'OrderSettingsError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: OrderSettingsErrorCode -} - -/** An enumeration. */ -export enum OrderSettingsErrorCode { - Invalid = 'INVALID', -} - -/** Update shop order settings. */ -export type OrderSettingsUpdate = { - __typename?: 'OrderSettingsUpdate' - /** Order settings. */ - orderSettings?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderSettingsErrors: Array - errors: Array -} - -export type OrderSettingsUpdateInput = { - /** When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. */ - automaticallyConfirmAllNewOrders: Scalars['Boolean'] -} - -export enum OrderSortField { - /** Sort orders by number. */ - Number = 'NUMBER', - /** Sort orders by creation date. */ - CreationDate = 'CREATION_DATE', - /** Sort orders by customer. */ - Customer = 'CUSTOMER', - /** Sort orders by payment. */ - Payment = 'PAYMENT', - /** Sort orders by fulfillment status. */ - FulfillmentStatus = 'FULFILLMENT_STATUS', -} - -export type OrderSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort orders by the selected field. */ - field: OrderSortField -} - -/** An enumeration. */ -export enum OrderStatus { - /** Draft */ - Draft = 'DRAFT', - /** Unconfirmed */ - Unconfirmed = 'UNCONFIRMED', - /** Unfulfilled */ - Unfulfilled = 'UNFULFILLED', - /** Partially fulfilled */ - PartiallyFulfilled = 'PARTIALLY_FULFILLED', - /** Partially returned */ - PartiallyReturned = 'PARTIALLY_RETURNED', - /** Returned */ - Returned = 'RETURNED', - /** Fulfilled */ - Fulfilled = 'FULFILLED', - /** Canceled */ - Canceled = 'CANCELED', -} - -export enum OrderStatusFilter { - ReadyToFulfill = 'READY_TO_FULFILL', - ReadyToCapture = 'READY_TO_CAPTURE', - Unfulfilled = 'UNFULFILLED', - Unconfirmed = 'UNCONFIRMED', - PartiallyFulfilled = 'PARTIALLY_FULFILLED', - Fulfilled = 'FULFILLED', - Canceled = 'CANCELED', -} - -/** Updates an order. */ -export type OrderUpdate = { - __typename?: 'OrderUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array - order?: Maybe -} - -export type OrderUpdateInput = { - /** Billing address of the customer. */ - billingAddress?: Maybe - /** Email address of the customer. */ - userEmail?: Maybe - /** Shipping address of the customer. */ - shippingAddress?: Maybe -} - -/** Updates a shipping method of the order. */ -export type OrderUpdateShipping = { - __typename?: 'OrderUpdateShipping' - /** Order with updated shipping method. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -export type OrderUpdateShippingInput = { - /** ID of the selected shipping method. */ - shippingMethod?: Maybe -} - -/** Void an order. */ -export type OrderVoid = { - __typename?: 'OrderVoid' - /** A voided order. */ - order?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - orderErrors: Array - errors: Array -} - -/** A static page that can be manually added by a shop operator through the dashboard. */ -export type Page = Node & - ObjectWithMetadata & { - __typename?: 'Page' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - title: Scalars['String'] - content?: Maybe - publicationDate?: Maybe - isPublished: Scalars['Boolean'] - slug: Scalars['String'] - pageType: PageType - created: Scalars['DateTime'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * Content of the page (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. - */ - contentJson: Scalars['JSONString'] - /** Returns translated page fields for the given language code. */ - translation?: Maybe - /** List of attributes assigned to this product. */ - attributes: Array - } - -/** A static page that can be manually added by a shop operator through the dashboard. */ -export type PageTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Assign attributes to a given page type. */ -export type PageAttributeAssign = { - __typename?: 'PageAttributeAssign' - /** The updated page type. */ - pageType?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array -} - -/** Unassign attributes from a given page type. */ -export type PageAttributeUnassign = { - __typename?: 'PageAttributeUnassign' - /** The updated page type. */ - pageType?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array -} - -/** Deletes pages. */ -export type PageBulkDelete = { - __typename?: 'PageBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array -} - -/** Publish pages. */ -export type PageBulkPublish = { - __typename?: 'PageBulkPublish' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array -} - -export type PageCountableConnection = { - __typename?: 'PageCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type PageCountableEdge = { - __typename?: 'PageCountableEdge' - /** The item at the end of the edge. */ - node: Page - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new page. */ -export type PageCreate = { - __typename?: 'PageCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array - page?: Maybe -} - -export type PageCreateInput = { - /** Page internal name. */ - slug?: Maybe - /** Page title. */ - title?: Maybe - /** Page content in JSON format. */ - content?: Maybe - /** List of attributes. */ - attributes?: Maybe> - /** Determines if page is visible in the storefront. */ - isPublished?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** ID of the page type that page belongs to. */ - pageType: Scalars['ID'] -} - -/** Deletes a page. */ -export type PageDelete = { - __typename?: 'PageDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array - page?: Maybe -} - -export type PageError = { - __typename?: 'PageError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: PageErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> -} - -/** An enumeration. */ -export enum PageErrorCode { - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - AttributeAlreadyAssigned = 'ATTRIBUTE_ALREADY_ASSIGNED', -} - -export type PageFilterInput = { - search?: Maybe - metadata?: Maybe>> - pageTypes?: Maybe>> -} - -/** The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. */ -export type PageInfo = { - __typename?: 'PageInfo' - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean'] - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean'] - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe -} - -export type PageInput = { - /** Page internal name. */ - slug?: Maybe - /** Page title. */ - title?: Maybe - /** Page content in JSON format. */ - content?: Maybe - /** List of attributes. */ - attributes?: Maybe> - /** Determines if page is visible in the storefront. */ - isPublished?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe -} - -/** Reorder page attribute values. */ -export type PageReorderAttributeValues = { - __typename?: 'PageReorderAttributeValues' - /** Page from which attribute values are reordered. */ - page?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array -} - -export enum PageSortField { - /** Sort pages by title. */ - Title = 'TITLE', - /** Sort pages by slug. */ - Slug = 'SLUG', - /** Sort pages by visibility. */ - Visibility = 'VISIBILITY', - /** Sort pages by creation date. */ - CreationDate = 'CREATION_DATE', - /** Sort pages by publication date. */ - PublicationDate = 'PUBLICATION_DATE', -} - -export type PageSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort pages by the selected field. */ - field: PageSortField -} - -export type PageTranslatableContent = Node & { - __typename?: 'PageTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - title: Scalars['String'] - content?: Maybe - /** - * Content of the page (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. - */ - contentJson?: Maybe - /** Returns translated page fields for the given language code. */ - translation?: Maybe - /** ('A static page that can be manually added by a shop operator ', 'through the dashboard.') */ - page?: Maybe -} - -export type PageTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for Page. */ -export type PageTranslate = { - __typename?: 'PageTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - page?: Maybe -} - -export type PageTranslation = Node & { - __typename?: 'PageTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - title: Scalars['String'] - content?: Maybe - /** Translation language. */ - language: LanguageDisplay - /** - * Translated description of the page (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `content` field instead. - */ - contentJson?: Maybe -} - -export type PageTranslationInput = { - seoTitle?: Maybe - seoDescription?: Maybe - title?: Maybe - content?: Maybe -} - -/** Represents a type of page. It defines what attributes are available to pages of this type. */ -export type PageType = Node & - ObjectWithMetadata & { - __typename?: 'PageType' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Page attributes of that page type. */ - attributes?: Maybe>> - /** Attributes that can be assigned to the page type. */ - availableAttributes?: Maybe - /** Whether page type has pages assigned. */ - hasPages?: Maybe - } - -/** Represents a type of page. It defines what attributes are available to pages of this type. */ -export type PageTypeAvailableAttributesArgs = { - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Delete page types. */ -export type PageTypeBulkDelete = { - __typename?: 'PageTypeBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array -} - -export type PageTypeCountableConnection = { - __typename?: 'PageTypeCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type PageTypeCountableEdge = { - __typename?: 'PageTypeCountableEdge' - /** The item at the end of the edge. */ - node: PageType - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Create a new page type. */ -export type PageTypeCreate = { - __typename?: 'PageTypeCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array - pageType?: Maybe -} - -export type PageTypeCreateInput = { - /** Name of the page type. */ - name?: Maybe - /** Page type slug. */ - slug?: Maybe - /** List of attribute IDs to be assigned to the page type. */ - addAttributes?: Maybe> -} - -/** Delete a page type. */ -export type PageTypeDelete = { - __typename?: 'PageTypeDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array - pageType?: Maybe -} - -export type PageTypeFilterInput = { - search?: Maybe -} - -/** Reorder the attributes of a page type. */ -export type PageTypeReorderAttributes = { - __typename?: 'PageTypeReorderAttributes' - /** Page type from which attributes are reordered. */ - pageType?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array -} - -export enum PageTypeSortField { - /** Sort page types by name. */ - Name = 'NAME', - /** Sort page types by slug. */ - Slug = 'SLUG', -} - -export type PageTypeSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort page types by the selected field. */ - field: PageTypeSortField -} - -/** Update page type. */ -export type PageTypeUpdate = { - __typename?: 'PageTypeUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array - pageType?: Maybe -} - -export type PageTypeUpdateInput = { - /** Name of the page type. */ - name?: Maybe - /** Page type slug. */ - slug?: Maybe - /** List of attribute IDs to be assigned to the page type. */ - addAttributes?: Maybe> - /** List of attribute IDs to be assigned to the page type. */ - removeAttributes?: Maybe> -} - -/** Updates an existing page. */ -export type PageUpdate = { - __typename?: 'PageUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pageErrors: Array - errors: Array - page?: Maybe -} - -/** Change the password of the logged in user. */ -export type PasswordChange = { - __typename?: 'PasswordChange' - /** A user instance with a new password. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Represents a payment of a given type. */ -export type Payment = Node & { - __typename?: 'Payment' - /** The ID of the object. */ - id: Scalars['ID'] - gateway: Scalars['String'] - isActive: Scalars['Boolean'] - created: Scalars['DateTime'] - modified: Scalars['DateTime'] - token: Scalars['String'] - checkout?: Maybe - order?: Maybe - paymentMethodType: Scalars['String'] - customerIpAddress?: Maybe - /** Internal payment status. */ - chargeStatus: PaymentChargeStatusEnum - /** List of actions that can be performed in the current state of a payment. */ - actions: Array> - /** Total amount of the payment. */ - total?: Maybe - /** Total amount captured for this payment. */ - capturedAmount?: Maybe - /** List of all transactions within this payment. */ - transactions?: Maybe>> - /** Maximum amount of money that can be captured. */ - availableCaptureAmount?: Maybe - /** Maximum amount of money that can be refunded. */ - availableRefundAmount?: Maybe - /** The details of the card used for this payment. */ - creditCard?: Maybe -} - -/** Captures the authorized payment amount. */ -export type PaymentCapture = { - __typename?: 'PaymentCapture' - /** Updated payment. */ - payment?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - paymentErrors: Array - errors: Array -} - -/** An enumeration. */ -export enum PaymentChargeStatusEnum { - NotCharged = 'NOT_CHARGED', - Pending = 'PENDING', - PartiallyCharged = 'PARTIALLY_CHARGED', - FullyCharged = 'FULLY_CHARGED', - PartiallyRefunded = 'PARTIALLY_REFUNDED', - FullyRefunded = 'FULLY_REFUNDED', - Refused = 'REFUSED', - Cancelled = 'CANCELLED', -} - -export type PaymentCountableConnection = { - __typename?: 'PaymentCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type PaymentCountableEdge = { - __typename?: 'PaymentCountableEdge' - /** The item at the end of the edge. */ - node: Payment - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type PaymentError = { - __typename?: 'PaymentError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: PaymentErrorCode -} - -/** An enumeration. */ -export enum PaymentErrorCode { - BillingAddressNotSet = 'BILLING_ADDRESS_NOT_SET', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - PartialPaymentNotAllowed = 'PARTIAL_PAYMENT_NOT_ALLOWED', - ShippingAddressNotSet = 'SHIPPING_ADDRESS_NOT_SET', - InvalidShippingMethod = 'INVALID_SHIPPING_METHOD', - ShippingMethodNotSet = 'SHIPPING_METHOD_NOT_SET', - PaymentError = 'PAYMENT_ERROR', - NotSupportedGateway = 'NOT_SUPPORTED_GATEWAY', - ChannelInactive = 'CHANNEL_INACTIVE', -} - -export type PaymentFilterInput = { - checkouts?: Maybe>> -} - -/** Available payment gateway backend with configuration necessary to setup client. */ -export type PaymentGateway = { - __typename?: 'PaymentGateway' - /** Payment gateway name. */ - name: Scalars['String'] - /** Payment gateway ID. */ - id: Scalars['ID'] - /** Payment gateway client configuration. */ - config: Array - /** Payment gateway supported currencies. */ - currencies: Array> -} - -/** Initializes payment process when it is required by gateway. */ -export type PaymentInitialize = { - __typename?: 'PaymentInitialize' - initializedPayment?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - paymentErrors: Array - errors: Array -} - -/** Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session. */ -export type PaymentInitialized = { - __typename?: 'PaymentInitialized' - /** ID of a payment gateway. */ - gateway: Scalars['String'] - /** Payment gateway name. */ - name: Scalars['String'] - /** Initialized data by gateway. */ - data?: Maybe -} - -export type PaymentInput = { - /** A gateway to use with that payment. */ - gateway: Scalars['String'] - /** Client-side generated payment token, representing customer's billing data in a secure manner. */ - token?: Maybe - /** Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used. */ - amount?: Maybe - /** URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided. */ - returnUrl?: Maybe -} - -/** Refunds the captured payment amount. */ -export type PaymentRefund = { - __typename?: 'PaymentRefund' - /** Updated payment. */ - payment?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - paymentErrors: Array - errors: Array -} - -/** Represents a payment source stored for user in payment gateway, such as credit card. */ -export type PaymentSource = { - __typename?: 'PaymentSource' - /** Payment gateway name. */ - gateway: Scalars['String'] - /** Stored credit card details if available. */ - creditCardInfo?: Maybe -} - -/** Voids the authorized payment. */ -export type PaymentVoid = { - __typename?: 'PaymentVoid' - /** Updated payment. */ - payment?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - paymentErrors: Array - errors: Array -} - -/** Represents a permission object in a friendly form. */ -export type Permission = { - __typename?: 'Permission' - /** Internal code for permission. */ - code: PermissionEnum - /** Describe action(s) allowed to do by permission. */ - name: Scalars['String'] -} - -/** An enumeration. */ -export enum PermissionEnum { - ManageUsers = 'MANAGE_USERS', - ManageStaff = 'MANAGE_STAFF', - ManageApps = 'MANAGE_APPS', - ManageChannels = 'MANAGE_CHANNELS', - ManageDiscounts = 'MANAGE_DISCOUNTS', - ManagePlugins = 'MANAGE_PLUGINS', - ManageGiftCard = 'MANAGE_GIFT_CARD', - ManageMenus = 'MANAGE_MENUS', - ManageOrders = 'MANAGE_ORDERS', - ManagePages = 'MANAGE_PAGES', - ManagePageTypesAndAttributes = 'MANAGE_PAGE_TYPES_AND_ATTRIBUTES', - ManageProducts = 'MANAGE_PRODUCTS', - ManageProductTypesAndAttributes = 'MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES', - ManageShipping = 'MANAGE_SHIPPING', - ManageSettings = 'MANAGE_SETTINGS', - ManageTranslations = 'MANAGE_TRANSLATIONS', - ManageCheckouts = 'MANAGE_CHECKOUTS', -} - -/** Create new permission group. */ -export type PermissionGroupCreate = { - __typename?: 'PermissionGroupCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - permissionGroupErrors: Array - errors: Array - group?: Maybe -} - -export type PermissionGroupCreateInput = { - /** List of permission code names to assign to this group. */ - addPermissions?: Maybe> - /** List of users to assign to this group. */ - addUsers?: Maybe> - /** Group name. */ - name: Scalars['String'] -} - -/** Delete permission group. */ -export type PermissionGroupDelete = { - __typename?: 'PermissionGroupDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - permissionGroupErrors: Array - errors: Array - group?: Maybe -} - -export type PermissionGroupError = { - __typename?: 'PermissionGroupError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: PermissionGroupErrorCode - /** List of permissions which causes the error. */ - permissions?: Maybe> - /** List of user IDs which causes the error. */ - users?: Maybe> -} - -/** An enumeration. */ -export enum PermissionGroupErrorCode { - AssignNonStaffMember = 'ASSIGN_NON_STAFF_MEMBER', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - CannotRemoveFromLastGroup = 'CANNOT_REMOVE_FROM_LAST_GROUP', - LeftNotManageablePermission = 'LEFT_NOT_MANAGEABLE_PERMISSION', - OutOfScopePermission = 'OUT_OF_SCOPE_PERMISSION', - OutOfScopeUser = 'OUT_OF_SCOPE_USER', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type PermissionGroupFilterInput = { - search?: Maybe -} - -export enum PermissionGroupSortField { - /** Sort permission group accounts by name. */ - Name = 'NAME', -} - -export type PermissionGroupSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort permission group by the selected field. */ - field: PermissionGroupSortField -} - -/** Update permission group. */ -export type PermissionGroupUpdate = { - __typename?: 'PermissionGroupUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - permissionGroupErrors: Array - errors: Array - group?: Maybe -} - -export type PermissionGroupUpdateInput = { - /** List of permission code names to assign to this group. */ - addPermissions?: Maybe> - /** List of users to assign to this group. */ - addUsers?: Maybe> - /** Group name. */ - name?: Maybe - /** List of permission code names to unassign from this group. */ - removePermissions?: Maybe> - /** List of users to unassign from this group. */ - removeUsers?: Maybe> -} - -/** Plugin. */ -export type Plugin = { - __typename?: 'Plugin' - /** Identifier of the plugin. */ - id: Scalars['ID'] - /** Name of the plugin. */ - name: Scalars['String'] - /** Description of the plugin. */ - description: Scalars['String'] - /** Global configuration of the plugin (not channel-specific). */ - globalConfiguration?: Maybe - /** Channel-specific plugin configuration. */ - channelConfigurations: Array -} - -/** Stores information about a configuration of plugin. */ -export type PluginConfiguration = { - __typename?: 'PluginConfiguration' - /** Determines if plugin is active or not. */ - active: Scalars['Boolean'] - /** The channel to which the plugin configuration is assigned to. */ - channel?: Maybe - /** Configuration of the plugin. */ - configuration?: Maybe>> -} - -export enum PluginConfigurationType { - PerChannel = 'PER_CHANNEL', - Global = 'GLOBAL', -} - -export type PluginCountableConnection = { - __typename?: 'PluginCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type PluginCountableEdge = { - __typename?: 'PluginCountableEdge' - /** The item at the end of the edge. */ - node: Plugin - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type PluginError = { - __typename?: 'PluginError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: PluginErrorCode -} - -/** An enumeration. */ -export enum PluginErrorCode { - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - PluginMisconfigured = 'PLUGIN_MISCONFIGURED', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type PluginFilterInput = { - statusInChannels?: Maybe - search?: Maybe - type?: Maybe -} - -export enum PluginSortField { - Name = 'NAME', - IsActive = 'IS_ACTIVE', -} - -export type PluginSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort plugins by the selected field. */ - field: PluginSortField -} - -export type PluginStatusInChannelsInput = { - active: Scalars['Boolean'] - channels: Array -} - -/** Update plugin configuration. */ -export type PluginUpdate = { - __typename?: 'PluginUpdate' - plugin?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - pluginsErrors: Array - errors: Array -} - -export type PluginUpdateInput = { - /** Indicates whether the plugin should be enabled. */ - active?: Maybe - /** Configuration of the plugin. */ - configuration?: Maybe>> -} - -/** An enumeration. */ -export enum PostalCodeRuleInclusionTypeEnum { - Include = 'INCLUDE', - Exclude = 'EXCLUDE', -} - -export type PriceRangeInput = { - /** Price greater than or equal to. */ - gte?: Maybe - /** Price less than or equal to. */ - lte?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type Product = Node & - ObjectWithMetadata & { - __typename?: 'Product' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - productType: ProductType - slug: Scalars['String'] - category?: Maybe - updatedAt?: Maybe - chargeTaxes: Scalars['Boolean'] - weight?: Maybe - defaultVariant?: Maybe - rating?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * Description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** The main thumbnail for a product. */ - thumbnail?: Maybe - /** Lists the storefront product's pricing, the current price and discounts, only meant for displaying. */ - pricing?: Maybe - /** Whether the product is in stock and visible or not. */ - isAvailable?: Maybe - /** A type of tax. Assigned by enabled tax gateway */ - taxType?: Maybe - /** List of attributes assigned to this product. */ - attributes: Array - /** List of availability in channels for the product. */ - channelListings?: Maybe> - /** Get a single product media by ID. */ - mediaById: ProductMedia - /** - * Get a single product image by ID. - * @deprecated Will be removed in Saleor 4.0. Use the `mediaById` field instead. - */ - imageById?: Maybe - /** List of variants for the product. */ - variants?: Maybe>> - /** List of media for the product. */ - media?: Maybe> - /** - * List of images for the product. - * @deprecated Will be removed in Saleor 4.0. Use the `media` field instead. - */ - images?: Maybe>> - /** List of collections for the product. */ - collections?: Maybe>> - /** Returns translated product fields for the given language code. */ - translation?: Maybe - /** Date when product is available for purchase. */ - availableForPurchase?: Maybe - /** Whether the product is available for purchase. */ - isAvailableForPurchase?: Maybe - } - -/** Represents an individual item for sale in the storefront. */ -export type ProductThumbnailArgs = { - size?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductPricingArgs = { - address?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductIsAvailableArgs = { - address?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductMediaByIdArgs = { - id?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductImageByIdArgs = { - id?: Maybe -} - -/** Represents an individual item for sale in the storefront. */ -export type ProductTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Assign attributes to a given product type. */ -export type ProductAttributeAssign = { - __typename?: 'ProductAttributeAssign' - /** The updated product type. */ - productType?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export type ProductAttributeAssignInput = { - /** The ID of the attribute to assign. */ - id: Scalars['ID'] - /** The attribute type to be assigned as. */ - type: ProductAttributeType -} - -export enum ProductAttributeType { - Product = 'PRODUCT', - Variant = 'VARIANT', -} - -/** Un-assign attributes from a given product type. */ -export type ProductAttributeUnassign = { - __typename?: 'ProductAttributeUnassign' - /** The updated product type. */ - productType?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Deletes products. */ -export type ProductBulkDelete = { - __typename?: 'ProductBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Represents product channel listing. */ -export type ProductChannelListing = Node & { - __typename?: 'ProductChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - publicationDate?: Maybe - isPublished: Scalars['Boolean'] - channel: Channel - visibleInListings: Scalars['Boolean'] - availableForPurchase?: Maybe - /** The price of the cheapest variant (including discounts). */ - discountedPrice?: Maybe - /** Purchase cost of product. */ - purchaseCost?: Maybe - /** Range of margin percentage value. */ - margin?: Maybe - /** Whether the product is available for purchase. */ - isAvailableForPurchase?: Maybe - /** Lists the storefront product's pricing, the current price and discounts, only meant for displaying. */ - pricing?: Maybe -} - -/** Represents product channel listing. */ -export type ProductChannelListingPricingArgs = { - address?: Maybe -} - -export type ProductChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Determines if object is visible to customers. */ - isPublished?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe - /** Determines if product is visible in product listings (doesn't apply to product collections). */ - visibleInListings?: Maybe - /** Determine if product should be available for purchase. */ - isAvailableForPurchase?: Maybe - /** A start date from which a product will be available for purchase. When not set and isAvailable is set to True, the current day is assumed. */ - availableForPurchaseDate?: Maybe - /** List of variants to which the channel should be assigned. */ - addVariants?: Maybe> - /** List of variants from which the channel should be unassigned. */ - removeVariants?: Maybe> -} - -export type ProductChannelListingError = { - __typename?: 'ProductChannelListingError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> - /** List of channels IDs which causes the error. */ - channels?: Maybe> - /** List of variants IDs which causes the error. */ - variants?: Maybe> -} - -/** Manage product's availability in channels. */ -export type ProductChannelListingUpdate = { - __typename?: 'ProductChannelListingUpdate' - /** An updated product instance. */ - product?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productChannelListingErrors: Array - errors: Array -} - -export type ProductChannelListingUpdateInput = { - /** List of channels to which the product should be assigned or updated. */ - updateChannels?: Maybe> - /** List of channels from which the product should be unassigned. */ - removeChannels?: Maybe> -} - -export type ProductCountableConnection = { - __typename?: 'ProductCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type ProductCountableEdge = { - __typename?: 'ProductCountableEdge' - /** The item at the end of the edge. */ - node: Product - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new product. */ -export type ProductCreate = { - __typename?: 'ProductCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - product?: Maybe -} - -export type ProductCreateInput = { - /** List of attributes. */ - attributes?: Maybe> - /** ID of the product's category. */ - category?: Maybe - /** Determine if taxes are being charged for the product. */ - chargeTaxes?: Maybe - /** List of IDs of collections that the product belongs to. */ - collections?: Maybe> - /** Product description (JSON). */ - description?: Maybe - /** Product name. */ - name?: Maybe - /** Product slug. */ - slug?: Maybe - /** Tax rate for enabled tax gateway. */ - taxCode?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Weight of the Product. */ - weight?: Maybe - /** Defines the product rating value. */ - rating?: Maybe - /** ID of the type that product belongs to. */ - productType: Scalars['ID'] -} - -/** Deletes a product. */ -export type ProductDelete = { - __typename?: 'ProductDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - product?: Maybe -} - -export type ProductError = { - __typename?: 'ProductError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ProductErrorCode - /** List of attributes IDs which causes the error. */ - attributes?: Maybe> - /** List of attribute values IDs which causes the error. */ - values?: Maybe> -} - -/** An enumeration. */ -export enum ProductErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - AttributeAlreadyAssigned = 'ATTRIBUTE_ALREADY_ASSIGNED', - AttributeCannotBeAssigned = 'ATTRIBUTE_CANNOT_BE_ASSIGNED', - AttributeVariantsDisabled = 'ATTRIBUTE_VARIANTS_DISABLED', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - ProductWithoutCategory = 'PRODUCT_WITHOUT_CATEGORY', - NotProductsImage = 'NOT_PRODUCTS_IMAGE', - NotProductsVariant = 'NOT_PRODUCTS_VARIANT', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - VariantNoDigitalContent = 'VARIANT_NO_DIGITAL_CONTENT', - CannotManageProductWithoutVariant = 'CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT', - ProductNotAssignedToChannel = 'PRODUCT_NOT_ASSIGNED_TO_CHANNEL', - UnsupportedMediaProvider = 'UNSUPPORTED_MEDIA_PROVIDER', -} - -export enum ProductFieldEnum { - Name = 'NAME', - Description = 'DESCRIPTION', - ProductType = 'PRODUCT_TYPE', - Category = 'CATEGORY', - ProductWeight = 'PRODUCT_WEIGHT', - Collections = 'COLLECTIONS', - ChargeTaxes = 'CHARGE_TAXES', - ProductMedia = 'PRODUCT_MEDIA', - VariantSku = 'VARIANT_SKU', - VariantWeight = 'VARIANT_WEIGHT', - VariantMedia = 'VARIANT_MEDIA', -} - -export type ProductFilterInput = { - isPublished?: Maybe - collections?: Maybe>> - categories?: Maybe>> - hasCategory?: Maybe - attributes?: Maybe>> - stockAvailability?: Maybe - stocks?: Maybe - search?: Maybe - metadata?: Maybe>> - price?: Maybe - minimalPrice?: Maybe - productTypes?: Maybe>> - ids?: Maybe>> - /** Specifies the channel by which the data should be sorted. */ - channel?: Maybe -} - -/** Represents a product image. */ -export type ProductImage = { - __typename?: 'ProductImage' - /** The ID of the image. */ - id: Scalars['ID'] - /** The alt text of the image. */ - alt?: Maybe - /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ - sortOrder?: Maybe - /** The URL of the image. */ - url: Scalars['String'] -} - -/** Represents a product image. */ -export type ProductImageUrlArgs = { - size?: Maybe -} - -export type ProductInput = { - /** List of attributes. */ - attributes?: Maybe> - /** ID of the product's category. */ - category?: Maybe - /** Determine if taxes are being charged for the product. */ - chargeTaxes?: Maybe - /** List of IDs of collections that the product belongs to. */ - collections?: Maybe> - /** Product description (JSON). */ - description?: Maybe - /** Product name. */ - name?: Maybe - /** Product slug. */ - slug?: Maybe - /** Tax rate for enabled tax gateway. */ - taxCode?: Maybe - /** Search engine optimization fields. */ - seo?: Maybe - /** Weight of the Product. */ - weight?: Maybe - /** Defines the product rating value. */ - rating?: Maybe -} - -/** Represents a product media. */ -export type ProductMedia = Node & { - __typename?: 'ProductMedia' - /** The ID of the object. */ - id: Scalars['ID'] - sortOrder?: Maybe - alt: Scalars['String'] - type: ProductMediaType - oembedData: Scalars['JSONString'] - /** The URL of the media. */ - url: Scalars['String'] -} - -/** Represents a product media. */ -export type ProductMediaUrlArgs = { - size?: Maybe -} - -/** Deletes product media. */ -export type ProductMediaBulkDelete = { - __typename?: 'ProductMediaBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ -export type ProductMediaCreate = { - __typename?: 'ProductMediaCreate' - product?: Maybe - media?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export type ProductMediaCreateInput = { - /** Alt text for a product media. */ - alt?: Maybe - /** Represents an image file in a multipart request. */ - image?: Maybe - /** ID of an product. */ - product: Scalars['ID'] - /** Represents an URL to an external media. */ - mediaUrl?: Maybe -} - -/** Deletes a product media. */ -export type ProductMediaDelete = { - __typename?: 'ProductMediaDelete' - product?: Maybe - media?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Changes ordering of the product media. */ -export type ProductMediaReorder = { - __typename?: 'ProductMediaReorder' - product?: Maybe - media?: Maybe> - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** An enumeration. */ -export enum ProductMediaType { - /** An uploaded image or an URL to an image */ - Image = 'IMAGE', - /** A URL to an external video */ - Video = 'VIDEO', -} - -/** Updates a product media. */ -export type ProductMediaUpdate = { - __typename?: 'ProductMediaUpdate' - product?: Maybe - media?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export type ProductMediaUpdateInput = { - /** Alt text for a product media. */ - alt?: Maybe -} - -export type ProductOrder = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** - * Sort product by the selected attribute's values. - * Note: this doesn't take translations into account yet. - */ - attributeId?: Maybe - /** Sort products by the selected field. */ - field?: Maybe -} - -export enum ProductOrderField { - /** Sort products by name. */ - Name = 'NAME', - /** Sort products by rank. Note: This option is available only with the `search` filter. */ - Rank = 'RANK', - /** Sort products by price. */ - Price = 'PRICE', - /** Sort products by a minimal price of a product's variant. */ - MinimalPrice = 'MINIMAL_PRICE', - /** Sort products by update date. */ - Date = 'DATE', - /** Sort products by type. */ - Type = 'TYPE', - /** Sort products by publication status. */ - Published = 'PUBLISHED', - /** Sort products by publication date. */ - PublicationDate = 'PUBLICATION_DATE', - /** Sort products by collection. Note: This option is available only for the `Collection.products` query. */ - Collection = 'COLLECTION', - /** Sort products by rating. */ - Rating = 'RATING', -} - -/** Represents availability of a product in the storefront. */ -export type ProductPricingInfo = { - __typename?: 'ProductPricingInfo' - /** Whether it is in sale or not. */ - onSale?: Maybe - /** The discount amount if in sale (null otherwise). */ - discount?: Maybe - /** The discount amount in the local currency. */ - discountLocalCurrency?: Maybe - /** The discounted price range of the product variants. */ - priceRange?: Maybe - /** The undiscounted price range of the product variants. */ - priceRangeUndiscounted?: Maybe - /** The discounted price range of the product variants in the local currency. */ - priceRangeLocalCurrency?: Maybe -} - -/** Reorder product attribute values. */ -export type ProductReorderAttributeValues = { - __typename?: 'ProductReorderAttributeValues' - /** Product from which attribute values are reordered. */ - product?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export type ProductStockFilterInput = { - warehouseIds?: Maybe> - quantity?: Maybe -} - -export type ProductTranslatableContent = Node & { - __typename?: 'ProductTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - /** - * Description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe - /** Returns translated product fields for the given language code. */ - translation?: Maybe - /** Represents an individual item for sale in the storefront. */ - product?: Maybe -} - -export type ProductTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for Product. */ -export type ProductTranslate = { - __typename?: 'ProductTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - product?: Maybe -} - -export type ProductTranslation = Node & { - __typename?: 'ProductTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - seoTitle?: Maybe - seoDescription?: Maybe - name: Scalars['String'] - description?: Maybe - /** Translation language. */ - language: LanguageDisplay - /** - * Translated description of the product (JSON). - * @deprecated Will be removed in Saleor 4.0. Use the `description` field instead. - */ - descriptionJson?: Maybe -} - -/** Represents a type of product. It defines what attributes are available to products of this type. */ -export type ProductType = Node & - ObjectWithMetadata & { - __typename?: 'ProductType' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] - hasVariants: Scalars['Boolean'] - isShippingRequired: Scalars['Boolean'] - isDigital: Scalars['Boolean'] - weight?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** - * List of products of this type. - * @deprecated Will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter. - */ - products?: Maybe - /** A type of tax. Assigned by enabled tax gateway */ - taxType?: Maybe - /** Variant attributes of that product type. */ - variantAttributes?: Maybe>> - /** Product attributes of that product type. */ - productAttributes?: Maybe>> - availableAttributes?: Maybe - } - -/** Represents a type of product. It defines what attributes are available to products of this type. */ -export type ProductTypeProductsArgs = { - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents a type of product. It defines what attributes are available to products of this type. */ -export type ProductTypeVariantAttributesArgs = { - variantSelection?: Maybe -} - -/** Represents a type of product. It defines what attributes are available to products of this type. */ -export type ProductTypeAvailableAttributesArgs = { - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Deletes product types. */ -export type ProductTypeBulkDelete = { - __typename?: 'ProductTypeBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export enum ProductTypeConfigurable { - Configurable = 'CONFIGURABLE', - Simple = 'SIMPLE', -} - -export type ProductTypeCountableConnection = { - __typename?: 'ProductTypeCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type ProductTypeCountableEdge = { - __typename?: 'ProductTypeCountableEdge' - /** The item at the end of the edge. */ - node: ProductType - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new product type. */ -export type ProductTypeCreate = { - __typename?: 'ProductTypeCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - productType?: Maybe -} - -/** Deletes a product type. */ -export type ProductTypeDelete = { - __typename?: 'ProductTypeDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - productType?: Maybe -} - -export enum ProductTypeEnum { - Digital = 'DIGITAL', - Shippable = 'SHIPPABLE', -} - -export type ProductTypeFilterInput = { - search?: Maybe - configurable?: Maybe - productType?: Maybe - metadata?: Maybe>> - ids?: Maybe>> -} - -export type ProductTypeInput = { - /** Name of the product type. */ - name?: Maybe - /** Product type slug. */ - slug?: Maybe - /** Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood. */ - hasVariants?: Maybe - /** List of attributes shared among all product variants. */ - productAttributes?: Maybe>> - /** List of attributes used to distinguish between different variants of a product. */ - variantAttributes?: Maybe>> - /** Determines if shipping is required for products of this variant. */ - isShippingRequired?: Maybe - /** Determines if products are digital. */ - isDigital?: Maybe - /** Weight of the ProductType items. */ - weight?: Maybe - /** Tax rate for enabled tax gateway. */ - taxCode?: Maybe -} - -/** Reorder the attributes of a product type. */ -export type ProductTypeReorderAttributes = { - __typename?: 'ProductTypeReorderAttributes' - /** Product type from which attributes are reordered. */ - productType?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -export enum ProductTypeSortField { - /** Sort products by name. */ - Name = 'NAME', - /** Sort products by type. */ - Digital = 'DIGITAL', - /** Sort products by shipping. */ - ShippingRequired = 'SHIPPING_REQUIRED', -} - -export type ProductTypeSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort product types by the selected field. */ - field: ProductTypeSortField -} - -/** Updates an existing product type. */ -export type ProductTypeUpdate = { - __typename?: 'ProductTypeUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - productType?: Maybe -} - -/** Updates an existing product. */ -export type ProductUpdate = { - __typename?: 'ProductUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - product?: Maybe -} - -/** Represents a version of a product such as different size or color. */ -export type ProductVariant = Node & - ObjectWithMetadata & { - __typename?: 'ProductVariant' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - sku: Scalars['String'] - product: Product - trackInventory: Scalars['Boolean'] - weight?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** List of price information in channels for the product. */ - channelListings?: Maybe> - /** Lists the storefront variant's pricing, the current price and discounts, only meant for displaying. */ - pricing?: Maybe - /** List of attributes assigned to this variant. */ - attributes: Array - /** Cost price of the variant. */ - costPrice?: Maybe - /** Gross margin percentage value. */ - margin?: Maybe - /** Total quantity ordered. */ - quantityOrdered?: Maybe - /** Total revenue generated by a variant in given period of time. Note: this field should be queried using `reportProductSales` query as it uses optimizations suitable for such calculations. */ - revenue?: Maybe - /** - * List of images for the product variant. - * @deprecated Will be removed in Saleor 4.0. Use the `media` instead. - */ - images?: Maybe>> - /** List of media for the product variant. */ - media?: Maybe> - /** Returns translated product variant fields for the given language code. */ - translation?: Maybe - /** Digital content for the product variant. */ - digitalContent?: Maybe - /** Stocks for the product variant. */ - stocks?: Maybe>> - /** Quantity of a product available for sale in one checkout. */ - quantityAvailable: Scalars['Int'] - } - -/** Represents a version of a product such as different size or color. */ -export type ProductVariantPricingArgs = { - address?: Maybe -} - -/** Represents a version of a product such as different size or color. */ -export type ProductVariantAttributesArgs = { - variantSelection?: Maybe -} - -/** Represents a version of a product such as different size or color. */ -export type ProductVariantRevenueArgs = { - period?: Maybe -} - -/** Represents a version of a product such as different size or color. */ -export type ProductVariantTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Represents a version of a product such as different size or color. */ -export type ProductVariantStocksArgs = { - address?: Maybe - countryCode?: Maybe -} - -/** Represents a version of a product such as different size or color. */ -export type ProductVariantQuantityAvailableArgs = { - address?: Maybe - countryCode?: Maybe -} - -/** Creates product variants for a given product. */ -export type ProductVariantBulkCreate = { - __typename?: 'ProductVariantBulkCreate' - /** Returns how many objects were created. */ - count: Scalars['Int'] - /** List of the created variants. */ - productVariants: Array - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - bulkProductErrors: Array - errors: Array -} - -export type ProductVariantBulkCreateInput = { - /** List of attributes specific to this variant. */ - attributes: Array> - /** Stock keeping unit. */ - sku: Scalars['String'] - /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ - trackInventory?: Maybe - /** Weight of the Product Variant. */ - weight?: Maybe - /** Stocks of a product available for sale. */ - stocks?: Maybe> - /** List of prices assigned to channels. */ - channelListings?: Maybe> -} - -/** Deletes product variants. */ -export type ProductVariantBulkDelete = { - __typename?: 'ProductVariantBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Represents product varaint channel listing. */ -export type ProductVariantChannelListing = Node & { - __typename?: 'ProductVariantChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - channel: Channel - price?: Maybe - /** Cost price of the variant. */ - costPrice?: Maybe - /** Gross margin percentage value. */ - margin?: Maybe -} - -export type ProductVariantChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Price of the particular variant in channel. */ - price: Scalars['PositiveDecimal'] - /** Cost price of the variant in channel. */ - costPrice?: Maybe -} - -/** Manage product variant prices in channels. */ -export type ProductVariantChannelListingUpdate = { - __typename?: 'ProductVariantChannelListingUpdate' - /** An updated product variant instance. */ - variant?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productChannelListingErrors: Array - errors: Array -} - -export type ProductVariantCountableConnection = { - __typename?: 'ProductVariantCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type ProductVariantCountableEdge = { - __typename?: 'ProductVariantCountableEdge' - /** The item at the end of the edge. */ - node: ProductVariant - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new variant for a product. */ -export type ProductVariantCreate = { - __typename?: 'ProductVariantCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - productVariant?: Maybe -} - -export type ProductVariantCreateInput = { - /** List of attributes specific to this variant. */ - attributes: Array> - /** Stock keeping unit. */ - sku?: Maybe - /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ - trackInventory?: Maybe - /** Weight of the Product Variant. */ - weight?: Maybe - /** Product ID of which type is the variant. */ - product: Scalars['ID'] - /** Stocks of a product available for sale. */ - stocks?: Maybe> -} - -/** Deletes a product variant. */ -export type ProductVariantDelete = { - __typename?: 'ProductVariantDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - productVariant?: Maybe -} - -export type ProductVariantFilterInput = { - search?: Maybe - sku?: Maybe>> - metadata?: Maybe>> -} - -export type ProductVariantInput = { - /** List of attributes specific to this variant. */ - attributes?: Maybe>> - /** Stock keeping unit. */ - sku?: Maybe - /** Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. */ - trackInventory?: Maybe - /** Weight of the Product Variant. */ - weight?: Maybe -} - -/** Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. */ -export type ProductVariantReorder = { - __typename?: 'ProductVariantReorder' - product?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Reorder product variant attribute values. */ -export type ProductVariantReorderAttributeValues = { - __typename?: 'ProductVariantReorderAttributeValues' - /** Product variant from which attribute values are reordered. */ - productVariant?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. */ -export type ProductVariantSetDefault = { - __typename?: 'ProductVariantSetDefault' - product?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Creates stocks for product variant. */ -export type ProductVariantStocksCreate = { - __typename?: 'ProductVariantStocksCreate' - /** Updated product variant. */ - productVariant?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - bulkStockErrors: Array - errors: Array -} - -/** Delete stocks from product variant. */ -export type ProductVariantStocksDelete = { - __typename?: 'ProductVariantStocksDelete' - /** Updated product variant. */ - productVariant?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - stockErrors: Array - errors: Array -} - -/** Update stocks for product variant. */ -export type ProductVariantStocksUpdate = { - __typename?: 'ProductVariantStocksUpdate' - /** Updated product variant. */ - productVariant?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - bulkStockErrors: Array - errors: Array -} - -export type ProductVariantTranslatableContent = Node & { - __typename?: 'ProductVariantTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated product variant fields for the given language code. */ - translation?: Maybe - /** Represents a version of a product such as different size or color. */ - productVariant?: Maybe -} - -export type ProductVariantTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for Product Variant. */ -export type ProductVariantTranslate = { - __typename?: 'ProductVariantTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - productVariant?: Maybe -} - -export type ProductVariantTranslation = Node & { - __typename?: 'ProductVariantTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Translation language. */ - language: LanguageDisplay -} - -/** Updates an existing variant for product. */ -export type ProductVariantUpdate = { - __typename?: 'ProductVariantUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array - productVariant?: Maybe -} - -export type PublishableChannelListingInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Determines if object is visible to customers. */ - isPublished?: Maybe - /** Publication date. ISO 8601 standard. */ - publicationDate?: Maybe -} - -export type Query = { - __typename?: 'Query' - /** Look up a webhook by ID. */ - webhook?: Maybe - /** List of all available webhook events. */ - webhookEvents?: Maybe>> - /** Retrieve a sample payload for a given webhook event based on real data. It can be useful for some integrations where sample payload is required. */ - webhookSamplePayload?: Maybe - /** Look up a warehouse by ID. */ - warehouse?: Maybe - /** List of warehouses. */ - warehouses?: Maybe - /** Returns a list of all translatable items of a given kind. */ - translations?: Maybe - translation?: Maybe - /** Look up a stock by ID */ - stock?: Maybe - /** List of stocks. */ - stocks?: Maybe - /** Return information about the shop. */ - shop: Shop - /** Order related settings from site settings. */ - orderSettings?: Maybe - /** Look up a shipping zone by ID. */ - shippingZone?: Maybe - /** List of the shop's shipping zones. */ - shippingZones?: Maybe - /** Look up digital content by ID. */ - digitalContent?: Maybe - /** List of digital content. */ - digitalContents?: Maybe - /** List of the shop's categories. */ - categories?: Maybe - /** Look up a category by ID or slug. */ - category?: Maybe - /** Look up a collection by ID. */ - collection?: Maybe - /** List of the shop's collections. */ - collections?: Maybe - /** Look up a product by ID. */ - product?: Maybe - /** List of the shop's products. */ - products?: Maybe - /** Look up a product type by ID. */ - productType?: Maybe - /** List of the shop's product types. */ - productTypes?: Maybe - /** Look up a product variant by ID or SKU. */ - productVariant?: Maybe - /** List of product variants. */ - productVariants?: Maybe - /** List of top selling products. */ - reportProductSales?: Maybe - /** Look up a payment by ID. */ - payment?: Maybe - /** List of payments. */ - payments?: Maybe - /** Look up a page by ID or slug. */ - page?: Maybe - /** List of the shop's pages. */ - pages?: Maybe - /** Look up a page type by ID. */ - pageType?: Maybe - /** List of the page types. */ - pageTypes?: Maybe - /** List of activity events to display on homepage (at the moment it only contains order-events). */ - homepageEvents?: Maybe - /** Look up an order by ID. */ - order?: Maybe - /** List of orders. */ - orders?: Maybe - /** List of draft orders. */ - draftOrders?: Maybe - /** Return the total sales amount from a specific period. */ - ordersTotal?: Maybe - /** Look up an order by token. */ - orderByToken?: Maybe - /** Look up a navigation menu by ID or name. */ - menu?: Maybe - /** List of the storefront's menus. */ - menus?: Maybe - /** Look up a menu item by ID. */ - menuItem?: Maybe - /** List of the storefronts's menu items. */ - menuItems?: Maybe - /** Look up a gift card by ID. */ - giftCard?: Maybe - /** List of gift cards. */ - giftCards?: Maybe - /** Look up a plugin by ID. */ - plugin?: Maybe - /** List of plugins. */ - plugins?: Maybe - /** Look up a sale by ID. */ - sale?: Maybe - /** List of the shop's sales. */ - sales?: Maybe - /** Look up a voucher by ID. */ - voucher?: Maybe - /** List of the shop's vouchers. */ - vouchers?: Maybe - /** Look up a export file by ID. */ - exportFile?: Maybe - /** List of export files. */ - exportFiles?: Maybe - /** List of all tax rates available from tax gateway. */ - taxTypes?: Maybe>> - /** Look up a checkout by token and slug of channel. */ - checkout?: Maybe - /** List of checkouts. */ - checkouts?: Maybe - /** Look up a checkout line by ID. */ - checkoutLine?: Maybe - /** List of checkout lines. */ - checkoutLines?: Maybe - /** Look up a channel by ID. */ - channel?: Maybe - /** List of all channels. */ - channels?: Maybe> - /** List of the shop's attributes. */ - attributes?: Maybe - /** Look up an attribute by ID. */ - attribute?: Maybe - /** List of all apps installations */ - appsInstallations: Array - /** List of the apps. */ - apps?: Maybe - /** Look up an app by ID. If ID is not provided, return the currently authenticated app. */ - app?: Maybe - /** Returns address validation rules. */ - addressValidationRules?: Maybe - /** Look up an address by ID. */ - address?: Maybe
- /** List of the shop's customers. */ - customers?: Maybe - /** List of permission groups. */ - permissionGroups?: Maybe - /** Look up permission group by ID. */ - permissionGroup?: Maybe - /** Return the currently authenticated user. */ - me?: Maybe - /** List of the shop's staff users. */ - staffUsers?: Maybe - /** Look up a user by ID or email address. */ - user?: Maybe - _entities?: Maybe>> - _service?: Maybe<_Service> -} - -export type QueryWebhookArgs = { - id: Scalars['ID'] -} - -export type QueryWebhookSamplePayloadArgs = { - eventType: WebhookSampleEventTypeEnum -} - -export type QueryWarehouseArgs = { - id: Scalars['ID'] -} - -export type QueryWarehousesArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryTranslationsArgs = { - kind: TranslatableKinds - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryTranslationArgs = { - id: Scalars['ID'] - kind: TranslatableKinds -} - -export type QueryStockArgs = { - id: Scalars['ID'] -} - -export type QueryStocksArgs = { - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryShippingZoneArgs = { - id: Scalars['ID'] - channel?: Maybe -} - -export type QueryShippingZonesArgs = { - filter?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryDigitalContentArgs = { - id: Scalars['ID'] -} - -export type QueryDigitalContentsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryCategoriesArgs = { - filter?: Maybe - sortBy?: Maybe - level?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryCategoryArgs = { - id?: Maybe - slug?: Maybe -} - -export type QueryCollectionArgs = { - id?: Maybe - slug?: Maybe - channel?: Maybe -} - -export type QueryCollectionsArgs = { - filter?: Maybe - sortBy?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryProductArgs = { - id?: Maybe - slug?: Maybe - channel?: Maybe -} - -export type QueryProductsArgs = { - filter?: Maybe - sortBy?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryProductTypeArgs = { - id: Scalars['ID'] -} - -export type QueryProductTypesArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryProductVariantArgs = { - id?: Maybe - sku?: Maybe - channel?: Maybe -} - -export type QueryProductVariantsArgs = { - ids?: Maybe>> - channel?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryReportProductSalesArgs = { - period: ReportingPeriod - channel: Scalars['String'] - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPaymentArgs = { - id: Scalars['ID'] -} - -export type QueryPaymentsArgs = { - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPageArgs = { - id?: Maybe - slug?: Maybe -} - -export type QueryPagesArgs = { - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPageTypeArgs = { - id: Scalars['ID'] -} - -export type QueryPageTypesArgs = { - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryHomepageEventsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryOrderArgs = { - id: Scalars['ID'] -} - -export type QueryOrdersArgs = { - sortBy?: Maybe - filter?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryDraftOrdersArgs = { - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryOrdersTotalArgs = { - period?: Maybe - channel?: Maybe -} - -export type QueryOrderByTokenArgs = { - token: Scalars['UUID'] -} - -export type QueryMenuArgs = { - channel?: Maybe - id?: Maybe - name?: Maybe - slug?: Maybe -} - -export type QueryMenusArgs = { - channel?: Maybe - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryMenuItemArgs = { - id: Scalars['ID'] - channel?: Maybe -} - -export type QueryMenuItemsArgs = { - channel?: Maybe - sortBy?: Maybe - filter?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryGiftCardArgs = { - id: Scalars['ID'] -} - -export type QueryGiftCardsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPluginArgs = { - id: Scalars['ID'] -} - -export type QueryPluginsArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QuerySaleArgs = { - id: Scalars['ID'] - channel?: Maybe -} - -export type QuerySalesArgs = { - filter?: Maybe - sortBy?: Maybe - query?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryVoucherArgs = { - id: Scalars['ID'] - channel?: Maybe -} - -export type QueryVouchersArgs = { - filter?: Maybe - sortBy?: Maybe - query?: Maybe - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryExportFileArgs = { - id: Scalars['ID'] -} - -export type QueryExportFilesArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryCheckoutArgs = { - token?: Maybe -} - -export type QueryCheckoutsArgs = { - channel?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryCheckoutLineArgs = { - id?: Maybe -} - -export type QueryCheckoutLinesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryChannelArgs = { - id?: Maybe -} - -export type QueryAttributesArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryAttributeArgs = { - id?: Maybe - slug?: Maybe -} - -export type QueryAppsArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryAppArgs = { - id?: Maybe -} - -export type QueryAddressValidationRulesArgs = { - countryCode: CountryCode - countryArea?: Maybe - city?: Maybe - cityArea?: Maybe -} - -export type QueryAddressArgs = { - id: Scalars['ID'] -} - -export type QueryCustomersArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPermissionGroupsArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryPermissionGroupArgs = { - id: Scalars['ID'] -} - -export type QueryStaffUsersArgs = { - filter?: Maybe - sortBy?: Maybe - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type QueryUserArgs = { - id?: Maybe - email?: Maybe -} - -export type Query_EntitiesArgs = { - representations?: Maybe>> -} - -/** Represents a reduced VAT rate for a particular type of goods. */ -export type ReducedRate = { - __typename?: 'ReducedRate' - /** Reduced VAT rate in percent. */ - rate: Scalars['Float'] - /** A type of goods. */ - rateType: TaxRateType -} - -/** Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie. */ -export type RefreshToken = { - __typename?: 'RefreshToken' - /** JWT token, required to authenticate. */ - token?: Maybe - /** A user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -export type ReorderInput = { - /** The ID of the item to move. */ - id: Scalars['ID'] - /** The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. */ - sortOrder?: Maybe -} - -export enum ReportingPeriod { - Today = 'TODAY', - ThisMonth = 'THIS_MONTH', -} - -/** Request email change of the logged in user. */ -export type RequestEmailChange = { - __typename?: 'RequestEmailChange' - /** A user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Sends an email with the account password modification link. */ -export type RequestPasswordReset = { - __typename?: 'RequestPasswordReset' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type Sale = Node & { - __typename?: 'Sale' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - type: SaleType - startDate: Scalars['DateTime'] - endDate?: Maybe - /** List of categories this sale applies to. */ - categories?: Maybe - /** List of collections this sale applies to. */ - collections?: Maybe - /** List of products this sale applies to. */ - products?: Maybe - /** Returns translated sale fields for the given language code. */ - translation?: Maybe - /** List of channels available for the sale. */ - channelListings?: Maybe> - /** Sale value. */ - discountValue?: Maybe - /** Currency code for sale. */ - currency?: Maybe -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type SaleCategoriesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type SaleCollectionsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type SaleProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ -export type SaleTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Adds products, categories, collections to a voucher. */ -export type SaleAddCatalogues = { - __typename?: 'SaleAddCatalogues' - /** Sale of which catalogue IDs will be modified. */ - sale?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array -} - -/** Deletes sales. */ -export type SaleBulkDelete = { - __typename?: 'SaleBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array -} - -/** Represents sale channel listing. */ -export type SaleChannelListing = Node & { - __typename?: 'SaleChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - channel: Channel - discountValue: Scalars['Float'] - currency: Scalars['String'] -} - -export type SaleChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** The value of the discount. */ - discountValue: Scalars['PositiveDecimal'] -} - -export type SaleChannelListingInput = { - /** List of channels to which the sale should be assigned. */ - addChannels?: Maybe> - /** List of channels from which the sale should be unassigned. */ - removeChannels?: Maybe> -} - -/** Manage sale's availability in channels. */ -export type SaleChannelListingUpdate = { - __typename?: 'SaleChannelListingUpdate' - /** An updated sale instance. */ - sale?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array -} - -export type SaleCountableConnection = { - __typename?: 'SaleCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type SaleCountableEdge = { - __typename?: 'SaleCountableEdge' - /** The item at the end of the edge. */ - node: Sale - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new sale. */ -export type SaleCreate = { - __typename?: 'SaleCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array - sale?: Maybe -} - -/** Deletes a sale. */ -export type SaleDelete = { - __typename?: 'SaleDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array - sale?: Maybe -} - -export type SaleFilterInput = { - status?: Maybe>> - saleType?: Maybe - started?: Maybe - search?: Maybe -} - -export type SaleInput = { - /** Voucher name. */ - name?: Maybe - /** Fixed or percentage. */ - type?: Maybe - /** Value of the voucher. */ - value?: Maybe - /** Products related to the discount. */ - products?: Maybe>> - /** Categories related to the discount. */ - categories?: Maybe>> - /** Collections related to the discount. */ - collections?: Maybe>> - /** Start date of the voucher in ISO 8601 format. */ - startDate?: Maybe - /** End date of the voucher in ISO 8601 format. */ - endDate?: Maybe -} - -/** Removes products, categories, collections from a sale. */ -export type SaleRemoveCatalogues = { - __typename?: 'SaleRemoveCatalogues' - /** Sale of which catalogue IDs will be modified. */ - sale?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array -} - -export enum SaleSortField { - /** Sort sales by name. */ - Name = 'NAME', - /** Sort sales by start date. */ - StartDate = 'START_DATE', - /** Sort sales by end date. */ - EndDate = 'END_DATE', - /** Sort sales by value. */ - Value = 'VALUE', - /** Sort sales by type. */ - Type = 'TYPE', -} - -export type SaleSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** Sort sales by the selected field. */ - field: SaleSortField -} - -export type SaleTranslatableContent = Node & { - __typename?: 'SaleTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - /** Returns translated sale fields for the given language code. */ - translation?: Maybe - /** Sales allow creating discounts for categories, collections or products and are visible to all the customers. */ - sale?: Maybe -} - -export type SaleTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/updates translations for a sale. */ -export type SaleTranslate = { - __typename?: 'SaleTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - sale?: Maybe -} - -export type SaleTranslation = Node & { - __typename?: 'SaleTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - /** Translation language. */ - language: LanguageDisplay -} - -/** An enumeration. */ -export enum SaleType { - /** fixed */ - Fixed = 'FIXED', - /** % */ - Percentage = 'PERCENTAGE', -} - -/** Updates a sale. */ -export type SaleUpdate = { - __typename?: 'SaleUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array - sale?: Maybe -} - -/** Represents a custom attribute. */ -export type SelectedAttribute = { - __typename?: 'SelectedAttribute' - /** Name of an attribute displayed in the interface. */ - attribute: Attribute - /** Values of an attribute. */ - values: Array> -} - -export type SeoInput = { - /** SEO title. */ - title?: Maybe - /** SEO description. */ - description?: Maybe -} - -/** Sets the user's password from the token sent by email using the RequestPasswordReset mutation. */ -export type SetPassword = { - __typename?: 'SetPassword' - /** JWT token, required to authenticate. */ - token?: Maybe - /** JWT refresh token, required to re-generate access token. */ - refreshToken?: Maybe - /** CSRF token required to re-generate access token. */ - csrfToken?: Maybe - /** A user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -export type ShippingError = { - __typename?: 'ShippingError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ShippingErrorCode - /** List of warehouse IDs which causes the error. */ - warehouses?: Maybe> - /** List of channels IDs which causes the error. */ - channels?: Maybe> -} - -/** An enumeration. */ -export enum ShippingErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - MaxLessThanMin = 'MAX_LESS_THAN_MIN', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', - DuplicatedInputItem = 'DUPLICATED_INPUT_ITEM', -} - -/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ -export type ShippingMethod = Node & - ObjectWithMetadata & { - __typename?: 'ShippingMethod' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - description?: Maybe - minimumOrderWeight?: Maybe - maximumOrderWeight?: Maybe - maximumDeliveryDays?: Maybe - minimumDeliveryDays?: Maybe - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Type of the shipping method. */ - type?: Maybe - /** Returns translated shipping method fields for the given language code. */ - translation?: Maybe - /** List of channels available for the method. */ - channelListings?: Maybe> - /** The price of the cheapest variant (including discounts). */ - price?: Maybe - /** The price of the cheapest variant (including discounts). */ - maximumOrderPrice?: Maybe - /** The price of the cheapest variant (including discounts). */ - minimumOrderPrice?: Maybe - /** Postal code ranges rule of exclusion or inclusion of the shipping method. */ - postalCodeRules?: Maybe>> - /** List of excluded products for the shipping method. */ - excludedProducts?: Maybe - } - -/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ -export type ShippingMethodTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ -export type ShippingMethodExcludedProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents shipping method channel listing. */ -export type ShippingMethodChannelListing = Node & { - __typename?: 'ShippingMethodChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - channel: Channel - minimumOrderPrice?: Maybe - maximumOrderPrice?: Maybe - price?: Maybe -} - -export type ShippingMethodChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Shipping price of the shipping method in this channel. */ - price?: Maybe - /** Minimum order price to use this shipping method. */ - minimumOrderPrice?: Maybe - /** Maximum order price to use this shipping method. */ - maximumOrderPrice?: Maybe -} - -export type ShippingMethodChannelListingInput = { - /** List of channels to which the shipping method should be assigned. */ - addChannels?: Maybe> - /** List of channels from which the shipping method should be unassigned. */ - removeChannels?: Maybe> -} - -/** Manage shipping method's availability in channels. */ -export type ShippingMethodChannelListingUpdate = { - __typename?: 'ShippingMethodChannelListingUpdate' - /** An updated shipping method instance. */ - shippingMethod?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array -} - -/** Represents shipping method postal code rule. */ -export type ShippingMethodPostalCodeRule = Node & { - __typename?: 'ShippingMethodPostalCodeRule' - /** Start address range. */ - start?: Maybe - /** End address range. */ - end?: Maybe - /** Inclusion type of the postal code rule. */ - inclusionType?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] -} - -export type ShippingMethodTranslatableContent = Node & { - __typename?: 'ShippingMethodTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - description?: Maybe - /** Returns translated shipping method fields for the given language code. */ - translation?: Maybe - /** Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. */ - shippingMethod?: Maybe -} - -export type ShippingMethodTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -export type ShippingMethodTranslation = Node & { - __typename?: 'ShippingMethodTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - description?: Maybe - /** Translation language. */ - language: LanguageDisplay -} - -/** An enumeration. */ -export enum ShippingMethodTypeEnum { - Price = 'PRICE', - Weight = 'WEIGHT', -} - -export type ShippingPostalCodeRulesCreateInputRange = { - /** Start range of the postal code. */ - start: Scalars['String'] - /** End range of the postal code. */ - end?: Maybe -} - -/** Deletes shipping prices. */ -export type ShippingPriceBulkDelete = { - __typename?: 'ShippingPriceBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array -} - -/** Creates a new shipping price. */ -export type ShippingPriceCreate = { - __typename?: 'ShippingPriceCreate' - /** A shipping zone to which the shipping method belongs. */ - shippingZone?: Maybe - shippingMethod?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array -} - -/** Deletes a shipping price. */ -export type ShippingPriceDelete = { - __typename?: 'ShippingPriceDelete' - /** A shipping method to delete. */ - shippingMethod?: Maybe - /** A shipping zone to which the shipping method belongs. */ - shippingZone?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array -} - -/** Exclude products from shipping price. */ -export type ShippingPriceExcludeProducts = { - __typename?: 'ShippingPriceExcludeProducts' - /** A shipping method with new list of excluded products. */ - shippingMethod?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array -} - -export type ShippingPriceExcludeProductsInput = { - /** List of products which will be excluded. */ - products: Array> -} - -export type ShippingPriceInput = { - /** Name of the shipping method. */ - name?: Maybe - /** Shipping method description (JSON). */ - description?: Maybe - /** Minimum order weight to use this shipping method. */ - minimumOrderWeight?: Maybe - /** Maximum order weight to use this shipping method. */ - maximumOrderWeight?: Maybe - /** Maximum number of days for delivery. */ - maximumDeliveryDays?: Maybe - /** Minimal number of days for delivery. */ - minimumDeliveryDays?: Maybe - /** Shipping type: price or weight based. */ - type?: Maybe - /** Shipping zone this method belongs to. */ - shippingZone?: Maybe - /** Postal code rules to add. */ - addPostalCodeRules?: Maybe> - /** Postal code rules to delete. */ - deletePostalCodeRules?: Maybe> - /** Inclusion type for currently assigned postal code rules. */ - inclusionType?: Maybe -} - -/** Remove product from excluded list for shipping price. */ -export type ShippingPriceRemoveProductFromExclude = { - __typename?: 'ShippingPriceRemoveProductFromExclude' - /** A shipping method with new list of excluded products. */ - shippingMethod?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array -} - -/** Creates/Updates translations for shipping method. */ -export type ShippingPriceTranslate = { - __typename?: 'ShippingPriceTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - shippingMethod?: Maybe -} - -export type ShippingPriceTranslationInput = { - name?: Maybe - /** Translated shipping method description (JSON). */ - description?: Maybe -} - -/** Updates a new shipping price. */ -export type ShippingPriceUpdate = { - __typename?: 'ShippingPriceUpdate' - /** A shipping zone to which the shipping method belongs. */ - shippingZone?: Maybe - shippingMethod?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array -} - -/** Represents a shipping zone in the shop. Zones are the concept used only for grouping shipping methods in the dashboard, and are never exposed to the customers directly. */ -export type ShippingZone = Node & - ObjectWithMetadata & { - __typename?: 'ShippingZone' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - default: Scalars['Boolean'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** Lowest and highest prices for the shipping. */ - priceRange?: Maybe - /** List of countries available for the method. */ - countries?: Maybe>> - /** List of shipping methods available for orders shipped to countries within this shipping zone. */ - shippingMethods?: Maybe>> - /** List of warehouses for shipping zone. */ - warehouses: Array - /** List of channels for shipping zone. */ - channels: Array - /** Description of a shipping zone. */ - description?: Maybe - } - -/** Deletes shipping zones. */ -export type ShippingZoneBulkDelete = { - __typename?: 'ShippingZoneBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array -} - -export type ShippingZoneCountableConnection = { - __typename?: 'ShippingZoneCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type ShippingZoneCountableEdge = { - __typename?: 'ShippingZoneCountableEdge' - /** The item at the end of the edge. */ - node: ShippingZone - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new shipping zone. */ -export type ShippingZoneCreate = { - __typename?: 'ShippingZoneCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array - shippingZone?: Maybe -} - -export type ShippingZoneCreateInput = { - /** Shipping zone's name. Visible only to the staff. */ - name?: Maybe - /** Description of the shipping zone. */ - description?: Maybe - /** List of countries in this shipping zone. */ - countries?: Maybe>> - /** Default shipping zone will be used for countries not covered by other zones. */ - default?: Maybe - /** List of warehouses to assign to a shipping zone */ - addWarehouses?: Maybe>> - /** List of channels to assign to the shipping zone. */ - addChannels?: Maybe> -} - -/** Deletes a shipping zone. */ -export type ShippingZoneDelete = { - __typename?: 'ShippingZoneDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array - shippingZone?: Maybe -} - -export type ShippingZoneFilterInput = { - search?: Maybe - channels?: Maybe>> -} - -/** Updates a new shipping zone. */ -export type ShippingZoneUpdate = { - __typename?: 'ShippingZoneUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shippingErrors: Array - errors: Array - shippingZone?: Maybe -} - -export type ShippingZoneUpdateInput = { - /** Shipping zone's name. Visible only to the staff. */ - name?: Maybe - /** Description of the shipping zone. */ - description?: Maybe - /** List of countries in this shipping zone. */ - countries?: Maybe>> - /** Default shipping zone will be used for countries not covered by other zones. */ - default?: Maybe - /** List of warehouses to assign to a shipping zone */ - addWarehouses?: Maybe>> - /** List of channels to assign to the shipping zone. */ - addChannels?: Maybe> - /** List of warehouses to unassign from a shipping zone */ - removeWarehouses?: Maybe>> - /** List of channels to unassign from the shipping zone. */ - removeChannels?: Maybe> -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type Shop = { - __typename?: 'Shop' - /** List of available payment gateways. */ - availablePaymentGateways: Array - /** List of available external authentications. */ - availableExternalAuthentications: Array - /** Shipping methods that are available for the shop. */ - availableShippingMethods?: Maybe>> - /** List of countries available in the shop. */ - countries: Array - /** Shop's default country. */ - defaultCountry?: Maybe - /** Default shop's email sender's name. */ - defaultMailSenderName?: Maybe - /** Default shop's email sender's address. */ - defaultMailSenderAddress?: Maybe - /** Shop's description. */ - description?: Maybe - /** Shop's domain data. */ - domain: Domain - /** List of the shops's supported languages. */ - languages: Array> - /** Shop's name. */ - name: Scalars['String'] - /** List of available permissions. */ - permissions: Array> - /** List of possible phone prefixes. */ - phonePrefixes: Array> - /** Header text. */ - headerText?: Maybe - /** Include taxes in prices. */ - includeTaxesInPrices: Scalars['Boolean'] - /** Display prices with tax in store. */ - displayGrossPrices: Scalars['Boolean'] - /** Charge taxes on shipping. */ - chargeTaxesOnShipping: Scalars['Boolean'] - /** Enable inventory tracking. */ - trackInventoryByDefault?: Maybe - /** Default weight unit. */ - defaultWeightUnit?: Maybe - /** Returns translated shop fields for the given language code. */ - translation?: Maybe - /** Enable automatic fulfillment for all digital products. */ - automaticFulfillmentDigitalProducts?: Maybe - /** Default number of max downloads per digital content URL. */ - defaultDigitalMaxDownloads?: Maybe - /** Default number of days which digital content URL will be valid. */ - defaultDigitalUrlValidDays?: Maybe - /** Company address. */ - companyAddress?: Maybe
- /** URL of a view where customers can set their password. */ - customerSetPasswordUrl?: Maybe - /** List of staff notification recipients. */ - staffNotificationRecipients?: Maybe>> - /** Resource limitations and current usage if any set for a shop */ - limits: LimitInfo - /** Saleor API version. */ - version: Scalars['String'] -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type ShopAvailablePaymentGatewaysArgs = { - currency?: Maybe - channel?: Maybe -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type ShopAvailableShippingMethodsArgs = { - channel: Scalars['String'] - address?: Maybe -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type ShopCountriesArgs = { - languageCode?: Maybe -} - -/** Represents a shop resource containing general shop data and configuration. */ -export type ShopTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. */ -export type ShopAddressUpdate = { - __typename?: 'ShopAddressUpdate' - /** Updated shop. */ - shop?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shopErrors: Array - errors: Array -} - -/** Updates site domain of the shop. */ -export type ShopDomainUpdate = { - __typename?: 'ShopDomainUpdate' - /** Updated shop. */ - shop?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shopErrors: Array - errors: Array -} - -export type ShopError = { - __typename?: 'ShopError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: ShopErrorCode -} - -/** An enumeration. */ -export enum ShopErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - CannotFetchTaxRates = 'CANNOT_FETCH_TAX_RATES', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -/** Fetch tax rates. */ -export type ShopFetchTaxRates = { - __typename?: 'ShopFetchTaxRates' - /** Updated shop. */ - shop?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shopErrors: Array - errors: Array -} - -export type ShopSettingsInput = { - /** Header text. */ - headerText?: Maybe - /** SEO description. */ - description?: Maybe - /** Include taxes in prices. */ - includeTaxesInPrices?: Maybe - /** Display prices with tax in store. */ - displayGrossPrices?: Maybe - /** Charge taxes on shipping. */ - chargeTaxesOnShipping?: Maybe - /** Enable inventory tracking. */ - trackInventoryByDefault?: Maybe - /** Default weight unit. */ - defaultWeightUnit?: Maybe - /** Enable automatic fulfillment for all digital products. */ - automaticFulfillmentDigitalProducts?: Maybe - /** Default number of max downloads per digital content URL. */ - defaultDigitalMaxDownloads?: Maybe - /** Default number of days which digital content URL will be valid. */ - defaultDigitalUrlValidDays?: Maybe - /** Default email sender's name. */ - defaultMailSenderName?: Maybe - /** Default email sender's address. */ - defaultMailSenderAddress?: Maybe - /** URL of a view where customers can set their password. */ - customerSetPasswordUrl?: Maybe -} - -/** Creates/Updates translations for Shop Settings. */ -export type ShopSettingsTranslate = { - __typename?: 'ShopSettingsTranslate' - /** Updated shop. */ - shop?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array -} - -export type ShopSettingsTranslationInput = { - headerText?: Maybe - description?: Maybe -} - -/** Updates shop settings. */ -export type ShopSettingsUpdate = { - __typename?: 'ShopSettingsUpdate' - /** Updated shop. */ - shop?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shopErrors: Array - errors: Array -} - -export type ShopTranslation = Node & { - __typename?: 'ShopTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - headerText: Scalars['String'] - description: Scalars['String'] - /** Translation language. */ - language: LanguageDisplay -} - -export type SiteDomainInput = { - /** Domain name for shop. */ - domain?: Maybe - /** Shop site name. */ - name?: Maybe -} - -/** Deletes staff users. */ -export type StaffBulkDelete = { - __typename?: 'StaffBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - staffErrors: Array - errors: Array -} - -/** Creates a new staff user. */ -export type StaffCreate = { - __typename?: 'StaffCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - staffErrors: Array - errors: Array - user?: Maybe -} - -export type StaffCreateInput = { - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** The unique email address of the user. */ - email?: Maybe - /** User account is active. */ - isActive?: Maybe - /** A note about the user. */ - note?: Maybe - /** List of permission group IDs to which user should be assigned. */ - addGroups?: Maybe> - /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ - redirectUrl?: Maybe -} - -/** Deletes a staff user. */ -export type StaffDelete = { - __typename?: 'StaffDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - staffErrors: Array - errors: Array - user?: Maybe -} - -export type StaffError = { - __typename?: 'StaffError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: AccountErrorCode - /** A type of address that causes the error. */ - addressType?: Maybe - /** List of permissions which causes the error. */ - permissions?: Maybe> - /** List of permission group IDs which cause the error. */ - groups?: Maybe> - /** List of user IDs which causes the error. */ - users?: Maybe> -} - -export enum StaffMemberStatus { - /** User account has been activated. */ - Active = 'ACTIVE', - /** User account has not been activated yet. */ - Deactivated = 'DEACTIVATED', -} - -/** Represents a recipient of email notifications send by Saleor, such as notifications about new orders. Notifications can be assigned to staff users or arbitrary email addresses. */ -export type StaffNotificationRecipient = Node & { - __typename?: 'StaffNotificationRecipient' - /** Returns a user subscribed to email notifications. */ - user?: Maybe - /** Determines if a notification active. */ - active?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - /** Returns email address of a user subscribed to email notifications. */ - email?: Maybe -} - -/** Creates a new staff notification recipient. */ -export type StaffNotificationRecipientCreate = { - __typename?: 'StaffNotificationRecipientCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shopErrors: Array - errors: Array - staffNotificationRecipient?: Maybe -} - -/** Delete staff notification recipient. */ -export type StaffNotificationRecipientDelete = { - __typename?: 'StaffNotificationRecipientDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shopErrors: Array - errors: Array - staffNotificationRecipient?: Maybe -} - -export type StaffNotificationRecipientInput = { - /** The ID of the user subscribed to email notifications.. */ - user?: Maybe - /** Email address of a user subscribed to email notifications. */ - email?: Maybe - /** Determines if a notification active. */ - active?: Maybe -} - -/** Updates a staff notification recipient. */ -export type StaffNotificationRecipientUpdate = { - __typename?: 'StaffNotificationRecipientUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - shopErrors: Array - errors: Array - staffNotificationRecipient?: Maybe -} - -/** Updates an existing staff user. */ -export type StaffUpdate = { - __typename?: 'StaffUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - staffErrors: Array - errors: Array - user?: Maybe -} - -export type StaffUpdateInput = { - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** The unique email address of the user. */ - email?: Maybe - /** User account is active. */ - isActive?: Maybe - /** A note about the user. */ - note?: Maybe - /** List of permission group IDs to which user should be assigned. */ - addGroups?: Maybe> - /** List of permission group IDs from which user should be unassigned. */ - removeGroups?: Maybe> -} - -export type StaffUserInput = { - status?: Maybe - search?: Maybe -} - -/** Represents stock. */ -export type Stock = Node & { - __typename?: 'Stock' - warehouse: Warehouse - productVariant: ProductVariant - /** Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment. */ - quantity: Scalars['Int'] - /** The ID of the object. */ - id: Scalars['ID'] - /** Quantity allocated for orders */ - quantityAllocated: Scalars['Int'] -} - -export enum StockAvailability { - InStock = 'IN_STOCK', - OutOfStock = 'OUT_OF_STOCK', -} - -export type StockCountableConnection = { - __typename?: 'StockCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type StockCountableEdge = { - __typename?: 'StockCountableEdge' - /** The item at the end of the edge. */ - node: Stock - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type StockError = { - __typename?: 'StockError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: StockErrorCode -} - -/** An enumeration. */ -export enum StockErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type StockFilterInput = { - quantity?: Maybe - search?: Maybe -} - -export type StockInput = { - /** Warehouse in which stock is located. */ - warehouse: Scalars['ID'] - /** Quantity of items available for sell. */ - quantity: Scalars['Int'] -} - -/** An enumeration. */ -export enum TaxRateType { - Accommodation = 'ACCOMMODATION', - AdmissionToCulturalEvents = 'ADMISSION_TO_CULTURAL_EVENTS', - AdmissionToEntertainmentEvents = 'ADMISSION_TO_ENTERTAINMENT_EVENTS', - AdmissionToSportingEvents = 'ADMISSION_TO_SPORTING_EVENTS', - Advertising = 'ADVERTISING', - AgriculturalSupplies = 'AGRICULTURAL_SUPPLIES', - BabyFoodstuffs = 'BABY_FOODSTUFFS', - Bikes = 'BIKES', - Books = 'BOOKS', - ChildrensClothing = 'CHILDRENS_CLOTHING', - DomesticFuel = 'DOMESTIC_FUEL', - DomesticServices = 'DOMESTIC_SERVICES', - EBooks = 'E_BOOKS', - Foodstuffs = 'FOODSTUFFS', - Hotels = 'HOTELS', - Medical = 'MEDICAL', - Newspapers = 'NEWSPAPERS', - PassengerTransport = 'PASSENGER_TRANSPORT', - Pharmaceuticals = 'PHARMACEUTICALS', - PropertyRenovations = 'PROPERTY_RENOVATIONS', - Restaurants = 'RESTAURANTS', - SocialHousing = 'SOCIAL_HOUSING', - Standard = 'STANDARD', - Water = 'WATER', - Wine = 'WINE', -} - -/** Representation of tax types fetched from tax gateway. */ -export type TaxType = { - __typename?: 'TaxType' - /** Description of the tax type. */ - description?: Maybe - /** External tax code used to identify given tax group. */ - taxCode?: Maybe -} - -/** Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal. */ -export type TaxedMoney = { - __typename?: 'TaxedMoney' - /** Currency code. */ - currency: Scalars['String'] - /** Amount of money including taxes. */ - gross: Money - /** Amount of money without taxes. */ - net: Money - /** Amount of taxes. */ - tax: Money -} - -/** Represents a range of monetary values. */ -export type TaxedMoneyRange = { - __typename?: 'TaxedMoneyRange' - /** Lower bound of a price range. */ - start?: Maybe - /** Upper bound of a price range. */ - stop?: Maybe -} - -/** An object representing a single payment. */ -export type Transaction = Node & { - __typename?: 'Transaction' - /** The ID of the object. */ - id: Scalars['ID'] - created: Scalars['DateTime'] - payment: Payment - token: Scalars['String'] - kind: TransactionKind - isSuccess: Scalars['Boolean'] - error?: Maybe - gatewayResponse: Scalars['JSONString'] - /** Total amount of the transaction. */ - amount?: Maybe -} - -/** An enumeration. */ -export enum TransactionKind { - /** External reference */ - External = 'EXTERNAL', - /** Authorization */ - Auth = 'AUTH', - /** Pending */ - Pending = 'PENDING', - /** Action to confirm */ - ActionToConfirm = 'ACTION_TO_CONFIRM', - /** Refund */ - Refund = 'REFUND', - /** Refund in progress */ - RefundOngoing = 'REFUND_ONGOING', - /** Capture */ - Capture = 'CAPTURE', - /** Void */ - Void = 'VOID', - /** Confirm */ - Confirm = 'CONFIRM', - /** Cancel */ - Cancel = 'CANCEL', -} - -export type TranslatableItem = - | ProductTranslatableContent - | CollectionTranslatableContent - | CategoryTranslatableContent - | AttributeTranslatableContent - | AttributeValueTranslatableContent - | ProductVariantTranslatableContent - | PageTranslatableContent - | ShippingMethodTranslatableContent - | SaleTranslatableContent - | VoucherTranslatableContent - | MenuItemTranslatableContent - -export type TranslatableItemConnection = { - __typename?: 'TranslatableItemConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type TranslatableItemEdge = { - __typename?: 'TranslatableItemEdge' - /** The item at the end of the edge. */ - node: TranslatableItem - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export enum TranslatableKinds { - Attribute = 'ATTRIBUTE', - AttributeValue = 'ATTRIBUTE_VALUE', - Category = 'CATEGORY', - Collection = 'COLLECTION', - MenuItem = 'MENU_ITEM', - Page = 'PAGE', - Product = 'PRODUCT', - Sale = 'SALE', - ShippingMethod = 'SHIPPING_METHOD', - Variant = 'VARIANT', - Voucher = 'VOUCHER', -} - -export type TranslationError = { - __typename?: 'TranslationError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: TranslationErrorCode -} - -/** An enumeration. */ -export enum TranslationErrorCode { - GraphqlError = 'GRAPHQL_ERROR', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', -} - -export type TranslationInput = { - seoTitle?: Maybe - seoDescription?: Maybe - name?: Maybe - description?: Maybe -} - -export type UpdateInvoiceInput = { - /** Invoice number */ - number?: Maybe - /** URL of an invoice to download. */ - url?: Maybe -} - -/** Updates metadata of an object. */ -export type UpdateMetadata = { - __typename?: 'UpdateMetadata' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - metadataErrors: Array - errors: Array - item?: Maybe -} - -/** Updates private metadata of an object. */ -export type UpdatePrivateMetadata = { - __typename?: 'UpdatePrivateMetadata' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - metadataErrors: Array - errors: Array - item?: Maybe -} - -export type UploadError = { - __typename?: 'UploadError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: UploadErrorCode -} - -/** An enumeration. */ -export enum UploadErrorCode { - GraphqlError = 'GRAPHQL_ERROR', -} - -/** Represents user data. */ -export type User = Node & - ObjectWithMetadata & { - __typename?: 'User' - /** The ID of the object. */ - id: Scalars['ID'] - lastLogin?: Maybe - email: Scalars['String'] - firstName: Scalars['String'] - lastName: Scalars['String'] - isStaff: Scalars['Boolean'] - isActive: Scalars['Boolean'] - /** A note about the customer. */ - note?: Maybe - dateJoined: Scalars['DateTime'] - defaultShippingAddress?: Maybe
- defaultBillingAddress?: Maybe
- /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - /** List of all user's addresses. */ - addresses?: Maybe>> - /** - * Returns the last open checkout of this user. - * @deprecated Will be removed in Saleor 4.0. Use the `checkout_tokens` field to fetch the user checkouts. - */ - checkout?: Maybe - /** Returns the checkout UUID's assigned to this user. */ - checkoutTokens?: Maybe> - /** List of the user gift cards. */ - giftCards?: Maybe - /** List of user's orders. */ - orders?: Maybe - /** List of user's permissions. */ - userPermissions?: Maybe>> - /** List of user's permission groups. */ - permissionGroups?: Maybe>> - /** List of user's permission groups which user can manage. */ - editableGroups?: Maybe>> - avatar?: Maybe - /** List of events associated with the user. */ - events?: Maybe>> - /** List of stored payment sources. */ - storedPaymentSources?: Maybe>> - /** User language code. */ - languageCode: LanguageCodeEnum - } - -/** Represents user data. */ -export type UserCheckoutTokensArgs = { - channel?: Maybe -} - -/** Represents user data. */ -export type UserGiftCardsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents user data. */ -export type UserOrdersArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Represents user data. */ -export type UserAvatarArgs = { - size?: Maybe -} - -/** Represents user data. */ -export type UserStoredPaymentSourcesArgs = { - channel?: Maybe -} - -/** Deletes a user avatar. Only for staff members. */ -export type UserAvatarDelete = { - __typename?: 'UserAvatarDelete' - /** An updated user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec */ -export type UserAvatarUpdate = { - __typename?: 'UserAvatarUpdate' - /** An updated user instance. */ - user?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** Activate or deactivate users. */ -export type UserBulkSetActive = { - __typename?: 'UserBulkSetActive' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -export type UserCountableConnection = { - __typename?: 'UserCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type UserCountableEdge = { - __typename?: 'UserCountableEdge' - /** The item at the end of the edge. */ - node: User - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -export type UserCreateInput = { - /** Billing address of the customer. */ - defaultBillingAddress?: Maybe - /** Shipping address of the customer. */ - defaultShippingAddress?: Maybe - /** Given name. */ - firstName?: Maybe - /** Family name. */ - lastName?: Maybe - /** The unique email address of the user. */ - email?: Maybe - /** User account is active. */ - isActive?: Maybe - /** A note about the user. */ - note?: Maybe - /** User language code. */ - languageCode?: Maybe - /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ - redirectUrl?: Maybe - /** Slug of a channel which will be used for notify user. Optional when only one channel exists. */ - channel?: Maybe -} - -export type UserPermission = { - __typename?: 'UserPermission' - /** Internal code for permission. */ - code: PermissionEnum - /** Describe action(s) allowed to do by permission. */ - name: Scalars['String'] - /** List of user permission groups which contains this permission. */ - sourcePermissionGroups?: Maybe> -} - -export type UserPermissionSourcePermissionGroupsArgs = { - userId: Scalars['ID'] -} - -export enum UserSortField { - /** Sort users by first name. */ - FirstName = 'FIRST_NAME', - /** Sort users by last name. */ - LastName = 'LAST_NAME', - /** Sort users by email. */ - Email = 'EMAIL', - /** Sort users by order count. */ - OrderCount = 'ORDER_COUNT', -} - -export type UserSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort users by the selected field. */ - field: UserSortField -} - -/** Represents a VAT rate for a country. */ -export type Vat = { - __typename?: 'VAT' - /** Country code. */ - countryCode: Scalars['String'] - /** Standard VAT rate in percent. */ - standardRate?: Maybe - /** Country's VAT rate exceptions for specific types of goods. */ - reducedRates: Array> -} - -export enum VariantAttributeScope { - All = 'ALL', - VariantSelection = 'VARIANT_SELECTION', - NotVariantSelection = 'NOT_VARIANT_SELECTION', -} - -/** Assign an media to a product variant. */ -export type VariantMediaAssign = { - __typename?: 'VariantMediaAssign' - productVariant?: Maybe - media?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Unassign an media from a product variant. */ -export type VariantMediaUnassign = { - __typename?: 'VariantMediaUnassign' - productVariant?: Maybe - media?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - productErrors: Array - errors: Array -} - -/** Represents availability of a variant in the storefront. */ -export type VariantPricingInfo = { - __typename?: 'VariantPricingInfo' - /** Whether it is in sale or not. */ - onSale?: Maybe - /** The discount amount if in sale (null otherwise). */ - discount?: Maybe - /** The discount amount in the local currency. */ - discountLocalCurrency?: Maybe - /** The price, with any discount subtracted. */ - price?: Maybe - /** The price without any discount. */ - priceUndiscounted?: Maybe - /** The discounted price in the local currency. */ - priceLocalCurrency?: Maybe -} - -/** Verify JWT token. */ -export type VerifyToken = { - __typename?: 'VerifyToken' - /** User assigned to token. */ - user?: Maybe - /** Determine if token is valid or not. */ - isValid: Scalars['Boolean'] - /** JWT payload. */ - payload?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - accountErrors: Array - errors: Array -} - -/** An enumeration. */ -export enum VolumeUnitsEnum { - CubicMillimeter = 'CUBIC_MILLIMETER', - CubicCentimeter = 'CUBIC_CENTIMETER', - CubicDecimeter = 'CUBIC_DECIMETER', - CubicMeter = 'CUBIC_METER', - Liter = 'LITER', - CubicFoot = 'CUBIC_FOOT', - CubicInch = 'CUBIC_INCH', - CubicYard = 'CUBIC_YARD', - Qt = 'QT', - Pint = 'PINT', - FlOz = 'FL_OZ', - AcreIn = 'ACRE_IN', - AcreFt = 'ACRE_FT', -} - -/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ -export type Voucher = Node & { - __typename?: 'Voucher' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - /** Determines a type of voucher. */ - type: VoucherTypeEnum - code: Scalars['String'] - usageLimit?: Maybe - used: Scalars['Int'] - startDate: Scalars['DateTime'] - endDate?: Maybe - applyOncePerOrder: Scalars['Boolean'] - applyOncePerCustomer: Scalars['Boolean'] - /** Determines a type of discount for voucher - value or percentage */ - discountValueType: DiscountValueTypeEnum - minCheckoutItemsQuantity?: Maybe - /** List of categories this voucher applies to. */ - categories?: Maybe - /** List of collections this voucher applies to. */ - collections?: Maybe - /** List of products this voucher applies to. */ - products?: Maybe - /** List of countries available for the shipping voucher. */ - countries?: Maybe>> - /** Returns translated voucher fields for the given language code. */ - translation?: Maybe - /** Voucher value. */ - discountValue?: Maybe - /** Currency code for voucher. */ - currency?: Maybe - /** Minimum order value to apply voucher. */ - minSpent?: Maybe - /** List of availability in channels for the voucher. */ - channelListings?: Maybe> -} - -/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ -export type VoucherCategoriesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ -export type VoucherCollectionsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ -export type VoucherProductsArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -/** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ -export type VoucherTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Adds products, categories, collections to a voucher. */ -export type VoucherAddCatalogues = { - __typename?: 'VoucherAddCatalogues' - /** Voucher of which catalogue IDs will be modified. */ - voucher?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array -} - -/** Deletes vouchers. */ -export type VoucherBulkDelete = { - __typename?: 'VoucherBulkDelete' - /** Returns how many objects were affected. */ - count: Scalars['Int'] - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array -} - -/** Represents voucher channel listing. */ -export type VoucherChannelListing = Node & { - __typename?: 'VoucherChannelListing' - /** The ID of the object. */ - id: Scalars['ID'] - channel: Channel - discountValue: Scalars['Float'] - currency: Scalars['String'] - minSpent?: Maybe -} - -export type VoucherChannelListingAddInput = { - /** ID of a channel. */ - channelId: Scalars['ID'] - /** Value of the voucher. */ - discountValue?: Maybe - /** Min purchase amount required to apply the voucher. */ - minAmountSpent?: Maybe -} - -export type VoucherChannelListingInput = { - /** List of channels to which the voucher should be assigned. */ - addChannels?: Maybe> - /** List of channels from which the voucher should be unassigned. */ - removeChannels?: Maybe> -} - -/** Manage voucher's availability in channels. */ -export type VoucherChannelListingUpdate = { - __typename?: 'VoucherChannelListingUpdate' - /** An updated voucher instance. */ - voucher?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array -} - -export type VoucherCountableConnection = { - __typename?: 'VoucherCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type VoucherCountableEdge = { - __typename?: 'VoucherCountableEdge' - /** The item at the end of the edge. */ - node: Voucher - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates a new voucher. */ -export type VoucherCreate = { - __typename?: 'VoucherCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array - voucher?: Maybe -} - -/** Deletes a voucher. */ -export type VoucherDelete = { - __typename?: 'VoucherDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array - voucher?: Maybe -} - -export enum VoucherDiscountType { - Fixed = 'FIXED', - Percentage = 'PERCENTAGE', - Shipping = 'SHIPPING', -} - -export type VoucherFilterInput = { - status?: Maybe>> - timesUsed?: Maybe - discountType?: Maybe>> - started?: Maybe - search?: Maybe -} - -export type VoucherInput = { - /** Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER. */ - type?: Maybe - /** Voucher name. */ - name?: Maybe - /** Code to use the voucher. */ - code?: Maybe - /** Start date of the voucher in ISO 8601 format. */ - startDate?: Maybe - /** End date of the voucher in ISO 8601 format. */ - endDate?: Maybe - /** Choices: fixed or percentage. */ - discountValueType?: Maybe - /** Products discounted by the voucher. */ - products?: Maybe>> - /** Collections discounted by the voucher. */ - collections?: Maybe>> - /** Categories discounted by the voucher. */ - categories?: Maybe>> - /** Minimal quantity of checkout items required to apply the voucher. */ - minCheckoutItemsQuantity?: Maybe - /** Country codes that can be used with the shipping voucher. */ - countries?: Maybe>> - /** Voucher should be applied to the cheapest item or entire order. */ - applyOncePerOrder?: Maybe - /** Voucher should be applied once per customer. */ - applyOncePerCustomer?: Maybe - /** Limit number of times this voucher can be used in total. */ - usageLimit?: Maybe -} - -/** Removes products, categories, collections from a voucher. */ -export type VoucherRemoveCatalogues = { - __typename?: 'VoucherRemoveCatalogues' - /** Voucher of which catalogue IDs will be modified. */ - voucher?: Maybe - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array -} - -export enum VoucherSortField { - /** Sort vouchers by code. */ - Code = 'CODE', - /** Sort vouchers by start date. */ - StartDate = 'START_DATE', - /** Sort vouchers by end date. */ - EndDate = 'END_DATE', - /** Sort vouchers by value. */ - Value = 'VALUE', - /** Sort vouchers by type. */ - Type = 'TYPE', - /** Sort vouchers by usage limit. */ - UsageLimit = 'USAGE_LIMIT', - /** Sort vouchers by minimum spent amount. */ - MinimumSpentAmount = 'MINIMUM_SPENT_AMOUNT', -} - -export type VoucherSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Specifies the channel in which to sort the data. */ - channel?: Maybe - /** Sort vouchers by the selected field. */ - field: VoucherSortField -} - -export type VoucherTranslatableContent = Node & { - __typename?: 'VoucherTranslatableContent' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - /** Returns translated voucher fields for the given language code. */ - translation?: Maybe - /** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ - voucher?: Maybe -} - -export type VoucherTranslatableContentTranslationArgs = { - languageCode: LanguageCodeEnum -} - -/** Creates/Updates translations for Voucher. */ -export type VoucherTranslate = { - __typename?: 'VoucherTranslate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - translationErrors: Array - errors: Array - voucher?: Maybe -} - -export type VoucherTranslation = Node & { - __typename?: 'VoucherTranslation' - /** The ID of the object. */ - id: Scalars['ID'] - name?: Maybe - /** Translation language. */ - language: LanguageDisplay -} - -export enum VoucherTypeEnum { - Shipping = 'SHIPPING', - EntireOrder = 'ENTIRE_ORDER', - SpecificProduct = 'SPECIFIC_PRODUCT', -} - -/** Updates a voucher. */ -export type VoucherUpdate = { - __typename?: 'VoucherUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - discountErrors: Array - errors: Array - voucher?: Maybe -} - -/** Represents warehouse. */ -export type Warehouse = Node & - ObjectWithMetadata & { - __typename?: 'Warehouse' - /** The ID of the object. */ - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] - companyName: Scalars['String'] - shippingZones: ShippingZoneCountableConnection - address: Address - email: Scalars['String'] - /** List of private metadata items.Requires proper staff permissions to access. */ - privateMetadata: Array> - /** List of public metadata items. Can be accessed without permissions. */ - metadata: Array> - } - -/** Represents warehouse. */ -export type WarehouseShippingZonesArgs = { - before?: Maybe - after?: Maybe - first?: Maybe - last?: Maybe -} - -export type WarehouseAddressInput = { - /** Address. */ - streetAddress1: Scalars['String'] - /** Address. */ - streetAddress2?: Maybe - /** City. */ - city: Scalars['String'] - /** District. */ - cityArea?: Maybe - /** Postal code. */ - postalCode?: Maybe - /** Country. */ - country: CountryCode - /** State or province. */ - countryArea?: Maybe - /** Phone number. */ - phone?: Maybe -} - -export type WarehouseCountableConnection = { - __typename?: 'WarehouseCountableConnection' - /** Pagination data for this connection. */ - pageInfo: PageInfo - edges: Array - /** A total count of items in the collection. */ - totalCount?: Maybe -} - -export type WarehouseCountableEdge = { - __typename?: 'WarehouseCountableEdge' - /** The item at the end of the edge. */ - node: Warehouse - /** A cursor for use in pagination. */ - cursor: Scalars['String'] -} - -/** Creates new warehouse. */ -export type WarehouseCreate = { - __typename?: 'WarehouseCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - warehouseErrors: Array - errors: Array - warehouse?: Maybe -} - -export type WarehouseCreateInput = { - /** Warehouse slug. */ - slug?: Maybe - /** Company name. */ - companyName?: Maybe - /** The email address of the warehouse. */ - email?: Maybe - /** Warehouse name. */ - name: Scalars['String'] - /** Address of the warehouse. */ - address: WarehouseAddressInput - /** Shipping zones supported by the warehouse. */ - shippingZones?: Maybe>> -} - -/** Deletes selected warehouse. */ -export type WarehouseDelete = { - __typename?: 'WarehouseDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - warehouseErrors: Array - errors: Array - warehouse?: Maybe -} - -export type WarehouseError = { - __typename?: 'WarehouseError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: WarehouseErrorCode -} - -/** An enumeration. */ -export enum WarehouseErrorCode { - AlreadyExists = 'ALREADY_EXISTS', - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -export type WarehouseFilterInput = { - search?: Maybe - ids?: Maybe>> -} - -/** Add shipping zone to given warehouse. */ -export type WarehouseShippingZoneAssign = { - __typename?: 'WarehouseShippingZoneAssign' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - warehouseErrors: Array - errors: Array - warehouse?: Maybe -} - -/** Remove shipping zone from given warehouse. */ -export type WarehouseShippingZoneUnassign = { - __typename?: 'WarehouseShippingZoneUnassign' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - warehouseErrors: Array - errors: Array - warehouse?: Maybe -} - -export enum WarehouseSortField { - /** Sort warehouses by name. */ - Name = 'NAME', -} - -export type WarehouseSortingInput = { - /** Specifies the direction in which to sort products. */ - direction: OrderDirection - /** Sort warehouses by the selected field. */ - field: WarehouseSortField -} - -/** Updates given warehouse. */ -export type WarehouseUpdate = { - __typename?: 'WarehouseUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - warehouseErrors: Array - errors: Array - warehouse?: Maybe -} - -export type WarehouseUpdateInput = { - /** Warehouse slug. */ - slug?: Maybe - /** Company name. */ - companyName?: Maybe - /** The email address of the warehouse. */ - email?: Maybe - /** Warehouse name. */ - name?: Maybe - /** Address of the warehouse. */ - address?: Maybe -} - -/** Webhook. */ -export type Webhook = Node & { - __typename?: 'Webhook' - name: Scalars['String'] - targetUrl: Scalars['String'] - isActive: Scalars['Boolean'] - secretKey?: Maybe - /** The ID of the object. */ - id: Scalars['ID'] - /** List of webhook events. */ - events: Array - app: App -} - -/** Creates a new webhook subscription. */ -export type WebhookCreate = { - __typename?: 'WebhookCreate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - webhookErrors: Array - errors: Array - webhook?: Maybe -} - -export type WebhookCreateInput = { - /** The name of the webhook. */ - name?: Maybe - /** The url to receive the payload. */ - targetUrl?: Maybe - /** The events that webhook wants to subscribe. */ - events?: Maybe>> - /** ID of the app to which webhook belongs. */ - app?: Maybe - /** Determine if webhook will be set active or not. */ - isActive?: Maybe - /** The secret key used to create a hash signature with each payload. */ - secretKey?: Maybe -} - -/** Deletes a webhook subscription. */ -export type WebhookDelete = { - __typename?: 'WebhookDelete' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - webhookErrors: Array - errors: Array - webhook?: Maybe -} - -export type WebhookError = { - __typename?: 'WebhookError' - /** Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. */ - field?: Maybe - /** The error message. */ - message?: Maybe - /** The error code. */ - code: WebhookErrorCode -} - -/** An enumeration. */ -export enum WebhookErrorCode { - GraphqlError = 'GRAPHQL_ERROR', - Invalid = 'INVALID', - NotFound = 'NOT_FOUND', - Required = 'REQUIRED', - Unique = 'UNIQUE', -} - -/** Webhook event. */ -export type WebhookEvent = { - __typename?: 'WebhookEvent' - /** Internal name of the event type. */ - eventType: WebhookEventTypeEnum - /** Display name of the event. */ - name: Scalars['String'] -} - -/** Enum determining type of webhook. */ -export enum WebhookEventTypeEnum { - /** All the events. */ - AnyEvents = 'ANY_EVENTS', - /** A new order is placed. */ - OrderCreated = 'ORDER_CREATED', - /** An order is confirmed (status change unconfirmed -> unfulfilled) by a staff user using the OrderConfirm mutation. It also triggers when the user completes the checkout and the shop setting `automatically_confirm_all_new_orders` is enabled. */ - OrderConfirmed = 'ORDER_CONFIRMED', - /** Payment is made and an order is fully paid. */ - OrderFullyPaid = 'ORDER_FULLY_PAID', - /** An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. */ - OrderUpdated = 'ORDER_UPDATED', - /** An order is cancelled. */ - OrderCancelled = 'ORDER_CANCELLED', - /** An order is fulfilled. */ - OrderFulfilled = 'ORDER_FULFILLED', - /** An invoice for order requested. */ - InvoiceRequested = 'INVOICE_REQUESTED', - /** An invoice is deleted. */ - InvoiceDeleted = 'INVOICE_DELETED', - /** Invoice has been sent. */ - InvoiceSent = 'INVOICE_SENT', - /** A new customer account is created. */ - CustomerCreated = 'CUSTOMER_CREATED', - /** A customer account is updated. */ - CustomerUpdated = 'CUSTOMER_UPDATED', - /** A new product is created. */ - ProductCreated = 'PRODUCT_CREATED', - /** A product is updated. */ - ProductUpdated = 'PRODUCT_UPDATED', - /** A product is deleted. */ - ProductDeleted = 'PRODUCT_DELETED', - /** A new product variant is created. */ - ProductVariantCreated = 'PRODUCT_VARIANT_CREATED', - /** A product variant is updated. */ - ProductVariantUpdated = 'PRODUCT_VARIANT_UPDATED', - /** A product variant is deleted. */ - ProductVariantDeleted = 'PRODUCT_VARIANT_DELETED', - /** A new checkout is created. */ - CheckoutCreated = 'CHECKOUT_CREATED', - /** A checkout is updated. It also triggers all updates related to the checkout. */ - CheckoutUpdated = 'CHECKOUT_UPDATED', - /** A new fulfillment is created. */ - FulfillmentCreated = 'FULFILLMENT_CREATED', - /** User notification triggered. */ - NotifyUser = 'NOTIFY_USER', - /** A new page is created. */ - PageCreated = 'PAGE_CREATED', - /** A page is updated. */ - PageUpdated = 'PAGE_UPDATED', - /** A page is deleted. */ - PageDeleted = 'PAGE_DELETED', -} - -/** An enumeration. */ -export enum WebhookSampleEventTypeEnum { - OrderCreated = 'ORDER_CREATED', - OrderConfirmed = 'ORDER_CONFIRMED', - OrderFullyPaid = 'ORDER_FULLY_PAID', - OrderUpdated = 'ORDER_UPDATED', - OrderCancelled = 'ORDER_CANCELLED', - OrderFulfilled = 'ORDER_FULFILLED', - InvoiceRequested = 'INVOICE_REQUESTED', - InvoiceDeleted = 'INVOICE_DELETED', - InvoiceSent = 'INVOICE_SENT', - CustomerCreated = 'CUSTOMER_CREATED', - CustomerUpdated = 'CUSTOMER_UPDATED', - ProductCreated = 'PRODUCT_CREATED', - ProductUpdated = 'PRODUCT_UPDATED', - ProductDeleted = 'PRODUCT_DELETED', - ProductVariantCreated = 'PRODUCT_VARIANT_CREATED', - ProductVariantUpdated = 'PRODUCT_VARIANT_UPDATED', - ProductVariantDeleted = 'PRODUCT_VARIANT_DELETED', - CheckoutCreated = 'CHECKOUT_CREATED', - CheckoutUpdated = 'CHECKOUT_UPDATED', - FulfillmentCreated = 'FULFILLMENT_CREATED', - NotifyUser = 'NOTIFY_USER', - PageCreated = 'PAGE_CREATED', - PageUpdated = 'PAGE_UPDATED', - PageDeleted = 'PAGE_DELETED', -} - -/** Updates a webhook subscription. */ -export type WebhookUpdate = { - __typename?: 'WebhookUpdate' - /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ - webhookErrors: Array - errors: Array - webhook?: Maybe -} - -export type WebhookUpdateInput = { - /** The new name of the webhook. */ - name?: Maybe - /** The url to receive the payload. */ - targetUrl?: Maybe - /** The events that webhook wants to subscribe. */ - events?: Maybe>> - /** ID of the app to which webhook belongs. */ - app?: Maybe - /** Determine if webhook will be set active or not. */ - isActive?: Maybe - /** Use to create a hash signature with each payload. */ - secretKey?: Maybe -} - -/** Represents weight value in a specific weight unit. */ -export type Weight = { - __typename?: 'Weight' - /** Weight unit. */ - unit: WeightUnitsEnum - /** Weight value. */ - value: Scalars['Float'] -} - -/** An enumeration. */ -export enum WeightUnitsEnum { - G = 'G', - Lb = 'LB', - Oz = 'OZ', - Kg = 'KG', - Tonne = 'TONNE', -} - -export type _Entity = - | Address - | User - | Group - | App - | ProductVariant - | Product - | ProductType - | Collection - | Category - | ProductMedia - | ProductImage - | PageType - -export type _Service = { - __typename?: '_Service' - sdl?: Maybe -} - -export type GetAllProductPathsQueryVariables = Exact<{ - first?: Maybe - cursor?: Maybe - channel?: Maybe -}> - -export type GetAllProductPathsQuery = { __typename?: 'Query' } & { - products?: Maybe< - { __typename?: 'ProductCountableConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick - edges: Array< - { __typename?: 'ProductCountableEdge' } & Pick & { - node: { __typename?: 'Product' } & Pick - } - > - } - > -} - -export type ProductConnectionFragment = { - __typename?: 'ProductCountableConnection' -} & { - pageInfo: { __typename?: 'PageInfo' } & Pick - edges: Array< - { __typename?: 'ProductCountableEdge' } & { - node: { __typename?: 'Product' } & Pick & { - pricing?: Maybe< - { __typename?: 'ProductPricingInfo' } & { - priceRange?: Maybe< - { __typename?: 'TaxedMoneyRange' } & { - start?: Maybe< - { __typename?: 'TaxedMoney' } & { - net: { __typename?: 'Money' } & Pick - } - > - } - > - } - > - media?: Maybe>> - } - } - > -} - -export type GetAllProductsQueryVariables = Exact<{ - first?: Maybe - filter?: Maybe - sortBy?: Maybe - channel?: Maybe -}> - -export type GetAllProductsQuery = { __typename?: 'Query' } & { - products?: Maybe<{ __typename?: 'ProductCountableConnection' } & ProductConnectionFragment> -} diff --git a/framework/saleor/schema.graphql b/framework/saleor/schema.graphql deleted file mode 100644 index de2858641..000000000 --- a/framework/saleor/schema.graphql +++ /dev/null @@ -1,18973 +0,0 @@ -""" -Create a new address for the customer. -""" -type AccountAddressCreate { - """ - A user instance for which the address was created. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - address: Address -} - -""" -Delete an address of the logged-in user. -""" -type AccountAddressDelete { - """ - A user instance for which the address was deleted. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - address: Address -} - -""" -Updates an address of the logged-in user. -""" -type AccountAddressUpdate { - """ - A user object for which the address was edited. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - address: Address -} - -""" -Remove user account. -""" -type AccountDelete { - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - user: User -} - -type AccountError { - """ - 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: AccountErrorCode! - - """ - A type of address that causes the error. - """ - addressType: AddressTypeEnum -} - -""" -An enumeration. -""" -enum AccountErrorCode { - ACTIVATE_OWN_ACCOUNT - ACTIVATE_SUPERUSER_ACCOUNT - DUPLICATED_INPUT_ITEM - DEACTIVATE_OWN_ACCOUNT - DEACTIVATE_SUPERUSER_ACCOUNT - DELETE_NON_STAFF_USER - DELETE_OWN_ACCOUNT - DELETE_STAFF_ACCOUNT - DELETE_SUPERUSER_ACCOUNT - GRAPHQL_ERROR - INACTIVE - INVALID - INVALID_PASSWORD - LEFT_NOT_MANAGEABLE_PERMISSION - INVALID_CREDENTIALS - NOT_FOUND - OUT_OF_SCOPE_USER - OUT_OF_SCOPE_GROUP - OUT_OF_SCOPE_PERMISSION - PASSWORD_ENTIRELY_NUMERIC - PASSWORD_TOO_COMMON - PASSWORD_TOO_SHORT - PASSWORD_TOO_SIMILAR - REQUIRED - UNIQUE - JWT_SIGNATURE_EXPIRED - JWT_INVALID_TOKEN - JWT_DECODE_ERROR - JWT_MISSING_TOKEN - JWT_INVALID_CSRF_TOKEN - CHANNEL_INACTIVE - MISSING_CHANNEL_SLUG -} - -input AccountInput { - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - Billing address of the customer. - """ - defaultBillingAddress: AddressInput - - """ - Shipping address of the customer. - """ - defaultShippingAddress: AddressInput - - """ - User language code. - """ - languageCode: LanguageCodeEnum -} - -""" -Register a new user. -""" -type AccountRegister { - """ - Informs whether users need to confirm their email address. - """ - requiresConfirmation: Boolean - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - user: User -} - -input AccountRegisterInput { - """ - The email address of the user. - """ - email: String! - - """ - Password. - """ - password: String! - - """ - Base of frontend URL that will be needed to create confirmation URL. - """ - redirectUrl: String - - """ - User language code. - """ - languageCode: LanguageCodeEnum - - """ - User public metadata. - """ - metadata: [MetadataInput!] - - """ - Slug of a channel which will be used to notify users. Optional when only one channel exists. - """ - channel: String -} - -""" -Sends an email with the account removal link for the logged-in user. -""" -type AccountRequestDeletion { - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Sets a default address for the authenticated user. -""" -type AccountSetDefaultAddress { - """ - An updated user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Updates the account of the logged-in user. -""" -type AccountUpdate { - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - user: User -} - -""" -Represents user address data. -""" -type Address implements Node { - """ - The ID of the object. - """ - id: ID! - firstName: String! - lastName: String! - companyName: String! - streetAddress1: String! - streetAddress2: String! - city: String! - cityArea: String! - postalCode: String! - - """ - Shop's default country. - """ - country: CountryDisplay! - countryArea: String! - phone: String - - """ - Address is user's default shipping address. - """ - isDefaultShippingAddress: Boolean - - """ - Address is user's default billing address. - """ - isDefaultBillingAddress: Boolean -} - -""" -Creates user address. -""" -type AddressCreate { - """ - A user instance for which the address was created. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - address: Address -} - -""" -Deletes an address. -""" -type AddressDelete { - """ - A user instance for which the address was deleted. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - address: Address -} - -input AddressInput { - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - Company or organization. - """ - companyName: String - - """ - Address. - """ - streetAddress1: String - - """ - Address. - """ - streetAddress2: String - - """ - City. - """ - city: String - - """ - District. - """ - cityArea: String - - """ - Postal code. - """ - postalCode: String - - """ - Country. - """ - country: CountryCode - - """ - State or province. - """ - countryArea: String - - """ - Phone number. - """ - phone: String -} - -""" -Sets a default address for the given user. -""" -type AddressSetDefault { - """ - An updated user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -An enumeration. -""" -enum AddressTypeEnum { - BILLING - SHIPPING -} - -""" -Updates an address. -""" -type AddressUpdate { - """ - A user object for which the address was edited. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - address: Address -} - -type AddressValidationData { - countryCode: String - countryName: String - addressFormat: String - addressLatinFormat: String - allowedFields: [String] - requiredFields: [String] - upperFields: [String] - countryAreaType: String - countryAreaChoices: [ChoiceValue] - cityType: String - cityChoices: [ChoiceValue] - cityAreaType: String - cityAreaChoices: [ChoiceValue] - postalCodeType: String - postalCodeMatchers: [String] - postalCodeExamples: [String] - postalCodePrefix: String -} - -""" -Represents allocation. -""" -type Allocation implements Node { - """ - The ID of the object. - """ - id: ID! - - """ - Quantity allocated for orders. - """ - quantity: Int! - - """ - The warehouse were items were allocated. - """ - warehouse: Warehouse! -} - -""" -Represents app data. -""" -type App implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - - """ - Name of the app. - """ - name: String - - """ - The date and time when the app was created. - """ - created: DateTime - - """ - Determine if app will be set active or not. - """ - isActive: Boolean - - """ - List of the app's permissions. - """ - permissions: [Permission] - - """ - Last 4 characters of the tokens. - """ - tokens: [AppToken] - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Type of the app. - """ - type: AppTypeEnum - - """ - List of webhooks assigned to this app. - """ - webhooks: [Webhook] - - """ - Description of this app. - """ - aboutApp: String - - """ - Description of the data privacy defined for this app. - """ - dataPrivacy: String - - """ - Url to details about the privacy policy on the app owner page. - """ - dataPrivacyUrl: String - - """ - Homepage of the app. - """ - homepageUrl: String - - """ - Support page for the app. - """ - supportUrl: String - - """ - Url to iframe with the configuration for the app. - """ - configurationUrl: String - - """ - Url to iframe with the app. - """ - appUrl: String - - """ - Version number of the app. - """ - version: String - - """ - JWT token used to authenticate by thridparty app. - """ - accessToken: String -} - -""" -Activate the app. -""" -type AppActivate { - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - app: App -} - -type AppCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [AppCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type AppCountableEdge { - """ - The item at the end of the edge. - """ - node: App! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new app. -""" -type AppCreate { - """ - The newly created authentication token. - """ - authToken: String - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - app: App -} - -""" -Deactivate the app. -""" -type AppDeactivate { - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - app: App -} - -""" -Deletes an app. -""" -type AppDelete { - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - app: App -} - -""" -Delete failed installation. -""" -type AppDeleteFailedInstallation { - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - appInstallation: AppInstallation -} - -type AppError { - """ - 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: AppErrorCode! - - """ - List of permissions which causes the error. - """ - permissions: [PermissionEnum!] -} - -""" -An enumeration. -""" -enum AppErrorCode { - FORBIDDEN - GRAPHQL_ERROR - INVALID - INVALID_STATUS - INVALID_PERMISSION - INVALID_URL_FORMAT - INVALID_MANIFEST_FORMAT - MANIFEST_URL_CANT_CONNECT - NOT_FOUND - REQUIRED - UNIQUE - OUT_OF_SCOPE_APP - OUT_OF_SCOPE_PERMISSION -} - -""" -Fetch and validate manifest. -""" -type AppFetchManifest { - manifest: Manifest - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! -} - -input AppFilterInput { - search: String - isActive: Boolean - type: AppTypeEnum -} - -input AppInput { - """ - Name of the app. - """ - name: String - - """ - List of permission code names to assign to this app. - """ - permissions: [PermissionEnum] -} - -""" -Install new app by using app manifest. -""" -type AppInstall { - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - appInstallation: AppInstallation -} - -input AppInstallInput { - """ - Name of the app to install. - """ - appName: String - - """ - Url to app's manifest in JSON format. - """ - manifestUrl: String - - """ - Determine if app will be set active or not. - """ - activateAfterInstallation: Boolean = true - - """ - List of permission code names to assign to this app. - """ - permissions: [PermissionEnum] -} - -""" -Represents ongoing installation of app. -""" -type AppInstallation implements Node & Job { - appName: String! - manifestUrl: String! - - """ - The ID of the object. - """ - id: ID! - - """ - Job status. - """ - status: JobStatusEnum! - - """ - Created date time of job in ISO 8601 format. - """ - createdAt: DateTime! - - """ - Date time of job last update in ISO 8601 format. - """ - updatedAt: DateTime! - - """ - Job message. - """ - message: String -} - -""" -Retry failed installation of new app. -""" -type AppRetryInstall { - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - appInstallation: AppInstallation -} - -enum AppSortField { - """ - Sort apps by name. - """ - NAME - - """ - Sort apps by creation date. - """ - CREATION_DATE -} - -input AppSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort apps by the selected field. - """ - field: AppSortField! -} - -""" -Represents token data. -""" -type AppToken implements Node { - """ - Name of the authenticated token. - """ - name: String - - """ - Last 4 characters of the token. - """ - authToken: String - - """ - The ID of the object. - """ - id: ID! -} - -""" -Creates a new token. -""" -type AppTokenCreate { - """ - The newly created authentication token. - """ - authToken: String - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - appToken: AppToken -} - -""" -Deletes an authentication token assigned to app. -""" -type AppTokenDelete { - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - appToken: AppToken -} - -input AppTokenInput { - """ - Name of the token. - """ - name: String - - """ - ID of app. - """ - app: ID! -} - -""" -Verify provided app token. -""" -type AppTokenVerify { - """ - Determine if token is valid or not. - """ - valid: Boolean! - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! -} - -""" -Enum determining type of your App. -""" -enum AppTypeEnum { - """ - Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token - """ - LOCAL - - """ - Third party external App. Installation is fully automated. Saleor uses a defined App manifest to gather all required information. - """ - THIRDPARTY -} - -""" -Updates an existing app. -""" -type AppUpdate { - appErrors: [AppError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AppError!]! - app: App -} - -""" -An enumeration. -""" -enum AreaUnitsEnum { - SQ_CM - SQ_M - SQ_KM - SQ_FT - SQ_YD - SQ_INCH -} - -""" -Assigns storefront's navigation menus. -""" -type AssignNavigation { - """ - Assigned navigation menu. - """ - menu: Menu - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! -} - -""" -Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. -""" -type Attribute implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - productTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection! - productVariantTypes(before: String, after: String, first: Int, last: Int): ProductTypeCountableConnection! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - The input type to use for entering attribute values in the dashboard. - """ - inputType: AttributeInputTypeEnum - - """ - The entity type which can be used as a reference. - """ - entityType: AttributeEntityTypeEnum - - """ - Name of an attribute displayed in the interface. - """ - name: String - - """ - Internal representation of an attribute name. - """ - slug: String - - """ - The attribute type. - """ - type: AttributeTypeEnum - - """ - The unit of attribute values. - """ - unit: MeasurementUnitsEnum - - """ - List of attribute's values. - """ - values: [AttributeValue] - - """ - Whether the attribute requires values to be passed or not. - """ - valueRequired: Boolean! - - """ - Whether the attribute should be visible or not in storefront. - """ - visibleInStorefront: Boolean! - - """ - Whether the attribute can be filtered in storefront. - """ - filterableInStorefront: Boolean! - - """ - Whether the attribute can be filtered in dashboard. - """ - filterableInDashboard: Boolean! - - """ - Whether the attribute can be displayed in the admin product list. - """ - availableInGrid: Boolean! - - """ - Returns translated attribute fields for the given language code. - """ - translation( - """ - A language code to return the translation for attribute. - """ - languageCode: LanguageCodeEnum! - ): AttributeTranslation - - """ - The position of the attribute in the storefront navigation (0 by default). - """ - storefrontSearchPosition: Int! -} - -""" -Deletes attributes. -""" -type AttributeBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! -} - -type AttributeCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [AttributeCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type AttributeCountableEdge { - """ - The item at the end of the edge. - """ - node: Attribute! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates an attribute. -""" -type AttributeCreate { - attribute: Attribute - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! -} - -input AttributeCreateInput { - """ - The input type to use for entering attribute values in the dashboard. - """ - inputType: AttributeInputTypeEnum - - """ - The entity type which can be used as a reference. - """ - entityType: AttributeEntityTypeEnum - - """ - Name of an attribute displayed in the interface. - """ - name: String! - - """ - Internal representation of an attribute name. - """ - slug: String - - """ - The attribute type. - """ - type: AttributeTypeEnum! - - """ - The unit of attribute values. - """ - unit: MeasurementUnitsEnum - - """ - List of attribute's values. - """ - values: [AttributeValueCreateInput] - - """ - Whether the attribute requires values to be passed or not. - """ - valueRequired: Boolean - - """ - Whether the attribute is for variants only. - """ - isVariantOnly: Boolean - - """ - Whether the attribute should be visible or not in storefront. - """ - visibleInStorefront: Boolean - - """ - Whether the attribute can be filtered in storefront. - """ - filterableInStorefront: Boolean - - """ - Whether the attribute can be filtered in dashboard. - """ - filterableInDashboard: Boolean - - """ - The position of the attribute in the storefront navigation (0 by default). - """ - storefrontSearchPosition: Int - - """ - Whether the attribute can be displayed in the admin product list. - """ - availableInGrid: Boolean -} - -""" -Deletes an attribute. -""" -type AttributeDelete { - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! - attribute: Attribute -} - -""" -An enumeration. -""" -enum AttributeEntityTypeEnum { - PAGE - PRODUCT -} - -type AttributeError { - """ - 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: AttributeErrorCode! -} - -""" -An enumeration. -""" -enum AttributeErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input AttributeFilterInput { - valueRequired: Boolean - isVariantOnly: Boolean - visibleInStorefront: Boolean - filterableInStorefront: Boolean - filterableInDashboard: Boolean - availableInGrid: Boolean - metadata: [MetadataInput] - search: String - ids: [ID] - type: AttributeTypeEnum - inCollection: ID - inCategory: ID - - """ - Specifies the channel by which the data should be sorted. - """ - channel: String -} - -input AttributeInput { - """ - Internal representation of an attribute name. - """ - slug: String! - - """ - Internal representation of a value (unique per attribute). - """ - values: [String] - - """ - The range that the returned values should be in. - """ - valuesRange: IntRangeInput -} - -""" -An enumeration. -""" -enum AttributeInputTypeEnum { - DROPDOWN - MULTISELECT - FILE - REFERENCE - NUMERIC - RICH_TEXT -} - -""" -Reorder the values of an attribute. -""" -type AttributeReorderValues { - """ - Attribute from which values are reordered. - """ - attribute: Attribute - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! -} - -enum AttributeSortField { - """ - Sort attributes by name - """ - NAME - - """ - Sort attributes by slug - """ - SLUG - - """ - Sort attributes by the value required flag - """ - VALUE_REQUIRED - - """ - Sort attributes by the variant only flag - """ - IS_VARIANT_ONLY - - """ - Sort attributes by visibility in the storefront - """ - VISIBLE_IN_STOREFRONT - - """ - Sort attributes by the filterable in storefront flag - """ - FILTERABLE_IN_STOREFRONT - - """ - Sort attributes by the filterable in dashboard flag - """ - FILTERABLE_IN_DASHBOARD - - """ - Sort attributes by their position in storefront - """ - STOREFRONT_SEARCH_POSITION - - """ - Sort attributes based on whether they can be displayed or not in a product grid. - """ - AVAILABLE_IN_GRID -} - -input AttributeSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort attributes by the selected field. - """ - field: AttributeSortField! -} - -type AttributeTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated attribute fields for the given language code. - """ - translation( - """ - A language code to return the translation for attribute. - """ - languageCode: LanguageCodeEnum! - ): AttributeTranslation - - """ - Custom attribute of a product. - """ - attribute: Attribute -} - -""" -Creates/Updates translations for attribute. -""" -type AttributeTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - attribute: Attribute -} - -type AttributeTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -An enumeration. -""" -enum AttributeTypeEnum { - PRODUCT_TYPE - PAGE_TYPE -} - -""" -Updates attribute. -""" -type AttributeUpdate { - attribute: Attribute - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! -} - -input AttributeUpdateInput { - """ - Name of an attribute displayed in the interface. - """ - name: String - - """ - Internal representation of an attribute name. - """ - slug: String - - """ - The unit of attribute values. - """ - unit: MeasurementUnitsEnum - - """ - IDs of values to be removed from this attribute. - """ - removeValues: [ID] - - """ - New values to be created for this attribute. - """ - addValues: [AttributeValueCreateInput] - - """ - Whether the attribute requires values to be passed or not. - """ - valueRequired: Boolean - - """ - Whether the attribute is for variants only. - """ - isVariantOnly: Boolean - - """ - Whether the attribute should be visible or not in storefront. - """ - visibleInStorefront: Boolean - - """ - Whether the attribute can be filtered in storefront. - """ - filterableInStorefront: Boolean - - """ - Whether the attribute can be filtered in dashboard. - """ - filterableInDashboard: Boolean - - """ - The position of the attribute in the storefront navigation (0 by default). - """ - storefrontSearchPosition: Int - - """ - Whether the attribute can be displayed in the admin product list. - """ - availableInGrid: Boolean -} - -""" -Represents a value of an attribute. -""" -type AttributeValue implements Node { - """ - The ID of the object. - """ - id: ID! - - """ - Name of a value displayed in the interface. - """ - name: String - - """ - Internal representation of a value (unique per attribute). - """ - slug: String - - """ - Represents the value of the attribute value. - """ - value: String - - """ - Returns translated attribute value fields for the given language code. - """ - translation( - """ - A language code to return the translation for attribute value. - """ - languageCode: LanguageCodeEnum! - ): AttributeValueTranslation - - """ - The input type to use for entering attribute values in the dashboard. - """ - inputType: AttributeInputTypeEnum - - """ - The ID of the attribute reference. - """ - reference: ID - - """ - Represents file URL and content type (if attribute value is a file). - """ - file: File - - """ - Represents the text (JSON) of the attribute value. - """ - richText: JSONString -} - -""" -Deletes values of attributes. -""" -type AttributeValueBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! -} - -""" -Creates a value for an attribute. -""" -type AttributeValueCreate { - """ - The updated attribute. - """ - attribute: Attribute - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! - attributeValue: AttributeValue -} - -input AttributeValueCreateInput { - """ - Name of a value displayed in the interface. - """ - name: String! - - """ - Represents the value of the attribute value. - """ - value: String - - """ - Represents the text (JSON) of the attribute value. - """ - richText: JSONString -} - -""" -Deletes a value of an attribute. -""" -type AttributeValueDelete { - """ - The updated attribute. - """ - attribute: Attribute - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! - attributeValue: AttributeValue -} - -input AttributeValueInput { - """ - ID of the selected attribute. - """ - id: ID - - """ - The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. - """ - values: [String] - - """ - URL of the file attribute. Every time, a new value is created. - """ - file: String - - """ - File content type. - """ - contentType: String - - """ - List of entity IDs that will be used as references. - """ - references: [ID!] - - """ - Text content in JSON format. - """ - richText: JSONString -} - -type AttributeValueTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated attribute value fields for the given language code. - """ - translation( - """ - A language code to return the translation for attribute value. - """ - languageCode: LanguageCodeEnum! - ): AttributeValueTranslation - - """ - Represents a value of an attribute. - """ - attributeValue: AttributeValue -} - -""" -Creates/Updates translations for attribute value. -""" -type AttributeValueTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - attributeValue: AttributeValue -} - -type AttributeValueTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - richText: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! -} - -input AttributeValueTranslationInput { - name: String - richText: JSONString -} - -""" -Updates value of an attribute. -""" -type AttributeValueUpdate { - """ - The updated attribute. - """ - attribute: Attribute - attributeErrors: [AttributeError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AttributeError!]! - attributeValue: AttributeValue -} - -input BulkAttributeValueInput { - """ - ID of the selected attribute. - """ - id: ID - - """ - The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. - """ - values: [String]! -} - -type BulkProductError { - """ - 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: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] - - """ - Index of an input list item that caused the error. - """ - index: Int - - """ - List of warehouse IDs which causes the error. - """ - warehouses: [ID!] - - """ - List of channel IDs which causes the error. - """ - channels: [ID!] -} - -type BulkStockError { - """ - 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: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] - - """ - Index of an input list item that caused the error. - """ - index: Int -} - -input CatalogueInput { - """ - Products related to the discount. - """ - products: [ID] - - """ - Categories related to the discount. - """ - categories: [ID] - - """ - Collections related to the discount. - """ - collections: [ID] -} - -""" -Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. -""" -type Category implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - slug: String! - parent: Category - level: Int! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Description of the category (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") - - """ - List of ancestors of the category. - """ - ancestors( - """ - 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 - ): CategoryCountableConnection - - """ - List of products in the category. - """ - products( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): ProductCountableConnection - - """ - List of children of the category. - """ - children( - """ - 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 - ): CategoryCountableConnection - backgroundImage( - """ - Size of the image. - """ - size: Int - ): Image - - """ - Returns translated category fields for the given language code. - """ - translation( - """ - A language code to return the translation for category. - """ - languageCode: LanguageCodeEnum! - ): CategoryTranslation -} - -""" -Deletes categories. -""" -type CategoryBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -type CategoryCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [CategoryCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type CategoryCountableEdge { - """ - The item at the end of the edge. - """ - node: Category! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new category. -""" -type CategoryCreate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - category: Category -} - -""" -Deletes a category. -""" -type CategoryDelete { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - category: Category -} - -input CategoryFilterInput { - search: String - metadata: [MetadataInput] - ids: [ID] -} - -input CategoryInput { - """ - Category description (JSON). - """ - description: JSONString - - """ - Category name. - """ - name: String - - """ - Category slug. - """ - slug: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Background image file. - """ - backgroundImage: Upload - - """ - Alt text for a product media. - """ - backgroundImageAlt: String -} - -enum CategorySortField { - """ - Sort categories by name. - """ - NAME - - """ - Sort categories by product count. - """ - PRODUCT_COUNT - - """ - Sort categories by subcategory count. - """ - SUBCATEGORY_COUNT -} - -input CategorySortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort categories by the selected field. - """ - field: CategorySortField! -} - -type CategoryTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - - """ - Description of the category (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") - - """ - Returns translated category fields for the given language code. - """ - translation( - """ - A language code to return the translation for category. - """ - languageCode: LanguageCodeEnum! - ): CategoryTranslation - - """ - Represents a single category of products. - """ - category: Category -} - -""" -Creates/Updates translations for Category. -""" -type CategoryTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - category: Category -} - -type CategoryTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! - - """ - Translated description of the product (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") -} - -""" -Updates a category. -""" -type CategoryUpdate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - category: Category -} - -""" -Represents channel. -""" -type Channel implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - isActive: Boolean! - slug: String! - currencyCode: String! - - """ - Whether a channel has associated orders. - """ - hasOrders: Boolean! -} - -""" -Activate a channel. -""" -type ChannelActivate { - """ - Activated channel. - """ - channel: Channel - channelErrors: [ChannelError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ChannelError!]! -} - -""" -Creates new channel. -""" -type ChannelCreate { - channelErrors: [ChannelError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ChannelError!]! - channel: Channel -} - -input ChannelCreateInput { - """ - isActive flag. - """ - isActive: Boolean - - """ - Name of the channel. - """ - name: String! - - """ - Slug of the channel. - """ - slug: String! - - """ - Currency of the channel. - """ - currencyCode: String! - - """ - List of shipping zones to assign to the channel. - """ - addShippingZones: [ID!] -} - -""" -Deactivate a channel. -""" -type ChannelDeactivate { - """ - Deactivated channel. - """ - channel: Channel - channelErrors: [ChannelError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ChannelError!]! -} - -""" -Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. -""" -type ChannelDelete { - channelErrors: [ChannelError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ChannelError!]! - channel: Channel -} - -input ChannelDeleteInput { - """ - ID of channel to migrate orders from origin channel. - """ - targetChannel: ID! -} - -type ChannelError { - """ - 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: ChannelErrorCode! - - """ - List of shipping zone IDs which causes the error. - """ - shippingZones: [ID!] -} - -""" -An enumeration. -""" -enum ChannelErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - CHANNEL_TARGET_ID_MUST_BE_DIFFERENT - CHANNELS_CURRENCY_MUST_BE_THE_SAME - CHANNEL_WITH_ORDERS - DUPLICATED_INPUT_ITEM -} - -""" -Update a channel. -""" -type ChannelUpdate { - channelErrors: [ChannelError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ChannelError!]! - channel: Channel -} - -input ChannelUpdateInput { - """ - isActive flag. - """ - isActive: Boolean - - """ - Name of the channel. - """ - name: String - - """ - Slug of the channel. - """ - slug: String - - """ - List of shipping zones to assign to the channel. - """ - addShippingZones: [ID!] - - """ - List of shipping zones to unassign from the channel. - """ - removeShippingZones: [ID!] -} - -""" -Checkout object. -""" -type Checkout implements Node & ObjectWithMetadata { - created: DateTime! - lastChange: DateTime! - user: User - channel: Channel! - billingAddress: Address - shippingAddress: Address - note: String! - discount: Money - discountName: String - translatedDiscountName: String - voucherCode: String - - """ - List of gift cards associated with this checkout. - """ - giftCards: [GiftCard] - - """ - The ID of the object. - """ - id: ID! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Shipping methods that can be used with this order. - """ - availableShippingMethods: [ShippingMethod]! - - """ - List of available payment gateways. - """ - availablePaymentGateways: [PaymentGateway!]! - - """ - Email of a customer. - """ - email: String! - - """ - Returns True, if checkout requires shipping. - """ - isShippingRequired: Boolean! - - """ - The number of items purchased. - """ - quantity: Int! - - """ - A list of checkout lines, each containing information about an item in the checkout. - """ - lines: [CheckoutLine] - - """ - The price of the shipping, with all the taxes included. - """ - shippingPrice: TaxedMoney - - """ - The shipping method related with checkout. - """ - shippingMethod: ShippingMethod - - """ - The price of the checkout before shipping, with taxes included. - """ - subtotalPrice: TaxedMoney - - """ - The checkout's token. - """ - token: UUID! - - """ - The sum of the the checkout line prices, with all the taxes,shipping costs, and discounts included. - """ - totalPrice: TaxedMoney - - """ - Checkout language code. - """ - languageCode: LanguageCodeEnum! -} - -""" -Adds a gift card or a voucher to a checkout. -""" -type CheckoutAddPromoCode { - """ - The checkout with the added gift card or voucher. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Update billing address in the existing checkout. -""" -type CheckoutBillingAddressUpdate { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation. -""" -type CheckoutComplete { - """ - Placed order. - """ - order: Order - - """ - Set to true if payment needs to be confirmed before checkout is complete. - """ - confirmationNeeded: Boolean! - - """ - Confirmation data used to process additional authorization steps. - """ - confirmationData: JSONString - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -type CheckoutCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [CheckoutCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type CheckoutCountableEdge { - """ - The item at the end of the edge. - """ - node: Checkout! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Create a new checkout. -""" -type CheckoutCreate { - """ - Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout.DEPRECATED: Will be removed in Saleor 4.0. Always returns True. - """ - created: Boolean - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! - checkout: Checkout -} - -input CheckoutCreateInput { - """ - Slug of a channel in which to create a checkout. - """ - channel: String - - """ - A list of checkout lines, each containing information about an item in the checkout. - """ - lines: [CheckoutLineInput]! - - """ - The customer's email address. - """ - email: String - - """ - The mailing address to where the checkout will be shipped. Note: the address will be ignored if the checkout doesn't contain shippable items. - """ - shippingAddress: AddressInput - - """ - Billing address of the customer. - """ - billingAddress: AddressInput - - """ - Checkout language code. - """ - languageCode: LanguageCodeEnum -} - -""" -Sets the customer as the owner of the checkout. -""" -type CheckoutCustomerAttach { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Removes the user assigned as the owner of the checkout. -""" -type CheckoutCustomerDetach { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Updates email address in the existing checkout object. -""" -type CheckoutEmailUpdate { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -type CheckoutError { - """ - 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: CheckoutErrorCode! - - """ - List of varint IDs which causes the error. - """ - variants: [ID!] - - """ - A type of address that causes the error. - """ - addressType: AddressTypeEnum -} - -""" -An enumeration. -""" -enum CheckoutErrorCode { - BILLING_ADDRESS_NOT_SET - CHECKOUT_NOT_FULLY_PAID - GRAPHQL_ERROR - PRODUCT_NOT_PUBLISHED - PRODUCT_UNAVAILABLE_FOR_PURCHASE - INSUFFICIENT_STOCK - INVALID - INVALID_SHIPPING_METHOD - NOT_FOUND - PAYMENT_ERROR - QUANTITY_GREATER_THAN_LIMIT - REQUIRED - SHIPPING_ADDRESS_NOT_SET - SHIPPING_METHOD_NOT_APPLICABLE - SHIPPING_METHOD_NOT_SET - SHIPPING_NOT_REQUIRED - TAX_ERROR - UNIQUE - VOUCHER_NOT_APPLICABLE - ZERO_QUANTITY - MISSING_CHANNEL_SLUG - CHANNEL_INACTIVE - UNAVAILABLE_VARIANT_IN_CHANNEL -} - -""" -Update language code in the existing checkout. -""" -type CheckoutLanguageCodeUpdate { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Represents an item in the checkout. -""" -type CheckoutLine implements Node { - """ - The ID of the object. - """ - id: ID! - variant: ProductVariant! - quantity: Int! - - """ - The sum of the checkout line price, taxes and discounts. - """ - totalPrice: TaxedMoney - - """ - Indicates whether the item need to be delivered. - """ - requiresShipping: Boolean -} - -type CheckoutLineCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [CheckoutLineCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type CheckoutLineCountableEdge { - """ - The item at the end of the edge. - """ - node: CheckoutLine! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Deletes a CheckoutLine. -""" -type CheckoutLineDelete { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -input CheckoutLineInput { - """ - The number of items purchased. - """ - quantity: Int! - - """ - ID of the product variant. - """ - variantId: ID! -} - -""" -Adds a checkout line to the existing checkout. -""" -type CheckoutLinesAdd { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Updates checkout line in the existing checkout. -""" -type CheckoutLinesUpdate { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Create a new payment for given checkout. -""" -type CheckoutPaymentCreate { - """ - Related checkout object. - """ - checkout: Checkout - - """ - A newly created payment. - """ - payment: Payment - paymentErrors: [PaymentError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PaymentError!]! -} - -""" -Remove a gift card or a voucher from a checkout. -""" -type CheckoutRemovePromoCode { - """ - The checkout with the removed gift card or voucher. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Update shipping address in the existing checkout. -""" -type CheckoutShippingAddressUpdate { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -""" -Updates the shipping address of the checkout. -""" -type CheckoutShippingMethodUpdate { - """ - An updated checkout. - """ - checkout: Checkout - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CheckoutError!]! -} - -type ChoiceValue { - raw: String - verbose: String -} - -""" -Represents a collection of products. -""" -type Collection implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - slug: String! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Description of the collection (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") - - """ - List of products in this collection. - """ - products( - """ - Filtering options for products. - """ - filter: ProductFilterInput - - """ - Sort products. - """ - sortBy: ProductOrder - - """ - 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 - ): ProductCountableConnection - backgroundImage( - """ - Size of the image. - """ - size: Int - ): Image - - """ - Returns translated collection fields for the given language code. - """ - translation( - """ - A language code to return the translation for collection. - """ - languageCode: LanguageCodeEnum! - ): CollectionTranslation - - """ - List of channels in which the collection is available. - """ - channelListings: [CollectionChannelListing!] -} - -""" -Adds products to a collection. -""" -type CollectionAddProducts { - """ - Collection to which products will be added. - """ - collection: Collection - collectionErrors: [CollectionError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CollectionError!]! -} - -""" -Deletes collections. -""" -type CollectionBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - collectionErrors: [CollectionError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CollectionError!]! -} - -""" -Represents collection channel listing. -""" -type CollectionChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - publicationDate: Date - isPublished: Boolean! - channel: Channel! -} - -type CollectionChannelListingError { - """ - 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: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] - - """ - List of channels IDs which causes the error. - """ - channels: [ID!] -} - -""" -Manage collection's availability in channels. -""" -type CollectionChannelListingUpdate { - """ - An updated collection instance. - """ - collection: Collection - collectionChannelListingErrors: [CollectionChannelListingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CollectionChannelListingError!]! -} - -input CollectionChannelListingUpdateInput { - """ - List of channels to which the collection should be assigned. - """ - addChannels: [PublishableChannelListingInput!] - - """ - List of channels from which the collection should be unassigned. - """ - removeChannels: [ID!] -} - -type CollectionCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [CollectionCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type CollectionCountableEdge { - """ - The item at the end of the edge. - """ - node: Collection! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new collection. -""" -type CollectionCreate { - collectionErrors: [CollectionError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CollectionError!]! - collection: Collection -} - -input CollectionCreateInput { - """ - Informs whether a collection is published. - """ - isPublished: Boolean - - """ - Name of the collection. - """ - name: String - - """ - Slug of the collection. - """ - slug: String - - """ - Description of the collection (JSON). - """ - description: JSONString - - """ - Background image file. - """ - backgroundImage: Upload - - """ - Alt text for an image. - """ - backgroundImageAlt: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: Date - - """ - List of products to be added to the collection. - """ - products: [ID] -} - -""" -Deletes a collection. -""" -type CollectionDelete { - collectionErrors: [CollectionError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CollectionError!]! - collection: Collection -} - -type CollectionError { - """ - 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 - - """ - List of products IDs which causes the error. - """ - products: [ID!] - - """ - The error code. - """ - code: CollectionErrorCode! -} - -""" -An enumeration. -""" -enum CollectionErrorCode { - DUPLICATED_INPUT_ITEM - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT -} - -input CollectionFilterInput { - published: CollectionPublished - search: String - metadata: [MetadataInput] - ids: [ID] - - """ - Specifies the channel by which the data should be sorted. - """ - channel: String -} - -input CollectionInput { - """ - Informs whether a collection is published. - """ - isPublished: Boolean - - """ - Name of the collection. - """ - name: String - - """ - Slug of the collection. - """ - slug: String - - """ - Description of the collection (JSON). - """ - description: JSONString - - """ - Background image file. - """ - backgroundImage: Upload - - """ - Alt text for an image. - """ - backgroundImageAlt: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: Date -} - -enum CollectionPublished { - PUBLISHED - HIDDEN -} - -""" -Remove products from a collection. -""" -type CollectionRemoveProducts { - """ - Collection from which products will be removed. - """ - collection: Collection - collectionErrors: [CollectionError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CollectionError!]! -} - -""" -Reorder the products of a collection. -""" -type CollectionReorderProducts { - """ - Collection from which products are reordered. - """ - collection: Collection - collectionErrors: [CollectionError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CollectionError!]! -} - -enum CollectionSortField { - """ - Sort collections by name. - """ - NAME - - """ - Sort collections by availability. - """ - AVAILABILITY - - """ - Sort collections by product count. - """ - PRODUCT_COUNT - - """ - Sort collections by publication date. - """ - PUBLICATION_DATE -} - -input CollectionSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort collections by the selected field. - """ - field: CollectionSortField! -} - -type CollectionTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - - """ - Description of the collection (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") - - """ - Returns translated collection fields for the given language code. - """ - translation( - """ - A language code to return the translation for collection. - """ - languageCode: LanguageCodeEnum! - ): CollectionTranslation - - """ - Represents a collection of products. - """ - collection: Collection -} - -""" -Creates/Updates translations for collection. -""" -type CollectionTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - collection: Collection -} - -type CollectionTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! - - """ - Translated description of the product (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") -} - -""" -Updates a collection. -""" -type CollectionUpdate { - collectionErrors: [CollectionError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [CollectionError!]! - collection: Collection -} - -""" -Stores information about a single configuration field. -""" -type ConfigurationItem { - """ - Name of the field. - """ - name: String! - - """ - Current value of the field. - """ - value: String - - """ - Type of the field. - """ - type: ConfigurationTypeFieldEnum - - """ - Help text for the field. - """ - helpText: String - - """ - Label for the field. - """ - label: String -} - -input ConfigurationItemInput { - """ - Name of the field to update. - """ - name: String! - - """ - Value of the given field to update. - """ - value: String -} - -""" -An enumeration. -""" -enum ConfigurationTypeFieldEnum { - STRING - MULTILINE - BOOLEAN - SECRET - PASSWORD - SECRETMULTILINE - OUTPUT -} - -""" -Confirm user account with token sent by email during registration. -""" -type ConfirmAccount { - """ - An activated user account. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Confirm the email change of the logged-in user. -""" -type ConfirmEmailChange { - """ - A user instance with a new email. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -An enumeration. -""" -enum CountryCode { - AF - AX - AL - DZ - AS - AD - AO - AI - AQ - AG - AR - AM - AW - AU - AT - AZ - BS - BH - BD - BB - BY - BE - BZ - BJ - BM - BT - BO - BQ - BA - BW - BV - BR - IO - BN - BG - BF - BI - CV - KH - CM - CA - KY - CF - TD - CL - CN - CX - CC - CO - KM - CG - CD - CK - CR - CI - HR - CU - CW - CY - CZ - DK - DJ - DM - DO - EC - EG - SV - GQ - ER - EE - SZ - ET - EU - FK - FO - FJ - FI - FR - GF - PF - TF - GA - GM - GE - DE - GH - GI - GR - GL - GD - GP - GU - GT - GG - GN - GW - GY - HT - HM - VA - HN - HK - HU - IS - IN - ID - IR - IQ - IE - IM - IL - IT - JM - JP - JE - JO - KZ - KE - KI - KW - KG - LA - LV - LB - LS - LR - LY - LI - LT - LU - MO - MG - MW - MY - MV - ML - MT - MH - MQ - MR - MU - YT - MX - FM - MD - MC - MN - ME - MS - MA - MZ - MM - NA - NR - NP - NL - NC - NZ - NI - NE - NG - NU - NF - KP - MK - MP - NO - OM - PK - PW - PS - PA - PG - PY - PE - PH - PN - PL - PT - PR - QA - RE - RO - RU - RW - BL - SH - KN - LC - MF - PM - VC - WS - SM - ST - SA - SN - RS - SC - SL - SG - SX - SK - SI - SB - SO - ZA - GS - KR - SS - ES - LK - SD - SR - SJ - SE - CH - SY - TW - TJ - TZ - TH - TL - TG - TK - TO - TT - TN - TR - TM - TC - TV - UG - UA - AE - GB - UM - US - UY - UZ - VU - VE - VN - VG - VI - WF - EH - YE - ZM - ZW -} - -type CountryDisplay { - """ - Country code. - """ - code: String! - - """ - Country name. - """ - country: String! - - """ - Country tax. - """ - vat: VAT -} - -""" -Create JWT token. -""" -type CreateToken { - """ - JWT token, required to authenticate. - """ - token: String - - """ - JWT refresh token, required to re-generate access token. - """ - refreshToken: String - - """ - CSRF token required to re-generate access token. - """ - csrfToken: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -type CreditCard { - """ - Card brand. - """ - brand: String! - - """ - First 4 digits of the card number. - """ - firstDigits: String - - """ - Last 4 digits of the card number. - """ - lastDigits: String! - - """ - Two-digit number representing the card’s expiration month. - """ - expMonth: Int - - """ - Four-digit number representing the card’s expiration year. - """ - expYear: Int -} - -""" -Deletes customers. -""" -type CustomerBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Creates a new customer. -""" -type CustomerCreate { - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - user: User -} - -""" -Deletes a customer. -""" -type CustomerDelete { - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - user: User -} - -""" -History log of the customer. -""" -type CustomerEvent implements Node { - """ - The ID of the object. - """ - id: ID! - - """ - Date when event happened at in ISO 8601 format. - """ - date: DateTime - - """ - Customer event type. - """ - type: CustomerEventsEnum - - """ - User who performed the action. - """ - user: User - - """ - Content of the event. - """ - message: String - - """ - Number of objects concerned by the event. - """ - count: Int - - """ - The concerned order. - """ - order: Order - - """ - The concerned order line. - """ - orderLine: OrderLine -} - -""" -An enumeration. -""" -enum CustomerEventsEnum { - ACCOUNT_CREATED - PASSWORD_RESET_LINK_SENT - PASSWORD_RESET - EMAIL_CHANGED_REQUEST - PASSWORD_CHANGED - EMAIL_CHANGED - PLACED_ORDER - NOTE_ADDED_TO_ORDER - DIGITAL_LINK_DOWNLOADED - CUSTOMER_DELETED - NAME_ASSIGNED - EMAIL_ASSIGNED - NOTE_ADDED -} - -input CustomerFilterInput { - dateJoined: DateRangeInput - numberOfOrders: IntRangeInput - placedOrders: DateRangeInput - search: String -} - -input CustomerInput { - """ - Billing address of the customer. - """ - defaultBillingAddress: AddressInput - - """ - Shipping address of the customer. - """ - defaultShippingAddress: AddressInput - - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - The unique email address of the user. - """ - email: String - - """ - User account is active. - """ - isActive: Boolean - - """ - A note about the user. - """ - note: String - - """ - User language code. - """ - languageCode: LanguageCodeEnum -} - -""" -Updates an existing customer. -""" -type CustomerUpdate { - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! - user: User -} - -""" -The `Date` scalar type represents a Date -value as specified by -[iso8601](https://en.wikipedia.org/wiki/ISO_8601). -""" -scalar Date - -input DateRangeInput { - """ - Start date. - """ - gte: Date - - """ - End date. - """ - lte: Date -} - -""" -The `DateTime` scalar type represents a DateTime -value as specified by -[iso8601](https://en.wikipedia.org/wiki/ISO_8601). -""" -scalar DateTime - -input DateTimeRangeInput { - """ - Start date. - """ - gte: DateTime - - """ - End date. - """ - lte: DateTime -} - -""" -Deactivate all JWT tokens of the currently authenticated user. -""" -type DeactivateAllUserTokens { - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Delete metadata of an object. -""" -type DeleteMetadata { - metadataErrors: [MetadataError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MetadataError!]! - item: ObjectWithMetadata -} - -""" -Delete object's private metadata. -""" -type DeletePrivateMetadata { - metadataErrors: [MetadataError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MetadataError!]! - item: ObjectWithMetadata -} - -type DigitalContent implements Node & ObjectWithMetadata { - useDefaultSettings: Boolean! - automaticFulfillment: Boolean! - contentFile: String! - maxDownloads: Int - urlValidDays: Int - - """ - List of URLs for the digital variant. - """ - urls: [DigitalContentUrl] - - """ - The ID of the object. - """ - id: ID! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Product variant assigned to digital content. - """ - productVariant: ProductVariant! -} - -type DigitalContentCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [DigitalContentCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type DigitalContentCountableEdge { - """ - The item at the end of the edge. - """ - node: DigitalContent! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec -""" -type DigitalContentCreate { - variant: ProductVariant - content: DigitalContent - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Remove digital content assigned to given variant. -""" -type DigitalContentDelete { - variant: ProductVariant - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -input DigitalContentInput { - """ - Use default digital content settings for this product. - """ - useDefaultSettings: Boolean! - - """ - Determines how many times a download link can be accessed by a customer. - """ - maxDownloads: Int - - """ - Determines for how many days a download link is active since it was generated. - """ - urlValidDays: Int - - """ - Overwrite default automatic_fulfillment setting for variant. - """ - automaticFulfillment: Boolean -} - -""" -Update digital content. -""" -type DigitalContentUpdate { - variant: ProductVariant - content: DigitalContent - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -input DigitalContentUploadInput { - """ - Use default digital content settings for this product. - """ - useDefaultSettings: Boolean! - - """ - Determines how many times a download link can be accessed by a customer. - """ - maxDownloads: Int - - """ - Determines for how many days a download link is active since it was generated. - """ - urlValidDays: Int - - """ - Overwrite default automatic_fulfillment setting for variant. - """ - automaticFulfillment: Boolean - - """ - Represents an file in a multipart request. - """ - contentFile: Upload! -} - -type DigitalContentUrl implements Node { - content: DigitalContent! - created: DateTime! - downloadNum: Int! - - """ - The ID of the object. - """ - id: ID! - - """ - URL for digital content. - """ - url: String - - """ - UUID of digital content. - """ - token: UUID! -} - -""" -Generate new URL to digital content. -""" -type DigitalContentUrlCreate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - digitalContentUrl: DigitalContentUrl -} - -input DigitalContentUrlCreateInput { - """ - Digital content ID which URL will belong to. - """ - content: ID! -} - -type DiscountError { - """ - 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 - - """ - List of products IDs which causes the error. - """ - products: [ID!] - - """ - The error code. - """ - code: DiscountErrorCode! - - """ - List of channels IDs which causes the error. - """ - channels: [ID!] -} - -""" -An enumeration. -""" -enum DiscountErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT - DUPLICATED_INPUT_ITEM -} - -enum DiscountStatusEnum { - ACTIVE - EXPIRED - SCHEDULED -} - -enum DiscountValueTypeEnum { - FIXED - PERCENTAGE -} - -""" -An enumeration. -""" -enum DistanceUnitsEnum { - CM - M - KM - FT - YD - INCH -} - -""" -Represents shop's domain. -""" -type Domain { - """ - The host name of the domain. - """ - host: String! - - """ - Inform if SSL is enabled. - """ - sslEnabled: Boolean! - - """ - Shop's absolute URL. - """ - url: String! -} - -""" -Deletes draft orders. -""" -type DraftOrderBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Completes creating an order. -""" -type DraftOrderComplete { - """ - Completed order. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Creates a new draft order. -""" -type DraftOrderCreate { - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! - order: Order -} - -input DraftOrderCreateInput { - """ - Billing address of the customer. - """ - billingAddress: AddressInput - user: ID - - """ - Email address of the customer. - """ - userEmail: String - - """ - Discount amount for the order. - """ - discount: PositiveDecimal - - """ - Shipping address of the customer. - """ - shippingAddress: AddressInput - - """ - ID of a selected shipping method. - """ - shippingMethod: ID - - """ - ID of the voucher associated with the order. - """ - voucher: ID - - """ - A note from a customer. Visible by customers in the order summary. - """ - customerNote: String - - """ - ID of the channel associated with the order. - """ - channel: ID - - """ - URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. - """ - redirectUrl: String - - """ - Variant line input consisting of variant ID and quantity of products. - """ - lines: [OrderLineCreateInput] -} - -""" -Deletes a draft order. -""" -type DraftOrderDelete { - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! - order: Order -} - -input DraftOrderInput { - """ - Billing address of the customer. - """ - billingAddress: AddressInput - user: ID - - """ - Email address of the customer. - """ - userEmail: String - - """ - Discount amount for the order. - """ - discount: PositiveDecimal - - """ - Shipping address of the customer. - """ - shippingAddress: AddressInput - - """ - ID of a selected shipping method. - """ - shippingMethod: ID - - """ - ID of the voucher associated with the order. - """ - voucher: ID - - """ - A note from a customer. Visible by customers in the order summary. - """ - customerNote: String - - """ - ID of the channel associated with the order. - """ - channel: ID - - """ - URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. - """ - redirectUrl: String -} - -""" -Deletes order lines. -""" -type DraftOrderLinesBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Updates a draft order. -""" -type DraftOrderUpdate { - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! - order: Order -} - -type ExportError { - """ - 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: ExportErrorCode! -} - -""" -An enumeration. -""" -enum ExportErrorCode { - INVALID - NOT_FOUND - REQUIRED -} - -""" -History log of export file. -""" -type ExportEvent implements Node { - """ - The ID of the object. - """ - id: ID! - - """ - Date when event happened at in ISO 8601 format. - """ - date: DateTime! - - """ - Export event type. - """ - type: ExportEventsEnum! - - """ - User who performed the action. - """ - user: User - - """ - App which performed the action. - """ - app: App - - """ - Content of the event. - """ - message: String! -} - -""" -An enumeration. -""" -enum ExportEventsEnum { - EXPORT_PENDING - EXPORT_SUCCESS - EXPORT_FAILED - EXPORT_DELETED - EXPORTED_FILE_SENT - EXPORT_FAILED_INFO_SENT -} - -""" -Represents a job data of exported file. -""" -type ExportFile implements Node & Job { - """ - The ID of the object. - """ - id: ID! - user: User - app: App - - """ - Job status. - """ - status: JobStatusEnum! - - """ - Created date time of job in ISO 8601 format. - """ - createdAt: DateTime! - - """ - Date time of job last update in ISO 8601 format. - """ - updatedAt: DateTime! - - """ - Job message. - """ - message: String - - """ - The URL of field to download. - """ - url: String - - """ - List of events associated with the export. - """ - events: [ExportEvent!] -} - -type ExportFileCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [ExportFileCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type ExportFileCountableEdge { - """ - The item at the end of the edge. - """ - node: ExportFile! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input ExportFileFilterInput { - createdAt: DateTimeRangeInput - updatedAt: DateTimeRangeInput - status: JobStatusEnum - user: String - app: String -} - -enum ExportFileSortField { - """ - Sort export file by status. - """ - STATUS - - """ - Sort export file by created at. - """ - CREATED_AT - - """ - Sort export file by updated at. - """ - UPDATED_AT -} - -input ExportFileSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort export file by the selected field. - """ - field: ExportFileSortField! -} - -input ExportInfoInput { - """ - List of attribute ids witch should be exported. - """ - attributes: [ID!] - - """ - List of warehouse ids witch should be exported. - """ - warehouses: [ID!] - - """ - List of channels ids which should be exported. - """ - channels: [ID!] - - """ - List of product fields witch should be exported. - """ - fields: [ProductFieldEnum!] -} - -""" -Export products to csv file. -""" -type ExportProducts { - """ - The newly created export file job which is responsible for export data. - """ - exportFile: ExportFile - exportErrors: [ExportError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ExportError!]! -} - -input ExportProductsInput { - """ - Determine which products should be exported. - """ - scope: ExportScope! - - """ - Filtering options for products. - """ - filter: ProductFilterInput - - """ - List of products IDS to export. - """ - ids: [ID!] - - """ - Input with info about fields which should be exported. - """ - exportInfo: ExportInfoInput - - """ - Type of exported file. - """ - fileType: FileTypesEnum! -} - -enum ExportScope { - """ - Export all products. - """ - ALL - - """ - Export products with given ids. - """ - IDS - - """ - Export the filtered products. - """ - FILTER -} - -type ExternalAuthentication { - """ - ID of external authentication plugin. - """ - id: String! - - """ - Name of external authentication plugin. - """ - name: String -} - -""" -Prepare external authentication url for user by custom plugin. -""" -type ExternalAuthenticationUrl { - """ - The data returned by authentication plugin. - """ - authenticationData: JSONString - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Logout user by custom plugin. -""" -type ExternalLogout { - """ - The data returned by authentication plugin. - """ - logoutData: JSONString - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Obtain external access tokens for user by custom plugin. -""" -type ExternalObtainAccessTokens { - """ - The token, required to authenticate. - """ - token: String - - """ - The refresh token, required to re-generate external access token. - """ - refreshToken: String - - """ - CSRF token required to re-generate external access token. - """ - csrfToken: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Refresh user's access by custom plugin. -""" -type ExternalRefresh { - """ - The token, required to authenticate. - """ - token: String - - """ - The refresh token, required to re-generate external access token. - """ - refreshToken: String - - """ - CSRF token required to re-generate external access token. - """ - csrfToken: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Verify external authentication data by plugin. -""" -type ExternalVerify { - """ - User assigned to data. - """ - user: User - - """ - Determine if authentication data is valid or not. - """ - isValid: Boolean! - - """ - External data. - """ - verifyData: JSONString - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -type File { - """ - The URL of the file. - """ - url: String! - - """ - Content type of the file. - """ - contentType: String -} - -""" -An enumeration. -""" -enum FileTypesEnum { - CSV - XLSX -} - -""" -Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec -""" -type FileUpload { - uploadedFile: File - uploadErrors: [UploadError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [UploadError!]! -} - -""" -Represents order fulfillment. -""" -type Fulfillment implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - fulfillmentOrder: Int! - status: FulfillmentStatus! - trackingNumber: String! - created: DateTime! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of lines for the fulfillment. - """ - lines: [FulfillmentLine] - - """ - User-friendly fulfillment status. - """ - statusDisplay: String - - """ - Warehouse from fulfillment was fulfilled. - """ - warehouse: Warehouse -} - -""" -Cancels existing fulfillment and optionally restocks items. -""" -type FulfillmentCancel { - """ - A canceled fulfillment. - """ - fulfillment: Fulfillment - - """ - Order which fulfillment was cancelled. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input FulfillmentCancelInput { - """ - ID of warehouse where items will be restock. - """ - warehouseId: ID! -} - -""" -Represents line of the fulfillment. -""" -type FulfillmentLine implements Node { - """ - The ID of the object. - """ - id: ID! - quantity: Int! - orderLine: OrderLine -} - -""" -Refund products. -""" -type FulfillmentRefundProducts { - """ - A refunded fulfillment. - """ - fulfillment: Fulfillment - - """ - Order which fulfillment was refunded. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Return products. -""" -type FulfillmentReturnProducts { - """ - A return fulfillment. - """ - returnFulfillment: Fulfillment - - """ - A replace fulfillment. - """ - replaceFulfillment: Fulfillment - - """ - Order which fulfillment was returned. - """ - order: Order - - """ - A draft order which was created for products with replace flag. - """ - replaceOrder: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -An enumeration. -""" -enum FulfillmentStatus { - """ - Fulfilled - """ - FULFILLED - - """ - Refunded - """ - REFUNDED - - """ - Returned - """ - RETURNED - - """ - Replaced - """ - REPLACED - - """ - Refunded and returned - """ - REFUNDED_AND_RETURNED - - """ - Canceled - """ - CANCELED -} - -""" -Updates a fulfillment for an order. -""" -type FulfillmentUpdateTracking { - """ - A fulfillment with updated tracking. - """ - fulfillment: Fulfillment - - """ - Order for which fulfillment was updated. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input FulfillmentUpdateTrackingInput { - """ - Fulfillment tracking number. - """ - trackingNumber: String - - """ - If true, send an email notification to the customer. - """ - notifyCustomer: Boolean = false -} - -""" -Payment gateway client configuration key and value pair. -""" -type GatewayConfigLine { - """ - Gateway config key. - """ - field: String! - - """ - Gateway config value for key. - """ - value: String -} - -""" -The `GenericScalar` scalar type represents a generic -GraphQL scalar value that could be: -String, Boolean, Int, Float, List or Object. -""" -scalar GenericScalar - -""" -A gift card is a prepaid electronic payment card accepted in stores. They can be used during checkout by providing a valid gift card codes. -""" -type GiftCard implements Node { - """ - Gift card code. - """ - code: String - - """ - The customer who bought a gift card. - """ - user: User - created: DateTime! - startDate: Date! - endDate: Date - lastUsedOn: DateTime - isActive: Boolean! - initialBalance: Money - currentBalance: Money - - """ - The ID of the object. - """ - id: ID! - - """ - Code in format which allows displaying in a user interface. - """ - displayCode: String -} - -""" -Activate a gift card. -""" -type GiftCardActivate { - """ - A gift card to activate. - """ - giftCard: GiftCard - giftCardErrors: [GiftCardError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [GiftCardError!]! -} - -type GiftCardCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [GiftCardCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type GiftCardCountableEdge { - """ - The item at the end of the edge. - """ - node: GiftCard! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new gift card. -""" -type GiftCardCreate { - giftCardErrors: [GiftCardError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [GiftCardError!]! - giftCard: GiftCard -} - -input GiftCardCreateInput { - """ - Start date of the gift card in ISO 8601 format. - """ - startDate: Date - - """ - End date of the gift card in ISO 8601 format. - """ - endDate: Date - - """ - Value of the gift card. - """ - balance: PositiveDecimal - - """ - The customer's email of the gift card buyer. - """ - userEmail: String - - """ - Code to use the gift card. - """ - code: String -} - -""" -Deactivate a gift card. -""" -type GiftCardDeactivate { - """ - A gift card to deactivate. - """ - giftCard: GiftCard - giftCardErrors: [GiftCardError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [GiftCardError!]! -} - -type GiftCardError { - """ - 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: GiftCardErrorCode! -} - -""" -An enumeration. -""" -enum GiftCardErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -""" -Update a gift card. -""" -type GiftCardUpdate { - giftCardErrors: [GiftCardError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [GiftCardError!]! - giftCard: GiftCard -} - -input GiftCardUpdateInput { - """ - Start date of the gift card in ISO 8601 format. - """ - startDate: Date - - """ - End date of the gift card in ISO 8601 format. - """ - endDate: Date - - """ - Value of the gift card. - """ - balance: PositiveDecimal - - """ - The customer's email of the gift card buyer. - """ - userEmail: String -} - -""" -Represents permission group data. -""" -type Group implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - List of group permissions - """ - permissions: [Permission] - - """ - List of group users - """ - users: [User] - - """ - True, if the currently authenticated user has rights to manage a group. - """ - userCanManage: Boolean! -} - -type GroupCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [GroupCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type GroupCountableEdge { - """ - The item at the end of the edge. - """ - node: Group! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Represents an image. -""" -type Image { - """ - The URL of the image. - """ - url: String! - - """ - Alt text for an image. - """ - alt: String -} - -input IntRangeInput { - """ - Value greater than or equal to. - """ - gte: Int - - """ - Value less than or equal to. - """ - lte: Int -} - -""" -Represents an Invoice. -""" -type Invoice implements ObjectWithMetadata & Job & Node { - """ - The ID of the object. - """ - id: ID! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Job status. - """ - status: JobStatusEnum! - number: String - externalUrl: String - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - Created date time of job in ISO 8601 format. - """ - createdAt: DateTime! - - """ - Date time of job last update in ISO 8601 format. - """ - updatedAt: DateTime! - - """ - Job message. - """ - message: String - - """ - URL to download an invoice. - """ - url: String -} - -""" -Creates a ready to send invoice. -""" -type InvoiceCreate { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [InvoiceError!]! - invoice: Invoice -} - -input InvoiceCreateInput { - """ - Invoice number. - """ - number: String! - - """ - URL of an invoice to download. - """ - url: String! -} - -""" -Deletes an invoice. -""" -type InvoiceDelete { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [InvoiceError!]! - invoice: Invoice -} - -type InvoiceError { - """ - 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: InvoiceErrorCode! -} - -""" -An enumeration. -""" -enum InvoiceErrorCode { - REQUIRED - NOT_READY - URL_NOT_SET - EMAIL_NOT_SET - NUMBER_NOT_SET - NOT_FOUND - INVALID_STATUS -} - -""" -Request an invoice for the order using plugin. -""" -type InvoiceRequest { - """ - Order related to an invoice. - """ - order: Order - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [InvoiceError!]! - invoice: Invoice -} - -""" -Requests deletion of an invoice. -""" -type InvoiceRequestDelete { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [InvoiceError!]! - invoice: Invoice -} - -""" -Send an invoice notification to the customer. -""" -type InvoiceSendNotification { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [InvoiceError!]! - invoice: Invoice -} - -""" -Updates an invoice. -""" -type InvoiceUpdate { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [InvoiceError!]! - invoice: Invoice -} - -""" -Allows use of a JSON String for input / output from the GraphQL schema. - -Use of this type is *not recommended* as you lose the benefits of having a defined, static -schema (one of the key benefits of GraphQL). -""" -scalar JSONString - -interface Job { - """ - Job status. - """ - status: JobStatusEnum! - - """ - Created date time of job in ISO 8601 format. - """ - createdAt: DateTime! - - """ - Date time of job last update in ISO 8601 format. - """ - updatedAt: DateTime! - - """ - Job message. - """ - message: String -} - -""" -An enumeration. -""" -enum JobStatusEnum { - PENDING - SUCCESS - FAILED - DELETED -} - -""" -An enumeration. -""" -enum LanguageCodeEnum { - AR - AZ - BG - BN - CA - CS - DA - DE - EL - EN - ES - ES_CO - ET - FA - FI - FR - HI - HU - HY - ID - IS - IT - JA - KA - KM - KO - LT - MN - MY - NB - NL - PL - PT - PT_BR - RO - RU - SK - SL - SQ - SR - SV - SW - TA - TH - TR - UK - VI - ZH_HANS - ZH_HANT -} - -type LanguageDisplay { - """ - ISO 639 representation of the language name. - """ - code: LanguageCodeEnum! - - """ - Full name of the language. - """ - language: String! -} - -type LimitInfo { - """ - Defines the current resource usage. - """ - currentUsage: Limits! - - """ - Defines the allowed maximum resource usage, null means unlimited. - """ - allowedUsage: Limits! -} - -type Limits { - channels: Int - orders: Int - productVariants: Int - staffUsers: Int - warehouses: Int -} - -""" -The manifest definition. -""" -type Manifest { - identifier: String! - version: String! - name: String! - about: String - permissions: [Permission] - appUrl: String - configurationUrl: String - tokenTargetUrl: String - dataPrivacy: String - dataPrivacyUrl: String - homepageUrl: String - supportUrl: String -} - -type Margin { - start: Int - stop: Int -} - -""" -An enumeration. -""" -enum MeasurementUnitsEnum { - CM - M - KM - FT - YD - INCH - SQ_CM - SQ_M - SQ_KM - SQ_FT - SQ_YD - SQ_INCH - CUBIC_MILLIMETER - CUBIC_CENTIMETER - CUBIC_DECIMETER - CUBIC_METER - LITER - CUBIC_FOOT - CUBIC_INCH - CUBIC_YARD - QT - PINT - FL_OZ - ACRE_IN - ACRE_FT - G - LB - OZ - KG - TONNE -} - -""" -Represents a single menu - an object that is used to help navigate through the store. -""" -type Menu implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - slug: String! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - items: [MenuItem] -} - -""" -Deletes menus. -""" -type MenuBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! -} - -type MenuCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [MenuCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type MenuCountableEdge { - """ - The item at the end of the edge. - """ - node: Menu! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new Menu. -""" -type MenuCreate { - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! - menu: Menu -} - -input MenuCreateInput { - """ - Name of the menu. - """ - name: String! - - """ - Slug of the menu. Will be generated if not provided. - """ - slug: String - - """ - List of menu items. - """ - items: [MenuItemInput] -} - -""" -Deletes a menu. -""" -type MenuDelete { - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! - menu: Menu -} - -type MenuError { - """ - 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: MenuErrorCode! -} - -""" -An enumeration. -""" -enum MenuErrorCode { - CANNOT_ASSIGN_NODE - GRAPHQL_ERROR - INVALID - INVALID_MENU_ITEM - NO_MENU_ITEM_PROVIDED - NOT_FOUND - REQUIRED - TOO_MANY_MENU_ITEMS - UNIQUE -} - -input MenuFilterInput { - search: String - slug: [String] - metadata: [MetadataInput] -} - -input MenuInput { - """ - Name of the menu. - """ - name: String - - """ - Slug of the menu. - """ - slug: String -} - -""" -Represents a single item of the related menu. Can store categories, collection or pages. -""" -type MenuItem implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - menu: Menu! - parent: MenuItem - category: Category - collection: Collection - page: Page - level: Int! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - children: [MenuItem] - - """ - URL to the menu item. - """ - url: String - - """ - Returns translated menu item fields for the given language code. - """ - translation( - """ - A language code to return the translation for menu item. - """ - languageCode: LanguageCodeEnum! - ): MenuItemTranslation -} - -""" -Deletes menu items. -""" -type MenuItemBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! -} - -type MenuItemCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [MenuItemCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type MenuItemCountableEdge { - """ - The item at the end of the edge. - """ - node: MenuItem! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new menu item. -""" -type MenuItemCreate { - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! - menuItem: MenuItem -} - -input MenuItemCreateInput { - """ - Name of the menu item. - """ - name: String! - - """ - URL of the pointed item. - """ - url: String - - """ - Category to which item points. - """ - category: ID - - """ - Collection to which item points. - """ - collection: ID - - """ - Page to which item points. - """ - page: ID - - """ - Menu to which item belongs. - """ - menu: ID! - - """ - ID of the parent menu. If empty, menu will be top level menu. - """ - parent: ID -} - -""" -Deletes a menu item. -""" -type MenuItemDelete { - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! - menuItem: MenuItem -} - -input MenuItemFilterInput { - search: String - metadata: [MetadataInput] -} - -input MenuItemInput { - """ - Name of the menu item. - """ - name: String - - """ - URL of the pointed item. - """ - url: String - - """ - Category to which item points. - """ - category: ID - - """ - Collection to which item points. - """ - collection: ID - - """ - Page to which item points. - """ - page: ID -} - -""" -Moves items of menus. -""" -type MenuItemMove { - """ - Assigned menu to move within. - """ - menu: Menu - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! -} - -input MenuItemMoveInput { - """ - The menu item ID to move. - """ - itemId: ID! - - """ - ID of the parent menu. If empty, menu will be top level menu. - """ - parentId: ID - - """ - The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. - """ - sortOrder: Int -} - -input MenuItemSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort menu items by the selected field. - """ - field: MenuItemsSortField! -} - -type MenuItemTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated menu item fields for the given language code. - """ - translation( - """ - A language code to return the translation for menu item. - """ - languageCode: LanguageCodeEnum! - ): MenuItemTranslation - - """ - Represents a single item of the related menu. Can store categories, collection or pages. - """ - menuItem: MenuItem -} - -""" -Creates/Updates translations for Menu Item. -""" -type MenuItemTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - menuItem: MenuItem -} - -type MenuItemTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -Updates a menu item. -""" -type MenuItemUpdate { - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! - menuItem: MenuItem -} - -enum MenuItemsSortField { - """ - Sort menu items by name. - """ - NAME -} - -enum MenuSortField { - """ - Sort menus by name. - """ - NAME - - """ - Sort menus by items count. - """ - ITEMS_COUNT -} - -input MenuSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort menus by the selected field. - """ - field: MenuSortField! -} - -""" -Updates a menu. -""" -type MenuUpdate { - menuErrors: [MenuError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MenuError!]! - menu: Menu -} - -type MetadataError { - """ - 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: MetadataErrorCode! -} - -""" -An enumeration. -""" -enum MetadataErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED -} - -input MetadataInput { - """ - Key of a metadata item. - """ - key: String! - - """ - Value of a metadata item. - """ - value: String! -} - -type MetadataItem { - """ - Key of a metadata item. - """ - key: String! - - """ - Value of a metadata item. - """ - value: String! -} - -""" -Represents amount of money in specific currency. -""" -type Money { - """ - Currency code. - """ - currency: String! - - """ - Amount of money. - """ - amount: Float! -} - -""" -Represents a range of amounts of money. -""" -type MoneyRange { - """ - Lower bound of a price range. - """ - start: Money - - """ - Upper bound of a price range. - """ - stop: Money -} - -input MoveProductInput { - """ - The ID of the product to move. - """ - productId: ID! - - """ - The relative sorting position of the product (from -inf to +inf) starting from the first given product's actual position.1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. - """ - sortOrder: Int -} - -type Mutation { - """ - Creates a new webhook subscription. - """ - webhookCreate( - """ - Fields required to create a webhook. - """ - input: WebhookCreateInput! - ): WebhookCreate - - """ - Deletes a webhook subscription. - """ - webhookDelete( - """ - ID of a webhook to delete. - """ - id: ID! - ): WebhookDelete - - """ - Updates a webhook subscription. - """ - webhookUpdate( - """ - ID of a webhook to update. - """ - id: ID! - - """ - Fields required to update a webhook. - """ - input: WebhookUpdateInput! - ): WebhookUpdate - - """ - Creates new warehouse. - """ - createWarehouse( - """ - Fields required to create warehouse. - """ - input: WarehouseCreateInput! - ): WarehouseCreate - - """ - Updates given warehouse. - """ - updateWarehouse( - """ - ID of a warehouse to update. - """ - id: ID! - - """ - Fields required to update warehouse. - """ - input: WarehouseUpdateInput! - ): WarehouseUpdate - - """ - Deletes selected warehouse. - """ - deleteWarehouse( - """ - ID of a warehouse to delete. - """ - id: ID! - ): WarehouseDelete - - """ - Add shipping zone to given warehouse. - """ - assignWarehouseShippingZone( - """ - ID of a warehouse to update. - """ - id: ID! - - """ - List of shipping zone IDs. - """ - shippingZoneIds: [ID!]! - ): WarehouseShippingZoneAssign - - """ - Remove shipping zone from given warehouse. - """ - unassignWarehouseShippingZone( - """ - ID of a warehouse to update. - """ - id: ID! - - """ - List of shipping zone IDs. - """ - shippingZoneIds: [ID!]! - ): WarehouseShippingZoneUnassign - - """ - Creates a new staff notification recipient. - """ - staffNotificationRecipientCreate( - """ - Fields required to create a staff notification recipient. - """ - input: StaffNotificationRecipientInput! - ): StaffNotificationRecipientCreate - - """ - Updates a staff notification recipient. - """ - staffNotificationRecipientUpdate( - """ - ID of a staff notification recipient to update. - """ - id: ID! - - """ - Fields required to update a staff notification recipient. - """ - input: StaffNotificationRecipientInput! - ): StaffNotificationRecipientUpdate - - """ - Delete staff notification recipient. - """ - staffNotificationRecipientDelete( - """ - ID of a staff notification recipient to delete. - """ - id: ID! - ): StaffNotificationRecipientDelete - - """ - Updates site domain of the shop. - """ - shopDomainUpdate( - """ - Fields required to update site. - """ - input: SiteDomainInput - ): ShopDomainUpdate - - """ - Updates shop settings. - """ - shopSettingsUpdate( - """ - Fields required to update shop settings. - """ - input: ShopSettingsInput! - ): ShopSettingsUpdate - - """ - Fetch tax rates. - """ - shopFetchTaxRates: ShopFetchTaxRates - - """ - Creates/Updates translations for Shop Settings. - """ - shopSettingsTranslate( - """ - Fields required to update shop settings translations. - """ - input: ShopSettingsTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): ShopSettingsTranslate - - """ - Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. - """ - shopAddressUpdate( - """ - Fields required to update shop address. - """ - input: AddressInput - ): ShopAddressUpdate - - """ - Update shop order settings. - """ - orderSettingsUpdate( - """ - Fields required to update shop order settings. - """ - input: OrderSettingsUpdateInput! - ): OrderSettingsUpdate - - """ - Manage shipping method's availability in channels. - """ - shippingMethodChannelListingUpdate( - """ - ID of a shipping method to update. - """ - id: ID! - - """ - Fields required to update shipping method channel listings. - """ - input: ShippingMethodChannelListingInput! - ): ShippingMethodChannelListingUpdate - - """ - Creates a new shipping price. - """ - shippingPriceCreate( - """ - Fields required to create a shipping price. - """ - input: ShippingPriceInput! - ): ShippingPriceCreate - - """ - Deletes a shipping price. - """ - shippingPriceDelete( - """ - ID of a shipping price to delete. - """ - id: ID! - ): ShippingPriceDelete - - """ - Deletes shipping prices. - """ - shippingPriceBulkDelete( - """ - List of shipping price IDs to delete. - """ - ids: [ID]! - ): ShippingPriceBulkDelete - - """ - Updates a new shipping price. - """ - shippingPriceUpdate( - """ - ID of a shipping price to update. - """ - id: ID! - - """ - Fields required to update a shipping price. - """ - input: ShippingPriceInput! - ): ShippingPriceUpdate - - """ - Creates/Updates translations for shipping method. - """ - shippingPriceTranslate( - """ - Shipping method ID. - """ - id: ID! - input: ShippingPriceTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): ShippingPriceTranslate - - """ - Exclude products from shipping price. - """ - shippingPriceExcludeProducts( - """ - ID of a shipping price. - """ - id: ID! - - """ - Exclude products input. - """ - input: ShippingPriceExcludeProductsInput! - ): ShippingPriceExcludeProducts - - """ - Remove product from excluded list for shipping price. - """ - shippingPriceRemoveProductFromExclude( - """ - ID of a shipping price. - """ - id: ID! - - """ - List of products which will be removed from excluded list. - """ - products: [ID]! - ): ShippingPriceRemoveProductFromExclude - - """ - Creates a new shipping zone. - """ - shippingZoneCreate( - """ - Fields required to create a shipping zone. - """ - input: ShippingZoneCreateInput! - ): ShippingZoneCreate - - """ - Deletes a shipping zone. - """ - shippingZoneDelete( - """ - ID of a shipping zone to delete. - """ - id: ID! - ): ShippingZoneDelete - - """ - Deletes shipping zones. - """ - shippingZoneBulkDelete( - """ - List of shipping zone IDs to delete. - """ - ids: [ID]! - ): ShippingZoneBulkDelete - - """ - Updates a new shipping zone. - """ - shippingZoneUpdate( - """ - ID of a shipping zone to update. - """ - id: ID! - - """ - Fields required to update a shipping zone. - """ - input: ShippingZoneUpdateInput! - ): ShippingZoneUpdate - - """ - Assign attributes to a given product type. - """ - productAttributeAssign( - """ - The operations to perform. - """ - operations: [ProductAttributeAssignInput]! - - """ - ID of the product type to assign the attributes into. - """ - productTypeId: ID! - ): ProductAttributeAssign - - """ - Un-assign attributes from a given product type. - """ - productAttributeUnassign( - """ - The IDs of the attributes to unassign. - """ - attributeIds: [ID]! - - """ - ID of the product type from which the attributes should be unassigned. - """ - productTypeId: ID! - ): ProductAttributeUnassign - - """ - Creates a new category. - """ - categoryCreate( - """ - Fields required to create a category. - """ - input: CategoryInput! - - """ - ID of the parent category. If empty, category will be top level category. - """ - parent: ID - ): CategoryCreate - - """ - Deletes a category. - """ - categoryDelete( - """ - ID of a category to delete. - """ - id: ID! - ): CategoryDelete - - """ - Deletes categories. - """ - categoryBulkDelete( - """ - List of category IDs to delete. - """ - ids: [ID]! - ): CategoryBulkDelete - - """ - Updates a category. - """ - categoryUpdate( - """ - ID of a category to update. - """ - id: ID! - - """ - Fields required to update a category. - """ - input: CategoryInput! - ): CategoryUpdate - - """ - Creates/Updates translations for Category. - """ - categoryTranslate( - """ - Category ID. - """ - id: ID! - input: TranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): CategoryTranslate - - """ - Adds products to a collection. - """ - collectionAddProducts( - """ - ID of a collection. - """ - collectionId: ID! - - """ - List of product IDs. - """ - products: [ID]! - ): CollectionAddProducts - - """ - Creates a new collection. - """ - collectionCreate( - """ - Fields required to create a collection. - """ - input: CollectionCreateInput! - ): CollectionCreate - - """ - Deletes a collection. - """ - collectionDelete( - """ - ID of a collection to delete. - """ - id: ID! - ): CollectionDelete - - """ - Reorder the products of a collection. - """ - collectionReorderProducts( - """ - ID of a collection. - """ - collectionId: ID! - - """ - The collection products position operations. - """ - moves: [MoveProductInput]! - ): CollectionReorderProducts - - """ - Deletes collections. - """ - collectionBulkDelete( - """ - List of collection IDs to delete. - """ - ids: [ID]! - ): CollectionBulkDelete - - """ - Remove products from a collection. - """ - collectionRemoveProducts( - """ - ID of a collection. - """ - collectionId: ID! - - """ - List of product IDs. - """ - products: [ID]! - ): CollectionRemoveProducts - - """ - Updates a collection. - """ - collectionUpdate( - """ - ID of a collection to update. - """ - id: ID! - - """ - Fields required to update a collection. - """ - input: CollectionInput! - ): CollectionUpdate - - """ - Creates/Updates translations for collection. - """ - collectionTranslate( - """ - Collection ID. - """ - id: ID! - input: TranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): CollectionTranslate - - """ - Manage collection's availability in channels. - """ - collectionChannelListingUpdate( - """ - ID of a collection to update. - """ - id: ID! - - """ - Fields required to create or update collection channel listings. - """ - input: CollectionChannelListingUpdateInput! - ): CollectionChannelListingUpdate - - """ - Creates a new product. - """ - productCreate( - """ - Fields required to create a product. - """ - input: ProductCreateInput! - ): ProductCreate - - """ - Deletes a product. - """ - productDelete( - """ - ID of a product to delete. - """ - id: ID! - ): ProductDelete - - """ - Deletes products. - """ - productBulkDelete( - """ - List of product IDs to delete. - """ - ids: [ID]! - ): ProductBulkDelete - - """ - Updates an existing product. - """ - productUpdate( - """ - ID of a product to update. - """ - id: ID! - - """ - Fields required to update a product. - """ - input: ProductInput! - ): ProductUpdate - - """ - Creates/Updates translations for Product. - """ - productTranslate( - """ - Product ID. - """ - id: ID! - input: TranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): ProductTranslate - - """ - Manage product's availability in channels. - """ - productChannelListingUpdate( - """ - ID of a product to update. - """ - id: ID! - - """ - Fields required to create or update product channel listings. - """ - input: ProductChannelListingUpdateInput! - ): ProductChannelListingUpdate - - """ - Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec - """ - productMediaCreate( - """ - Fields required to create a product media. - """ - input: ProductMediaCreateInput! - ): ProductMediaCreate - - """ - Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. - """ - productVariantReorder( - """ - The list of variant reordering operations. - """ - moves: [ReorderInput]! - - """ - Id of product that variants order will be altered. - """ - productId: ID! - ): ProductVariantReorder - - """ - Deletes a product media. - """ - productMediaDelete( - """ - ID of a product media to delete. - """ - id: ID! - ): ProductMediaDelete - - """ - Deletes product media. - """ - productMediaBulkDelete( - """ - List of product media IDs to delete. - """ - ids: [ID]! - ): ProductMediaBulkDelete - - """ - Changes ordering of the product media. - """ - productMediaReorder( - """ - IDs of a product media in the desired order. - """ - mediaIds: [ID]! - - """ - ID of product that media order will be altered. - """ - productId: ID! - ): ProductMediaReorder - - """ - Updates a product media. - """ - productMediaUpdate( - """ - ID of a product media to update. - """ - id: ID! - - """ - Fields required to update a product media. - """ - input: ProductMediaUpdateInput! - ): ProductMediaUpdate - - """ - Creates a new product type. - """ - productTypeCreate( - """ - Fields required to create a product type. - """ - input: ProductTypeInput! - ): ProductTypeCreate - - """ - Deletes a product type. - """ - productTypeDelete( - """ - ID of a product type to delete. - """ - id: ID! - ): ProductTypeDelete - - """ - Deletes product types. - """ - productTypeBulkDelete( - """ - List of product type IDs to delete. - """ - ids: [ID]! - ): ProductTypeBulkDelete - - """ - Updates an existing product type. - """ - productTypeUpdate( - """ - ID of a product type to update. - """ - id: ID! - - """ - Fields required to update a product type. - """ - input: ProductTypeInput! - ): ProductTypeUpdate - - """ - Reorder the attributes of a product type. - """ - productTypeReorderAttributes( - """ - The list of attribute reordering operations. - """ - moves: [ReorderInput]! - - """ - ID of a product type. - """ - productTypeId: ID! - - """ - The attribute type to reorder. - """ - type: ProductAttributeType! - ): ProductTypeReorderAttributes - - """ - Reorder product attribute values. - """ - productReorderAttributeValues( - """ - ID of an attribute. - """ - attributeId: ID! - - """ - The list of reordering operations for given attribute values. - """ - moves: [ReorderInput]! - - """ - ID of a product. - """ - productId: ID! - ): ProductReorderAttributeValues - - """ - Create new digital content. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec - """ - digitalContentCreate( - """ - Fields required to create a digital content. - """ - input: DigitalContentUploadInput! - - """ - ID of a product variant to upload digital content. - """ - variantId: ID! - ): DigitalContentCreate - - """ - Remove digital content assigned to given variant. - """ - digitalContentDelete( - """ - ID of a product variant with digital content to remove. - """ - variantId: ID! - ): DigitalContentDelete - - """ - Update digital content. - """ - digitalContentUpdate( - """ - Fields required to update a digital content. - """ - input: DigitalContentInput! - - """ - ID of a product variant with digital content to update. - """ - variantId: ID! - ): DigitalContentUpdate - - """ - Generate new URL to digital content. - """ - digitalContentUrlCreate( - """ - Fields required to create a new url. - """ - input: DigitalContentUrlCreateInput! - ): DigitalContentUrlCreate - - """ - Creates a new variant for a product. - """ - productVariantCreate( - """ - Fields required to create a product variant. - """ - input: ProductVariantCreateInput! - ): ProductVariantCreate - - """ - Deletes a product variant. - """ - productVariantDelete( - """ - ID of a product variant to delete. - """ - id: ID! - ): ProductVariantDelete - - """ - Creates product variants for a given product. - """ - productVariantBulkCreate( - """ - ID of the product to create the variants for. - """ - product: ID! - - """ - Input list of product variants to create. - """ - variants: [ProductVariantBulkCreateInput]! - ): ProductVariantBulkCreate - - """ - Deletes product variants. - """ - productVariantBulkDelete( - """ - List of product variant IDs to delete. - """ - ids: [ID]! - ): ProductVariantBulkDelete - - """ - Creates stocks for product variant. - """ - productVariantStocksCreate( - """ - Input list of stocks to create. - """ - stocks: [StockInput!]! - - """ - ID of a product variant for which stocks will be created. - """ - variantId: ID! - ): ProductVariantStocksCreate - - """ - Delete stocks from product variant. - """ - productVariantStocksDelete( - """ - ID of product variant for which stocks will be deleted. - """ - variantId: ID! - warehouseIds: [ID!] - ): ProductVariantStocksDelete - - """ - Update stocks for product variant. - """ - productVariantStocksUpdate( - """ - Input list of stocks to create. - """ - stocks: [StockInput!]! - - """ - ID of a product variant for which stocks will be created. - """ - variantId: ID! - ): ProductVariantStocksUpdate - - """ - Updates an existing variant for product. - """ - productVariantUpdate( - """ - ID of a product variant to update. - """ - id: ID! - - """ - Fields required to update a product variant. - """ - input: ProductVariantInput! - ): ProductVariantUpdate - - """ - Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. - """ - productVariantSetDefault( - """ - Id of a product that will have the default variant set. - """ - productId: ID! - - """ - Id of a variant that will be set as default. - """ - variantId: ID! - ): ProductVariantSetDefault - - """ - Creates/Updates translations for Product Variant. - """ - productVariantTranslate( - """ - Product Variant ID. - """ - id: ID! - input: NameTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): ProductVariantTranslate - - """ - Manage product variant prices in channels. - """ - productVariantChannelListingUpdate( - """ - ID of a product variant to update. - """ - id: ID! - - """ - ('List of fields required to create or upgrade product variant ', 'channel listings.') - """ - input: [ProductVariantChannelListingAddInput!]! - ): ProductVariantChannelListingUpdate - - """ - Reorder product variant attribute values. - """ - productVariantReorderAttributeValues( - """ - ID of an attribute. - """ - attributeId: ID! - - """ - The list of reordering operations for given attribute values. - """ - moves: [ReorderInput]! - - """ - ID of a product variant. - """ - variantId: ID! - ): ProductVariantReorderAttributeValues - - """ - Assign an media to a product variant. - """ - variantMediaAssign( - """ - ID of a product media to assign to a variant. - """ - mediaId: ID! - - """ - ID of a product variant. - """ - variantId: ID! - ): VariantMediaAssign - - """ - Unassign an media from a product variant. - """ - variantMediaUnassign( - """ - ID of a product media to unassign from a variant. - """ - mediaId: ID! - - """ - ID of a product variant. - """ - variantId: ID! - ): VariantMediaUnassign - - """ - Captures the authorized payment amount. - """ - paymentCapture( - """ - Transaction amount. - """ - amount: PositiveDecimal - - """ - Payment ID. - """ - paymentId: ID! - ): PaymentCapture - - """ - Refunds the captured payment amount. - """ - paymentRefund( - """ - Transaction amount. - """ - amount: PositiveDecimal - - """ - Payment ID. - """ - paymentId: ID! - ): PaymentRefund - - """ - Voids the authorized payment. - """ - paymentVoid( - """ - Payment ID. - """ - paymentId: ID! - ): PaymentVoid - - """ - Initializes payment process when it is required by gateway. - """ - paymentInitialize( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - A gateway name used to initialize the payment. - """ - gateway: String! - - """ - Client-side generated data required to initialize the payment. - """ - paymentData: JSONString - ): PaymentInitialize - - """ - Creates a new page. - """ - pageCreate( - """ - Fields required to create a page. - """ - input: PageCreateInput! - ): PageCreate - - """ - Deletes a page. - """ - pageDelete( - """ - ID of a page to delete. - """ - id: ID! - ): PageDelete - - """ - Deletes pages. - """ - pageBulkDelete( - """ - List of page IDs to delete. - """ - ids: [ID]! - ): PageBulkDelete - - """ - Publish pages. - """ - pageBulkPublish( - """ - List of page IDs to (un)publish. - """ - ids: [ID]! - - """ - Determine if pages will be published or not. - """ - isPublished: Boolean! - ): PageBulkPublish - - """ - Updates an existing page. - """ - pageUpdate( - """ - ID of a page to update. - """ - id: ID! - - """ - Fields required to update a page. - """ - input: PageInput! - ): PageUpdate - - """ - Creates/Updates translations for Page. - """ - pageTranslate( - """ - Page ID. - """ - id: ID! - input: PageTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): PageTranslate - - """ - Create a new page type. - """ - pageTypeCreate( - """ - Fields required to create page type. - """ - input: PageTypeCreateInput! - ): PageTypeCreate - - """ - Update page type. - """ - pageTypeUpdate( - """ - ID of the page type to update. - """ - id: ID - - """ - Fields required to update page type. - """ - input: PageTypeUpdateInput! - ): PageTypeUpdate - - """ - Delete a page type. - """ - pageTypeDelete( - """ - ID of the page type to delete. - """ - id: ID! - ): PageTypeDelete - - """ - Delete page types. - """ - pageTypeBulkDelete( - """ - List of page type IDs to delete - """ - ids: [ID!]! - ): PageTypeBulkDelete - - """ - Assign attributes to a given page type. - """ - pageAttributeAssign( - """ - The IDs of the attributes to assign. - """ - attributeIds: [ID!]! - - """ - ID of the page type to assign the attributes into. - """ - pageTypeId: ID! - ): PageAttributeAssign - - """ - Unassign attributes from a given page type. - """ - pageAttributeUnassign( - """ - The IDs of the attributes to unassign. - """ - attributeIds: [ID!]! - - """ - ID of the page type from which the attributes should be unassign. - """ - pageTypeId: ID! - ): PageAttributeUnassign - - """ - Reorder the attributes of a page type. - """ - pageTypeReorderAttributes( - """ - The list of attribute reordering operations. - """ - moves: [ReorderInput!]! - - """ - ID of a page type. - """ - pageTypeId: ID! - ): PageTypeReorderAttributes - - """ - Reorder page attribute values. - """ - pageReorderAttributeValues( - """ - ID of an attribute. - """ - attributeId: ID! - - """ - The list of reordering operations for given attribute values. - """ - moves: [ReorderInput]! - - """ - ID of a page. - """ - pageId: ID! - ): PageReorderAttributeValues - - """ - Completes creating an order. - """ - draftOrderComplete( - """ - ID of the order that will be completed. - """ - id: ID! - ): DraftOrderComplete - - """ - Creates a new draft order. - """ - draftOrderCreate( - """ - Fields required to create an order. - """ - input: DraftOrderCreateInput! - ): DraftOrderCreate - - """ - Deletes a draft order. - """ - draftOrderDelete( - """ - ID of a draft order to delete. - """ - id: ID! - ): DraftOrderDelete - - """ - Deletes draft orders. - """ - draftOrderBulkDelete( - """ - List of draft order IDs to delete. - """ - ids: [ID]! - ): DraftOrderBulkDelete - - """ - Deletes order lines. - """ - draftOrderLinesBulkDelete( - """ - List of order lines IDs to delete. - """ - ids: [ID]! - ): DraftOrderLinesBulkDelete - - """ - Updates a draft order. - """ - draftOrderUpdate( - """ - ID of a draft order to update. - """ - id: ID! - - """ - Fields required to update an order. - """ - input: DraftOrderInput! - ): DraftOrderUpdate - - """ - Adds note to the order. - """ - orderAddNote( - """ - ID of the order to add a note for. - """ - order: ID! - - """ - Fields required to create a note for the order. - """ - input: OrderAddNoteInput! - ): OrderAddNote - - """ - Cancel an order. - """ - orderCancel( - """ - ID of the order to cancel. - """ - id: ID! - ): OrderCancel - - """ - Capture an order. - """ - orderCapture( - """ - Amount of money to capture. - """ - amount: PositiveDecimal! - - """ - ID of the order to capture. - """ - id: ID! - ): OrderCapture - - """ - Confirms an unconfirmed order by changing status to unfulfilled. - """ - orderConfirm( - """ - ID of an order to confirm. - """ - id: ID! - ): OrderConfirm - - """ - Creates new fulfillments for an order. - """ - orderFulfill( - """ - Fields required to create an fulfillment. - """ - input: OrderFulfillInput! - - """ - ID of the order to be fulfilled. - """ - order: ID - ): OrderFulfill - - """ - Cancels existing fulfillment and optionally restocks items. - """ - orderFulfillmentCancel( - """ - ID of an fulfillment to cancel. - """ - id: ID! - - """ - Fields required to cancel an fulfillment. - """ - input: FulfillmentCancelInput! - ): FulfillmentCancel - - """ - Updates a fulfillment for an order. - """ - orderFulfillmentUpdateTracking( - """ - ID of an fulfillment to update. - """ - id: ID! - - """ - Fields required to update an fulfillment. - """ - input: FulfillmentUpdateTrackingInput! - ): FulfillmentUpdateTracking - - """ - Refund products. - """ - orderFulfillmentRefundProducts( - """ - Fields required to create an refund fulfillment. - """ - input: OrderRefundProductsInput! - - """ - ID of the order to be refunded. - """ - order: ID! - ): FulfillmentRefundProducts - - """ - Return products. - """ - orderFulfillmentReturnProducts( - """ - Fields required to return products. - """ - input: OrderReturnProductsInput! - - """ - ID of the order to be returned. - """ - order: ID! - ): FulfillmentReturnProducts - - """ - Create order lines for an order. - """ - orderLinesCreate( - """ - ID of the order to add the lines to. - """ - id: ID! - - """ - Fields required to add order lines. - """ - input: [OrderLineCreateInput]! - ): OrderLinesCreate - - """ - Deletes an order line from an order. - """ - orderLineDelete( - """ - ID of the order line to delete. - """ - id: ID! - ): OrderLineDelete - - """ - Updates an order line of an order. - """ - orderLineUpdate( - """ - ID of the order line to update. - """ - id: ID! - - """ - Fields required to update an order line. - """ - input: OrderLineInput! - ): OrderLineUpdate - - """ - Adds discount to the order. - """ - orderDiscountAdd( - """ - Fields required to create a discount for the order. - """ - input: OrderDiscountCommonInput! - - """ - ID of an order to discount. - """ - orderId: ID! - ): OrderDiscountAdd - - """ - Update discount for the order. - """ - orderDiscountUpdate( - """ - ID of a discount to update. - """ - discountId: ID! - - """ - Fields required to update a discount for the order. - """ - input: OrderDiscountCommonInput! - ): OrderDiscountUpdate - - """ - Remove discount from the order. - """ - orderDiscountDelete( - """ - ID of a discount to remove. - """ - discountId: ID! - ): OrderDiscountDelete - - """ - Update discount for the order line. - """ - orderLineDiscountUpdate( - """ - Fields required to update price for the order line. - """ - input: OrderDiscountCommonInput! - - """ - ID of a order line to update price - """ - orderLineId: ID! - ): OrderLineDiscountUpdate - - """ - Remove discount applied to the order line. - """ - orderLineDiscountRemove( - """ - ID of a order line to remove its discount - """ - orderLineId: ID! - ): OrderLineDiscountRemove - - """ - Mark order as manually paid. - """ - orderMarkAsPaid( - """ - ID of the order to mark paid. - """ - id: ID! - - """ - The external transaction reference. - """ - transactionReference: String - ): OrderMarkAsPaid - - """ - Refund an order. - """ - orderRefund( - """ - Amount of money to refund. - """ - amount: PositiveDecimal! - - """ - ID of the order to refund. - """ - id: ID! - ): OrderRefund - - """ - Updates an order. - """ - orderUpdate( - """ - ID of an order to update. - """ - id: ID! - - """ - Fields required to update an order. - """ - input: OrderUpdateInput! - ): OrderUpdate - - """ - Updates a shipping method of the order. - """ - orderUpdateShipping( - """ - ID of the order to update a shipping method. - """ - order: ID! - - """ - Fields required to change shipping method of the order. - """ - input: OrderUpdateShippingInput - ): OrderUpdateShipping - - """ - Void an order. - """ - orderVoid( - """ - ID of the order to void. - """ - id: ID! - ): OrderVoid - - """ - Cancels orders. - """ - orderBulkCancel( - """ - List of orders IDs to cancel. - """ - ids: [ID]! - ): OrderBulkCancel - - """ - Delete metadata of an object. - """ - deleteMetadata( - """ - ID of an object to update. - """ - id: ID! - - """ - Metadata keys to delete. - """ - keys: [String!]! - ): DeleteMetadata - - """ - Delete object's private metadata. - """ - deletePrivateMetadata( - """ - ID of an object to update. - """ - id: ID! - - """ - Metadata keys to delete. - """ - keys: [String!]! - ): DeletePrivateMetadata - - """ - Updates metadata of an object. - """ - updateMetadata( - """ - ID of an object to update. - """ - id: ID! - - """ - Fields required to update the object's metadata. - """ - input: [MetadataInput!]! - ): UpdateMetadata - - """ - Updates private metadata of an object. - """ - updatePrivateMetadata( - """ - ID of an object to update. - """ - id: ID! - - """ - Fields required to update the object's metadata. - """ - input: [MetadataInput!]! - ): UpdatePrivateMetadata - - """ - Assigns storefront's navigation menus. - """ - assignNavigation( - """ - ID of the menu. - """ - menu: ID - - """ - Type of the navigation bar to assign the menu to. - """ - navigationType: NavigationType! - ): AssignNavigation - - """ - Creates a new Menu. - """ - menuCreate( - """ - Fields required to create a menu. - """ - input: MenuCreateInput! - ): MenuCreate - - """ - Deletes a menu. - """ - menuDelete( - """ - ID of a menu to delete. - """ - id: ID! - ): MenuDelete - - """ - Deletes menus. - """ - menuBulkDelete( - """ - List of menu IDs to delete. - """ - ids: [ID]! - ): MenuBulkDelete - - """ - Updates a menu. - """ - menuUpdate( - """ - ID of a menu to update. - """ - id: ID! - - """ - Fields required to update a menu. - """ - input: MenuInput! - ): MenuUpdate - - """ - Creates a new menu item. - """ - menuItemCreate( - """ - Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item. - """ - input: MenuItemCreateInput! - ): MenuItemCreate - - """ - Deletes a menu item. - """ - menuItemDelete( - """ - ID of a menu item to delete. - """ - id: ID! - ): MenuItemDelete - - """ - Deletes menu items. - """ - menuItemBulkDelete( - """ - List of menu item IDs to delete. - """ - ids: [ID]! - ): MenuItemBulkDelete - - """ - Updates a menu item. - """ - menuItemUpdate( - """ - ID of a menu item to update. - """ - id: ID! - - """ - Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item. - """ - input: MenuItemInput! - ): MenuItemUpdate - - """ - Creates/Updates translations for Menu Item. - """ - menuItemTranslate( - """ - Menu Item ID. - """ - id: ID! - input: NameTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): MenuItemTranslate - - """ - Moves items of menus. - """ - menuItemMove( - """ - ID of the menu. - """ - menu: ID! - - """ - The menu position data. - """ - moves: [MenuItemMoveInput]! - ): MenuItemMove - - """ - Request an invoice for the order using plugin. - """ - invoiceRequest( - """ - Invoice number, if not provided it will be generated. - """ - number: String - - """ - ID of the order related to invoice. - """ - orderId: ID! - ): InvoiceRequest - - """ - Requests deletion of an invoice. - """ - invoiceRequestDelete( - """ - ID of an invoice to request the deletion. - """ - id: ID! - ): InvoiceRequestDelete - - """ - Creates a ready to send invoice. - """ - invoiceCreate( - """ - Fields required when creating an invoice. - """ - input: InvoiceCreateInput! - - """ - ID of the order related to invoice. - """ - orderId: ID! - ): InvoiceCreate - - """ - Deletes an invoice. - """ - invoiceDelete( - """ - ID of an invoice to delete. - """ - id: ID! - ): InvoiceDelete - - """ - Updates an invoice. - """ - invoiceUpdate( - """ - ID of an invoice to update. - """ - id: ID! - - """ - Fields to use when updating an invoice. - """ - input: UpdateInvoiceInput! - ): InvoiceUpdate - - """ - Send an invoice notification to the customer. - """ - invoiceSendNotification( - """ - ID of an invoice to be sent. - """ - id: ID! - ): InvoiceSendNotification - - """ - Activate a gift card. - """ - giftCardActivate( - """ - ID of a gift card to activate. - """ - id: ID! - ): GiftCardActivate - - """ - Creates a new gift card. - """ - giftCardCreate( - """ - Fields required to create a gift card. - """ - input: GiftCardCreateInput! - ): GiftCardCreate - - """ - Deactivate a gift card. - """ - giftCardDeactivate( - """ - ID of a gift card to deactivate. - """ - id: ID! - ): GiftCardDeactivate - - """ - Update a gift card. - """ - giftCardUpdate( - """ - ID of a gift card to update. - """ - id: ID! - - """ - Fields required to update a gift card. - """ - input: GiftCardUpdateInput! - ): GiftCardUpdate - - """ - Update plugin configuration. - """ - pluginUpdate( - """ - ID of a channel for which the data should be modified. - """ - channel: ID - - """ - ID of plugin to update. - """ - id: ID! - - """ - Fields required to update a plugin configuration. - """ - input: PluginUpdateInput! - ): PluginUpdate - - """ - Creates a new sale. - """ - saleCreate( - """ - Fields required to create a sale. - """ - input: SaleInput! - ): SaleCreate - - """ - Deletes a sale. - """ - saleDelete( - """ - ID of a sale to delete. - """ - id: ID! - ): SaleDelete - - """ - Deletes sales. - """ - saleBulkDelete( - """ - List of sale IDs to delete. - """ - ids: [ID]! - ): SaleBulkDelete - - """ - Updates a sale. - """ - saleUpdate( - """ - ID of a sale to update. - """ - id: ID! - - """ - Fields required to update a sale. - """ - input: SaleInput! - ): SaleUpdate - - """ - Adds products, categories, collections to a voucher. - """ - saleCataloguesAdd( - """ - ID of a sale. - """ - id: ID! - - """ - Fields required to modify catalogue IDs of sale. - """ - input: CatalogueInput! - ): SaleAddCatalogues - - """ - Removes products, categories, collections from a sale. - """ - saleCataloguesRemove( - """ - ID of a sale. - """ - id: ID! - - """ - Fields required to modify catalogue IDs of sale. - """ - input: CatalogueInput! - ): SaleRemoveCatalogues - - """ - Creates/updates translations for a sale. - """ - saleTranslate( - """ - Voucher ID. - """ - id: ID! - input: NameTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): SaleTranslate - - """ - Manage sale's availability in channels. - """ - saleChannelListingUpdate( - """ - ID of a sale to update. - """ - id: ID! - - """ - Fields required to update sale channel listings. - """ - input: SaleChannelListingInput! - ): SaleChannelListingUpdate - - """ - Creates a new voucher. - """ - voucherCreate( - """ - Fields required to create a voucher. - """ - input: VoucherInput! - ): VoucherCreate - - """ - Deletes a voucher. - """ - voucherDelete( - """ - ID of a voucher to delete. - """ - id: ID! - ): VoucherDelete - - """ - Deletes vouchers. - """ - voucherBulkDelete( - """ - List of voucher IDs to delete. - """ - ids: [ID]! - ): VoucherBulkDelete - - """ - Updates a voucher. - """ - voucherUpdate( - """ - ID of a voucher to update. - """ - id: ID! - - """ - Fields required to update a voucher. - """ - input: VoucherInput! - ): VoucherUpdate - - """ - Adds products, categories, collections to a voucher. - """ - voucherCataloguesAdd( - """ - ID of a voucher. - """ - id: ID! - - """ - Fields required to modify catalogue IDs of voucher. - """ - input: CatalogueInput! - ): VoucherAddCatalogues - - """ - Removes products, categories, collections from a voucher. - """ - voucherCataloguesRemove( - """ - ID of a voucher. - """ - id: ID! - - """ - Fields required to modify catalogue IDs of voucher. - """ - input: CatalogueInput! - ): VoucherRemoveCatalogues - - """ - Creates/Updates translations for Voucher. - """ - voucherTranslate( - """ - Voucher ID. - """ - id: ID! - input: NameTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): VoucherTranslate - - """ - Manage voucher's availability in channels. - """ - voucherChannelListingUpdate( - """ - ID of a voucher to update. - """ - id: ID! - - """ - Fields required to update voucher channel listings. - """ - input: VoucherChannelListingInput! - ): VoucherChannelListingUpdate - - """ - Export products to csv file. - """ - exportProducts( - """ - Fields required to export product data - """ - input: ExportProductsInput! - ): ExportProducts - - """ - Upload a file. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec - """ - fileUpload( - """ - Represents a file in a multipart request. - """ - file: Upload! - ): FileUpload - - """ - Adds a gift card or a voucher to a checkout. - """ - checkoutAddPromoCode( - """ - Checkout ID. - """ - checkoutId: ID! - - """ - Gift card code or voucher code. - """ - promoCode: String! - ): CheckoutAddPromoCode - - """ - Update billing address in the existing checkout. - """ - checkoutBillingAddressUpdate( - """ - The billing address of the checkout. - """ - billingAddress: AddressInput! - - """ - ID of the checkout. - """ - checkoutId: ID! - ): CheckoutBillingAddressUpdate - - """ - Completes the checkout. As a result a new order is created and a payment charge is made. This action requires a successful payment before it can be performed. In case additional confirmation step as 3D secure is required confirmationNeeded flag will be set to True and no order created until payment is confirmed with second call of this mutation. - """ - checkoutComplete( - """ - Checkout ID. - """ - checkoutId: ID! - - """ - Client-side generated data required to finalize the payment. - """ - paymentData: JSONString - - """ - URL of a view where users should be redirected to see the order details. URL in RFC 1808 format. - """ - redirectUrl: String - - """ - Determines whether to store the payment source for future usage. - """ - storeSource: Boolean = false - ): CheckoutComplete - - """ - Create a new checkout. - """ - checkoutCreate( - """ - Fields required to create checkout. - """ - input: CheckoutCreateInput! - ): CheckoutCreate - - """ - Sets the customer as the owner of the checkout. - """ - checkoutCustomerAttach( - """ - ID of the checkout. - """ - checkoutId: ID! - ): CheckoutCustomerAttach - - """ - Removes the user assigned as the owner of the checkout. - """ - checkoutCustomerDetach( - """ - Checkout ID. - """ - checkoutId: ID! - ): CheckoutCustomerDetach - - """ - Updates email address in the existing checkout object. - """ - checkoutEmailUpdate( - """ - Checkout ID. - """ - checkoutId: ID - - """ - email. - """ - email: String! - ): CheckoutEmailUpdate - - """ - Deletes a CheckoutLine. - """ - checkoutLineDelete( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - ID of the checkout line to delete. - """ - lineId: ID - ): CheckoutLineDelete - - """ - Adds a checkout line to the existing checkout. - """ - checkoutLinesAdd( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - A list of checkout lines, each containing information about an item in the checkout. - """ - lines: [CheckoutLineInput]! - ): CheckoutLinesAdd - - """ - Updates checkout line in the existing checkout. - """ - checkoutLinesUpdate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - A list of checkout lines, each containing information about an item in the checkout. - """ - lines: [CheckoutLineInput]! - ): CheckoutLinesUpdate - - """ - Remove a gift card or a voucher from a checkout. - """ - checkoutRemovePromoCode( - """ - Checkout ID. - """ - checkoutId: ID! - - """ - Gift card code or voucher code. - """ - promoCode: String! - ): CheckoutRemovePromoCode - - """ - Create a new payment for given checkout. - """ - checkoutPaymentCreate( - """ - Checkout ID. - """ - checkoutId: ID! - - """ - Data required to create a new payment. - """ - input: PaymentInput! - ): CheckoutPaymentCreate - - """ - Update shipping address in the existing checkout. - """ - checkoutShippingAddressUpdate( - """ - ID of the checkout. - """ - checkoutId: ID! - - """ - The mailing address to where the checkout will be shipped. - """ - shippingAddress: AddressInput! - ): CheckoutShippingAddressUpdate - - """ - Updates the shipping address of the checkout. - """ - checkoutShippingMethodUpdate( - """ - Checkout ID. - """ - checkoutId: ID - - """ - Shipping method. - """ - shippingMethodId: ID! - ): CheckoutShippingMethodUpdate - - """ - Update language code in the existing checkout. - """ - checkoutLanguageCodeUpdate( - """ - ID of the checkout. - """ - checkoutId: ID! - - """ - New language code. - """ - languageCode: LanguageCodeEnum! - ): CheckoutLanguageCodeUpdate - - """ - Creates new channel. - """ - channelCreate( - """ - Fields required to create channel. - """ - input: ChannelCreateInput! - ): ChannelCreate - - """ - Update a channel. - """ - channelUpdate( - """ - ID of a channel to update. - """ - id: ID! - - """ - Fields required to update a channel. - """ - input: ChannelUpdateInput! - ): ChannelUpdate - - """ - Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. - """ - channelDelete( - """ - ID of a channel to delete. - """ - id: ID! - - """ - Fields required to delete a channel. - """ - input: ChannelDeleteInput - ): ChannelDelete - - """ - Activate a channel. - """ - channelActivate( - """ - ID of the channel to activate. - """ - id: ID! - ): ChannelActivate - - """ - Deactivate a channel. - """ - channelDeactivate( - """ - ID of the channel to deactivate. - """ - id: ID! - ): ChannelDeactivate - - """ - Creates an attribute. - """ - attributeCreate( - """ - Fields required to create an attribute. - """ - input: AttributeCreateInput! - ): AttributeCreate - - """ - Deletes an attribute. - """ - attributeDelete( - """ - ID of an attribute to delete. - """ - id: ID! - ): AttributeDelete - - """ - Updates attribute. - """ - attributeUpdate( - """ - ID of an attribute to update. - """ - id: ID! - - """ - Fields required to update an attribute. - """ - input: AttributeUpdateInput! - ): AttributeUpdate - - """ - Creates/Updates translations for attribute. - """ - attributeTranslate( - """ - Attribute ID. - """ - id: ID! - input: NameTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): AttributeTranslate - - """ - Deletes attributes. - """ - attributeBulkDelete( - """ - List of attribute IDs to delete. - """ - ids: [ID]! - ): AttributeBulkDelete - - """ - Deletes values of attributes. - """ - attributeValueBulkDelete( - """ - List of attribute value IDs to delete. - """ - ids: [ID]! - ): AttributeValueBulkDelete - - """ - Creates a value for an attribute. - """ - attributeValueCreate( - """ - Attribute to which value will be assigned. - """ - attribute: ID! - - """ - Fields required to create an AttributeValue. - """ - input: AttributeValueCreateInput! - ): AttributeValueCreate - - """ - Deletes a value of an attribute. - """ - attributeValueDelete( - """ - ID of a value to delete. - """ - id: ID! - ): AttributeValueDelete - - """ - Updates value of an attribute. - """ - attributeValueUpdate( - """ - ID of an AttributeValue to update. - """ - id: ID! - - """ - Fields required to update an AttributeValue. - """ - input: AttributeValueCreateInput! - ): AttributeValueUpdate - - """ - Creates/Updates translations for attribute value. - """ - attributeValueTranslate( - """ - Attribute Value ID. - """ - id: ID! - input: AttributeValueTranslationInput! - - """ - Translation language code. - """ - languageCode: LanguageCodeEnum! - ): AttributeValueTranslate - - """ - Reorder the values of an attribute. - """ - attributeReorderValues( - """ - ID of an attribute. - """ - attributeId: ID! - - """ - The list of reordering operations for given attribute values. - """ - moves: [ReorderInput]! - ): AttributeReorderValues - - """ - Creates a new app. - """ - appCreate( - """ - Fields required to create a new app. - """ - input: AppInput! - ): AppCreate - - """ - Updates an existing app. - """ - appUpdate( - """ - ID of an app to update. - """ - id: ID! - - """ - Fields required to update an existing app. - """ - input: AppInput! - ): AppUpdate - - """ - Deletes an app. - """ - appDelete( - """ - ID of an app to delete. - """ - id: ID! - ): AppDelete - - """ - Creates a new token. - """ - appTokenCreate( - """ - Fields required to create a new auth token. - """ - input: AppTokenInput! - ): AppTokenCreate - - """ - Deletes an authentication token assigned to app. - """ - appTokenDelete( - """ - ID of an auth token to delete. - """ - id: ID! - ): AppTokenDelete - - """ - Verify provided app token. - """ - appTokenVerify( - """ - App token to verify. - """ - token: String! - ): AppTokenVerify - - """ - Install new app by using app manifest. - """ - appInstall( - """ - Fields required to install a new app. - """ - input: AppInstallInput! - ): AppInstall - - """ - Retry failed installation of new app. - """ - appRetryInstall( - """ - Determine if app will be set active or not. - """ - activateAfterInstallation: Boolean = true - - """ - ID of failed installation. - """ - id: ID! - ): AppRetryInstall - - """ - Delete failed installation. - """ - appDeleteFailedInstallation( - """ - ID of failed installation to delete. - """ - id: ID! - ): AppDeleteFailedInstallation - - """ - Fetch and validate manifest. - """ - appFetchManifest(manifestUrl: String!): AppFetchManifest - - """ - Activate the app. - """ - appActivate( - """ - ID of app to activate. - """ - id: ID! - ): AppActivate - - """ - Deactivate the app. - """ - appDeactivate( - """ - ID of app to deactivate. - """ - id: ID! - ): AppDeactivate - - """ - Create JWT token. - """ - tokenCreate( - """ - Email of a user. - """ - email: String! - - """ - Password of a user. - """ - password: String! - ): CreateToken - - """ - Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie. - """ - tokenRefresh( - """ - CSRF token required to refresh token. This argument is required when refreshToken is provided as a cookie. - """ - csrfToken: String - - """ - Refresh token. - """ - refreshToken: String - ): RefreshToken - - """ - Verify JWT token. - """ - tokenVerify( - """ - JWT token to validate. - """ - token: String! - ): VerifyToken - - """ - Deactivate all JWT tokens of the currently authenticated user. - """ - tokensDeactivateAll: DeactivateAllUserTokens - - """ - Prepare external authentication url for user by custom plugin. - """ - externalAuthenticationUrl( - """ - The data required by plugin to create external authentication url. - """ - input: JSONString! - - """ - The ID of the authentication plugin. - """ - pluginId: String! - ): ExternalAuthenticationUrl - - """ - Obtain external access tokens for user by custom plugin. - """ - externalObtainAccessTokens( - """ - The data required by plugin to create authentication data. - """ - input: JSONString! - - """ - The ID of the authentication plugin. - """ - pluginId: String! - ): ExternalObtainAccessTokens - - """ - Refresh user's access by custom plugin. - """ - externalRefresh( - """ - The data required by plugin to proceed the refresh process. - """ - input: JSONString! - - """ - The ID of the authentication plugin. - """ - pluginId: String! - ): ExternalRefresh - - """ - Logout user by custom plugin. - """ - externalLogout( - """ - The data required by plugin to proceed the logout process. - """ - input: JSONString! - - """ - The ID of the authentication plugin. - """ - pluginId: String! - ): ExternalLogout - - """ - Verify external authentication data by plugin. - """ - externalVerify( - """ - The data required by plugin to proceed the verification. - """ - input: JSONString! - - """ - The ID of the authentication plugin. - """ - pluginId: String! - ): ExternalVerify - - """ - Sends an email with the account password modification link. - """ - requestPasswordReset( - """ - Slug of a channel which will be used for notify user. Optional when only one channel exists. - """ - channel: String - - """ - Email of the user that will be used for password recovery. - """ - email: String! - - """ - URL of a view where users should be redirected to reset the password. URL in RFC 1808 format. - """ - redirectUrl: String! - ): RequestPasswordReset - - """ - Confirm user account with token sent by email during registration. - """ - confirmAccount( - """ - E-mail of the user performing account confirmation. - """ - email: String! - - """ - A one-time token required to confirm the account. - """ - token: String! - ): ConfirmAccount - - """ - Sets the user's password from the token sent by email using the RequestPasswordReset mutation. - """ - setPassword( - """ - Email of a user. - """ - email: String! - - """ - Password of a user. - """ - password: String! - - """ - A one-time token required to set the password. - """ - token: String! - ): SetPassword - - """ - Change the password of the logged in user. - """ - passwordChange( - """ - New user password. - """ - newPassword: String! - - """ - Current user password. - """ - oldPassword: String! - ): PasswordChange - - """ - Request email change of the logged in user. - """ - requestEmailChange( - """ - Slug of a channel which will be used to notify users. Optional when only one channel exists. - """ - channel: String - - """ - New user email. - """ - newEmail: String! - - """ - User password. - """ - password: String! - - """ - URL of a view where users should be redirected to update the email address. URL in RFC 1808 format. - """ - redirectUrl: String! - ): RequestEmailChange - - """ - Confirm the email change of the logged-in user. - """ - confirmEmailChange( - """ - Slug of a channel which will be used to notify users. Optional when only one channel exists. - """ - channel: String - - """ - A one-time token required to change the email. - """ - token: String! - ): ConfirmEmailChange - - """ - Create a new address for the customer. - """ - accountAddressCreate( - """ - Fields required to create address. - """ - input: AddressInput! - - """ - A type of address. If provided, the new address will be automatically assigned as the customer's default address of that type. - """ - type: AddressTypeEnum - ): AccountAddressCreate - - """ - Updates an address of the logged-in user. - """ - accountAddressUpdate( - """ - ID of the address to update. - """ - id: ID! - - """ - Fields required to update the address. - """ - input: AddressInput! - ): AccountAddressUpdate - - """ - Delete an address of the logged-in user. - """ - accountAddressDelete( - """ - ID of the address to delete. - """ - id: ID! - ): AccountAddressDelete - - """ - Sets a default address for the authenticated user. - """ - accountSetDefaultAddress( - """ - ID of the address to set as default. - """ - id: ID! - - """ - The type of address. - """ - type: AddressTypeEnum! - ): AccountSetDefaultAddress - - """ - Register a new user. - """ - accountRegister( - """ - Fields required to create a user. - """ - input: AccountRegisterInput! - ): AccountRegister - - """ - Updates the account of the logged-in user. - """ - accountUpdate( - """ - Fields required to update the account of the logged-in user. - """ - input: AccountInput! - ): AccountUpdate - - """ - Sends an email with the account removal link for the logged-in user. - """ - accountRequestDeletion( - """ - Slug of a channel which will be used to notify users. Optional when only one channel exists. - """ - channel: String - - """ - URL of a view where users should be redirected to delete their account. URL in RFC 1808 format. - """ - redirectUrl: String! - ): AccountRequestDeletion - - """ - Remove user account. - """ - accountDelete( - """ - A one-time token required to remove account. Sent by email using AccountRequestDeletion mutation. - """ - token: String! - ): AccountDelete - - """ - Creates user address. - """ - addressCreate( - """ - Fields required to create address. - """ - input: AddressInput! - - """ - ID of a user to create address for. - """ - userId: ID! - ): AddressCreate - - """ - Updates an address. - """ - addressUpdate( - """ - ID of the address to update. - """ - id: ID! - - """ - Fields required to update the address. - """ - input: AddressInput! - ): AddressUpdate - - """ - Deletes an address. - """ - addressDelete( - """ - ID of the address to delete. - """ - id: ID! - ): AddressDelete - - """ - Sets a default address for the given user. - """ - addressSetDefault( - """ - ID of the address. - """ - addressId: ID! - - """ - The type of address. - """ - type: AddressTypeEnum! - - """ - ID of the user to change the address for. - """ - userId: ID! - ): AddressSetDefault - - """ - Creates a new customer. - """ - customerCreate( - """ - Fields required to create a customer. - """ - input: UserCreateInput! - ): CustomerCreate - - """ - Updates an existing customer. - """ - customerUpdate( - """ - ID of a customer to update. - """ - id: ID! - - """ - Fields required to update a customer. - """ - input: CustomerInput! - ): CustomerUpdate - - """ - Deletes a customer. - """ - customerDelete( - """ - ID of a customer to delete. - """ - id: ID! - ): CustomerDelete - - """ - Deletes customers. - """ - customerBulkDelete( - """ - List of user IDs to delete. - """ - ids: [ID]! - ): CustomerBulkDelete - - """ - Creates a new staff user. - """ - staffCreate( - """ - Fields required to create a staff user. - """ - input: StaffCreateInput! - ): StaffCreate - - """ - Updates an existing staff user. - """ - staffUpdate( - """ - ID of a staff user to update. - """ - id: ID! - - """ - Fields required to update a staff user. - """ - input: StaffUpdateInput! - ): StaffUpdate - - """ - Deletes a staff user. - """ - staffDelete( - """ - ID of a staff user to delete. - """ - id: ID! - ): StaffDelete - - """ - Deletes staff users. - """ - staffBulkDelete( - """ - List of user IDs to delete. - """ - ids: [ID]! - ): StaffBulkDelete - - """ - Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec - """ - userAvatarUpdate( - """ - Represents an image file in a multipart request. - """ - image: Upload! - ): UserAvatarUpdate - - """ - Deletes a user avatar. Only for staff members. - """ - userAvatarDelete: UserAvatarDelete - - """ - Activate or deactivate users. - """ - userBulkSetActive( - """ - List of user IDs to (de)activate). - """ - ids: [ID]! - - """ - Determine if users will be set active or not. - """ - isActive: Boolean! - ): UserBulkSetActive - - """ - Create new permission group. - """ - permissionGroupCreate( - """ - Input fields to create permission group. - """ - input: PermissionGroupCreateInput! - ): PermissionGroupCreate - - """ - Update permission group. - """ - permissionGroupUpdate( - """ - ID of the group to update. - """ - id: ID! - - """ - Input fields to create permission group. - """ - input: PermissionGroupUpdateInput! - ): PermissionGroupUpdate - - """ - Delete permission group. - """ - permissionGroupDelete( - """ - ID of the group to delete. - """ - id: ID! - ): PermissionGroupDelete -} - -input NameTranslationInput { - name: String -} - -enum NavigationType { - """ - Main storefront navigation. - """ - MAIN - - """ - Secondary storefront navigation. - """ - SECONDARY -} - -""" -An object with an ID -""" -interface Node { - """ - The ID of the object. - """ - id: ID! -} - -interface ObjectWithMetadata { - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! -} - -""" -Represents an order in the shop. -""" -type Order implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - created: DateTime! - status: OrderStatus! - user: User - trackingClientId: String! - billingAddress: Address - shippingAddress: Address - shippingMethod: ShippingMethod - shippingMethodName: String - channel: Channel! - - """ - Total price of shipping. - """ - shippingPrice: TaxedMoney! - shippingTaxRate: Float! - token: String! - voucher: Voucher - - """ - List of user gift cards. - """ - giftCards: [GiftCard] - displayGrossPrices: Boolean! - customerNote: String! - weight: Weight - redirectUrl: String - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of shipments for the order. - """ - fulfillments: [Fulfillment]! - - """ - List of order lines. - """ - lines: [OrderLine]! - - """ - List of actions that can be performed in the current state of an order. - """ - actions: [OrderAction]! - - """ - Shipping methods that can be used with this order. - """ - availableShippingMethods: [ShippingMethod] - - """ - List of order invoices. - """ - invoices: [Invoice] - - """ - User-friendly number of an order. - """ - number: String - - """ - The ID of the order that was the base for this order. - """ - original: ID - - """ - The order origin. - """ - origin: OrderOriginEnum! - - """ - Informs if an order is fully paid. - """ - isPaid: Boolean! - - """ - Internal payment status. - """ - paymentStatus: PaymentChargeStatusEnum! - - """ - User-friendly payment status. - """ - paymentStatusDisplay: String! - - """ - List of payments for the order. - """ - payments: [Payment] - - """ - Total amount of the order. - """ - total: TaxedMoney! - - """ - Undiscounted total amount of the order. - """ - undiscountedTotal: TaxedMoney! - - """ - The sum of line prices not including shipping. - """ - subtotal: TaxedMoney! - - """ - User-friendly order status. - """ - statusDisplay: String - - """ - Informs whether a draft order can be finalized(turned into a regular order). - """ - canFinalize: Boolean! - - """ - Amount authorized for the order. - """ - totalAuthorized: Money! - - """ - Amount captured by payment. - """ - totalCaptured: Money! - - """ - List of events associated with the order. - """ - events: [OrderEvent] - - """ - The difference between the paid and the order total amount. - """ - totalBalance: Money! - - """ - Email address of the customer. - """ - userEmail: String - - """ - Returns True, if order requires shipping. - """ - isShippingRequired: Boolean! - languageCode: String! - @deprecated( - reason: "Use the `languageCodeEnum` field to fetch the language code. This field will be removed in Saleor 4.0." - ) - - """ - Order language code. - """ - languageCodeEnum: LanguageCodeEnum! - - """ - Returns applied discount. - """ - discount: Money @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.") - - """ - Discount name. - """ - discountName: String @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.") - - """ - Translated discount name. - """ - translatedDiscountName: String @deprecated(reason: "Use discounts field. This field will be removed in Saleor 4.0.") - - """ - List of all discounts assigned to the order. - """ - discounts: [OrderDiscount!] -} - -enum OrderAction { - """ - Represents the capture action. - """ - CAPTURE - - """ - Represents a mark-as-paid action. - """ - MARK_AS_PAID - - """ - Represents a refund action. - """ - REFUND - - """ - Represents a void action. - """ - VOID -} - -""" -Adds note to the order. -""" -type OrderAddNote { - """ - Order with the note added. - """ - order: Order - - """ - Order note created. - """ - event: OrderEvent - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input OrderAddNoteInput { - """ - Note message. - """ - message: String! -} - -""" -Cancels orders. -""" -type OrderBulkCancel { - """ - Returns how many objects were affected. - """ - count: Int! - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Cancel an order. -""" -type OrderCancel { - """ - Canceled order. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Capture an order. -""" -type OrderCapture { - """ - Captured order. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Confirms an unconfirmed order by changing status to unfulfilled. -""" -type OrderConfirm { - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -type OrderCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [OrderCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type OrderCountableEdge { - """ - The item at the end of the edge. - """ - node: Order! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -enum OrderDirection { - """ - Specifies an ascending sort order. - """ - ASC - - """ - Specifies a descending sort order. - """ - DESC -} - -""" -Contains all details related to the applied discount to the order. -""" -type OrderDiscount implements Node { - """ - The ID of the object. - """ - id: ID! - type: OrderDiscountType! - - """ - Type of the discount: fixed or percent - """ - valueType: DiscountValueTypeEnum! - - """ - Value of the discount. Can store fixed value or percent value - """ - value: PositiveDecimal! - name: String - translatedName: String - - """ - Explanation for the applied discount. - """ - reason: String - - """ - Returns amount of discount. - """ - amount: Money! -} - -""" -Adds discount to the order. -""" -type OrderDiscountAdd { - """ - Order which has been discounted. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input OrderDiscountCommonInput { - """ - Type of the discount: fixed or percent - """ - valueType: DiscountValueTypeEnum! - - """ - Value of the discount. Can store fixed value or percent value - """ - value: PositiveDecimal! - - """ - Explanation for the applied discount. - """ - reason: String -} - -""" -Remove discount from the order. -""" -type OrderDiscountDelete { - """ - Order which has removed discount. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -An enumeration. -""" -enum OrderDiscountType { - """ - Voucher - """ - VOUCHER - - """ - Manual - """ - MANUAL -} - -""" -Update discount for the order. -""" -type OrderDiscountUpdate { - """ - Order which has been discounted. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input OrderDraftFilterInput { - customer: String - created: DateRangeInput - search: String - metadata: [MetadataInput] - channels: [ID] -} - -type OrderError { - """ - 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: OrderErrorCode! - - """ - Warehouse ID which causes the error. - """ - warehouse: ID - - """ - Order line ID which causes the error. - """ - orderLine: ID - - """ - List of product variants that are associated with the error - """ - variants: [ID!] - - """ - A type of address that causes the error. - """ - addressType: AddressTypeEnum -} - -""" -An enumeration. -""" -enum OrderErrorCode { - BILLING_ADDRESS_NOT_SET - CANNOT_CANCEL_FULFILLMENT - CANNOT_CANCEL_ORDER - CANNOT_DELETE - CANNOT_DISCOUNT - CANNOT_REFUND - CAPTURE_INACTIVE_PAYMENT - NOT_EDITABLE - FULFILL_ORDER_LINE - GRAPHQL_ERROR - INVALID - PRODUCT_NOT_PUBLISHED - PRODUCT_UNAVAILABLE_FOR_PURCHASE - NOT_FOUND - ORDER_NO_SHIPPING_ADDRESS - PAYMENT_ERROR - PAYMENT_MISSING - REQUIRED - SHIPPING_METHOD_NOT_APPLICABLE - SHIPPING_METHOD_REQUIRED - TAX_ERROR - UNIQUE - VOID_INACTIVE_PAYMENT - ZERO_QUANTITY - INVALID_QUANTITY - INSUFFICIENT_STOCK - DUPLICATED_INPUT_ITEM - NOT_AVAILABLE_IN_CHANNEL - CHANNEL_INACTIVE -} - -""" -History log of the order. -""" -type OrderEvent implements Node { - """ - The ID of the object. - """ - id: ID! - - """ - Date when event happened at in ISO 8601 format. - """ - date: DateTime - - """ - Order event type. - """ - type: OrderEventsEnum - - """ - User who performed the action. - """ - user: User - - """ - Content of the event. - """ - message: String - - """ - Email of the customer. - """ - email: String - - """ - Type of an email sent to the customer. - """ - emailType: OrderEventsEmailsEnum - - """ - Amount of money. - """ - amount: Float - - """ - The payment ID from the payment gateway. - """ - paymentId: String - - """ - The payment gateway of the payment. - """ - paymentGateway: String - - """ - Number of items. - """ - quantity: Int - - """ - Composed ID of the Fulfillment. - """ - composedId: String - - """ - User-friendly number of an order. - """ - orderNumber: String - - """ - Number of an invoice related to the order. - """ - invoiceNumber: String - - """ - List of oversold lines names. - """ - oversoldItems: [String] - - """ - The concerned lines. - """ - lines: [OrderEventOrderLineObject] - - """ - The lines fulfilled. - """ - fulfilledItems: [FulfillmentLine] - - """ - The warehouse were items were restocked. - """ - warehouse: Warehouse - - """ - The transaction reference of captured payment. - """ - transactionReference: String - - """ - Define if shipping costs were included to the refund. - """ - shippingCostsIncluded: Boolean - - """ - The order which is related to this order. - """ - relatedOrder: Order - - """ - The discount applied to the order. - """ - discount: OrderEventDiscountObject -} - -type OrderEventCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [OrderEventCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type OrderEventCountableEdge { - """ - The item at the end of the edge. - """ - node: OrderEvent! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -type OrderEventDiscountObject { - """ - Type of the discount: fixed or percent. - """ - valueType: DiscountValueTypeEnum! - - """ - Value of the discount. Can store fixed value or percent value. - """ - value: PositiveDecimal! - - """ - Explanation for the applied discount. - """ - reason: String - - """ - Returns amount of discount. - """ - amount: Money - - """ - Type of the discount: fixed or percent. - """ - oldValueType: DiscountValueTypeEnum - - """ - Value of the discount. Can store fixed value or percent value. - """ - oldValue: PositiveDecimal - - """ - Returns amount of discount. - """ - oldAmount: Money -} - -type OrderEventOrderLineObject { - """ - The variant quantity. - """ - quantity: Int - - """ - The order line. - """ - orderLine: OrderLine - - """ - The variant name. - """ - itemName: String - - """ - The discount applied to the order line. - """ - discount: OrderEventDiscountObject -} - -""" -An enumeration. -""" -enum OrderEventsEmailsEnum { - PAYMENT_CONFIRMATION - CONFIRMED - SHIPPING_CONFIRMATION - TRACKING_UPDATED - ORDER_CONFIRMATION - ORDER_CANCEL - ORDER_REFUND - FULFILLMENT_CONFIRMATION - DIGITAL_LINKS -} - -""" -An enumeration. -""" -enum OrderEventsEnum { - DRAFT_CREATED - DRAFT_CREATED_FROM_REPLACE - ADDED_PRODUCTS - REMOVED_PRODUCTS - PLACED - PLACED_FROM_DRAFT - OVERSOLD_ITEMS - CANCELED - ORDER_MARKED_AS_PAID - ORDER_FULLY_PAID - ORDER_REPLACEMENT_CREATED - ORDER_DISCOUNT_ADDED - ORDER_DISCOUNT_AUTOMATICALLY_UPDATED - ORDER_DISCOUNT_UPDATED - ORDER_DISCOUNT_DELETED - ORDER_LINE_DISCOUNT_UPDATED - ORDER_LINE_DISCOUNT_REMOVED - UPDATED_ADDRESS - EMAIL_SENT - CONFIRMED - PAYMENT_AUTHORIZED - PAYMENT_CAPTURED - EXTERNAL_SERVICE_NOTIFICATION - PAYMENT_REFUNDED - PAYMENT_VOIDED - PAYMENT_FAILED - INVOICE_REQUESTED - INVOICE_GENERATED - INVOICE_UPDATED - INVOICE_SENT - FULFILLMENT_CANCELED - FULFILLMENT_RESTOCKED_ITEMS - FULFILLMENT_FULFILLED_ITEMS - FULFILLMENT_REFUNDED - FULFILLMENT_RETURNED - FULFILLMENT_REPLACED - TRACKING_UPDATED - NOTE_ADDED - OTHER -} - -input OrderFilterInput { - paymentStatus: [PaymentChargeStatusEnum] - status: [OrderStatusFilter] - customer: String - created: DateRangeInput - search: String - metadata: [MetadataInput] - channels: [ID] -} - -""" -Creates new fulfillments for an order. -""" -type OrderFulfill { - """ - List of created fulfillments. - """ - fulfillments: [Fulfillment] - - """ - Fulfilled order. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input OrderFulfillInput { - """ - List of items informing how to fulfill the order. - """ - lines: [OrderFulfillLineInput!]! - - """ - If true, send an email notification to the customer. - """ - notifyCustomer: Boolean -} - -input OrderFulfillLineInput { - """ - The ID of the order line. - """ - orderLineId: ID - - """ - List of stock items to create. - """ - stocks: [OrderFulfillStockInput!]! -} - -input OrderFulfillStockInput { - """ - The number of line items to be fulfilled from given warehouse. - """ - quantity: Int! - - """ - ID of the warehouse from which the item will be fulfilled. - """ - warehouse: ID! -} - -""" -Represents order line of particular order. -""" -type OrderLine implements Node { - """ - The ID of the object. - """ - id: ID! - productName: String! - variantName: String! - productSku: String! - isShippingRequired: Boolean! - quantity: Int! - quantityFulfilled: Int! - unitDiscountReason: String - taxRate: Float! - digitalContentUrl: DigitalContentUrl - - """ - The main thumbnail for the ordered product. - """ - thumbnail( - """ - Size of thumbnail. - """ - size: Int - ): Image - - """ - Price of the single item in the order line. - """ - unitPrice: TaxedMoney! - - """ - Price of the single item in the order line without applied an order line discount. - """ - undiscountedUnitPrice: TaxedMoney! - - """ - The discount applied to the single order line. - """ - unitDiscount: Money! - - """ - Value of the discount. Can store fixed value or percent value - """ - unitDiscountValue: PositiveDecimal! - - """ - Price of the order line. - """ - totalPrice: TaxedMoney! - - """ - A purchased product variant. Note: this field may be null if the variant has been removed from stock at all. - """ - variant: ProductVariant - - """ - Product name in the customer's language - """ - translatedProductName: String! - - """ - Variant name in the customer's language - """ - translatedVariantName: String! - - """ - List of allocations across warehouses. - """ - allocations: [Allocation!] - - """ - Type of the discount: fixed or percent - """ - unitDiscountType: DiscountValueTypeEnum -} - -input OrderLineCreateInput { - """ - Number of variant items ordered. - """ - quantity: Int! - - """ - Product variant ID. - """ - variantId: ID! -} - -""" -Deletes an order line from an order. -""" -type OrderLineDelete { - """ - A related order. - """ - order: Order - - """ - An order line that was deleted. - """ - orderLine: OrderLine - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Remove discount applied to the order line. -""" -type OrderLineDiscountRemove { - """ - Order line which has removed discount. - """ - orderLine: OrderLine - - """ - Order which is related to line which has removed discount. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Update discount for the order line. -""" -type OrderLineDiscountUpdate { - """ - Order line which has been discounted. - """ - orderLine: OrderLine - - """ - Order which is related to the discounted line. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input OrderLineInput { - """ - Number of variant items ordered. - """ - quantity: Int! -} - -""" -Updates an order line of an order. -""" -type OrderLineUpdate { - """ - Related order. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! - orderLine: OrderLine -} - -""" -Create order lines for an order. -""" -type OrderLinesCreate { - """ - Related order. - """ - order: Order - - """ - List of added order lines. - """ - orderLines: [OrderLine!] - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -Mark order as manually paid. -""" -type OrderMarkAsPaid { - """ - Order marked as paid. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -An enumeration. -""" -enum OrderOriginEnum { - CHECKOUT - DRAFT - REISSUE -} - -""" -Refund an order. -""" -type OrderRefund { - """ - A refunded order. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input OrderRefundFulfillmentLineInput { - """ - The ID of the fulfillment line to refund. - """ - fulfillmentLineId: ID! - - """ - The number of items to be refunded. - """ - quantity: Int! -} - -input OrderRefundLineInput { - """ - The ID of the order line to refund. - """ - orderLineId: ID! - - """ - The number of items to be refunded. - """ - quantity: Int! -} - -input OrderRefundProductsInput { - """ - List of unfulfilled lines to refund. - """ - orderLines: [OrderRefundLineInput!] - - """ - List of fulfilled lines to refund. - """ - fulfillmentLines: [OrderRefundFulfillmentLineInput!] - - """ - The total amount of refund when the value is provided manually. - """ - amountToRefund: PositiveDecimal - - """ - If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. - """ - includeShippingCosts: Boolean = false -} - -input OrderReturnFulfillmentLineInput { - """ - The ID of the fulfillment line to return. - """ - fulfillmentLineId: ID! - - """ - The number of items to be returned. - """ - quantity: Int! - - """ - Determines, if the line should be added to replace order. - """ - replace: Boolean = false -} - -input OrderReturnLineInput { - """ - The ID of the order line to return. - """ - orderLineId: ID! - - """ - The number of items to be returned. - """ - quantity: Int! - - """ - Determines, if the line should be added to replace order. - """ - replace: Boolean = false -} - -input OrderReturnProductsInput { - """ - List of unfulfilled lines to return. - """ - orderLines: [OrderReturnLineInput!] - - """ - List of fulfilled lines to return. - """ - fulfillmentLines: [OrderReturnFulfillmentLineInput!] - - """ - The total amount of refund when the value is provided manually. - """ - amountToRefund: PositiveDecimal - - """ - If true, Saleor will refund shipping costs. If amountToRefund is providedincludeShippingCosts will be ignored. - """ - includeShippingCosts: Boolean = false - - """ - If true, Saleor will call refund action for all lines. - """ - refund: Boolean = false -} - -""" -Order related settings from site settings. -""" -type OrderSettings { - automaticallyConfirmAllNewOrders: Boolean! -} - -type OrderSettingsError { - """ - 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: OrderSettingsErrorCode! -} - -""" -An enumeration. -""" -enum OrderSettingsErrorCode { - INVALID -} - -""" -Update shop order settings. -""" -type OrderSettingsUpdate { - """ - Order settings. - """ - orderSettings: OrderSettings - orderSettingsErrors: [OrderSettingsError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderSettingsError!]! -} - -input OrderSettingsUpdateInput { - """ - When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. - """ - automaticallyConfirmAllNewOrders: Boolean! -} - -enum OrderSortField { - """ - Sort orders by number. - """ - NUMBER - - """ - Sort orders by creation date. - """ - CREATION_DATE - - """ - Sort orders by customer. - """ - CUSTOMER - - """ - Sort orders by payment. - """ - PAYMENT - - """ - Sort orders by fulfillment status. - """ - FULFILLMENT_STATUS -} - -input OrderSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort orders by the selected field. - """ - field: OrderSortField! -} - -""" -An enumeration. -""" -enum OrderStatus { - """ - Draft - """ - DRAFT - - """ - Unconfirmed - """ - UNCONFIRMED - - """ - Unfulfilled - """ - UNFULFILLED - - """ - Partially fulfilled - """ - PARTIALLY_FULFILLED - - """ - Partially returned - """ - PARTIALLY_RETURNED - - """ - Returned - """ - RETURNED - - """ - Fulfilled - """ - FULFILLED - - """ - Canceled - """ - CANCELED -} - -enum OrderStatusFilter { - READY_TO_FULFILL - READY_TO_CAPTURE - UNFULFILLED - UNCONFIRMED - PARTIALLY_FULFILLED - FULFILLED - CANCELED -} - -""" -Updates an order. -""" -type OrderUpdate { - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! - order: Order -} - -input OrderUpdateInput { - """ - Billing address of the customer. - """ - billingAddress: AddressInput - - """ - Email address of the customer. - """ - userEmail: String - - """ - Shipping address of the customer. - """ - shippingAddress: AddressInput -} - -""" -Updates a shipping method of the order. -""" -type OrderUpdateShipping { - """ - Order with updated shipping method. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -input OrderUpdateShippingInput { - """ - ID of the selected shipping method. - """ - shippingMethod: ID -} - -""" -Void an order. -""" -type OrderVoid { - """ - A voided order. - """ - order: Order - orderErrors: [OrderError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [OrderError!]! -} - -""" -A static page that can be manually added by a shop operator through the dashboard. -""" -type Page implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - title: String! - content: JSONString - publicationDate: Date - isPublished: Boolean! - slug: String! - pageType: PageType! - created: DateTime! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Content of the page (JSON). - """ - contentJson: JSONString! @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") - - """ - Returns translated page fields for the given language code. - """ - translation( - """ - A language code to return the translation for page. - """ - languageCode: LanguageCodeEnum! - ): PageTranslation - - """ - List of attributes assigned to this product. - """ - attributes: [SelectedAttribute!]! -} - -""" -Assign attributes to a given page type. -""" -type PageAttributeAssign { - """ - The updated page type. - """ - pageType: PageType - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! -} - -""" -Unassign attributes from a given page type. -""" -type PageAttributeUnassign { - """ - The updated page type. - """ - pageType: PageType - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! -} - -""" -Deletes pages. -""" -type PageBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! -} - -""" -Publish pages. -""" -type PageBulkPublish { - """ - Returns how many objects were affected. - """ - count: Int! - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! -} - -type PageCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [PageCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type PageCountableEdge { - """ - The item at the end of the edge. - """ - node: Page! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new page. -""" -type PageCreate { - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! - page: Page -} - -input PageCreateInput { - """ - Page internal name. - """ - slug: String - - """ - Page title. - """ - title: String - - """ - Page content in JSON format. - """ - content: JSONString - - """ - List of attributes. - """ - attributes: [AttributeValueInput!] - - """ - Determines if page is visible in the storefront. - """ - isPublished: Boolean - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - ID of the page type that page belongs to. - """ - pageType: ID! -} - -""" -Deletes a page. -""" -type PageDelete { - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! - page: Page -} - -type PageError { - """ - 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: PageErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] -} - -""" -An enumeration. -""" -enum PageErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - DUPLICATED_INPUT_ITEM - ATTRIBUTE_ALREADY_ASSIGNED -} - -input PageFilterInput { - search: String - metadata: [MetadataInput] - pageTypes: [ID] -} - -""" -The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. -""" -type PageInfo { - """ - When paginating forwards, are there more items? - """ - hasNextPage: Boolean! - - """ - When paginating backwards, are there more items? - """ - hasPreviousPage: Boolean! - - """ - When paginating backwards, the cursor to continue. - """ - startCursor: String - - """ - When paginating forwards, the cursor to continue. - """ - endCursor: String -} - -input PageInput { - """ - Page internal name. - """ - slug: String - - """ - Page title. - """ - title: String - - """ - Page content in JSON format. - """ - content: JSONString - - """ - List of attributes. - """ - attributes: [AttributeValueInput!] - - """ - Determines if page is visible in the storefront. - """ - isPublished: Boolean - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: String - - """ - Search engine optimization fields. - """ - seo: SeoInput -} - -""" -Reorder page attribute values. -""" -type PageReorderAttributeValues { - """ - Page from which attribute values are reordered. - """ - page: Page - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! -} - -enum PageSortField { - """ - Sort pages by title. - """ - TITLE - - """ - Sort pages by slug. - """ - SLUG - - """ - Sort pages by visibility. - """ - VISIBILITY - - """ - Sort pages by creation date. - """ - CREATION_DATE - - """ - Sort pages by publication date. - """ - PUBLICATION_DATE -} - -input PageSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort pages by the selected field. - """ - field: PageSortField! -} - -type PageTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - title: String! - content: JSONString - - """ - Content of the page (JSON). - """ - contentJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") - - """ - Returns translated page fields for the given language code. - """ - translation( - """ - A language code to return the translation for page. - """ - languageCode: LanguageCodeEnum! - ): PageTranslation - - """ - ('A static page that can be manually added by a shop operator ', 'through the dashboard.') - """ - page: Page -} - -""" -Creates/Updates translations for Page. -""" -type PageTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - page: PageTranslatableContent -} - -type PageTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - title: String! - content: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! - - """ - Translated description of the page (JSON). - """ - contentJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") -} - -input PageTranslationInput { - seoTitle: String - seoDescription: String - title: String - content: JSONString -} - -""" -Represents a type of page. It defines what attributes are available to pages of this type. -""" -type PageType implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - slug: String! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Page attributes of that page type. - """ - attributes: [Attribute] - - """ - Attributes that can be assigned to the page type. - """ - availableAttributes( - filter: AttributeFilterInput - - """ - 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 - ): AttributeCountableConnection - - """ - Whether page type has pages assigned. - """ - hasPages: Boolean -} - -""" -Delete page types. -""" -type PageTypeBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! -} - -type PageTypeCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [PageTypeCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type PageTypeCountableEdge { - """ - The item at the end of the edge. - """ - node: PageType! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Create a new page type. -""" -type PageTypeCreate { - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! - pageType: PageType -} - -input PageTypeCreateInput { - """ - Name of the page type. - """ - name: String - - """ - Page type slug. - """ - slug: String - - """ - List of attribute IDs to be assigned to the page type. - """ - addAttributes: [ID!] -} - -""" -Delete a page type. -""" -type PageTypeDelete { - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! - pageType: PageType -} - -input PageTypeFilterInput { - search: String -} - -""" -Reorder the attributes of a page type. -""" -type PageTypeReorderAttributes { - """ - Page type from which attributes are reordered. - """ - pageType: PageType - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! -} - -enum PageTypeSortField { - """ - Sort page types by name. - """ - NAME - - """ - Sort page types by slug. - """ - SLUG -} - -input PageTypeSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort page types by the selected field. - """ - field: PageTypeSortField! -} - -""" -Update page type. -""" -type PageTypeUpdate { - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! - pageType: PageType -} - -input PageTypeUpdateInput { - """ - Name of the page type. - """ - name: String - - """ - Page type slug. - """ - slug: String - - """ - List of attribute IDs to be assigned to the page type. - """ - addAttributes: [ID!] - - """ - List of attribute IDs to be assigned to the page type. - """ - removeAttributes: [ID!] -} - -""" -Updates an existing page. -""" -type PageUpdate { - pageErrors: [PageError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PageError!]! - page: Page -} - -""" -Change the password of the logged in user. -""" -type PasswordChange { - """ - A user instance with a new password. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Represents a payment of a given type. -""" -type Payment implements Node { - """ - The ID of the object. - """ - id: ID! - gateway: String! - isActive: Boolean! - created: DateTime! - modified: DateTime! - token: String! - checkout: Checkout - order: Order - paymentMethodType: String! - customerIpAddress: String - - """ - Internal payment status. - """ - chargeStatus: PaymentChargeStatusEnum! - - """ - List of actions that can be performed in the current state of a payment. - """ - actions: [OrderAction]! - - """ - Total amount of the payment. - """ - total: Money - - """ - Total amount captured for this payment. - """ - capturedAmount: Money - - """ - List of all transactions within this payment. - """ - transactions: [Transaction] - - """ - Maximum amount of money that can be captured. - """ - availableCaptureAmount: Money - - """ - Maximum amount of money that can be refunded. - """ - availableRefundAmount: Money - - """ - The details of the card used for this payment. - """ - creditCard: CreditCard -} - -""" -Captures the authorized payment amount. -""" -type PaymentCapture { - """ - Updated payment. - """ - payment: Payment - paymentErrors: [PaymentError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PaymentError!]! -} - -""" -An enumeration. -""" -enum PaymentChargeStatusEnum { - NOT_CHARGED - PENDING - PARTIALLY_CHARGED - FULLY_CHARGED - PARTIALLY_REFUNDED - FULLY_REFUNDED - REFUSED - CANCELLED -} - -type PaymentCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [PaymentCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type PaymentCountableEdge { - """ - The item at the end of the edge. - """ - node: Payment! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -type PaymentError { - """ - 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: PaymentErrorCode! -} - -""" -An enumeration. -""" -enum PaymentErrorCode { - BILLING_ADDRESS_NOT_SET - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE - PARTIAL_PAYMENT_NOT_ALLOWED - SHIPPING_ADDRESS_NOT_SET - INVALID_SHIPPING_METHOD - SHIPPING_METHOD_NOT_SET - PAYMENT_ERROR - NOT_SUPPORTED_GATEWAY - CHANNEL_INACTIVE -} - -input PaymentFilterInput { - checkouts: [ID] -} - -""" -Available payment gateway backend with configuration necessary to setup client. -""" -type PaymentGateway { - """ - Payment gateway name. - """ - name: String! - - """ - Payment gateway ID. - """ - id: ID! - - """ - Payment gateway client configuration. - """ - config: [GatewayConfigLine!]! - - """ - Payment gateway supported currencies. - """ - currencies: [String]! -} - -""" -Initializes payment process when it is required by gateway. -""" -type PaymentInitialize { - initializedPayment: PaymentInitialized - paymentErrors: [PaymentError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PaymentError!]! -} - -""" -Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session. -""" -type PaymentInitialized { - """ - ID of a payment gateway. - """ - gateway: String! - - """ - Payment gateway name. - """ - name: String! - - """ - Initialized data by gateway. - """ - data: JSONString -} - -input PaymentInput { - """ - A gateway to use with that payment. - """ - gateway: String! - - """ - Client-side generated payment token, representing customer's billing data in a secure manner. - """ - token: String - - """ - Total amount of the transaction, including all taxes and discounts. If no amount is provided, the checkout total will be used. - """ - amount: PositiveDecimal - - """ - URL of a storefront view where user should be redirected after requiring additional actions. Payment with additional actions will not be finished if this field is not provided. - """ - returnUrl: String -} - -""" -Refunds the captured payment amount. -""" -type PaymentRefund { - """ - Updated payment. - """ - payment: Payment - paymentErrors: [PaymentError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PaymentError!]! -} - -""" -Represents a payment source stored for user in payment gateway, such as credit card. -""" -type PaymentSource { - """ - Payment gateway name. - """ - gateway: String! - - """ - Stored credit card details if available. - """ - creditCardInfo: CreditCard -} - -""" -Voids the authorized payment. -""" -type PaymentVoid { - """ - Updated payment. - """ - payment: Payment - paymentErrors: [PaymentError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PaymentError!]! -} - -""" -Represents a permission object in a friendly form. -""" -type Permission { - """ - Internal code for permission. - """ - code: PermissionEnum! - - """ - Describe action(s) allowed to do by permission. - """ - name: String! -} - -""" -An enumeration. -""" -enum PermissionEnum { - MANAGE_USERS - MANAGE_STAFF - MANAGE_APPS - MANAGE_CHANNELS - MANAGE_DISCOUNTS - MANAGE_PLUGINS - MANAGE_GIFT_CARD - MANAGE_MENUS - MANAGE_ORDERS - MANAGE_PAGES - MANAGE_PAGE_TYPES_AND_ATTRIBUTES - MANAGE_PRODUCTS - MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES - MANAGE_SHIPPING - MANAGE_SETTINGS - MANAGE_TRANSLATIONS - MANAGE_CHECKOUTS -} - -""" -Create new permission group. -""" -type PermissionGroupCreate { - permissionGroupErrors: [PermissionGroupError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PermissionGroupError!]! - group: Group -} - -input PermissionGroupCreateInput { - """ - List of permission code names to assign to this group. - """ - addPermissions: [PermissionEnum!] - - """ - List of users to assign to this group. - """ - addUsers: [ID!] - - """ - Group name. - """ - name: String! -} - -""" -Delete permission group. -""" -type PermissionGroupDelete { - permissionGroupErrors: [PermissionGroupError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PermissionGroupError!]! - group: Group -} - -type PermissionGroupError { - """ - 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: PermissionGroupErrorCode! - - """ - List of permissions which causes the error. - """ - permissions: [PermissionEnum!] - - """ - List of user IDs which causes the error. - """ - users: [ID!] -} - -""" -An enumeration. -""" -enum PermissionGroupErrorCode { - ASSIGN_NON_STAFF_MEMBER - DUPLICATED_INPUT_ITEM - CANNOT_REMOVE_FROM_LAST_GROUP - LEFT_NOT_MANAGEABLE_PERMISSION - OUT_OF_SCOPE_PERMISSION - OUT_OF_SCOPE_USER - REQUIRED - UNIQUE -} - -input PermissionGroupFilterInput { - search: String -} - -enum PermissionGroupSortField { - """ - Sort permission group accounts by name. - """ - NAME -} - -input PermissionGroupSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort permission group by the selected field. - """ - field: PermissionGroupSortField! -} - -""" -Update permission group. -""" -type PermissionGroupUpdate { - permissionGroupErrors: [PermissionGroupError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PermissionGroupError!]! - group: Group -} - -input PermissionGroupUpdateInput { - """ - List of permission code names to assign to this group. - """ - addPermissions: [PermissionEnum!] - - """ - List of users to assign to this group. - """ - addUsers: [ID!] - - """ - Group name. - """ - name: String - - """ - List of permission code names to unassign from this group. - """ - removePermissions: [PermissionEnum!] - - """ - List of users to unassign from this group. - """ - removeUsers: [ID!] -} - -""" -Plugin. -""" -type Plugin { - """ - Identifier of the plugin. - """ - id: ID! - - """ - Name of the plugin. - """ - name: String! - - """ - Description of the plugin. - """ - description: String! - - """ - Global configuration of the plugin (not channel-specific). - """ - globalConfiguration: PluginConfiguration - - """ - Channel-specific plugin configuration. - """ - channelConfigurations: [PluginConfiguration!]! -} - -""" -Stores information about a configuration of plugin. -""" -type PluginConfiguration { - """ - Determines if plugin is active or not. - """ - active: Boolean! - - """ - The channel to which the plugin configuration is assigned to. - """ - channel: Channel - - """ - Configuration of the plugin. - """ - configuration: [ConfigurationItem] -} - -enum PluginConfigurationType { - PER_CHANNEL - GLOBAL -} - -type PluginCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [PluginCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type PluginCountableEdge { - """ - The item at the end of the edge. - """ - node: Plugin! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -type PluginError { - """ - 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: PluginErrorCode! -} - -""" -An enumeration. -""" -enum PluginErrorCode { - GRAPHQL_ERROR - INVALID - PLUGIN_MISCONFIGURED - NOT_FOUND - REQUIRED - UNIQUE -} - -input PluginFilterInput { - statusInChannels: PluginStatusInChannelsInput - search: String - type: PluginConfigurationType -} - -enum PluginSortField { - NAME - IS_ACTIVE -} - -input PluginSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort plugins by the selected field. - """ - field: PluginSortField! -} - -input PluginStatusInChannelsInput { - active: Boolean! - channels: [ID!]! -} - -""" -Update plugin configuration. -""" -type PluginUpdate { - plugin: Plugin - pluginsErrors: [PluginError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [PluginError!]! -} - -input PluginUpdateInput { - """ - Indicates whether the plugin should be enabled. - """ - active: Boolean - - """ - Configuration of the plugin. - """ - configuration: [ConfigurationItemInput] -} - -""" -Positive Decimal scalar implementation. - -Should be used in places where value must be positive. -""" -scalar PositiveDecimal - -""" -An enumeration. -""" -enum PostalCodeRuleInclusionTypeEnum { - INCLUDE - EXCLUDE -} - -input PriceRangeInput { - """ - Price greater than or equal to. - """ - gte: Float - - """ - Price less than or equal to. - """ - lte: Float -} - -""" -Represents an individual item for sale in the storefront. -""" -type Product implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - productType: ProductType! - slug: String! - category: Category - updatedAt: DateTime - chargeTaxes: Boolean! - weight: Weight - defaultVariant: ProductVariant - rating: Float - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Description of the product (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") - - """ - The main thumbnail for a product. - """ - thumbnail( - """ - Size of thumbnail. - """ - size: Int - ): Image - - """ - Lists the storefront product's pricing, the current price and discounts, only meant for displaying. - """ - pricing( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - ): ProductPricingInfo - - """ - Whether the product is in stock and visible or not. - """ - isAvailable( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - ): Boolean - - """ - A type of tax. Assigned by enabled tax gateway - """ - taxType: TaxType - - """ - List of attributes assigned to this product. - """ - attributes: [SelectedAttribute!]! - - """ - List of availability in channels for the product. - """ - channelListings: [ProductChannelListing!] - - """ - Get a single product media by ID. - """ - mediaById( - """ - ID of a product media. - """ - id: ID - ): ProductMedia! - - """ - Get a single product image by ID. - """ - imageById( - """ - ID of a product image. - """ - id: ID - ): ProductImage @deprecated(reason: "Will be removed in Saleor 4.0. Use the `mediaById` field instead.") - - """ - List of variants for the product. - """ - variants: [ProductVariant] - - """ - List of media for the product. - """ - media: [ProductMedia!] - - """ - List of images for the product. - """ - images: [ProductImage] @deprecated(reason: "Will be removed in Saleor 4.0. Use the `media` field instead.") - - """ - List of collections for the product. - """ - collections: [Collection] - - """ - Returns translated product fields for the given language code. - """ - translation( - """ - A language code to return the translation for product. - """ - languageCode: LanguageCodeEnum! - ): ProductTranslation - - """ - Date when product is available for purchase. - """ - availableForPurchase: Date - - """ - Whether the product is available for purchase. - """ - isAvailableForPurchase: Boolean -} - -""" -Assign attributes to a given product type. -""" -type ProductAttributeAssign { - """ - The updated product type. - """ - productType: ProductType - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -input ProductAttributeAssignInput { - """ - The ID of the attribute to assign. - """ - id: ID! - - """ - The attribute type to be assigned as. - """ - type: ProductAttributeType! -} - -enum ProductAttributeType { - PRODUCT - VARIANT -} - -""" -Un-assign attributes from a given product type. -""" -type ProductAttributeUnassign { - """ - The updated product type. - """ - productType: ProductType - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Deletes products. -""" -type ProductBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Represents product channel listing. -""" -type ProductChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - publicationDate: Date - isPublished: Boolean! - channel: Channel! - visibleInListings: Boolean! - availableForPurchase: Date - - """ - The price of the cheapest variant (including discounts). - """ - discountedPrice: Money - - """ - Purchase cost of product. - """ - purchaseCost: MoneyRange - - """ - Range of margin percentage value. - """ - margin: Margin - - """ - Whether the product is available for purchase. - """ - isAvailableForPurchase: Boolean - - """ - Lists the storefront product's pricing, the current price and discounts, only meant for displaying. - """ - pricing( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - ): ProductPricingInfo -} - -input ProductChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Determines if object is visible to customers. - """ - isPublished: Boolean - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: Date - - """ - Determines if product is visible in product listings (doesn't apply to product collections). - """ - visibleInListings: Boolean - - """ - Determine if product should be available for purchase. - """ - isAvailableForPurchase: Boolean - - """ - A start date from which a product will be available for purchase. When not set and isAvailable is set to True, the current day is assumed. - """ - availableForPurchaseDate: Date - - """ - List of variants to which the channel should be assigned. - """ - addVariants: [ID!] - - """ - List of variants from which the channel should be unassigned. - """ - removeVariants: [ID!] -} - -type ProductChannelListingError { - """ - 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: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] - - """ - List of channels IDs which causes the error. - """ - channels: [ID!] - - """ - List of variants IDs which causes the error. - """ - variants: [ID!] -} - -""" -Manage product's availability in channels. -""" -type ProductChannelListingUpdate { - """ - An updated product instance. - """ - product: Product - productChannelListingErrors: [ProductChannelListingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductChannelListingError!]! -} - -input ProductChannelListingUpdateInput { - """ - List of channels to which the product should be assigned or updated. - """ - updateChannels: [ProductChannelListingAddInput!] - - """ - List of channels from which the product should be unassigned. - """ - removeChannels: [ID!] -} - -type ProductCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [ProductCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type ProductCountableEdge { - """ - The item at the end of the edge. - """ - node: Product! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new product. -""" -type ProductCreate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - product: Product -} - -input ProductCreateInput { - """ - List of attributes. - """ - attributes: [AttributeValueInput!] - - """ - ID of the product's category. - """ - category: ID - - """ - Determine if taxes are being charged for the product. - """ - chargeTaxes: Boolean - - """ - List of IDs of collections that the product belongs to. - """ - collections: [ID!] - - """ - Product description (JSON). - """ - description: JSONString - - """ - Product name. - """ - name: String - - """ - Product slug. - """ - slug: String - - """ - Tax rate for enabled tax gateway. - """ - taxCode: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Weight of the Product. - """ - weight: WeightScalar - - """ - Defines the product rating value. - """ - rating: Float - - """ - ID of the type that product belongs to. - """ - productType: ID! -} - -""" -Deletes a product. -""" -type ProductDelete { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - product: Product -} - -type ProductError { - """ - 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: ProductErrorCode! - - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] -} - -""" -An enumeration. -""" -enum ProductErrorCode { - ALREADY_EXISTS - ATTRIBUTE_ALREADY_ASSIGNED - ATTRIBUTE_CANNOT_BE_ASSIGNED - ATTRIBUTE_VARIANTS_DISABLED - DUPLICATED_INPUT_ITEM - GRAPHQL_ERROR - INVALID - PRODUCT_WITHOUT_CATEGORY - NOT_PRODUCTS_IMAGE - NOT_PRODUCTS_VARIANT - NOT_FOUND - REQUIRED - UNIQUE - VARIANT_NO_DIGITAL_CONTENT - CANNOT_MANAGE_PRODUCT_WITHOUT_VARIANT - PRODUCT_NOT_ASSIGNED_TO_CHANNEL - UNSUPPORTED_MEDIA_PROVIDER -} - -enum ProductFieldEnum { - NAME - DESCRIPTION - PRODUCT_TYPE - CATEGORY - PRODUCT_WEIGHT - COLLECTIONS - CHARGE_TAXES - PRODUCT_MEDIA - VARIANT_SKU - VARIANT_WEIGHT - VARIANT_MEDIA -} - -input ProductFilterInput { - isPublished: Boolean - collections: [ID] - categories: [ID] - hasCategory: Boolean - attributes: [AttributeInput] - stockAvailability: StockAvailability - stocks: ProductStockFilterInput - search: String - metadata: [MetadataInput] - price: PriceRangeInput - minimalPrice: PriceRangeInput - productTypes: [ID] - ids: [ID] - - """ - Specifies the channel by which the data should be sorted. - """ - channel: String -} - -""" -Represents a product image. -""" -type ProductImage { - """ - The ID of the image. - """ - id: ID! - - """ - The alt text of the image. - """ - alt: String - - """ - The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. - """ - sortOrder: Int - - """ - The URL of the image. - """ - url( - """ - Size of the image. - """ - size: Int - ): String! -} - -input ProductInput { - """ - List of attributes. - """ - attributes: [AttributeValueInput!] - - """ - ID of the product's category. - """ - category: ID - - """ - Determine if taxes are being charged for the product. - """ - chargeTaxes: Boolean - - """ - List of IDs of collections that the product belongs to. - """ - collections: [ID!] - - """ - Product description (JSON). - """ - description: JSONString - - """ - Product name. - """ - name: String - - """ - Product slug. - """ - slug: String - - """ - Tax rate for enabled tax gateway. - """ - taxCode: String - - """ - Search engine optimization fields. - """ - seo: SeoInput - - """ - Weight of the Product. - """ - weight: WeightScalar - - """ - Defines the product rating value. - """ - rating: Float -} - -""" -Represents a product media. -""" -type ProductMedia implements Node { - """ - The ID of the object. - """ - id: ID! - sortOrder: Int - alt: String! - type: ProductMediaType! - oembedData: JSONString! - - """ - The URL of the media. - """ - url( - """ - Size of the image. - """ - size: Int - ): String! -} - -""" -Deletes product media. -""" -type ProductMediaBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Create a media object (image or video URL) associated with product. For image, this mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec -""" -type ProductMediaCreate { - product: Product - media: ProductMedia - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -input ProductMediaCreateInput { - """ - Alt text for a product media. - """ - alt: String - - """ - Represents an image file in a multipart request. - """ - image: Upload - - """ - ID of an product. - """ - product: ID! - - """ - Represents an URL to an external media. - """ - mediaUrl: String -} - -""" -Deletes a product media. -""" -type ProductMediaDelete { - product: Product - media: ProductMedia - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Changes ordering of the product media. -""" -type ProductMediaReorder { - product: Product - media: [ProductMedia!] - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -An enumeration. -""" -enum ProductMediaType { - """ - An uploaded image or an URL to an image - """ - IMAGE - - """ - A URL to an external video - """ - VIDEO -} - -""" -Updates a product media. -""" -type ProductMediaUpdate { - product: Product - media: ProductMedia - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -input ProductMediaUpdateInput { - """ - Alt text for a product media. - """ - alt: String -} - -input ProductOrder { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort product by the selected attribute's values. - Note: this doesn't take translations into account yet. - """ - attributeId: ID - - """ - Sort products by the selected field. - """ - field: ProductOrderField -} - -enum ProductOrderField { - """ - Sort products by name. - """ - NAME - - """ - Sort products by rank. Note: This option is available only with the `search` filter. - """ - RANK - - """ - Sort products by price. - """ - PRICE - - """ - Sort products by a minimal price of a product's variant. - """ - MINIMAL_PRICE - - """ - Sort products by update date. - """ - DATE - - """ - Sort products by type. - """ - TYPE - - """ - Sort products by publication status. - """ - PUBLISHED - - """ - Sort products by publication date. - """ - PUBLICATION_DATE - - """ - Sort products by collection. Note: This option is available only for the `Collection.products` query. - """ - COLLECTION - - """ - Sort products by rating. - """ - RATING -} - -""" -Represents availability of a product in the storefront. -""" -type ProductPricingInfo { - """ - Whether it is in sale or not. - """ - onSale: Boolean - - """ - The discount amount if in sale (null otherwise). - """ - discount: TaxedMoney - - """ - The discount amount in the local currency. - """ - discountLocalCurrency: TaxedMoney - - """ - The discounted price range of the product variants. - """ - priceRange: TaxedMoneyRange - - """ - The undiscounted price range of the product variants. - """ - priceRangeUndiscounted: TaxedMoneyRange - - """ - The discounted price range of the product variants in the local currency. - """ - priceRangeLocalCurrency: TaxedMoneyRange -} - -""" -Reorder product attribute values. -""" -type ProductReorderAttributeValues { - """ - Product from which attribute values are reordered. - """ - product: Product - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -input ProductStockFilterInput { - warehouseIds: [ID!] - quantity: IntRangeInput -} - -type ProductTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - - """ - Description of the product (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") - - """ - Returns translated product fields for the given language code. - """ - translation( - """ - A language code to return the translation for product. - """ - languageCode: LanguageCodeEnum! - ): ProductTranslation - - """ - Represents an individual item for sale in the storefront. - """ - product: Product -} - -""" -Creates/Updates translations for Product. -""" -type ProductTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - product: Product -} - -type ProductTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - seoTitle: String - seoDescription: String - name: String! - description: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! - - """ - Translated description of the product (JSON). - """ - descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") -} - -""" -Represents a type of product. It defines what attributes are available to products of this type. -""" -type ProductType implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - slug: String! - hasVariants: Boolean! - isShippingRequired: Boolean! - isDigital: Boolean! - weight: Weight - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of products of this type. - """ - products( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): ProductCountableConnection - @deprecated( - reason: "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 - - """ - Variant attributes of that product type. - """ - variantAttributes( - """ - Define scope of returned attributes. - """ - variantSelection: VariantAttributeScope - ): [Attribute] - - """ - Product attributes of that product type. - """ - productAttributes: [Attribute] - availableAttributes( - filter: AttributeFilterInput - - """ - 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 - ): AttributeCountableConnection -} - -""" -Deletes product types. -""" -type ProductTypeBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -enum ProductTypeConfigurable { - CONFIGURABLE - SIMPLE -} - -type ProductTypeCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [ProductTypeCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type ProductTypeCountableEdge { - """ - The item at the end of the edge. - """ - node: ProductType! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new product type. -""" -type ProductTypeCreate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - productType: ProductType -} - -""" -Deletes a product type. -""" -type ProductTypeDelete { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - productType: ProductType -} - -enum ProductTypeEnum { - DIGITAL - SHIPPABLE -} - -input ProductTypeFilterInput { - search: String - configurable: ProductTypeConfigurable - productType: ProductTypeEnum - metadata: [MetadataInput] - ids: [ID] -} - -input ProductTypeInput { - """ - Name of the product type. - """ - name: String - - """ - Product type slug. - """ - slug: String - - """ - Determines if product of this type has multiple variants. This option mainly simplifies product management in the dashboard. There is always at least one variant created under the hood. - """ - hasVariants: Boolean - - """ - List of attributes shared among all product variants. - """ - productAttributes: [ID] - - """ - List of attributes used to distinguish between different variants of a product. - """ - variantAttributes: [ID] - - """ - Determines if shipping is required for products of this variant. - """ - isShippingRequired: Boolean - - """ - Determines if products are digital. - """ - isDigital: Boolean - - """ - Weight of the ProductType items. - """ - weight: WeightScalar - - """ - Tax rate for enabled tax gateway. - """ - taxCode: String -} - -""" -Reorder the attributes of a product type. -""" -type ProductTypeReorderAttributes { - """ - Product type from which attributes are reordered. - """ - productType: ProductType - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -enum ProductTypeSortField { - """ - Sort products by name. - """ - NAME - - """ - Sort products by type. - """ - DIGITAL - - """ - Sort products by shipping. - """ - SHIPPING_REQUIRED -} - -input ProductTypeSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort product types by the selected field. - """ - field: ProductTypeSortField! -} - -""" -Updates an existing product type. -""" -type ProductTypeUpdate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - productType: ProductType -} - -""" -Updates an existing product. -""" -type ProductUpdate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - product: Product -} - -""" -Represents a version of a product such as different size or color. -""" -type ProductVariant implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - sku: String! - product: Product! - trackInventory: Boolean! - weight: Weight - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of price information in channels for the product. - """ - channelListings: [ProductVariantChannelListing!] - - """ - Lists the storefront variant's pricing, the current price and discounts, only meant for displaying. - """ - pricing( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - ): VariantPricingInfo - - """ - List of attributes assigned to this variant. - """ - attributes( - """ - Define scope of returned attributes. - """ - variantSelection: VariantAttributeScope - ): [SelectedAttribute!]! - - """ - Cost price of the variant. - """ - costPrice: Money - - """ - Gross margin percentage value. - """ - margin: Int - - """ - Total quantity ordered. - """ - quantityOrdered: Int - - """ - Total revenue generated by a variant in given period of time. Note: this field should be queried using `reportProductSales` query as it uses optimizations suitable for such calculations. - """ - revenue(period: ReportingPeriod): TaxedMoney - - """ - List of images for the product variant. - """ - images: [ProductImage] @deprecated(reason: "Will be removed in Saleor 4.0. Use the `media` instead.") - - """ - List of media for the product variant. - """ - media: [ProductMedia!] - - """ - Returns translated product variant fields for the given language code. - """ - translation( - """ - A language code to return the translation for product variant. - """ - languageCode: LanguageCodeEnum! - ): ProductVariantTranslation - - """ - Digital content for the product variant. - """ - digitalContent: DigitalContent - - """ - Stocks for the product variant. - """ - stocks( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - - """ - DEPRECATED: use `address` argument instead. This argument will be removed in Saleor 4.0. Two-letter ISO 3166-1 country code. - """ - countryCode: CountryCode - ): [Stock] - - """ - Quantity of a product available for sale in one checkout. - """ - quantityAvailable( - """ - Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. - """ - address: AddressInput - - """ - DEPRECATED: use `address` argument instead. This argument will be removed in Saleor 4.0.Two-letter ISO 3166-1 country code. When provided, the exact quantity from a warehouse operating in shipping zones that contain this country will be returned. Otherwise, it will return the maximum quantity from all shipping zones. - """ - countryCode: CountryCode - ): Int! -} - -""" -Creates product variants for a given product. -""" -type ProductVariantBulkCreate { - """ - Returns how many objects were created. - """ - count: Int! - - """ - List of the created variants. - """ - productVariants: [ProductVariant!]! - bulkProductErrors: [BulkProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [BulkProductError!]! -} - -input ProductVariantBulkCreateInput { - """ - List of attributes specific to this variant. - """ - attributes: [BulkAttributeValueInput]! - - """ - Stock keeping unit. - """ - sku: String! - - """ - Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. - """ - trackInventory: Boolean - - """ - Weight of the Product Variant. - """ - weight: WeightScalar - - """ - Stocks of a product available for sale. - """ - stocks: [StockInput!] - - """ - List of prices assigned to channels. - """ - channelListings: [ProductVariantChannelListingAddInput!] -} - -""" -Deletes product variants. -""" -type ProductVariantBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Represents product varaint channel listing. -""" -type ProductVariantChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - channel: Channel! - price: Money - - """ - Cost price of the variant. - """ - costPrice: Money - - """ - Gross margin percentage value. - """ - margin: Int -} - -input ProductVariantChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Price of the particular variant in channel. - """ - price: PositiveDecimal! - - """ - Cost price of the variant in channel. - """ - costPrice: PositiveDecimal -} - -""" -Manage product variant prices in channels. -""" -type ProductVariantChannelListingUpdate { - """ - An updated product variant instance. - """ - variant: ProductVariant - productChannelListingErrors: [ProductChannelListingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductChannelListingError!]! -} - -type ProductVariantCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [ProductVariantCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type ProductVariantCountableEdge { - """ - The item at the end of the edge. - """ - node: ProductVariant! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new variant for a product. -""" -type ProductVariantCreate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - productVariant: ProductVariant -} - -input ProductVariantCreateInput { - """ - List of attributes specific to this variant. - """ - attributes: [AttributeValueInput]! - - """ - Stock keeping unit. - """ - sku: String - - """ - Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. - """ - trackInventory: Boolean - - """ - Weight of the Product Variant. - """ - weight: WeightScalar - - """ - Product ID of which type is the variant. - """ - product: ID! - - """ - Stocks of a product available for sale. - """ - stocks: [StockInput!] -} - -""" -Deletes a product variant. -""" -type ProductVariantDelete { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - productVariant: ProductVariant -} - -input ProductVariantFilterInput { - search: String - sku: [String] - metadata: [MetadataInput] -} - -input ProductVariantInput { - """ - List of attributes specific to this variant. - """ - attributes: [AttributeValueInput] - - """ - Stock keeping unit. - """ - sku: String - - """ - Determines if the inventory of this variant should be tracked. If false, the quantity won't change when customers buy this item. - """ - trackInventory: Boolean - - """ - Weight of the Product Variant. - """ - weight: WeightScalar -} - -""" -Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. -""" -type ProductVariantReorder { - product: Product - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Reorder product variant attribute values. -""" -type ProductVariantReorderAttributeValues { - """ - Product variant from which attribute values are reordered. - """ - productVariant: ProductVariant - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. -""" -type ProductVariantSetDefault { - product: Product - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Creates stocks for product variant. -""" -type ProductVariantStocksCreate { - """ - Updated product variant. - """ - productVariant: ProductVariant - bulkStockErrors: [BulkStockError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [BulkStockError!]! -} - -""" -Delete stocks from product variant. -""" -type ProductVariantStocksDelete { - """ - Updated product variant. - """ - productVariant: ProductVariant - stockErrors: [StockError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [StockError!]! -} - -""" -Update stocks for product variant. -""" -type ProductVariantStocksUpdate { - """ - Updated product variant. - """ - productVariant: ProductVariant - bulkStockErrors: [BulkStockError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [BulkStockError!]! -} - -type ProductVariantTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated product variant fields for the given language code. - """ - translation( - """ - A language code to return the translation for product variant. - """ - languageCode: LanguageCodeEnum! - ): ProductVariantTranslation - - """ - Represents a version of a product such as different size or color. - """ - productVariant: ProductVariant -} - -""" -Creates/Updates translations for Product Variant. -""" -type ProductVariantTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - productVariant: ProductVariant -} - -type ProductVariantTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -Updates an existing variant for product. -""" -type ProductVariantUpdate { - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! - productVariant: ProductVariant -} - -input PublishableChannelListingInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Determines if object is visible to customers. - """ - isPublished: Boolean - - """ - Publication date. ISO 8601 standard. - """ - publicationDate: Date -} - -type Query { - """ - Look up a webhook by ID. - """ - webhook( - """ - ID of the webhook. - """ - id: ID! - ): Webhook - - """ - List of all available webhook events. - """ - webhookEvents: [WebhookEvent] - - """ - Retrieve a sample payload for a given webhook event based on real data. It can be useful for some integrations where sample payload is required. - """ - webhookSamplePayload( - """ - Name of the requested event type. - """ - eventType: WebhookSampleEventTypeEnum! - ): JSONString - - """ - Look up a warehouse by ID. - """ - warehouse( - """ - ID of an warehouse - """ - id: ID! - ): Warehouse - - """ - List of warehouses. - """ - warehouses( - filter: WarehouseFilterInput - sortBy: WarehouseSortingInput - - """ - 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 - ): WarehouseCountableConnection - - """ - Returns a list of all translatable items of a given kind. - """ - translations( - """ - Kind of objects to retrieve. - """ - kind: TranslatableKinds! - - """ - 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 - ): TranslatableItemConnection - translation( - """ - ID of the object to retrieve. - """ - id: ID! - - """ - Kind of the object to retrieve. - """ - kind: TranslatableKinds! - ): TranslatableItem - - """ - Look up a stock by ID - """ - stock( - """ - ID of an warehouse - """ - id: ID! - ): Stock - - """ - List of stocks. - """ - stocks( - filter: StockFilterInput - - """ - 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 - ): StockCountableConnection - - """ - Return information about the shop. - """ - shop: Shop! - - """ - Order related settings from site settings. - """ - orderSettings: OrderSettings - - """ - Look up a shipping zone by ID. - """ - shippingZone( - """ - ID of the shipping zone. - """ - id: ID! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): ShippingZone - - """ - List of the shop's shipping zones. - """ - shippingZones( - """ - Filtering options for shipping zones. - """ - filter: ShippingZoneFilterInput - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): ShippingZoneCountableConnection - - """ - Look up digital content by ID. - """ - digitalContent( - """ - ID of the digital content. - """ - id: ID! - ): DigitalContent - - """ - List of digital content. - """ - digitalContents( - """ - 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 - ): DigitalContentCountableConnection - - """ - List of the shop's categories. - """ - categories( - """ - Filtering options for categories. - """ - filter: CategoryFilterInput - - """ - Sort categories. - """ - sortBy: CategorySortingInput - - """ - Filter categories by the nesting level in the category tree. - """ - level: Int - - """ - 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 - ): CategoryCountableConnection - - """ - Look up a category by ID or slug. - """ - category( - """ - ID of the category. - """ - id: ID - - """ - Slug of the category - """ - slug: String - ): Category - - """ - Look up a collection by ID. - """ - collection( - """ - ID of the collection. - """ - id: ID - - """ - Slug of the category - """ - slug: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): Collection - - """ - List of the shop's collections. - """ - collections( - """ - Filtering options for collections. - """ - filter: CollectionFilterInput - - """ - Sort collections. - """ - sortBy: CollectionSortingInput - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): CollectionCountableConnection - - """ - Look up a product by ID. - """ - product( - """ - ID of the product. - """ - id: ID - - """ - Slug of the product. - """ - slug: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): Product - - """ - List of the shop's products. - """ - products( - """ - Filtering options for products. - """ - filter: ProductFilterInput - - """ - Sort products. - """ - sortBy: ProductOrder - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): ProductCountableConnection - - """ - Look up a product type by ID. - """ - productType( - """ - ID of the product type. - """ - id: ID! - ): ProductType - - """ - List of the shop's product types. - """ - productTypes( - """ - Filtering options for product types. - """ - filter: ProductTypeFilterInput - - """ - Sort product types. - """ - sortBy: ProductTypeSortingInput - - """ - 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 - ): ProductTypeCountableConnection - - """ - Look up a product variant by ID or SKU. - """ - productVariant( - """ - ID of the product variant. - """ - id: ID - - """ - Sku of the product variant. - """ - sku: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): ProductVariant - - """ - List of product variants. - """ - productVariants( - """ - Filter product variants by given IDs. - """ - ids: [ID] - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Filtering options for product variant. - """ - filter: ProductVariantFilterInput - - """ - 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 - ): ProductVariantCountableConnection - - """ - List of top selling products. - """ - reportProductSales( - """ - Span of time. - """ - period: ReportingPeriod! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String! - - """ - 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 - ): ProductVariantCountableConnection - - """ - Look up a payment by ID. - """ - payment( - """ - ID of the payment. - """ - id: ID! - ): Payment - - """ - List of payments. - """ - payments( - """ - Filtering options for payments. - """ - filter: PaymentFilterInput - - """ - 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 - ): PaymentCountableConnection - - """ - Look up a page by ID or slug. - """ - page( - """ - ID of the page. - """ - id: ID - - """ - The slug of the page. - """ - slug: String - ): Page - - """ - List of the shop's pages. - """ - pages( - """ - Sort pages. - """ - sortBy: PageSortingInput - - """ - Filtering options for pages. - """ - filter: PageFilterInput - - """ - 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 - ): PageCountableConnection - - """ - Look up a page type by ID. - """ - pageType( - """ - ID of the page type. - """ - id: ID! - ): PageType - - """ - List of the page types. - """ - pageTypes( - """ - Sort page types. - """ - sortBy: PageTypeSortingInput - - """ - Filtering options for page types. - """ - filter: PageTypeFilterInput - - """ - 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 - ): PageTypeCountableConnection - - """ - List of activity events to display on homepage (at the moment it only contains order-events). - """ - homepageEvents( - """ - 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 - ): OrderEventCountableConnection - - """ - Look up an order by ID. - """ - order( - """ - ID of an order. - """ - id: ID! - ): Order - - """ - List of orders. - """ - orders( - """ - Sort orders. - """ - sortBy: OrderSortingInput - - """ - Filtering options for orders. - """ - filter: OrderFilterInput - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): OrderCountableConnection - - """ - List of draft orders. - """ - draftOrders( - """ - Sort draft orders. - """ - sortBy: OrderSortingInput - - """ - Filtering options for draft orders. - """ - filter: OrderDraftFilterInput - - """ - 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 - ): OrderCountableConnection - - """ - Return the total sales amount from a specific period. - """ - ordersTotal( - """ - A period of time. - """ - period: ReportingPeriod - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): TaxedMoney - - """ - Look up an order by token. - """ - orderByToken( - """ - The order's token. - """ - token: UUID! - ): Order - - """ - Look up a navigation menu by ID or name. - """ - menu( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - ID of the menu. - """ - id: ID - - """ - The menu's name. - """ - name: String - - """ - The menu's slug. - """ - slug: String - ): Menu - - """ - List of the storefront's menus. - """ - menus( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Sort menus. - """ - sortBy: MenuSortingInput - - """ - Filtering options for menus. - """ - filter: MenuFilterInput - - """ - 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 - ): MenuCountableConnection - - """ - Look up a menu item by ID. - """ - menuItem( - """ - ID of the menu item. - """ - id: ID! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): MenuItem - - """ - List of the storefronts's menu items. - """ - menuItems( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - Sort menus items. - """ - sortBy: MenuItemSortingInput - - """ - Filtering options for menu items. - """ - filter: MenuItemFilterInput - - """ - 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 - ): MenuItemCountableConnection - - """ - Look up a gift card by ID. - """ - giftCard( - """ - ID of the gift card. - """ - id: ID! - ): GiftCard - - """ - List of gift cards. - """ - giftCards( - """ - 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 - ): GiftCardCountableConnection - - """ - Look up a plugin by ID. - """ - plugin( - """ - ID of the plugin. - """ - id: ID! - ): Plugin - - """ - List of plugins. - """ - plugins( - """ - Filtering options for plugins. - """ - filter: PluginFilterInput - - """ - Sort plugins. - """ - sortBy: PluginSortingInput - - """ - 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 - ): PluginCountableConnection - - """ - Look up a sale by ID. - """ - sale( - """ - ID of the sale. - """ - id: ID! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): Sale - - """ - List of the shop's sales. - """ - sales( - """ - Filtering options for sales. - """ - filter: SaleFilterInput - - """ - Sort sales. - """ - sortBy: SaleSortingInput - - """ - Search sales by name, value or type. - """ - query: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): SaleCountableConnection - - """ - Look up a voucher by ID. - """ - voucher( - """ - ID of the voucher. - """ - id: ID! - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): Voucher - - """ - List of the shop's vouchers. - """ - vouchers( - """ - Filtering options for vouchers. - """ - filter: VoucherFilterInput - - """ - Sort voucher. - """ - sortBy: VoucherSortingInput - - """ - Search vouchers by name or code. - """ - query: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): VoucherCountableConnection - - """ - Look up a export file by ID. - """ - exportFile( - """ - ID of the export file job. - """ - id: ID! - ): ExportFile - - """ - List of export files. - """ - exportFiles( - """ - Filtering options for export files. - """ - filter: ExportFileFilterInput - - """ - Sort export files. - """ - sortBy: ExportFileSortingInput - - """ - 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 - ): ExportFileCountableConnection - - """ - List of all tax rates available from tax gateway. - """ - taxTypes: [TaxType] - - """ - Look up a checkout by token and slug of channel. - """ - checkout( - """ - The checkout's token. - """ - token: UUID - ): Checkout - - """ - List of checkouts. - """ - checkouts( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - - """ - 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 - ): CheckoutCountableConnection - - """ - Look up a checkout line by ID. - """ - checkoutLine( - """ - ID of the checkout line. - """ - id: ID - ): CheckoutLine - - """ - List of checkout lines. - """ - checkoutLines( - """ - 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 - ): CheckoutLineCountableConnection - - """ - Look up a channel by ID. - """ - channel( - """ - ID of the channel. - """ - id: ID - ): Channel - - """ - List of all channels. - """ - channels: [Channel!] - - """ - List of the shop's attributes. - """ - attributes( - """ - Filtering options for attributes. - """ - filter: AttributeFilterInput - - """ - Sorting options for attributes. - """ - sortBy: AttributeSortingInput - - """ - 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 - ): AttributeCountableConnection - - """ - Look up an attribute by ID. - """ - attribute( - """ - ID of the attribute. - """ - id: ID - - """ - Slug of the attribute. - """ - slug: String - ): Attribute - - """ - List of all apps installations - """ - appsInstallations: [AppInstallation!]! - - """ - List of the apps. - """ - apps( - """ - Filtering options for apps. - """ - filter: AppFilterInput - - """ - Sort apps. - """ - sortBy: AppSortingInput - - """ - 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 - ): AppCountableConnection - - """ - Look up an app by ID. If ID is not provided, return the currently authenticated app. - """ - app( - """ - ID of the app. - """ - id: ID - ): App - - """ - Returns address validation rules. - """ - addressValidationRules( - """ - Two-letter ISO 3166-1 country code. - """ - countryCode: CountryCode! - - """ - Designation of a region, province or state. - """ - countryArea: String - - """ - City or a town name. - """ - city: String - - """ - Sublocality like a district. - """ - cityArea: String - ): AddressValidationData - - """ - Look up an address by ID. - """ - address( - """ - ID of an address. - """ - id: ID! - ): Address - - """ - List of the shop's customers. - """ - customers( - """ - Filtering options for customers. - """ - filter: CustomerFilterInput - - """ - Sort customers. - """ - sortBy: UserSortingInput - - """ - 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 - ): UserCountableConnection - - """ - List of permission groups. - """ - permissionGroups( - """ - Filtering options for permission groups. - """ - filter: PermissionGroupFilterInput - - """ - Sort permission groups. - """ - sortBy: PermissionGroupSortingInput - - """ - 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 - ): GroupCountableConnection - - """ - Look up permission group by ID. - """ - permissionGroup( - """ - ID of the group. - """ - id: ID! - ): Group - - """ - Return the currently authenticated user. - """ - me: User - - """ - List of the shop's staff users. - """ - staffUsers( - """ - Filtering options for staff users. - """ - filter: StaffUserInput - - """ - Sort staff users. - """ - sortBy: UserSortingInput - - """ - 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 - ): UserCountableConnection - - """ - Look up a user by ID or email address. - """ - user( - """ - ID of the user. - """ - id: ID - - """ - Email address of the user. - """ - email: String - ): User - _entities(representations: [_Any]): [_Entity] - _service: _Service -} - -""" -Represents a reduced VAT rate for a particular type of goods. -""" -type ReducedRate { - """ - Reduced VAT rate in percent. - """ - rate: Float! - - """ - A type of goods. - """ - rateType: TaxRateType! -} - -""" -Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie. -""" -type RefreshToken { - """ - JWT token, required to authenticate. - """ - token: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -input ReorderInput { - """ - The ID of the item to move. - """ - id: ID! - - """ - The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. - """ - sortOrder: Int -} - -enum ReportingPeriod { - TODAY - THIS_MONTH -} - -""" -Request email change of the logged in user. -""" -type RequestEmailChange { - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Sends an email with the account password modification link. -""" -type RequestPasswordReset { - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Sales allow creating discounts for categories, collections or products and are visible to all the customers. -""" -type Sale implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - type: SaleType! - startDate: DateTime! - endDate: DateTime - - """ - List of categories this sale applies to. - """ - categories( - """ - 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 - ): CategoryCountableConnection - - """ - List of collections this sale applies to. - """ - collections( - """ - 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 - ): CollectionCountableConnection - - """ - List of products this sale applies to. - """ - products( - """ - 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 - ): ProductCountableConnection - - """ - Returns translated sale fields for the given language code. - """ - translation( - """ - A language code to return the translation for sale. - """ - languageCode: LanguageCodeEnum! - ): SaleTranslation - - """ - List of channels available for the sale. - """ - channelListings: [SaleChannelListing!] - - """ - Sale value. - """ - discountValue: Float - - """ - Currency code for sale. - """ - currency: String -} - -""" -Adds products, categories, collections to a voucher. -""" -type SaleAddCatalogues { - """ - Sale of which catalogue IDs will be modified. - """ - sale: Sale - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! -} - -""" -Deletes sales. -""" -type SaleBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! -} - -""" -Represents sale channel listing. -""" -type SaleChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - channel: Channel! - discountValue: Float! - currency: String! -} - -input SaleChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - The value of the discount. - """ - discountValue: PositiveDecimal! -} - -input SaleChannelListingInput { - """ - List of channels to which the sale should be assigned. - """ - addChannels: [SaleChannelListingAddInput!] - - """ - List of channels from which the sale should be unassigned. - """ - removeChannels: [ID!] -} - -""" -Manage sale's availability in channels. -""" -type SaleChannelListingUpdate { - """ - An updated sale instance. - """ - sale: Sale - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! -} - -type SaleCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [SaleCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type SaleCountableEdge { - """ - The item at the end of the edge. - """ - node: Sale! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new sale. -""" -type SaleCreate { - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! - sale: Sale -} - -""" -Deletes a sale. -""" -type SaleDelete { - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! - sale: Sale -} - -input SaleFilterInput { - status: [DiscountStatusEnum] - saleType: DiscountValueTypeEnum - started: DateTimeRangeInput - search: String -} - -input SaleInput { - """ - Voucher name. - """ - name: String - - """ - Fixed or percentage. - """ - type: DiscountValueTypeEnum - - """ - Value of the voucher. - """ - value: PositiveDecimal - - """ - Products related to the discount. - """ - products: [ID] - - """ - Categories related to the discount. - """ - categories: [ID] - - """ - Collections related to the discount. - """ - collections: [ID] - - """ - Start date of the voucher in ISO 8601 format. - """ - startDate: DateTime - - """ - End date of the voucher in ISO 8601 format. - """ - endDate: DateTime -} - -""" -Removes products, categories, collections from a sale. -""" -type SaleRemoveCatalogues { - """ - Sale of which catalogue IDs will be modified. - """ - sale: Sale - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! -} - -enum SaleSortField { - """ - Sort sales by name. - """ - NAME - - """ - Sort sales by start date. - """ - START_DATE - - """ - Sort sales by end date. - """ - END_DATE - - """ - Sort sales by value. - """ - VALUE - - """ - Sort sales by type. - """ - TYPE -} - -input SaleSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort sales by the selected field. - """ - field: SaleSortField! -} - -type SaleTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - - """ - Returns translated sale fields for the given language code. - """ - translation( - """ - A language code to return the translation for sale. - """ - languageCode: LanguageCodeEnum! - ): SaleTranslation - - """ - Sales allow creating discounts for categories, collections or products and are visible to all the customers. - """ - sale: Sale -} - -""" -Creates/updates translations for a sale. -""" -type SaleTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - sale: Sale -} - -type SaleTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -An enumeration. -""" -enum SaleType { - """ - fixed - """ - FIXED - - """ - % - """ - PERCENTAGE -} - -""" -Updates a sale. -""" -type SaleUpdate { - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! - sale: Sale -} - -""" -Represents a custom attribute. -""" -type SelectedAttribute { - """ - Name of an attribute displayed in the interface. - """ - attribute: Attribute! - - """ - Values of an attribute. - """ - values: [AttributeValue]! -} - -input SeoInput { - """ - SEO title. - """ - title: String - - """ - SEO description. - """ - description: String -} - -""" -Sets the user's password from the token sent by email using the RequestPasswordReset mutation. -""" -type SetPassword { - """ - JWT token, required to authenticate. - """ - token: String - - """ - JWT refresh token, required to re-generate access token. - """ - refreshToken: String - - """ - CSRF token required to re-generate access token. - """ - csrfToken: String - - """ - A user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -type ShippingError { - """ - 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: ShippingErrorCode! - - """ - List of warehouse IDs which causes the error. - """ - warehouses: [ID!] - - """ - List of channels IDs which causes the error. - """ - channels: [ID!] -} - -""" -An enumeration. -""" -enum ShippingErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - MAX_LESS_THAN_MIN - NOT_FOUND - REQUIRED - UNIQUE - DUPLICATED_INPUT_ITEM -} - -""" -Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. -""" -type ShippingMethod implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - description: JSONString - minimumOrderWeight: Weight - maximumOrderWeight: Weight - maximumDeliveryDays: Int - minimumDeliveryDays: Int - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Type of the shipping method. - """ - type: ShippingMethodTypeEnum - - """ - Returns translated shipping method fields for the given language code. - """ - translation( - """ - A language code to return the translation for shipping method. - """ - languageCode: LanguageCodeEnum! - ): ShippingMethodTranslation - - """ - List of channels available for the method. - """ - channelListings: [ShippingMethodChannelListing!] - - """ - The price of the cheapest variant (including discounts). - """ - price: Money - - """ - The price of the cheapest variant (including discounts). - """ - maximumOrderPrice: Money - - """ - The price of the cheapest variant (including discounts). - """ - minimumOrderPrice: Money - - """ - Postal code ranges rule of exclusion or inclusion of the shipping method. - """ - postalCodeRules: [ShippingMethodPostalCodeRule] - - """ - List of excluded products for the shipping method. - """ - excludedProducts( - """ - 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 - ): ProductCountableConnection -} - -""" -Represents shipping method channel listing. -""" -type ShippingMethodChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - channel: Channel! - minimumOrderPrice: Money - maximumOrderPrice: Money - price: Money -} - -input ShippingMethodChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Shipping price of the shipping method in this channel. - """ - price: PositiveDecimal - - """ - Minimum order price to use this shipping method. - """ - minimumOrderPrice: PositiveDecimal - - """ - Maximum order price to use this shipping method. - """ - maximumOrderPrice: PositiveDecimal -} - -input ShippingMethodChannelListingInput { - """ - List of channels to which the shipping method should be assigned. - """ - addChannels: [ShippingMethodChannelListingAddInput!] - - """ - List of channels from which the shipping method should be unassigned. - """ - removeChannels: [ID!] -} - -""" -Manage shipping method's availability in channels. -""" -type ShippingMethodChannelListingUpdate { - """ - An updated shipping method instance. - """ - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! -} - -""" -Represents shipping method postal code rule. -""" -type ShippingMethodPostalCodeRule implements Node { - """ - Start address range. - """ - start: String - - """ - End address range. - """ - end: String - - """ - Inclusion type of the postal code rule. - """ - inclusionType: PostalCodeRuleInclusionTypeEnum - - """ - The ID of the object. - """ - id: ID! -} - -type ShippingMethodTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String! - description: JSONString - - """ - Returns translated shipping method fields for the given language code. - """ - translation( - """ - A language code to return the translation for shipping method. - """ - languageCode: LanguageCodeEnum! - ): ShippingMethodTranslation - - """ - Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. - """ - shippingMethod: ShippingMethod -} - -type ShippingMethodTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - description: JSONString - - """ - Translation language. - """ - language: LanguageDisplay! -} - -""" -An enumeration. -""" -enum ShippingMethodTypeEnum { - PRICE - WEIGHT -} - -input ShippingPostalCodeRulesCreateInputRange { - """ - Start range of the postal code. - """ - start: String! - - """ - End range of the postal code. - """ - end: String -} - -""" -Deletes shipping prices. -""" -type ShippingPriceBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! -} - -""" -Creates a new shipping price. -""" -type ShippingPriceCreate { - """ - A shipping zone to which the shipping method belongs. - """ - shippingZone: ShippingZone - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! -} - -""" -Deletes a shipping price. -""" -type ShippingPriceDelete { - """ - A shipping method to delete. - """ - shippingMethod: ShippingMethod - - """ - A shipping zone to which the shipping method belongs. - """ - shippingZone: ShippingZone - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! -} - -""" -Exclude products from shipping price. -""" -type ShippingPriceExcludeProducts { - """ - A shipping method with new list of excluded products. - """ - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! -} - -input ShippingPriceExcludeProductsInput { - """ - List of products which will be excluded. - """ - products: [ID]! -} - -input ShippingPriceInput { - """ - Name of the shipping method. - """ - name: String - - """ - Shipping method description (JSON). - """ - description: JSONString - - """ - Minimum order weight to use this shipping method. - """ - minimumOrderWeight: WeightScalar - - """ - Maximum order weight to use this shipping method. - """ - maximumOrderWeight: WeightScalar - - """ - Maximum number of days for delivery. - """ - maximumDeliveryDays: Int - - """ - Minimal number of days for delivery. - """ - minimumDeliveryDays: Int - - """ - Shipping type: price or weight based. - """ - type: ShippingMethodTypeEnum - - """ - Shipping zone this method belongs to. - """ - shippingZone: ID - - """ - Postal code rules to add. - """ - addPostalCodeRules: [ShippingPostalCodeRulesCreateInputRange!] - - """ - Postal code rules to delete. - """ - deletePostalCodeRules: [ID!] - - """ - Inclusion type for currently assigned postal code rules. - """ - inclusionType: PostalCodeRuleInclusionTypeEnum -} - -""" -Remove product from excluded list for shipping price. -""" -type ShippingPriceRemoveProductFromExclude { - """ - A shipping method with new list of excluded products. - """ - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! -} - -""" -Creates/Updates translations for shipping method. -""" -type ShippingPriceTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - shippingMethod: ShippingMethod -} - -input ShippingPriceTranslationInput { - name: String - - """ - Translated shipping method description (JSON). - """ - description: JSONString -} - -""" -Updates a new shipping price. -""" -type ShippingPriceUpdate { - """ - A shipping zone to which the shipping method belongs. - """ - shippingZone: ShippingZone - shippingMethod: ShippingMethod - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! -} - -""" -Represents a shipping zone in the shop. Zones are the concept used only for grouping shipping methods in the dashboard, and are never exposed to the customers directly. -""" -type ShippingZone implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - default: Boolean! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - Lowest and highest prices for the shipping. - """ - priceRange: MoneyRange - - """ - List of countries available for the method. - """ - countries: [CountryDisplay] - - """ - List of shipping methods available for orders shipped to countries within this shipping zone. - """ - shippingMethods: [ShippingMethod] - - """ - List of warehouses for shipping zone. - """ - warehouses: [Warehouse!]! - - """ - List of channels for shipping zone. - """ - channels: [Channel!]! - - """ - Description of a shipping zone. - """ - description: String -} - -""" -Deletes shipping zones. -""" -type ShippingZoneBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! -} - -type ShippingZoneCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [ShippingZoneCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type ShippingZoneCountableEdge { - """ - The item at the end of the edge. - """ - node: ShippingZone! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new shipping zone. -""" -type ShippingZoneCreate { - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! - shippingZone: ShippingZone -} - -input ShippingZoneCreateInput { - """ - Shipping zone's name. Visible only to the staff. - """ - name: String - - """ - Description of the shipping zone. - """ - description: String - - """ - List of countries in this shipping zone. - """ - countries: [String] - - """ - Default shipping zone will be used for countries not covered by other zones. - """ - default: Boolean - - """ - List of warehouses to assign to a shipping zone - """ - addWarehouses: [ID] - - """ - List of channels to assign to the shipping zone. - """ - addChannels: [ID!] -} - -""" -Deletes a shipping zone. -""" -type ShippingZoneDelete { - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! - shippingZone: ShippingZone -} - -input ShippingZoneFilterInput { - search: String - channels: [ID] -} - -""" -Updates a new shipping zone. -""" -type ShippingZoneUpdate { - shippingErrors: [ShippingError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShippingError!]! - shippingZone: ShippingZone -} - -input ShippingZoneUpdateInput { - """ - Shipping zone's name. Visible only to the staff. - """ - name: String - - """ - Description of the shipping zone. - """ - description: String - - """ - List of countries in this shipping zone. - """ - countries: [String] - - """ - Default shipping zone will be used for countries not covered by other zones. - """ - default: Boolean - - """ - List of warehouses to assign to a shipping zone - """ - addWarehouses: [ID] - - """ - List of channels to assign to the shipping zone. - """ - addChannels: [ID!] - - """ - List of warehouses to unassign from a shipping zone - """ - removeWarehouses: [ID] - - """ - List of channels to unassign from the shipping zone. - """ - removeChannels: [ID!] -} - -""" -Represents a shop resource containing general shop data and configuration. -""" -type Shop { - """ - List of available payment gateways. - """ - availablePaymentGateways( - """ - DEPRECATED: use `channel` argument instead. This argument will be removed in Saleor 4.0.A currency for which gateways will be returned. - """ - currency: String - - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): [PaymentGateway!]! - - """ - List of available external authentications. - """ - availableExternalAuthentications: [ExternalAuthentication!]! - - """ - Shipping methods that are available for the shop. - """ - availableShippingMethods( - """ - Slug of a channel for which the data should be returned. - """ - channel: String! - - """ - Address for which available shipping methods should be returned. - """ - address: AddressInput - ): [ShippingMethod] - - """ - List of countries available in the shop. - """ - countries( - """ - A language code to return the translation for. - """ - languageCode: LanguageCodeEnum - ): [CountryDisplay!]! - - """ - Shop's default country. - """ - defaultCountry: CountryDisplay - - """ - Default shop's email sender's name. - """ - defaultMailSenderName: String - - """ - Default shop's email sender's address. - """ - defaultMailSenderAddress: String - - """ - Shop's description. - """ - description: String - - """ - Shop's domain data. - """ - domain: Domain! - - """ - List of the shops's supported languages. - """ - languages: [LanguageDisplay]! - - """ - Shop's name. - """ - name: String! - - """ - List of available permissions. - """ - permissions: [Permission]! - - """ - List of possible phone prefixes. - """ - phonePrefixes: [String]! - - """ - Header text. - """ - headerText: 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 - - """ - Default weight unit. - """ - defaultWeightUnit: WeightUnitsEnum - - """ - Returns translated shop fields for the given language code. - """ - translation( - """ - A language code to return the translation for shop. - """ - languageCode: LanguageCodeEnum! - ): ShopTranslation - - """ - Enable automatic fulfillment for all digital products. - """ - automaticFulfillmentDigitalProducts: Boolean - - """ - Default number of max downloads per digital content URL. - """ - defaultDigitalMaxDownloads: Int - - """ - Default number of days which digital content URL will be valid. - """ - defaultDigitalUrlValidDays: Int - - """ - Company address. - """ - companyAddress: Address - - """ - URL of a view where customers can set their password. - """ - customerSetPasswordUrl: String - - """ - List of staff notification recipients. - """ - staffNotificationRecipients: [StaffNotificationRecipient] - - """ - Resource limitations and current usage if any set for a shop - """ - limits: LimitInfo! - - """ - Saleor API version. - """ - version: String! -} - -""" -Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. -""" -type ShopAddressUpdate { - """ - Updated shop. - """ - shop: Shop - shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShopError!]! -} - -""" -Updates site domain of the shop. -""" -type ShopDomainUpdate { - """ - Updated shop. - """ - shop: Shop - shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShopError!]! -} - -type ShopError { - """ - 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: ShopErrorCode! -} - -""" -An enumeration. -""" -enum ShopErrorCode { - ALREADY_EXISTS - CANNOT_FETCH_TAX_RATES - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -""" -Fetch tax rates. -""" -type ShopFetchTaxRates { - """ - Updated shop. - """ - shop: Shop - shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShopError!]! -} - -input ShopSettingsInput { - """ - Header text. - """ - headerText: String - - """ - 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 - - """ - Default weight unit. - """ - defaultWeightUnit: WeightUnitsEnum - - """ - Enable automatic fulfillment for all digital products. - """ - automaticFulfillmentDigitalProducts: Boolean - - """ - Default number of max downloads per digital content URL. - """ - defaultDigitalMaxDownloads: Int - - """ - Default number of days which digital content URL will be valid. - """ - defaultDigitalUrlValidDays: Int - - """ - Default email sender's name. - """ - defaultMailSenderName: String - - """ - Default email sender's address. - """ - defaultMailSenderAddress: String - - """ - URL of a view where customers can set their password. - """ - customerSetPasswordUrl: String -} - -""" -Creates/Updates translations for Shop Settings. -""" -type ShopSettingsTranslate { - """ - Updated shop. - """ - shop: Shop - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! -} - -input ShopSettingsTranslationInput { - headerText: String - description: String -} - -""" -Updates shop settings. -""" -type ShopSettingsUpdate { - """ - Updated shop. - """ - shop: Shop - shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShopError!]! -} - -type ShopTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - headerText: String! - description: String! - - """ - Translation language. - """ - language: LanguageDisplay! -} - -input SiteDomainInput { - """ - Domain name for shop. - """ - domain: String - - """ - Shop site name. - """ - name: String -} - -""" -Deletes staff users. -""" -type StaffBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - staffErrors: [StaffError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [StaffError!]! -} - -""" -Creates a new staff user. -""" -type StaffCreate { - staffErrors: [StaffError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [StaffError!]! - user: User -} - -input StaffCreateInput { - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - The unique email address of the user. - """ - email: String - - """ - User account is active. - """ - isActive: Boolean - - """ - A note about the user. - """ - note: String - - """ - List of permission group IDs to which user should be assigned. - """ - addGroups: [ID!] - - """ - URL of a view where users should be redirected to set the password. URL in RFC 1808 format. - """ - redirectUrl: String -} - -""" -Deletes a staff user. -""" -type StaffDelete { - staffErrors: [StaffError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [StaffError!]! - user: User -} - -type StaffError { - """ - 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: AccountErrorCode! - - """ - A type of address that causes the error. - """ - addressType: AddressTypeEnum - - """ - List of permissions which causes the error. - """ - permissions: [PermissionEnum!] - - """ - List of permission group IDs which cause the error. - """ - groups: [ID!] - - """ - List of user IDs which causes the error. - """ - users: [ID!] -} - -enum StaffMemberStatus { - """ - User account has been activated. - """ - ACTIVE - - """ - User account has not been activated yet. - """ - DEACTIVATED -} - -""" -Represents a recipient of email notifications send by Saleor, such as notifications about new orders. Notifications can be assigned to staff users or arbitrary email addresses. -""" -type StaffNotificationRecipient implements Node { - """ - Returns a user subscribed to email notifications. - """ - user: User - - """ - Determines if a notification active. - """ - active: Boolean - - """ - The ID of the object. - """ - id: ID! - - """ - Returns email address of a user subscribed to email notifications. - """ - email: String -} - -""" -Creates a new staff notification recipient. -""" -type StaffNotificationRecipientCreate { - shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -""" -Delete staff notification recipient. -""" -type StaffNotificationRecipientDelete { - shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -input StaffNotificationRecipientInput { - """ - The ID of the user subscribed to email notifications.. - """ - user: ID - - """ - Email address of a user subscribed to email notifications. - """ - email: String - - """ - Determines if a notification active. - """ - active: Boolean -} - -""" -Updates a staff notification recipient. -""" -type StaffNotificationRecipientUpdate { - shopErrors: [ShopError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient -} - -""" -Updates an existing staff user. -""" -type StaffUpdate { - staffErrors: [StaffError!]! @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [StaffError!]! - user: User -} - -input StaffUpdateInput { - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - The unique email address of the user. - """ - email: String - - """ - User account is active. - """ - isActive: Boolean - - """ - A note about the user. - """ - note: String - - """ - List of permission group IDs to which user should be assigned. - """ - addGroups: [ID!] - - """ - List of permission group IDs from which user should be unassigned. - """ - removeGroups: [ID!] -} - -input StaffUserInput { - status: StaffMemberStatus - search: String -} - -""" -Represents stock. -""" -type Stock implements Node { - warehouse: Warehouse! - productVariant: ProductVariant! - - """ - Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment. - """ - quantity: Int! - - """ - The ID of the object. - """ - id: ID! - - """ - Quantity allocated for orders - """ - quantityAllocated: Int! -} - -enum StockAvailability { - IN_STOCK - OUT_OF_STOCK -} - -type StockCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [StockCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type StockCountableEdge { - """ - The item at the end of the edge. - """ - node: Stock! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -type StockError { - """ - 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: StockErrorCode! -} - -""" -An enumeration. -""" -enum StockErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input StockFilterInput { - quantity: Float - search: String -} - -input StockInput { - """ - Warehouse in which stock is located. - """ - warehouse: ID! - - """ - Quantity of items available for sell. - """ - quantity: Int! -} - -""" -An enumeration. -""" -enum TaxRateType { - ACCOMMODATION - ADMISSION_TO_CULTURAL_EVENTS - ADMISSION_TO_ENTERTAINMENT_EVENTS - ADMISSION_TO_SPORTING_EVENTS - ADVERTISING - AGRICULTURAL_SUPPLIES - BABY_FOODSTUFFS - BIKES - BOOKS - CHILDRENS_CLOTHING - DOMESTIC_FUEL - DOMESTIC_SERVICES - E_BOOKS - FOODSTUFFS - HOTELS - MEDICAL - NEWSPAPERS - PASSENGER_TRANSPORT - PHARMACEUTICALS - PROPERTY_RENOVATIONS - RESTAURANTS - SOCIAL_HOUSING - STANDARD - WATER - WINE -} - -""" -Representation of tax types fetched from tax gateway. -""" -type TaxType { - """ - Description of the tax type. - """ - description: String - - """ - External tax code used to identify given tax group. - """ - taxCode: String -} - -""" -Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal. -""" -type TaxedMoney { - """ - Currency code. - """ - currency: String! - - """ - Amount of money including taxes. - """ - gross: Money! - - """ - Amount of money without taxes. - """ - net: Money! - - """ - Amount of taxes. - """ - tax: Money! -} - -""" -Represents a range of monetary values. -""" -type TaxedMoneyRange { - """ - Lower bound of a price range. - """ - start: TaxedMoney - - """ - Upper bound of a price range. - """ - stop: TaxedMoney -} - -""" -An object representing a single payment. -""" -type Transaction implements Node { - """ - The ID of the object. - """ - id: ID! - created: DateTime! - payment: Payment! - token: String! - kind: TransactionKind! - isSuccess: Boolean! - error: String - gatewayResponse: JSONString! - - """ - Total amount of the transaction. - """ - amount: Money -} - -""" -An enumeration. -""" -enum TransactionKind { - """ - External reference - """ - EXTERNAL - - """ - Authorization - """ - AUTH - - """ - Pending - """ - PENDING - - """ - Action to confirm - """ - ACTION_TO_CONFIRM - - """ - Refund - """ - REFUND - - """ - Refund in progress - """ - REFUND_ONGOING - - """ - Capture - """ - CAPTURE - - """ - Void - """ - VOID - - """ - Confirm - """ - CONFIRM - - """ - Cancel - """ - CANCEL -} - -union TranslatableItem = - ProductTranslatableContent - | CollectionTranslatableContent - | CategoryTranslatableContent - | AttributeTranslatableContent - | AttributeValueTranslatableContent - | ProductVariantTranslatableContent - | PageTranslatableContent - | ShippingMethodTranslatableContent - | SaleTranslatableContent - | VoucherTranslatableContent - | MenuItemTranslatableContent - -type TranslatableItemConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [TranslatableItemEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type TranslatableItemEdge { - """ - The item at the end of the edge. - """ - node: TranslatableItem! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -enum TranslatableKinds { - ATTRIBUTE - ATTRIBUTE_VALUE - CATEGORY - COLLECTION - MENU_ITEM - PAGE - PRODUCT - SALE - SHIPPING_METHOD - VARIANT - VOUCHER -} - -type TranslationError { - """ - 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: TranslationErrorCode! -} - -""" -An enumeration. -""" -enum TranslationErrorCode { - GRAPHQL_ERROR - NOT_FOUND - REQUIRED -} - -input TranslationInput { - seoTitle: String - seoDescription: String - name: String - description: JSONString -} - -scalar UUID - -input UpdateInvoiceInput { - """ - Invoice number - """ - number: String - - """ - URL of an invoice to download. - """ - url: String -} - -""" -Updates metadata of an object. -""" -type UpdateMetadata { - metadataErrors: [MetadataError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MetadataError!]! - item: ObjectWithMetadata -} - -""" -Updates private metadata of an object. -""" -type UpdatePrivateMetadata { - metadataErrors: [MetadataError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [MetadataError!]! - item: ObjectWithMetadata -} - -""" -Variables of this type must be set to null in mutations. They will be replaced with a filename from a following multipart part containing a binary file. See: https://github.com/jaydenseric/graphql-multipart-request-spec. -""" -scalar Upload - -type UploadError { - """ - 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: UploadErrorCode! -} - -""" -An enumeration. -""" -enum UploadErrorCode { - GRAPHQL_ERROR -} - -""" -Represents user data. -""" -type User implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - lastLogin: DateTime - email: String! - firstName: String! - lastName: String! - isStaff: Boolean! - isActive: Boolean! - - """ - A note about the customer. - """ - note: String - dateJoined: DateTime! - defaultShippingAddress: Address - defaultBillingAddress: Address - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! - - """ - List of all user's addresses. - """ - addresses: [Address] - - """ - Returns the last open checkout of this user. - """ - checkout: Checkout - @deprecated(reason: "Will be removed in Saleor 4.0. Use the `checkout_tokens` field to fetch the user checkouts.") - - """ - Returns the checkout UUID's assigned to this user. - """ - checkoutTokens( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): [UUID!] - - """ - List of the user gift cards. - """ - giftCards( - """ - 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 - ): GiftCardCountableConnection - - """ - List of user's orders. - """ - orders( - """ - 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 - ): OrderCountableConnection - - """ - List of user's permissions. - """ - userPermissions: [UserPermission] - - """ - List of user's permission groups. - """ - permissionGroups: [Group] - - """ - List of user's permission groups which user can manage. - """ - editableGroups: [Group] - avatar( - """ - Size of the avatar. - """ - size: Int - ): Image - - """ - List of events associated with the user. - """ - events: [CustomerEvent] - - """ - List of stored payment sources. - """ - storedPaymentSources( - """ - Slug of a channel for which the data should be returned. - """ - channel: String - ): [PaymentSource] - - """ - User language code. - """ - languageCode: LanguageCodeEnum! -} - -""" -Deletes a user avatar. Only for staff members. -""" -type UserAvatarDelete { - """ - An updated user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Create a user avatar. Only for staff members. This mutation must be sent as a `multipart` request. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec -""" -type UserAvatarUpdate { - """ - An updated user instance. - """ - user: User - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -Activate or deactivate users. -""" -type UserBulkSetActive { - """ - Returns how many objects were affected. - """ - count: Int! - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -type UserCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [UserCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type UserCountableEdge { - """ - The item at the end of the edge. - """ - node: User! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -input UserCreateInput { - """ - Billing address of the customer. - """ - defaultBillingAddress: AddressInput - - """ - Shipping address of the customer. - """ - defaultShippingAddress: AddressInput - - """ - Given name. - """ - firstName: String - - """ - Family name. - """ - lastName: String - - """ - The unique email address of the user. - """ - email: String - - """ - User account is active. - """ - isActive: Boolean - - """ - A note about the user. - """ - note: String - - """ - User language code. - """ - languageCode: LanguageCodeEnum - - """ - URL of a view where users should be redirected to set the password. URL in RFC 1808 format. - """ - redirectUrl: String - - """ - Slug of a channel which will be used for notify user. Optional when only one channel exists. - """ - channel: String -} - -type UserPermission { - """ - Internal code for permission. - """ - code: PermissionEnum! - - """ - Describe action(s) allowed to do by permission. - """ - name: String! - - """ - List of user permission groups which contains this permission. - """ - sourcePermissionGroups( - """ - ID of user whose groups should be returned. - """ - userId: ID! - ): [Group!] -} - -enum UserSortField { - """ - Sort users by first name. - """ - FIRST_NAME - - """ - Sort users by last name. - """ - LAST_NAME - - """ - Sort users by email. - """ - EMAIL - - """ - Sort users by order count. - """ - ORDER_COUNT -} - -input UserSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort users by the selected field. - """ - field: UserSortField! -} - -""" -Represents a VAT rate for a country. -""" -type VAT { - """ - Country code. - """ - countryCode: String! - - """ - Standard VAT rate in percent. - """ - standardRate: Float - - """ - Country's VAT rate exceptions for specific types of goods. - """ - reducedRates: [ReducedRate]! -} - -enum VariantAttributeScope { - ALL - VARIANT_SELECTION - NOT_VARIANT_SELECTION -} - -""" -Assign an media to a product variant. -""" -type VariantMediaAssign { - productVariant: ProductVariant - media: ProductMedia - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Unassign an media from a product variant. -""" -type VariantMediaUnassign { - productVariant: ProductVariant - media: ProductMedia - productErrors: [ProductError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [ProductError!]! -} - -""" -Represents availability of a variant in the storefront. -""" -type VariantPricingInfo { - """ - Whether it is in sale or not. - """ - onSale: Boolean - - """ - The discount amount if in sale (null otherwise). - """ - discount: TaxedMoney - - """ - The discount amount in the local currency. - """ - discountLocalCurrency: TaxedMoney - - """ - The price, with any discount subtracted. - """ - price: TaxedMoney - - """ - The price without any discount. - """ - priceUndiscounted: TaxedMoney - - """ - The discounted price in the local currency. - """ - priceLocalCurrency: TaxedMoney -} - -""" -Verify JWT token. -""" -type VerifyToken { - """ - User assigned to token. - """ - user: User - - """ - Determine if token is valid or not. - """ - isValid: Boolean! - - """ - JWT payload. - """ - payload: GenericScalar - accountErrors: [AccountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [AccountError!]! -} - -""" -An enumeration. -""" -enum VolumeUnitsEnum { - CUBIC_MILLIMETER - CUBIC_CENTIMETER - CUBIC_DECIMETER - CUBIC_METER - LITER - CUBIC_FOOT - CUBIC_INCH - CUBIC_YARD - QT - PINT - FL_OZ - ACRE_IN - ACRE_FT -} - -""" -Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. -""" -type Voucher implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - - """ - Determines a type of voucher. - """ - type: VoucherTypeEnum! - code: String! - usageLimit: Int - used: Int! - startDate: DateTime! - endDate: DateTime - applyOncePerOrder: Boolean! - applyOncePerCustomer: Boolean! - - """ - Determines a type of discount for voucher - value or percentage - """ - discountValueType: DiscountValueTypeEnum! - minCheckoutItemsQuantity: Int - - """ - List of categories this voucher applies to. - """ - categories( - """ - 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 - ): CategoryCountableConnection - - """ - List of collections this voucher applies to. - """ - collections( - """ - 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 - ): CollectionCountableConnection - - """ - List of products this voucher applies to. - """ - products( - """ - 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 - ): ProductCountableConnection - - """ - List of countries available for the shipping voucher. - """ - countries: [CountryDisplay] - - """ - Returns translated voucher fields for the given language code. - """ - translation( - """ - A language code to return the translation for voucher. - """ - languageCode: LanguageCodeEnum! - ): VoucherTranslation - - """ - Voucher value. - """ - discountValue: Float - - """ - Currency code for voucher. - """ - currency: String - - """ - Minimum order value to apply voucher. - """ - minSpent: Money - - """ - List of availability in channels for the voucher. - """ - channelListings: [VoucherChannelListing!] -} - -""" -Adds products, categories, collections to a voucher. -""" -type VoucherAddCatalogues { - """ - Voucher of which catalogue IDs will be modified. - """ - voucher: Voucher - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! -} - -""" -Deletes vouchers. -""" -type VoucherBulkDelete { - """ - Returns how many objects were affected. - """ - count: Int! - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! -} - -""" -Represents voucher channel listing. -""" -type VoucherChannelListing implements Node { - """ - The ID of the object. - """ - id: ID! - channel: Channel! - discountValue: Float! - currency: String! - minSpent: Money -} - -input VoucherChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Value of the voucher. - """ - discountValue: PositiveDecimal - - """ - Min purchase amount required to apply the voucher. - """ - minAmountSpent: PositiveDecimal -} - -input VoucherChannelListingInput { - """ - List of channels to which the voucher should be assigned. - """ - addChannels: [VoucherChannelListingAddInput!] - - """ - List of channels from which the voucher should be unassigned. - """ - removeChannels: [ID!] -} - -""" -Manage voucher's availability in channels. -""" -type VoucherChannelListingUpdate { - """ - An updated voucher instance. - """ - voucher: Voucher - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! -} - -type VoucherCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [VoucherCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type VoucherCountableEdge { - """ - The item at the end of the edge. - """ - node: Voucher! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates a new voucher. -""" -type VoucherCreate { - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! - voucher: Voucher -} - -""" -Deletes a voucher. -""" -type VoucherDelete { - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! - voucher: Voucher -} - -enum VoucherDiscountType { - FIXED - PERCENTAGE - SHIPPING -} - -input VoucherFilterInput { - status: [DiscountStatusEnum] - timesUsed: IntRangeInput - discountType: [VoucherDiscountType] - started: DateTimeRangeInput - search: String -} - -input VoucherInput { - """ - Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER. - """ - type: VoucherTypeEnum - - """ - Voucher name. - """ - name: String - - """ - Code to use the voucher. - """ - code: String - - """ - Start date of the voucher in ISO 8601 format. - """ - startDate: DateTime - - """ - End date of the voucher in ISO 8601 format. - """ - endDate: DateTime - - """ - Choices: fixed or percentage. - """ - discountValueType: DiscountValueTypeEnum - - """ - Products discounted by the voucher. - """ - products: [ID] - - """ - Collections discounted by the voucher. - """ - collections: [ID] - - """ - Categories discounted by the voucher. - """ - categories: [ID] - - """ - Minimal quantity of checkout items required to apply the voucher. - """ - minCheckoutItemsQuantity: Int - - """ - Country codes that can be used with the shipping voucher. - """ - countries: [String] - - """ - Voucher should be applied to the cheapest item or entire order. - """ - applyOncePerOrder: Boolean - - """ - Voucher should be applied once per customer. - """ - applyOncePerCustomer: Boolean - - """ - Limit number of times this voucher can be used in total. - """ - usageLimit: Int -} - -""" -Removes products, categories, collections from a voucher. -""" -type VoucherRemoveCatalogues { - """ - Voucher of which catalogue IDs will be modified. - """ - voucher: Voucher - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! -} - -enum VoucherSortField { - """ - Sort vouchers by code. - """ - CODE - - """ - Sort vouchers by start date. - """ - START_DATE - - """ - Sort vouchers by end date. - """ - END_DATE - - """ - Sort vouchers by value. - """ - VALUE - - """ - Sort vouchers by type. - """ - TYPE - - """ - Sort vouchers by usage limit. - """ - USAGE_LIMIT - - """ - Sort vouchers by minimum spent amount. - """ - MINIMUM_SPENT_AMOUNT -} - -input VoucherSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Specifies the channel in which to sort the data. - """ - channel: String - - """ - Sort vouchers by the selected field. - """ - field: VoucherSortField! -} - -type VoucherTranslatableContent implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - - """ - Returns translated voucher fields for the given language code. - """ - translation( - """ - A language code to return the translation for voucher. - """ - languageCode: LanguageCodeEnum! - ): VoucherTranslation - - """ - Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. - """ - voucher: Voucher -} - -""" -Creates/Updates translations for Voucher. -""" -type VoucherTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [TranslationError!]! - voucher: Voucher -} - -type VoucherTranslation implements Node { - """ - The ID of the object. - """ - id: ID! - name: String - - """ - Translation language. - """ - language: LanguageDisplay! -} - -enum VoucherTypeEnum { - SHIPPING - ENTIRE_ORDER - SPECIFIC_PRODUCT -} - -""" -Updates a voucher. -""" -type VoucherUpdate { - discountErrors: [DiscountError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [DiscountError!]! - voucher: Voucher -} - -""" -Represents warehouse. -""" -type Warehouse implements Node & ObjectWithMetadata { - """ - The ID of the object. - """ - id: ID! - name: String! - slug: String! - companyName: String! - shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection! - address: Address! - email: String! - - """ - List of private metadata items.Requires proper staff permissions to access. - """ - privateMetadata: [MetadataItem]! - - """ - List of public metadata items. Can be accessed without permissions. - """ - metadata: [MetadataItem]! -} - -input WarehouseAddressInput { - """ - Address. - """ - streetAddress1: String! - - """ - Address. - """ - streetAddress2: String - - """ - City. - """ - city: String! - - """ - District. - """ - cityArea: String - - """ - Postal code. - """ - postalCode: String - - """ - Country. - """ - country: CountryCode! - - """ - State or province. - """ - countryArea: String - - """ - Phone number. - """ - phone: String -} - -type WarehouseCountableConnection { - """ - Pagination data for this connection. - """ - pageInfo: PageInfo! - edges: [WarehouseCountableEdge!]! - - """ - A total count of items in the collection. - """ - totalCount: Int -} - -type WarehouseCountableEdge { - """ - The item at the end of the edge. - """ - node: Warehouse! - - """ - A cursor for use in pagination. - """ - cursor: String! -} - -""" -Creates new warehouse. -""" -type WarehouseCreate { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -input WarehouseCreateInput { - """ - Warehouse slug. - """ - slug: String - - """ - Company name. - """ - companyName: String - - """ - The email address of the warehouse. - """ - email: String - - """ - Warehouse name. - """ - name: String! - - """ - Address of the warehouse. - """ - address: WarehouseAddressInput! - - """ - Shipping zones supported by the warehouse. - """ - shippingZones: [ID] -} - -""" -Deletes selected warehouse. -""" -type WarehouseDelete { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -type WarehouseError { - """ - 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: WarehouseErrorCode! -} - -""" -An enumeration. -""" -enum WarehouseErrorCode { - ALREADY_EXISTS - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -input WarehouseFilterInput { - search: String - ids: [ID] -} - -""" -Add shipping zone to given warehouse. -""" -type WarehouseShippingZoneAssign { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -""" -Remove shipping zone from given warehouse. -""" -type WarehouseShippingZoneUnassign { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -enum WarehouseSortField { - """ - Sort warehouses by name. - """ - NAME -} - -input WarehouseSortingInput { - """ - Specifies the direction in which to sort products. - """ - direction: OrderDirection! - - """ - Sort warehouses by the selected field. - """ - field: WarehouseSortField! -} - -""" -Updates given warehouse. -""" -type WarehouseUpdate { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [WarehouseError!]! - warehouse: Warehouse -} - -input WarehouseUpdateInput { - """ - Warehouse slug. - """ - slug: String - - """ - Company name. - """ - companyName: String - - """ - The email address of the warehouse. - """ - email: String - - """ - Warehouse name. - """ - name: String - - """ - Address of the warehouse. - """ - address: WarehouseAddressInput -} - -""" -Webhook. -""" -type Webhook implements Node { - name: String! - targetUrl: String! - isActive: Boolean! - secretKey: String - - """ - The ID of the object. - """ - id: ID! - - """ - List of webhook events. - """ - events: [WebhookEvent!]! - app: App! -} - -""" -Creates a new webhook subscription. -""" -type WebhookCreate { - webhookErrors: [WebhookError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [WebhookError!]! - webhook: Webhook -} - -input WebhookCreateInput { - """ - The name of the webhook. - """ - name: String - - """ - The url to receive the payload. - """ - targetUrl: String - - """ - The events that webhook wants to subscribe. - """ - events: [WebhookEventTypeEnum] - - """ - ID of the app to which webhook belongs. - """ - app: ID - - """ - Determine if webhook will be set active or not. - """ - isActive: Boolean - - """ - The secret key used to create a hash signature with each payload. - """ - secretKey: String -} - -""" -Deletes a webhook subscription. -""" -type WebhookDelete { - webhookErrors: [WebhookError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [WebhookError!]! - webhook: Webhook -} - -type WebhookError { - """ - 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: WebhookErrorCode! -} - -""" -An enumeration. -""" -enum WebhookErrorCode { - GRAPHQL_ERROR - INVALID - NOT_FOUND - REQUIRED - UNIQUE -} - -""" -Webhook event. -""" -type WebhookEvent { - """ - Internal name of the event type. - """ - eventType: WebhookEventTypeEnum! - - """ - Display name of the event. - """ - name: String! -} - -""" -Enum determining type of webhook. -""" -enum WebhookEventTypeEnum { - """ - All the events. - """ - ANY_EVENTS - - """ - A new order is placed. - """ - ORDER_CREATED - - """ - An order is confirmed (status change unconfirmed -> unfulfilled) by a staff user using the OrderConfirm mutation. It also triggers when the user completes the checkout and the shop setting `automatically_confirm_all_new_orders` is enabled. - """ - ORDER_CONFIRMED - - """ - Payment is made and an order is fully paid. - """ - ORDER_FULLY_PAID - - """ - An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. - """ - ORDER_UPDATED - - """ - An order is cancelled. - """ - ORDER_CANCELLED - - """ - An order is fulfilled. - """ - ORDER_FULFILLED - - """ - An invoice for order requested. - """ - INVOICE_REQUESTED - - """ - An invoice is deleted. - """ - INVOICE_DELETED - - """ - Invoice has been sent. - """ - INVOICE_SENT - - """ - A new customer account is created. - """ - CUSTOMER_CREATED - - """ - A customer account is updated. - """ - CUSTOMER_UPDATED - - """ - A new product is created. - """ - PRODUCT_CREATED - - """ - A product is updated. - """ - PRODUCT_UPDATED - - """ - A product is deleted. - """ - PRODUCT_DELETED - - """ - A new product variant is created. - """ - PRODUCT_VARIANT_CREATED - - """ - A product variant is updated. - """ - PRODUCT_VARIANT_UPDATED - - """ - A product variant is deleted. - """ - PRODUCT_VARIANT_DELETED - - """ - A new checkout is created. - """ - CHECKOUT_CREATED - - """ - A checkout is updated. It also triggers all updates related to the checkout. - """ - CHECKOUT_UPDATED - - """ - A new fulfillment is created. - """ - FULFILLMENT_CREATED - - """ - User notification triggered. - """ - NOTIFY_USER - - """ - A new page is created. - """ - PAGE_CREATED - - """ - A page is updated. - """ - PAGE_UPDATED - - """ - A page is deleted. - """ - PAGE_DELETED -} - -""" -An enumeration. -""" -enum WebhookSampleEventTypeEnum { - ORDER_CREATED - ORDER_CONFIRMED - ORDER_FULLY_PAID - ORDER_UPDATED - ORDER_CANCELLED - ORDER_FULFILLED - INVOICE_REQUESTED - INVOICE_DELETED - INVOICE_SENT - CUSTOMER_CREATED - CUSTOMER_UPDATED - PRODUCT_CREATED - PRODUCT_UPDATED - PRODUCT_DELETED - PRODUCT_VARIANT_CREATED - PRODUCT_VARIANT_UPDATED - PRODUCT_VARIANT_DELETED - CHECKOUT_CREATED - CHECKOUT_UPDATED - FULFILLMENT_CREATED - NOTIFY_USER - PAGE_CREATED - PAGE_UPDATED - PAGE_DELETED -} - -""" -Updates a webhook subscription. -""" -type WebhookUpdate { - webhookErrors: [WebhookError!]! - @deprecated(reason: "Use errors field instead. This field will be removed in Saleor 4.0.") - errors: [WebhookError!]! - webhook: Webhook -} - -input WebhookUpdateInput { - """ - The new name of the webhook. - """ - name: String - - """ - The url to receive the payload. - """ - targetUrl: String - - """ - The events that webhook wants to subscribe. - """ - events: [WebhookEventTypeEnum] - - """ - ID of the app to which webhook belongs. - """ - app: ID - - """ - Determine if webhook will be set active or not. - """ - isActive: Boolean - - """ - Use to create a hash signature with each payload. - """ - secretKey: String -} - -""" -Represents weight value in a specific weight unit. -""" -type Weight { - """ - Weight unit. - """ - unit: WeightUnitsEnum! - - """ - Weight value. - """ - value: Float! -} - -scalar WeightScalar - -""" -An enumeration. -""" -enum WeightUnitsEnum { - G - LB - OZ - KG - TONNE -} - -""" -Anything -""" -scalar _Any - -union _Entity = - Address - | User - | Group - | App - | ProductVariant - | Product - | ProductType - | Collection - | Category - | ProductMedia - | ProductImage - | PageType - -type _Service { - sdl: String -} diff --git a/framework/saleor/types.ts b/framework/saleor/types.ts deleted file mode 100644 index 2025b8898..000000000 --- a/framework/saleor/types.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { Cart as CoreCart } from '@commerce/types' -import { CheckoutLine } from './schema' - -export type SaleorCheckout = { - id: string - webUrl: string - lineItems: CheckoutLine[] -} - -export type Cart = CoreCart.Cart & { - lineItems: LineItem[] -} -export interface LineItem extends CoreCart.LineItem { - options?: any[] -} - -/** - * Cart mutations - */ - -export type OptionSelections = { - option_id: number - option_value: number | string -} - -export type CartItemBody = CoreCart.CartItemBody & { - productId: string // The product id is always required for BC - optionSelections?: OptionSelections -} - -// export type GetCartHandlerBody = CoreCart.GetCartHandlerBody - -// export type AddCartItemBody = Core.AddCartItemBody - -// export type AddCartItemHandlerBody = Core.AddCartItemHandlerBody - -// export type UpdateCartItemBody = Core.UpdateCartItemBody - -// export type UpdateCartItemHandlerBody = Core.UpdateCartItemHandlerBody - -// export type RemoveCartItemBody = Core.RemoveCartItemBody - -// export type RemoveCartItemHandlerBody = Core.RemoveCartItemHandlerBody diff --git a/framework/saleor/types/cart.ts b/framework/saleor/types/cart.ts deleted file mode 100644 index 1f4ba61df..000000000 --- a/framework/saleor/types/cart.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as Core from '@commerce/types/cart' - -export * from '@commerce/types/cart' - -export type SaleorCart = {} - -/** - * Extend core cart types - */ - -export type Cart = Core.Cart & { - lineItems: Core.LineItem[] - url?: string -} - -export type CartTypes = Core.CartTypes - -export type CartHooks = Core.CartHooks - -export type GetCartHook = CartHooks['getCart'] -export type AddItemHook = CartHooks['addItem'] -export type UpdateItemHook = CartHooks['updateItem'] -export type RemoveItemHook = CartHooks['removeItem'] - -export type CartSchema = Core.CartSchema - -export type CartHandlers = Core.CartHandlers - -export type GetCartHandler = CartHandlers['getCart'] -export type AddItemHandler = CartHandlers['addItem'] -export type UpdateItemHandler = CartHandlers['updateItem'] -export type RemoveItemHandler = CartHandlers['removeItem'] diff --git a/framework/saleor/utils/checkout-attach.ts b/framework/saleor/utils/checkout-attach.ts deleted file mode 100644 index 476c73e77..000000000 --- a/framework/saleor/utils/checkout-attach.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as mutation from './mutations' -import { CheckoutCustomerAttach } from '../schema' - -export const checkoutAttach = async (fetch: any, { variables, headers }: any): Promise => { - const data = await fetch({ - query: mutation.CheckoutAttach, - variables, - headers, - }) - - return data -} diff --git a/framework/saleor/utils/checkout-create.ts b/framework/saleor/utils/checkout-create.ts deleted file mode 100644 index c1b6e4023..000000000 --- a/framework/saleor/utils/checkout-create.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Cookies from 'js-cookie' - -import * as mutation from './mutations' -import { CheckoutCreate } from '../schema' -import { CHECKOUT_ID_COOKIE } from '@framework/const' - -export const checkoutCreate = async (fetch: any): Promise => { - const data = await fetch({ query: mutation.CheckoutCreate }) - const checkout = data.checkoutCreate?.checkout - const checkoutId = checkout?.id - const checkoutToken = checkout?.token - - const value = `${checkoutId}:${checkoutToken}` - - if (checkoutId) { - const options = { - expires: 60 * 60 * 24 * 30, - } - Cookies.set(CHECKOUT_ID_COOKIE, value, options) - } - - return checkout -} - -export default checkoutCreate diff --git a/framework/saleor/utils/checkout-to-cart.ts b/framework/saleor/utils/checkout-to-cart.ts deleted file mode 100644 index 638ca815e..000000000 --- a/framework/saleor/utils/checkout-to-cart.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Cart } from '../types' -import { CommerceError } from '@commerce/utils/errors' - -import { CheckoutLinesAdd, CheckoutLinesUpdate, CheckoutCreate, CheckoutError, Checkout, Maybe, CheckoutLineDelete } from '../schema' - -import { normalizeCart } from './normalize' -import throwUserErrors from './throw-user-errors' - -export type CheckoutQuery = { - checkout: Checkout - errors?: Array -} - -export type CheckoutPayload = CheckoutLinesAdd | CheckoutLinesUpdate | CheckoutCreate | CheckoutQuery | CheckoutLineDelete - -const checkoutToCart = (checkoutPayload?: Maybe): Cart => { - if (!checkoutPayload) { - throw new CommerceError({ - message: 'Missing checkout payload from response', - }) - } - - const checkout = checkoutPayload?.checkout - throwUserErrors(checkoutPayload?.errors) - - if (!checkout) { - throw new CommerceError({ - message: 'Missing checkout object from response', - }) - } - - return normalizeCart(checkout) -} - -export default checkoutToCart diff --git a/framework/saleor/utils/customer-token.ts b/framework/saleor/utils/customer-token.ts deleted file mode 100644 index dd15fbe25..000000000 --- a/framework/saleor/utils/customer-token.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Cookies, { CookieAttributes } from 'js-cookie' -import * as Const from '../const' - -export const getToken = () => Cookies.get(Const.SALEOR_TOKEN) -export const setToken = (token?: string, options?: CookieAttributes) => { - setCookie(Const.SALEOR_TOKEN, token, options) -} - -export const getCSRFToken = () => Cookies.get(Const.SALEOR_CRSF_TOKEN) -export const setCSRFToken = (token?: string, options?: CookieAttributes) => { - setCookie(Const.SALEOR_CRSF_TOKEN, token, options) -} - -export const getCheckoutToken = () => Cookies.get(Const.CHECKOUT_ID_COOKIE) -export const setCheckoutToken = (token?: string, options?: CookieAttributes) => { - setCookie(Const.CHECKOUT_ID_COOKIE, token, options) -} - -const setCookie = (name: string, token?: string, options?: CookieAttributes) => { - if (!token) { - Cookies.remove(name) - } else { - Cookies.set(name, token, options ?? { expires: 60 * 60 * 24 * 30 }) - } -} diff --git a/framework/saleor/utils/fragments/checkout-details.ts b/framework/saleor/utils/fragments/checkout-details.ts deleted file mode 100644 index 437c24777..000000000 --- a/framework/saleor/utils/fragments/checkout-details.ts +++ /dev/null @@ -1,49 +0,0 @@ -export const CheckoutDetails = /* GraphQL */ ` - fragment CheckoutDetails on Checkout { - id - token - created - totalPrice { - currency - gross { - amount - } - } - subtotalPrice { - currency - gross { - amount - } - } - - lines { - id - variant { - id - name - sku - product { - name - slug - } - media { - url - } - pricing { - price { - gross { - amount - } - } - } - } - quantity - totalPrice { - currency - gross { - amount - } - } - } - } -` diff --git a/framework/saleor/utils/fragments/index.ts b/framework/saleor/utils/fragments/index.ts deleted file mode 100644 index 6c0c88950..000000000 --- a/framework/saleor/utils/fragments/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { ProductConnection } from './product' -export { CheckoutDetails } from './checkout-details' diff --git a/framework/saleor/utils/fragments/product.ts b/framework/saleor/utils/fragments/product.ts deleted file mode 100644 index 1ea59c02d..000000000 --- a/framework/saleor/utils/fragments/product.ts +++ /dev/null @@ -1,29 +0,0 @@ -export const ProductConnection = /* GraphQL */ ` - fragment ProductConnection on ProductCountableConnection { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - id - name - description - slug - pricing { - priceRange { - start { - net { - amount - } - } - } - } - media { - url - alt - } - } - } - } -` diff --git a/framework/saleor/utils/get-categories.ts b/framework/saleor/utils/get-categories.ts deleted file mode 100644 index 990c0a404..000000000 --- a/framework/saleor/utils/get-categories.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Category } from '@commerce/types/site' -import { SaleorConfig } from '../api' -import { CollectionCountableEdge } from '../schema' -import * as query from './queries' - -const getCategories = async (config: SaleorConfig): Promise => { - const { data } = await config.fetch(query.CollectionMany, { - variables: { - first: 100, - }, - }) - - return ( - data.collections?.edges?.map(({ node: { id, name, slug } }: CollectionCountableEdge) => ({ - id, - name, - slug, - path: `/${slug}`, - })) ?? [] - ) -} - -export default getCategories diff --git a/framework/saleor/utils/get-checkout-id.ts b/framework/saleor/utils/get-checkout-id.ts deleted file mode 100644 index de495a9ad..000000000 --- a/framework/saleor/utils/get-checkout-id.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Cookies from 'js-cookie' -import { CHECKOUT_ID_COOKIE } from '../const' - -const getCheckoutId = (id?: string) => { - const r = Cookies.get(CHECKOUT_ID_COOKIE)?.split(':') || [] - return { checkoutId: r[0], checkoutToken: r[1] } -} - -export default getCheckoutId diff --git a/framework/saleor/utils/get-search-variables.ts b/framework/saleor/utils/get-search-variables.ts deleted file mode 100644 index 5adf938e8..000000000 --- a/framework/saleor/utils/get-search-variables.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { getSortVariables } from './get-sort-variables' -import type { SearchProductsInput } from '../product/use-search' - -export const getSearchVariables = ({ brandId, search, categoryId, sort }: SearchProductsInput) => { - const sortBy = { - field: 'NAME', - direction: 'ASC', - ...getSortVariables(sort, !!categoryId), - channel: 'default-channel', - } - return { - categoryId, - filter: { search }, - sortBy, - } -} - -export default getSearchVariables diff --git a/framework/saleor/utils/get-sort-variables.ts b/framework/saleor/utils/get-sort-variables.ts deleted file mode 100644 index fe040a0a5..000000000 --- a/framework/saleor/utils/get-sort-variables.ts +++ /dev/null @@ -1,30 +0,0 @@ -export const getSortVariables = (sort?: string, isCategory: boolean = false) => { - let output = {} - switch (sort) { - case 'price-asc': - output = { - field: 'PRICE', - direction: 'ASC', - } - break - case 'price-desc': - output = { - field: 'PRICE', - direction: 'DESC', - } - break - case 'trending-desc': - output = { - field: 'RANK', - direction: 'DESC', - } - break - case 'latest-desc': - output = { - field: 'DATE', - direction: 'DESC', - } - break - } - return output -} diff --git a/framework/saleor/utils/get-vendors.ts b/framework/saleor/utils/get-vendors.ts deleted file mode 100644 index caae555a8..000000000 --- a/framework/saleor/utils/get-vendors.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { SaleorConfig } from '../api' - -export type Brand = { - entityId: string - name: string - path: string -} - -export type BrandEdge = { - node: Brand -} - -export type Brands = BrandEdge[] - -// TODO: Find a way to get vendors from meta -const getVendors = async (config: SaleorConfig): Promise => { - // const vendors = await fetchAllProducts({ - // config, - // query: getAllProductVendors, - // variables: { - // first: 100, - // }, - // }) - - // let vendorsStrings = vendors.map(({ node: { vendor } }) => vendor) - - // return [...new Set(vendorsStrings)].map((v) => { - // const id = v.replace(/\s+/g, '-').toLowerCase() - // return { - // node: { - // entityId: id, - // name: v, - // path: `brands/${id}`, - // }, - // } - // }) - - return [] -} - -export default getVendors diff --git a/framework/saleor/utils/handle-fetch-response.ts b/framework/saleor/utils/handle-fetch-response.ts deleted file mode 100644 index 6a2b5f57b..000000000 --- a/framework/saleor/utils/handle-fetch-response.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { FetcherError } from '@commerce/utils/errors' - -export function getError(errors: any[], status: number) { - errors = errors ?? [{ message: 'Failed to fetch Saleor API' }] - return new FetcherError({ errors, status }) -} - -export async function getAsyncError(res: Response) { - const data = await res.json() - return getError(data.errors, res.status) -} - -const handleFetchResponse = async (res: Response) => { - if (res.ok) { - const { data, errors } = await res.json() - - if (errors && errors.length) { - throw getError(errors, res.status) - } - - return data - } - - throw await getAsyncError(res) -} - -export default handleFetchResponse diff --git a/framework/saleor/utils/handle-login.ts b/framework/saleor/utils/handle-login.ts deleted file mode 100644 index 4ef390174..000000000 --- a/framework/saleor/utils/handle-login.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { FetcherOptions } from '@commerce/utils/types' -import { CreateToken, Mutation, MutationTokenCreateArgs } from '../schema' -import { setToken, setCSRFToken } from './customer-token' -import * as mutation from './mutations' -import throwUserErrors from './throw-user-errors' - -const handleLogin = (data: CreateToken) => { - throwUserErrors(data?.errors) - - const token = data?.token - - if (token) { - setToken(token) - setCSRFToken(token) - } - - return token -} - -export const handleAutomaticLogin = async ( - fetch: (options: FetcherOptions) => Promise, - input: MutationTokenCreateArgs -) => { - try { - const { tokenCreate } = await fetch({ - query: mutation.SessionCreate, - variables: { ...input }, - }) - handleLogin(tokenCreate!) - } catch (error) { - // - } -} - -export default handleLogin diff --git a/framework/saleor/utils/index.ts b/framework/saleor/utils/index.ts deleted file mode 100644 index de81eea67..000000000 --- a/framework/saleor/utils/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -export { getSortVariables } from './get-sort-variables' - -export { default as handleFetchResponse } from './handle-fetch-response' -export { default as getSearchVariables } from './get-search-variables' -export { default as getVendors } from './get-vendors' -export { default as getCategories } from './get-categories' -export { default as getCheckoutId } from './get-checkout-id' - -export { default as checkoutCreate } from './checkout-create' -export { checkoutAttach } from './checkout-attach' - -export { default as checkoutToCart } from './checkout-to-cart' -export { default as handleLogin, handleAutomaticLogin } from './handle-login' -export { default as throwUserErrors } from './throw-user-errors' - -export * from './queries' -export * from './mutations' -export * from './normalize' -export * from './customer-token' diff --git a/framework/saleor/utils/mutations/account-create.ts b/framework/saleor/utils/mutations/account-create.ts deleted file mode 100644 index f50fe6ddd..000000000 --- a/framework/saleor/utils/mutations/account-create.ts +++ /dev/null @@ -1,15 +0,0 @@ -export const AccountCreate = /* GraphQL */ ` - mutation AccountCreate($input: AccountRegisterInput!) { - accountRegister(input: $input) { - errors { - code - field - message - } - user { - email - isActive - } - } - } -` diff --git a/framework/saleor/utils/mutations/checkout-attach.ts b/framework/saleor/utils/mutations/checkout-attach.ts deleted file mode 100644 index 435be0582..000000000 --- a/framework/saleor/utils/mutations/checkout-attach.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const CheckoutAttach = /* GraphQl */ ` - mutation CheckoutAttach($checkoutId: ID!) { - checkoutCustomerAttach(checkoutId: $checkoutId) { - errors { - message - } - checkout { - id - } - } - } -` diff --git a/framework/saleor/utils/mutations/checkout-create.ts b/framework/saleor/utils/mutations/checkout-create.ts deleted file mode 100644 index 3cfe9d480..000000000 --- a/framework/saleor/utils/mutations/checkout-create.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as fragment from '../fragments' - -export const CheckoutCreate = /* GraphQL */ ` - mutation CheckoutCreate { - checkoutCreate(input: { email: "customer@example.com", lines: [], channel: "default-channel" }) { - errors { - code - field - message - } - checkout { - ...CheckoutDetails - } - } - } - ${fragment.CheckoutDetails} -` diff --git a/framework/saleor/utils/mutations/checkout-line-add.ts b/framework/saleor/utils/mutations/checkout-line-add.ts deleted file mode 100644 index e7b8e0a27..000000000 --- a/framework/saleor/utils/mutations/checkout-line-add.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as fragment from '../fragments' - -export const CheckoutLineAdd = /* GraphQL */ ` - mutation CheckoutLineAdd($checkoutId: ID!, $lineItems: [CheckoutLineInput!]!) { - checkoutLinesAdd(checkoutId: $checkoutId, lines: $lineItems) { - errors { - code - field - message - } - checkout { - ...CheckoutDetails - } - } - } - ${fragment.CheckoutDetails} -` diff --git a/framework/saleor/utils/mutations/checkout-line-remove.ts b/framework/saleor/utils/mutations/checkout-line-remove.ts deleted file mode 100644 index 191ef54aa..000000000 --- a/framework/saleor/utils/mutations/checkout-line-remove.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as fragment from '../fragments' - -export const CheckoutLineDelete = /* GraphQL */ ` - mutation CheckoutLineDelete($checkoutId: ID!, $lineId: ID!) { - checkoutLineDelete(checkoutId: $checkoutId, lineId: $lineId) { - errors { - code - field - message - } - checkout { - ...CheckoutDetails - } - } - } - ${fragment.CheckoutDetails} -` diff --git a/framework/saleor/utils/mutations/checkout-line-update.ts b/framework/saleor/utils/mutations/checkout-line-update.ts deleted file mode 100644 index 50019d6ef..000000000 --- a/framework/saleor/utils/mutations/checkout-line-update.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as fragment from '../fragments' - -export const CheckoutLineUpdate = /* GraphQL */ ` - mutation CheckoutLineUpdate($checkoutId: ID!, $lineItems: [CheckoutLineInput!]!) { - checkoutLinesUpdate(checkoutId: $checkoutId, lines: $lineItems) { - errors { - code - field - message - } - checkout { - ...CheckoutDetails - } - } - } - ${fragment.CheckoutDetails} -` diff --git a/framework/saleor/utils/mutations/index.ts b/framework/saleor/utils/mutations/index.ts deleted file mode 100644 index a1f3d6089..000000000 --- a/framework/saleor/utils/mutations/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { AccountCreate } from './account-create' -export { CheckoutCreate } from './checkout-create' -export { CheckoutLineAdd } from './checkout-line-add' -export { CheckoutLineUpdate } from './checkout-line-update' -export { CheckoutLineDelete } from './checkout-line-remove' -export { SessionCreate } from './session-create' -export { SessionDestroy } from './session-destroy' -export { CheckoutAttach } from './checkout-attach' diff --git a/framework/saleor/utils/mutations/session-create.ts b/framework/saleor/utils/mutations/session-create.ts deleted file mode 100644 index d3c5a513d..000000000 --- a/framework/saleor/utils/mutations/session-create.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const SessionCreate = /* GraphQL */ ` - mutation SessionCreate($email: String!, $password: String!) { - tokenCreate(email: $email, password: $password) { - token - refreshToken - csrfToken - errors { - code - field - message - } - } - } -` diff --git a/framework/saleor/utils/mutations/session-destroy.ts b/framework/saleor/utils/mutations/session-destroy.ts deleted file mode 100644 index def3a04ad..000000000 --- a/framework/saleor/utils/mutations/session-destroy.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const SessionDestroy = /* GraphQL */ ` - mutation SessionDestroy { - tokensDeactivateAll { - errors { - field - message - } - } - } -` diff --git a/framework/saleor/utils/normalize.ts b/framework/saleor/utils/normalize.ts deleted file mode 100644 index 56091db15..000000000 --- a/framework/saleor/utils/normalize.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Product } from '@commerce/types/product' - -import { Product as SaleorProduct, Checkout, CheckoutLine, Money, ProductVariant } from '../schema' - -import type { Cart, LineItem } from '../types' - -// TODO: Check nextjs-commerce bug if no images are added for a product -const placeholderImg = '/product-img-placeholder.svg' - -const money = ({ amount, currency }: Money) => { - return { - value: +amount, - currencyCode: currency || 'USD', - } -} - -const normalizeProductOptions = (options: ProductVariant[]) => { - return options - ?.map((option) => option?.attributes) - .flat(1) - .reduce((acc, x) => { - if (acc.find(({ displayName }: any) => displayName === x.attribute.name)) { - return acc.map((opt: any) => { - return opt.displayName === x.attribute.name - ? { - ...opt, - values: [ - ...opt.values, - ...x.values.map((value: any) => ({ - label: value?.name, - })), - ], - } - : opt - }) - } - - return acc.concat({ - __typename: 'MultipleChoiceOption', - displayName: x.attribute.name, - variant: 'size', - values: x.values.map((value: any) => ({ - label: value?.name, - })), - }) - }, []) -} - -const normalizeProductVariants = (variants: ProductVariant[]) => { - return variants?.map((variant) => { - const { id, sku, name, pricing } = variant - const price = pricing?.price?.net && money(pricing.price.net)?.value - - return { - id, - name, - sku: sku ?? id, - price, - listPrice: price, - requiresShipping: true, - options: normalizeProductOptions([variant]), - } - }) -} - -export function normalizeProduct(productNode: SaleorProduct): Product { - const { id, name, media = [], variants, description, slug, pricing, ...rest } = productNode - - const product = { - id, - name, - vendor: '', - description: description ? JSON.parse(description)?.blocks[0]?.data.text : '', - path: `/${slug}`, - slug: slug?.replace(/^\/+|\/+$/g, ''), - price: (pricing?.priceRange?.start?.net && money(pricing.priceRange.start.net)) || { - value: 0, - currencyCode: 'USD', - }, - // TODO: Check nextjs-commerce bug if no images are added for a product - images: media?.length ? media : [{ url: placeholderImg }], - variants: variants && variants.length > 0 ? normalizeProductVariants(variants as ProductVariant[]) : [], - options: variants && variants.length > 0 ? normalizeProductOptions(variants as ProductVariant[]) : [], - ...rest, - } - - return product as Product -} - -export function normalizeCart(checkout: Checkout): Cart { - const lines = checkout.lines as CheckoutLine[] - const lineItems: LineItem[] = lines.length > 0 ? lines?.map(normalizeLineItem) : [] - - return { - id: checkout.id, - customerId: '', - email: '', - createdAt: checkout.created, - currency: { - code: checkout.totalPrice?.currency!, - }, - taxesIncluded: false, - lineItems, - lineItemsSubtotalPrice: checkout.subtotalPrice?.gross?.amount!, - subtotalPrice: checkout.subtotalPrice?.gross?.amount!, - totalPrice: checkout.totalPrice?.gross.amount!, - discounts: [], - } -} - -function normalizeLineItem({ id, variant, quantity }: CheckoutLine): LineItem { - return { - id, - variantId: String(variant?.id), - productId: String(variant?.id), - name: `${variant.product.name}`, - quantity, - variant: { - id: String(variant?.id), - sku: variant?.sku ?? '', - name: variant?.name!, - image: { - url: variant?.media![0] ? variant?.media![0].url : placeholderImg, - }, - requiresShipping: false, - price: variant?.pricing?.price?.gross.amount!, - listPrice: 0, - }, - path: String(variant?.product?.slug), - discounts: [], - options: [], - } -} diff --git a/framework/saleor/utils/queries/checkout-one.ts b/framework/saleor/utils/queries/checkout-one.ts deleted file mode 100644 index ce4823671..000000000 --- a/framework/saleor/utils/queries/checkout-one.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as fragment from '../fragments' - -export const CheckoutOne = /* GraphQL */ ` - query CheckoutOne($checkoutId: UUID!) { - checkout(token: $checkoutId) { - ... on Checkout { - ...CheckoutDetails - } - } - } - ${fragment.CheckoutDetails} -` diff --git a/framework/saleor/utils/queries/collection-many.ts b/framework/saleor/utils/queries/collection-many.ts deleted file mode 100644 index b556e3faf..000000000 --- a/framework/saleor/utils/queries/collection-many.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const CollectionMany = /* GraphQL */ ` - query CollectionMany($first: Int!, $channel: String = "default-channel") { - collections(first: $first, channel: $channel) { - edges { - node { - id - name - slug - } - } - } - } -` diff --git a/framework/saleor/utils/queries/collection-one.ts b/framework/saleor/utils/queries/collection-one.ts deleted file mode 100644 index c2e593f51..000000000 --- a/framework/saleor/utils/queries/collection-one.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as fragment from '../fragments' - -export const CollectionOne = /* GraphQL */ ` - query getProductsFromCollection($categoryId: ID!, $first: Int = 100, $channel: String = "default-channel") { - collection(id: $categoryId, channel: $channel) { - id - products(first: $first) { - ...ProductConnection - } - } - } - ${fragment.ProductConnection} -` diff --git a/framework/saleor/utils/queries/customer-current.ts b/framework/saleor/utils/queries/customer-current.ts deleted file mode 100644 index 796545198..000000000 --- a/framework/saleor/utils/queries/customer-current.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const CustomerCurrent = /* GraphQL */ ` - query CustomerCurrent { - me { - id - email - firstName - lastName - dateJoined - } - } -` diff --git a/framework/saleor/utils/queries/customer-one.ts b/framework/saleor/utils/queries/customer-one.ts deleted file mode 100644 index d35b3f5ff..000000000 --- a/framework/saleor/utils/queries/customer-one.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const CustomerOne = /* GraphQL */ ` - query CustomerOne($customerAccessToken: String!) { - customer(customerAccessToken: $customerAccessToken) { - id - } - } -` diff --git a/framework/saleor/utils/queries/get-all-product-vendors-query.ts b/framework/saleor/utils/queries/get-all-product-vendors-query.ts deleted file mode 100644 index 7d0f01614..000000000 --- a/framework/saleor/utils/queries/get-all-product-vendors-query.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const getAllProductVendors = /* GraphQL */ ` - query getAllProductVendors($first: Int = 250, $cursor: String) { - products(first: $first, after: $cursor) { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - vendor - } - cursor - } - } - } -` diff --git a/framework/saleor/utils/queries/get-all-products-paths-query.ts b/framework/saleor/utils/queries/get-all-products-paths-query.ts deleted file mode 100644 index d9acb82cf..000000000 --- a/framework/saleor/utils/queries/get-all-products-paths-query.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const getAllProductsPathsQuery = /* GraphQL */ ` - query getAllProductPaths($first: Int = 100, $cursor: String, $channel: String = "default-channel") { - products(first: $first, after: $cursor, channel: $channel) { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - slug - } - cursor - } - } - } -` diff --git a/framework/saleor/utils/queries/index.ts b/framework/saleor/utils/queries/index.ts deleted file mode 100644 index 542c46f7c..000000000 --- a/framework/saleor/utils/queries/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export { CollectionMany } from './collection-many' -export { ProductOneBySlug } from './product-one-by-slug' -export { ProductMany } from './product-many' -export { CollectionOne } from './collection-one' -export { CheckoutOne } from './checkout-one' -export { PageMany } from './page-many' -export { PageOne } from './page-one' -export { CustomerCurrent } from './customer-current' - -// getCustomerIdQuery -export { CustomerOne } from './customer-one' - -export { getAllProductsPathsQuery } from './get-all-products-paths-query' -export { getAllProductVendors } from './get-all-product-vendors-query' diff --git a/framework/saleor/utils/queries/page-many.ts b/framework/saleor/utils/queries/page-many.ts deleted file mode 100644 index 94bba696d..000000000 --- a/framework/saleor/utils/queries/page-many.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const PageMany = /* GraphQL */ ` - query PageMany($first: Int = 100) { - pages(first: $first) { - edges { - node { - id - title - slug - } - } - } - } -` diff --git a/framework/saleor/utils/queries/page-one.ts b/framework/saleor/utils/queries/page-one.ts deleted file mode 100644 index 6d9789a9e..000000000 --- a/framework/saleor/utils/queries/page-one.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const PageOne = /* GraphQL */ ` - query PageOne($id: ID!) { - page(id: $id) { - id - title - slug - } - } -` diff --git a/framework/saleor/utils/queries/product-many.ts b/framework/saleor/utils/queries/product-many.ts deleted file mode 100644 index 7e0aa9a07..000000000 --- a/framework/saleor/utils/queries/product-many.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as fragment from '../fragments' - -export const ProductMany = /* GraphQL */ ` - query ProductMany( - $first: Int = 100 - $filter: ProductFilterInput - $sortBy: ProductOrder - $channel: String = "default-channel" - ) { - products(first: $first, channel: $channel, filter: $filter, sortBy: $sortBy) { - ...ProductConnection - } - } - ${fragment.ProductConnection} -` diff --git a/framework/saleor/utils/queries/product-one-by-slug.ts b/framework/saleor/utils/queries/product-one-by-slug.ts deleted file mode 100644 index e9169f05e..000000000 --- a/framework/saleor/utils/queries/product-one-by-slug.ts +++ /dev/null @@ -1,43 +0,0 @@ -export const ProductOneBySlug = /* GraphQL */ ` - query ProductOneBySlug($slug: String!, $channel: String = "default-channel") { - product(slug: $slug, channel: $channel) { - id - slug - name - description - pricing { - priceRange { - start { - net { - amount - } - } - } - } - variants { - id - name - attributes { - attribute { - name - } - values { - name - } - } - pricing { - price { - net { - amount - currency - } - } - } - } - media { - url - alt - } - } - } -` diff --git a/framework/saleor/utils/throw-user-errors.ts b/framework/saleor/utils/throw-user-errors.ts deleted file mode 100644 index 2991d78a6..000000000 --- a/framework/saleor/utils/throw-user-errors.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ValidationError } from '@commerce/utils/errors' - -import { CheckoutError, CheckoutErrorCode, AppError, AccountError, AccountErrorCode } from '../schema' - -export type UserErrors = Array - -export type UserErrorCode = CheckoutErrorCode | AccountErrorCode | null | undefined - -export const throwUserErrors = (errors?: UserErrors) => { - if (errors && errors.length) { - throw new ValidationError({ - errors: errors.map(({ code, message }) => ({ - code: code ?? 'validation_error', - message: message || '', - })), - }) - } -} - -export default throwUserErrors diff --git a/framework/saleor/wishlist/use-add-item.tsx b/framework/saleor/wishlist/use-add-item.tsx deleted file mode 100644 index 75f067c3a..000000000 --- a/framework/saleor/wishlist/use-add-item.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { useCallback } from 'react' - -export function emptyHook() { - const useEmptyHook = async (options = {}) => { - return useCallback(async function () { - return Promise.resolve() - }, []) - } - - return useEmptyHook -} - -export default emptyHook diff --git a/framework/saleor/wishlist/use-remove-item.tsx b/framework/saleor/wishlist/use-remove-item.tsx deleted file mode 100644 index a2d3a8a05..000000000 --- a/framework/saleor/wishlist/use-remove-item.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { useCallback } from 'react' - -type Options = { - includeProducts?: boolean -} - -export function emptyHook(options?: Options) { - const useEmptyHook = async ({ id }: { id: string | number }) => { - return useCallback(async function () { - return Promise.resolve() - }, []) - } - - return useEmptyHook -} - -export default emptyHook diff --git a/framework/saleor/wishlist/use-wishlist.tsx b/framework/saleor/wishlist/use-wishlist.tsx deleted file mode 100644 index cdd9a643d..000000000 --- a/framework/saleor/wishlist/use-wishlist.tsx +++ /dev/null @@ -1,46 +0,0 @@ -// TODO: replace this hook and other wishlist hooks with a handler, or remove them if -// Saleor doesn't have a wishlist - -import { HookFetcher } from '@commerce/utils/types' -import { Product } from '../schema' - -const defaultOpts = {} - -export type Wishlist = { - items: [ - { - product_id: number - variant_id: number - id: number - product: Product - } - ] -} - -export interface UseWishlistOptions { - includeProducts?: boolean -} - -export interface UseWishlistInput extends UseWishlistOptions { - customerId?: number -} - -export const fetcher: HookFetcher = () => { - return null -} - -export function extendHook( - customFetcher: typeof fetcher, - // swrOptions?: SwrOptions - swrOptions?: any -) { - const useWishlist = ({ includeProducts }: UseWishlistOptions = {}) => { - return { data: null } - } - - useWishlist.extend = extendHook - - return useWishlist -} - -export default extendHook(fetcher) diff --git a/framework/shopify/.env.template b/framework/shopify/.env.template deleted file mode 100644 index 74f446835..000000000 --- a/framework/shopify/.env.template +++ /dev/null @@ -1,4 +0,0 @@ -COMMERCE_PROVIDER=shopify - -NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN= -NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN= diff --git a/framework/shopify/README.md b/framework/shopify/README.md deleted file mode 100644 index d5c4aa942..000000000 --- a/framework/shopify/README.md +++ /dev/null @@ -1,135 +0,0 @@ -## Shopify Provider - -**Demo:** https://shopify.demo.vercel.store/ - -Before getting starter, a [Shopify](https://www.shopify.com/) account and store is required before using the provider. - -Next, copy the `.env.template` file in this directory to `.env.local` in the main directory (which will be ignored by Git): - -```bash -cp framework/shopify/.env.template .env.local -``` - -Then, set the environment variables in `.env.local` to match the ones from your store. - -## Contribute - -Our commitment to Open Source can be found [here](https://vercel.com/oss). - -If you find an issue with the provider or want a new feature, feel free to open a PR or [create a new issue](https://github.com/vercel/commerce/issues). - -## Modifications - -These modifications are temporarily until contributions are made to remove them. - -### Adding item to Cart - -```js -// components/product/ProductView/ProductView.tsx -const ProductView: FC = ({ product }) => { - const addToCart = async () => { - setLoading(true) - try { - await addItem({ - productId: product.id, - variantId: variant ? variant.id : product.variants[0].id, - }) - openSidebar() - setLoading(false) - } catch (err) { - setLoading(false) - } - } -} -``` - -### Proceed to Checkout - -```js -// components/cart/CartSidebarView/CartSidebarView.tsx -import { useCommerce } from '@framework' - -const CartSidebarView: FC = () => { - const { checkout } = useCommerce() - return ( - - ) -} -``` - -## APIs - -Collections of APIs to fetch data from a Shopify store. - -The data is fetched using the [Shopify JavaScript Buy SDK](https://github.com/Shopify/js-buy-sdk#readme). Read the [Shopify Storefront API reference](https://shopify.dev/docs/storefront-api/reference) for more information. - -### getProduct - -Get a single product by its `handle`. - -```js -import getProduct from '@framework/product/get-product' -import { getConfig } from '@framework/api' - -const config = getConfig() - -const product = await getProduct({ - variables: { slug }, - config, -}) -``` - -### getAllProducts - -```js -import getAllProducts from '@framework/product/get-all-products' -import { getConfig } from '@framework/api' - -const config = getConfig() - -const { products } = await getAllProducts({ - variables: { first: 12 }, - config, -}) -``` - -### getAllCollections - -```js -import getAllCollections from '@framework/product/get-all-collections' -import { getConfig } from '@framework/api' - -const config = getConfig() - -const collections = await getAllCollections({ - config, -}) -``` - -### getAllPages - -```js -import getAllPages from '@framework/common/get-all-pages' -import { getConfig } from '@framework/api' - -const config = getConfig() - -const pages = await getAllPages({ - variables: { first: 12 }, - config, -}) -``` - -## Code generation - -This provider makes use of GraphQL code generation. The [schema.graphql](./schema.graphql) and [schema.d.ts](./schema.d.ts) files contain the generated types & schema introspection results. - -When developing the provider, changes to any GraphQL operations should be followed by re-generation of the types and schema files: - -From the project root dir, run: - -```sh -yarn generate:shopify -``` diff --git a/framework/shopify/api/endpoints/cart.ts b/framework/shopify/api/endpoints/cart.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/shopify/api/endpoints/cart.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/shopify/api/endpoints/catalog/products.ts b/framework/shopify/api/endpoints/catalog/products.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/shopify/api/endpoints/catalog/products.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/shopify/api/endpoints/checkout/checkout.ts b/framework/shopify/api/endpoints/checkout/checkout.ts deleted file mode 100644 index 0c340a129..000000000 --- a/framework/shopify/api/endpoints/checkout/checkout.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - SHOPIFY_CHECKOUT_ID_COOKIE, - SHOPIFY_CHECKOUT_URL_COOKIE, - SHOPIFY_CUSTOMER_TOKEN_COOKIE, -} from '../../../const' -import associateCustomerWithCheckoutMutation from '../../../utils/mutations/associate-customer-with-checkout' -import type { CheckoutEndpoint } from '.' - -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ - req, - res, - config, -}) => { - const { cookies } = req - const checkoutUrl = cookies[SHOPIFY_CHECKOUT_URL_COOKIE] - const customerCookie = cookies[SHOPIFY_CUSTOMER_TOKEN_COOKIE] - - if (customerCookie) { - try { - await config.fetch(associateCustomerWithCheckoutMutation, { - variables: { - checkoutId: cookies[SHOPIFY_CHECKOUT_ID_COOKIE], - customerAccessToken: cookies[SHOPIFY_CUSTOMER_TOKEN_COOKIE], - }, - }) - } catch (error) { - console.error(error) - } - } - - if (checkoutUrl) { - res.redirect(checkoutUrl) - } else { - res.redirect('/cart') - } -} - -export default checkout diff --git a/framework/shopify/api/endpoints/checkout/index.ts b/framework/shopify/api/endpoints/checkout/index.ts deleted file mode 100644 index 5d78f451b..000000000 --- a/framework/shopify/api/endpoints/checkout/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GetAPISchema, createEndpoint } from '@commerce/api' -import checkoutEndpoint from '@commerce/api/endpoints/checkout' -import type { CheckoutSchema } from '../../../types/checkout' -import type { ShopifyAPI } from '../..' -import checkout from './checkout' - -export type CheckoutAPI = GetAPISchema - -export type CheckoutEndpoint = CheckoutAPI['endpoint'] - -export const handlers: CheckoutEndpoint['handlers'] = { checkout } - -const checkoutApi = createEndpoint({ - handler: checkoutEndpoint, - handlers, -}) - -export default checkoutApi diff --git a/framework/shopify/api/endpoints/customer.ts b/framework/shopify/api/endpoints/customer.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/shopify/api/endpoints/customer.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/shopify/api/endpoints/login.ts b/framework/shopify/api/endpoints/login.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/shopify/api/endpoints/login.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/shopify/api/endpoints/logout.ts b/framework/shopify/api/endpoints/logout.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/shopify/api/endpoints/logout.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/shopify/api/endpoints/signup.ts b/framework/shopify/api/endpoints/signup.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/shopify/api/endpoints/signup.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/shopify/api/endpoints/wishlist.ts b/framework/shopify/api/endpoints/wishlist.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/shopify/api/endpoints/wishlist.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/shopify/api/index.ts b/framework/shopify/api/index.ts deleted file mode 100644 index 28c7d34b3..000000000 --- a/framework/shopify/api/index.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - CommerceAPI, - CommerceAPIConfig, - getCommerceApi as commerceApi, -} from '@commerce/api' - -import { - API_URL, - API_TOKEN, - SHOPIFY_CUSTOMER_TOKEN_COOKIE, - SHOPIFY_CHECKOUT_ID_COOKIE, -} from '../const' - -import fetchGraphqlApi from './utils/fetch-graphql-api' - -import * as operations from './operations' - -if (!API_URL) { - throw new Error( - `The environment variable NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN is missing and it's required to access your store` - ) -} - -if (!API_TOKEN) { - throw new Error( - `The environment variable NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN is missing and it's required to access your store` - ) -} -export interface ShopifyConfig extends CommerceAPIConfig {} - -const ONE_DAY = 60 * 60 * 24 - -const config: ShopifyConfig = { - commerceUrl: API_URL, - apiToken: API_TOKEN, - customerCookie: SHOPIFY_CUSTOMER_TOKEN_COOKIE, - cartCookie: SHOPIFY_CHECKOUT_ID_COOKIE, - cartCookieMaxAge: ONE_DAY * 30, - fetch: fetchGraphqlApi, -} - -export const provider = { - config, - operations, -} - -export type Provider = typeof provider - -export type ShopifyAPI

= CommerceAPI

- -export function getCommerceApi

( - customProvider: P = provider as any -): ShopifyAPI

{ - return commerceApi(customProvider) -} diff --git a/framework/shopify/api/operations/get-all-pages.ts b/framework/shopify/api/operations/get-all-pages.ts deleted file mode 100644 index 58bc6a94b..000000000 --- a/framework/shopify/api/operations/get-all-pages.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import { - GetAllPagesQuery, - GetAllPagesQueryVariables, - PageEdge, -} from '../../schema' -import { normalizePages } from '../../utils' -import type { ShopifyConfig, Provider } from '..' -import type { GetAllPagesOperation, Page } from '../../types/page' -import getAllPagesQuery from '../../utils/queries/get-all-pages-query' - -export default function getAllPagesOperation({ - commerce, -}: OperationContext) { - async function getAllPages(opts?: { - config?: Partial - preview?: boolean - }): Promise - - async function getAllPages( - opts: { - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getAllPages({ - query = getAllPagesQuery, - config, - variables, - }: { - url?: string - config?: Partial - variables?: GetAllPagesQueryVariables - preview?: boolean - query?: string - } = {}): Promise { - const { fetch, locale, locales = ['en-US', 'es'] } = commerce.getConfig( - config - ) - - const { data } = await fetch( - query, - { - variables, - }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - return { - pages: locales.reduce( - (arr, locale) => - arr.concat(normalizePages(data.pages.edges as PageEdge[], locale)), - [] - ), - } - } - - return getAllPages -} diff --git a/framework/shopify/api/operations/get-all-product-paths.ts b/framework/shopify/api/operations/get-all-product-paths.ts deleted file mode 100644 index c84f8c90a..000000000 --- a/framework/shopify/api/operations/get-all-product-paths.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import { GetAllProductPathsOperation } from '../../types/product' -import { - GetAllProductPathsQuery, - GetAllProductPathsQueryVariables, - ProductEdge, -} from '../../schema' -import type { ShopifyConfig, Provider } from '..' -import { getAllProductsQuery } from '../../utils' - -export default function getAllProductPathsOperation({ - commerce, -}: OperationContext) { - async function getAllProductPaths< - T extends GetAllProductPathsOperation - >(opts?: { - variables?: T['variables'] - config?: ShopifyConfig - }): Promise - - async function getAllProductPaths( - opts: { - variables?: T['variables'] - config?: ShopifyConfig - } & OperationOptions - ): Promise - - async function getAllProductPaths({ - query = getAllProductsQuery, - config, - variables, - }: { - query?: string - config?: ShopifyConfig - variables?: T['variables'] - } = {}): Promise { - config = commerce.getConfig(config) - - const { data } = await config.fetch< - GetAllProductPathsQuery, - GetAllProductPathsQueryVariables - >(query, { variables }) - - return { - products: data.products.edges.map(({ node: { handle } }) => ({ - path: `/${handle}`, - })), - } - } - - return getAllProductPaths -} diff --git a/framework/shopify/api/operations/get-all-products.ts b/framework/shopify/api/operations/get-all-products.ts deleted file mode 100644 index 08d781d5c..000000000 --- a/framework/shopify/api/operations/get-all-products.ts +++ /dev/null @@ -1,67 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import { GetAllProductsOperation } from '../../types/product' -import { - GetAllProductsQuery, - GetAllProductsQueryVariables, - Product as ShopifyProduct, -} from '../../schema' -import type { ShopifyConfig, Provider } from '..' -import getAllProductsQuery from '../../utils/queries/get-all-products-query' -import { normalizeProduct } from '../../utils' - -export default function getAllProductsOperation({ - commerce, -}: OperationContext) { - async function getAllProducts(opts?: { - variables?: T['variables'] - config?: Partial - preview?: boolean - }): Promise - - async function getAllProducts( - opts: { - variables?: T['variables'] - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getAllProducts({ - query = getAllProductsQuery, - variables, - config, - }: { - query?: string - variables?: T['variables'] - config?: Partial - preview?: boolean - } = {}): Promise { - const { fetch, locale } = commerce.getConfig(config) - - const { data } = await fetch< - GetAllProductsQuery, - GetAllProductsQueryVariables - >( - query, - { variables }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - return { - products: data.products.edges.map(({ node }) => - normalizeProduct(node as ShopifyProduct) - ), - } - } - - return getAllProducts -} diff --git a/framework/shopify/api/operations/get-page.ts b/framework/shopify/api/operations/get-page.ts deleted file mode 100644 index 023ebeeb7..000000000 --- a/framework/shopify/api/operations/get-page.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import { normalizePage } from '../../utils' -import type { ShopifyConfig, Provider } from '..' -import { - GetPageQuery, - GetPageQueryVariables, - Page as ShopifyPage, -} from '../../schema' -import { GetPageOperation } from '../../types/page' -import getPageQuery from '../../utils/queries/get-page-query' - -export default function getPageOperation({ - commerce, -}: OperationContext) { - async function getPage(opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise - - async function getPage( - opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getPage({ - query = getPageQuery, - variables, - config, - }: { - query?: string - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise { - const { fetch, locale } = commerce.getConfig(config) - - const { - data: { node: page }, - } = await fetch( - query, - { - variables, - }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - return page ? { page: normalizePage(page as ShopifyPage, locale) } : {} - } - - return getPage -} diff --git a/framework/shopify/api/operations/get-product.ts b/framework/shopify/api/operations/get-product.ts deleted file mode 100644 index 447b5c792..000000000 --- a/framework/shopify/api/operations/get-product.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import { GetProductOperation } from '../../types/product' -import { normalizeProduct, getProductQuery } from '../../utils' -import type { ShopifyConfig, Provider } from '..' -import { GetProductBySlugQuery, Product as ShopifyProduct } from '../../schema' - -export default function getProductOperation({ - commerce, -}: OperationContext) { - async function getProduct(opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise - - async function getProduct( - opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getProduct({ - query = getProductQuery, - variables, - config: cfg, - }: { - query?: string - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise { - const { fetch, locale } = commerce.getConfig(cfg) - - const { - data: { productByHandle }, - } = await fetch( - query, - { - variables, - }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - return { - ...(productByHandle && { - product: normalizeProduct(productByHandle as ShopifyProduct), - }), - } - } - - return getProduct -} diff --git a/framework/shopify/api/operations/get-site-info.ts b/framework/shopify/api/operations/get-site-info.ts deleted file mode 100644 index 7f51d1d5c..000000000 --- a/framework/shopify/api/operations/get-site-info.ts +++ /dev/null @@ -1,62 +0,0 @@ -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import { GetSiteInfoQueryVariables } from '../../schema' -import type { ShopifyConfig, Provider } from '..' -import { GetSiteInfoOperation } from '../../types/site' - -import { getCategories, getBrands, getSiteInfoQuery } from '../../utils' - -export default function getSiteInfoOperation({ - commerce, -}: OperationContext) { - async function getSiteInfo(opts?: { - config?: Partial - preview?: boolean - }): Promise - - async function getSiteInfo( - opts: { - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getSiteInfo({ - query = getSiteInfoQuery, - config, - variables, - }: { - query?: string - config?: Partial - preview?: boolean - variables?: GetSiteInfoQueryVariables - } = {}): Promise { - const cfg = commerce.getConfig(config) - - const categoriesPromise = getCategories(cfg) - const brandsPromise = getBrands(cfg) - /* - const { fetch, locale } = cfg - const { data } = await fetch( - query, - { variables }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - */ - - return { - categories: await categoriesPromise, - brands: await brandsPromise, - } - } - - return getSiteInfo -} diff --git a/framework/shopify/api/operations/index.ts b/framework/shopify/api/operations/index.ts deleted file mode 100644 index 7872a20b6..000000000 --- a/framework/shopify/api/operations/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { default as getAllPages } from './get-all-pages' -export { default as getPage } from './get-page' -export { default as getAllProducts } from './get-all-products' -export { default as getAllProductPaths } from './get-all-product-paths' -export { default as getProduct } from './get-product' -export { default as getSiteInfo } from './get-site-info' -export { default as login } from './login' diff --git a/framework/shopify/api/operations/login.ts b/framework/shopify/api/operations/login.ts deleted file mode 100644 index 41e837a3f..000000000 --- a/framework/shopify/api/operations/login.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { ServerResponse } from 'http' -import type { OperationContext } from '@commerce/api/operations' -import type { LoginOperation } from '../../types/login' -import type { ShopifyConfig, Provider } from '..' -import { - customerAccessTokenCreateMutation, - setCustomerToken, - throwUserErrors, -} from '../../utils' -import { CustomerAccessTokenCreateMutation } from '../../schema' - -export default function loginOperation({ - commerce, -}: OperationContext) { - async function login({ - query = customerAccessTokenCreateMutation, - variables, - config, - }: { - query?: string - variables: T['variables'] - res: ServerResponse - config?: ShopifyConfig - }): Promise { - config = commerce.getConfig(config) - - const { - data: { customerAccessTokenCreate }, - } = await config.fetch(query, { - variables, - }) - - throwUserErrors(customerAccessTokenCreate?.customerUserErrors) - - const customerAccessToken = customerAccessTokenCreate?.customerAccessToken - const accessToken = customerAccessToken?.accessToken - - if (accessToken) { - setCustomerToken(accessToken) - } - - return { - result: customerAccessToken?.accessToken, - } - } - - return login -} diff --git a/framework/shopify/api/utils/fetch-graphql-api.ts b/framework/shopify/api/utils/fetch-graphql-api.ts deleted file mode 100644 index c45d57e70..000000000 --- a/framework/shopify/api/utils/fetch-graphql-api.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { GraphQLFetcher } from '@commerce/api' -import fetch from './fetch' - -import { API_URL, API_TOKEN } from '../../const' -import { getError } from '../../utils/handle-fetch-response' - -const fetchGraphqlApi: GraphQLFetcher = async ( - query: string, - { variables } = {}, - fetchOptions -) => { - try { - const res = await fetch(API_URL, { - ...fetchOptions, - method: 'POST', - headers: { - 'X-Shopify-Storefront-Access-Token': API_TOKEN!, - ...fetchOptions?.headers, - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ - query, - variables, - }), - }) - - const { data, errors, status } = await res.json() - - if (errors) { - throw getError(errors, status) - } - - return { data, res } - } catch (err) { - throw getError( - [ - { - message: `${err} \n Most likely related to an unexpected output. e.g the store might be protected with password or not available.`, - }, - ], - 500 - ) - } -} -export default fetchGraphqlApi diff --git a/framework/shopify/api/utils/fetch.ts b/framework/shopify/api/utils/fetch.ts deleted file mode 100644 index 0b8367102..000000000 --- a/framework/shopify/api/utils/fetch.ts +++ /dev/null @@ -1,2 +0,0 @@ -import zeitFetch from '@vercel/fetch' -export default zeitFetch() diff --git a/framework/shopify/auth/use-login.tsx b/framework/shopify/auth/use-login.tsx deleted file mode 100644 index e1de89c99..000000000 --- a/framework/shopify/auth/use-login.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useLogin, { UseLogin } from '@commerce/auth/use-login' -import type { LoginHook } from '../types/login' -import useCustomer from '../customer/use-customer' - -import { - setCustomerToken, - throwUserErrors, - customerAccessTokenCreateMutation, -} from '../utils' -import { Mutation, MutationCustomerAccessTokenCreateArgs } from '../schema' - -export default useLogin as UseLogin - -export const handler: MutationHook = { - fetchOptions: { - query: customerAccessTokenCreateMutation, - }, - async fetcher({ input: { email, password }, options, fetch }) { - if (!(email && password)) { - throw new CommerceError({ - message: - 'An email and password are required to login', - }) - } - - const { customerAccessTokenCreate } = await fetch< - Mutation, - MutationCustomerAccessTokenCreateArgs - >({ - ...options, - variables: { - input: { email, password }, - }, - }) - - throwUserErrors(customerAccessTokenCreate?.customerUserErrors) - - const customerAccessToken = customerAccessTokenCreate?.customerAccessToken - const accessToken = customerAccessToken?.accessToken - - if (accessToken) { - setCustomerToken(accessToken) - } - - return null - }, - useHook: ({ fetch }) => () => { - const { revalidate } = useCustomer() - - return useCallback( - async function login(input) { - const data = await fetch({ input }) - await revalidate() - return data - }, - [fetch, revalidate] - ) - }, -} diff --git a/framework/shopify/auth/use-logout.tsx b/framework/shopify/auth/use-logout.tsx deleted file mode 100644 index 30074b8d5..000000000 --- a/framework/shopify/auth/use-logout.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import useLogout, { UseLogout } from '@commerce/auth/use-logout' -import type { LogoutHook } from '../types/logout' -import useCustomer from '../customer/use-customer' -import customerAccessTokenDeleteMutation from '../utils/mutations/customer-access-token-delete' -import { getCustomerToken, setCustomerToken } from '../utils/customer-token' - -export default useLogout as UseLogout - -export const handler: MutationHook = { - fetchOptions: { - query: customerAccessTokenDeleteMutation, - }, - async fetcher({ options, fetch }) { - await fetch({ - ...options, - variables: { - customerAccessToken: getCustomerToken(), - }, - }) - setCustomerToken(null) - return null - }, - useHook: ({ fetch }) => () => { - const { mutate } = useCustomer() - - return useCallback( - async function logout() { - const data = await fetch() - await mutate(null, false) - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/shopify/auth/use-signup.tsx b/framework/shopify/auth/use-signup.tsx deleted file mode 100644 index 29557e960..000000000 --- a/framework/shopify/auth/use-signup.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useSignup, { UseSignup } from '@commerce/auth/use-signup' -import type { SignupHook } from '../types/signup' -import useCustomer from '../customer/use-customer' -import { Mutation, MutationCustomerCreateArgs } from '../schema' - -import { - handleAutomaticLogin, - throwUserErrors, - customerCreateMutation, -} from '../utils' - -export default useSignup as UseSignup - -export const handler: MutationHook = { - fetchOptions: { - query: customerCreateMutation, - }, - async fetcher({ - input: { firstName, lastName, email, password }, - options, - fetch, - }) { - if (!(firstName && lastName && email && password)) { - throw new CommerceError({ - message: - 'A first name, last name, email and password are required to signup', - }) - } - - const { customerCreate } = await fetch< - Mutation, - MutationCustomerCreateArgs - >({ - ...options, - variables: { - input: { - firstName, - lastName, - email, - password, - }, - }, - }) - - throwUserErrors(customerCreate?.customerUserErrors) - await handleAutomaticLogin(fetch, { email, password }) - - return null - }, - useHook: ({ fetch }) => () => { - const { revalidate } = useCustomer() - - return useCallback( - async function signup(input) { - const data = await fetch({ input }) - await revalidate() - return data - }, - [fetch, revalidate] - ) - }, -} diff --git a/framework/shopify/cart/index.ts b/framework/shopify/cart/index.ts deleted file mode 100644 index f6d36b443..000000000 --- a/framework/shopify/cart/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { default as useCart } from './use-cart' -export { default as useAddItem } from './use-add-item' -export { default as useUpdateItem } from './use-update-item' -export { default as useRemoveItem } from './use-remove-item' diff --git a/framework/shopify/cart/use-add-item.tsx b/framework/shopify/cart/use-add-item.tsx deleted file mode 100644 index 5f0809d01..000000000 --- a/framework/shopify/cart/use-add-item.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useAddItem, { UseAddItem } from '@commerce/cart/use-add-item' -import type { AddItemHook } from '../types/cart' -import useCart from './use-cart' - -import { - checkoutLineItemAddMutation, - getCheckoutId, - checkoutToCart, -} from '../utils' -import { Mutation, MutationCheckoutLineItemsAddArgs } from '../schema' - -export default useAddItem as UseAddItem - -export const handler: MutationHook = { - fetchOptions: { - query: checkoutLineItemAddMutation, - }, - async fetcher({ input: item, options, fetch }) { - if ( - item.quantity && - (!Number.isInteger(item.quantity) || item.quantity! < 1) - ) { - throw new CommerceError({ - message: 'The item quantity has to be a valid integer greater than 0', - }) - } - - const { checkoutLineItemsAdd } = await fetch< - Mutation, - MutationCheckoutLineItemsAddArgs - >({ - ...options, - variables: { - checkoutId: getCheckoutId(), - lineItems: [ - { - variantId: item.variantId, - quantity: item.quantity ?? 1, - }, - ], - }, - }) - - return checkoutToCart(checkoutLineItemsAdd) - }, - useHook: ({ fetch }) => () => { - const { mutate } = useCart() - - return useCallback( - async function addItem(input) { - const data = await fetch({ input }) - await mutate(data, false) - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/shopify/cart/use-cart.tsx b/framework/shopify/cart/use-cart.tsx deleted file mode 100644 index d920d058a..000000000 --- a/framework/shopify/cart/use-cart.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { useMemo } from 'react' -import useCommerceCart, { UseCart } from '@commerce/cart/use-cart' - -import { SWRHook } from '@commerce/utils/types' -import { checkoutCreate, checkoutToCart } from '../utils' -import getCheckoutQuery from '../utils/queries/get-checkout-query' -import { GetCartHook } from '../types/cart' - -import { - GetCheckoutQuery, - GetCheckoutQueryVariables, - CheckoutDetailsFragment, -} from '../schema' - -export default useCommerceCart as UseCart - -export const handler: SWRHook = { - fetchOptions: { - query: getCheckoutQuery, - }, - async fetcher({ input: { cartId: checkoutId }, options, fetch }) { - let checkout - - if (checkoutId) { - const data = await fetch({ - ...options, - variables: { - checkoutId: checkoutId, - }, - }) - checkout = data.node - } - - if (checkout?.completedAt || !checkoutId) { - checkout = await checkoutCreate(fetch) - } - - return checkoutToCart({ checkout }) - }, - useHook: ({ useData }) => (input) => { - const response = useData({ - swrOptions: { revalidateOnFocus: false, ...input?.swrOptions }, - }) - return useMemo( - () => - Object.create(response, { - isEmpty: { - get() { - return (response.data?.lineItems.length ?? 0) <= 0 - }, - enumerable: true, - }, - }), - [response] - ) - }, -} diff --git a/framework/shopify/cart/use-remove-item.tsx b/framework/shopify/cart/use-remove-item.tsx deleted file mode 100644 index bf9fb2d95..000000000 --- a/framework/shopify/cart/use-remove-item.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { useCallback } from 'react' -import type { - MutationHookContext, - HookFetcherContext, -} from '@commerce/utils/types' -import { ValidationError } from '@commerce/utils/errors' -import useRemoveItem, { UseRemoveItem } from '@commerce/cart/use-remove-item' -import type { Cart, LineItem, RemoveItemHook } from '../types/cart' -import useCart from './use-cart' - -export type RemoveItemFn = T extends LineItem - ? (input?: RemoveItemActionInput) => Promise - : (input: RemoveItemActionInput) => Promise - -export type RemoveItemActionInput = T extends LineItem - ? Partial - : RemoveItemHook['actionInput'] - -export default useRemoveItem as UseRemoveItem - -import { - checkoutLineItemRemoveMutation, - getCheckoutId, - checkoutToCart, -} from '../utils' - -import { Mutation, MutationCheckoutLineItemsRemoveArgs } from '../schema' - -export const handler = { - fetchOptions: { - query: checkoutLineItemRemoveMutation, - }, - async fetcher({ - input: { itemId }, - options, - fetch, - }: HookFetcherContext) { - const data = await fetch({ - ...options, - variables: { checkoutId: getCheckoutId(), lineItemIds: [itemId] }, - }) - return checkoutToCart(data.checkoutLineItemsRemove) - }, - useHook: ({ fetch }: MutationHookContext) => < - T extends LineItem | undefined = undefined - >( - ctx: { item?: T } = {} - ) => { - const { item } = ctx - const { mutate } = useCart() - const removeItem: RemoveItemFn = async (input) => { - const itemId = input?.id ?? item?.id - - if (!itemId) { - throw new ValidationError({ - message: 'Invalid input used for this operation', - }) - } - - const data = await fetch({ input: { itemId } }) - await mutate(data, false) - return data - } - - return useCallback(removeItem as RemoveItemFn, [fetch, mutate]) - }, -} diff --git a/framework/shopify/cart/use-update-item.tsx b/framework/shopify/cart/use-update-item.tsx deleted file mode 100644 index 3f1cf4315..000000000 --- a/framework/shopify/cart/use-update-item.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { useCallback } from 'react' -import debounce from 'lodash.debounce' -import type { - HookFetcherContext, - MutationHookContext, -} from '@commerce/utils/types' -import { ValidationError } from '@commerce/utils/errors' -import useUpdateItem, { UseUpdateItem } from '@commerce/cart/use-update-item' - -import useCart from './use-cart' -import { handler as removeItemHandler } from './use-remove-item' -import type { UpdateItemHook, LineItem } from '../types/cart' -import { - getCheckoutId, - checkoutLineItemUpdateMutation, - checkoutToCart, -} from '../utils' -import { Mutation, MutationCheckoutLineItemsUpdateArgs } from '../schema' - -export type UpdateItemActionInput = T extends LineItem - ? Partial - : UpdateItemHook['actionInput'] - -export default useUpdateItem as UseUpdateItem - -export const handler = { - fetchOptions: { - query: checkoutLineItemUpdateMutation, - }, - async fetcher({ - input: { itemId, item }, - options, - fetch, - }: HookFetcherContext) { - if (Number.isInteger(item.quantity)) { - // Also allow the update hook to remove an item if the quantity is lower than 1 - if (item.quantity! < 1) { - return removeItemHandler.fetcher({ - options: removeItemHandler.fetchOptions, - input: { itemId }, - fetch, - }) - } - } else if (item.quantity) { - throw new ValidationError({ - message: 'The item quantity has to be a valid integer', - }) - } - const { checkoutLineItemsUpdate } = await fetch< - Mutation, - MutationCheckoutLineItemsUpdateArgs - >({ - ...options, - variables: { - checkoutId: getCheckoutId(), - lineItems: [ - { - id: itemId, - quantity: item.quantity, - }, - ], - }, - }) - - return checkoutToCart(checkoutLineItemsUpdate) - }, - useHook: ({ fetch }: MutationHookContext) => < - T extends LineItem | undefined = undefined - >( - ctx: { - item?: T - wait?: number - } = {} - ) => { - const { item } = ctx - const { mutate } = useCart() as any - - return useCallback( - debounce(async (input: UpdateItemActionInput) => { - const itemId = input.id ?? item?.id - const productId = input.productId ?? item?.productId - const variantId = input.productId ?? item?.variantId - if (!itemId || !productId || !variantId) { - throw new ValidationError({ - message: 'Invalid input used for this operation', - }) - } - - const data = await fetch({ - input: { - item: { - productId, - variantId, - quantity: input.quantity, - }, - itemId, - }, - }) - await mutate(data, false) - return data - }, ctx.wait ?? 500), - [fetch, mutate] - ) - }, -} diff --git a/framework/shopify/codegen.json b/framework/shopify/codegen.json deleted file mode 100644 index 9d7dcf8a9..000000000 --- a/framework/shopify/codegen.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "schema": { - "https://${NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN}/api/2021-07/graphql.json": { - "headers": { - "X-Shopify-Storefront-Access-Token": "${NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN}" - } - } - }, - "documents": [ - { - "./framework/shopify/**/*.{ts,tsx}": { - "noRequire": true - } - } - ], - "generates": { - "./framework/shopify/schema.d.ts": { - "plugins": ["typescript", "typescript-operations"], - "config": { - "scalars": { - "ID": "string" - } - } - }, - "./framework/shopify/schema.graphql": { - "plugins": ["schema-ast"] - } - }, - "hooks": { - "afterAllFileWrite": ["prettier --write"] - } -} diff --git a/framework/shopify/commerce.config.json b/framework/shopify/commerce.config.json deleted file mode 100644 index b30ab39d9..000000000 --- a/framework/shopify/commerce.config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "provider": "shopify", - "features": { - "wishlist": false - } -} diff --git a/framework/shopify/const.ts b/framework/shopify/const.ts deleted file mode 100644 index 06fbe5054..000000000 --- a/framework/shopify/const.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const SHOPIFY_CHECKOUT_ID_COOKIE = 'shopify_checkoutId' - -export const SHOPIFY_CHECKOUT_URL_COOKIE = 'shopify_checkoutUrl' - -export const SHOPIFY_CUSTOMER_TOKEN_COOKIE = 'shopify_customerToken' - -export const STORE_DOMAIN = process.env.NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN - -export const SHOPIFY_COOKIE_EXPIRE = 30 - -export const API_URL = `https://${STORE_DOMAIN}/api/2021-01/graphql.json` - -export const API_TOKEN = process.env.NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN diff --git a/framework/shopify/customer/index.ts b/framework/shopify/customer/index.ts deleted file mode 100644 index 6c903ecc5..000000000 --- a/framework/shopify/customer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as useCustomer } from './use-customer' diff --git a/framework/shopify/customer/use-customer.tsx b/framework/shopify/customer/use-customer.tsx deleted file mode 100644 index be097fe80..000000000 --- a/framework/shopify/customer/use-customer.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import useCustomer, { UseCustomer } from '@commerce/customer/use-customer' -import type { CustomerHook } from '../types/customer' -import { SWRHook } from '@commerce/utils/types' -import { getCustomerQuery, getCustomerToken } from '../utils' -import { GetCustomerQuery, GetCustomerQueryVariables } from '../schema' - -export default useCustomer as UseCustomer - -export const handler: SWRHook = { - fetchOptions: { - query: getCustomerQuery, - }, - async fetcher({ options, fetch }) { - const customerAccessToken = getCustomerToken() - if (customerAccessToken) { - const data = await fetch({ - ...options, - variables: { customerAccessToken: getCustomerToken() }, - }) - return data.customer - } - return null - }, - useHook: ({ useData }) => (input) => { - return useData({ - swrOptions: { - revalidateOnFocus: false, - ...input?.swrOptions, - }, - }) - }, -} diff --git a/framework/shopify/fetcher.ts b/framework/shopify/fetcher.ts deleted file mode 100644 index 9a8d2d8d5..000000000 --- a/framework/shopify/fetcher.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Fetcher } from '@commerce/utils/types' -import { API_TOKEN, API_URL } from './const' -import { handleFetchResponse } from './utils' - -const fetcher: Fetcher = async ({ - url = API_URL, - method = 'POST', - variables, - query, -}) => { - const { locale, ...vars } = variables ?? {} - return handleFetchResponse( - await fetch(url, { - method, - body: JSON.stringify({ query, variables: vars }), - headers: { - 'X-Shopify-Storefront-Access-Token': API_TOKEN!, - 'Content-Type': 'application/json', - ...(locale && { - 'Accept-Language': locale, - }), - }, - }) - ) -} - -export default fetcher diff --git a/framework/shopify/index.tsx b/framework/shopify/index.tsx deleted file mode 100644 index 46ed106c5..000000000 --- a/framework/shopify/index.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import * as React from 'react' -import { ReactNode } from 'react' - -import { - CommerceConfig, - CommerceProvider as CoreCommerceProvider, - useCommerce as useCoreCommerce, -} from '@commerce' - -import { shopifyProvider } from './provider' -import type { ShopifyProvider } from './provider' -import { SHOPIFY_CHECKOUT_ID_COOKIE } from './const' - -export { shopifyProvider } -export type { ShopifyProvider } - -export const shopifyConfig: CommerceConfig = { - locale: 'en-us', - cartCookie: SHOPIFY_CHECKOUT_ID_COOKIE, -} - -export type ShopifyConfig = Partial - -export type ShopifyProps = { - children?: ReactNode - locale: string -} & ShopifyConfig - -export function CommerceProvider({ children, ...config }: ShopifyProps) { - return ( - - {children} - - ) -} - -export const useCommerce = () => useCoreCommerce() diff --git a/framework/shopify/next.config.js b/framework/shopify/next.config.js deleted file mode 100644 index e9d48c02c..000000000 --- a/framework/shopify/next.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const commerce = require('./commerce.config.json') - -module.exports = { - commerce, - images: { - domains: ['cdn.shopify.com'], - }, -} diff --git a/framework/shopify/product/use-price.tsx b/framework/shopify/product/use-price.tsx deleted file mode 100644 index 0174faf5e..000000000 --- a/framework/shopify/product/use-price.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export * from '@commerce/product/use-price' -export { default } from '@commerce/product/use-price' diff --git a/framework/shopify/product/use-search.tsx b/framework/shopify/product/use-search.tsx deleted file mode 100644 index 72dc8bb65..000000000 --- a/framework/shopify/product/use-search.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { SWRHook } from '@commerce/utils/types' -import useSearch, { UseSearch } from '@commerce/product/use-search' - -import { - CollectionEdge, - GetAllProductsQuery, - GetProductsFromCollectionQueryVariables, - Product as ShopifyProduct, - ProductEdge, -} from '../schema' - -import { - getAllProductsQuery, - getCollectionProductsQuery, - getSearchVariables, - normalizeProduct, -} from '../utils' - -import type { SearchProductsHook } from '../types/product' - -export type SearchProductsInput = { - search?: string - categoryId?: number - brandId?: number - sort?: string - locale?: string -} - -export default useSearch as UseSearch - -export const handler: SWRHook = { - fetchOptions: { - query: getAllProductsQuery, - }, - async fetcher({ input, options, fetch }) { - const { categoryId, brandId } = input - const method = options?.method - const variables = getSearchVariables(input) - let products - - // change the query to getCollectionProductsQuery when categoryId is set - if (categoryId) { - const data = await fetch< - CollectionEdge, - GetProductsFromCollectionQueryVariables - >({ - query: getCollectionProductsQuery, - method, - variables, - }) - // filter on client when brandId & categoryId are set since is not available on collection product query - products = brandId - ? data.node?.products?.edges?.filter( - ({ node: { vendor } }: ProductEdge) => - vendor.replace(/\s+/g, '-').toLowerCase() === brandId - ) - : data.node?.products?.edges - } else { - const data = await fetch({ - query: options.query, - method, - variables, - }) - products = data.products?.edges - } - - return { - products: products?.map(({ node }) => - normalizeProduct(node as ShopifyProduct) - ), - found: !!products?.length, - } - }, - useHook: ({ useData }) => (input = {}) => { - return useData({ - input: [ - ['search', input.search], - ['categoryId', input.categoryId], - ['brandId', input.brandId], - ['sort', input.sort], - ['locale', input.locale], - ], - swrOptions: { - revalidateOnFocus: false, - ...input.swrOptions, - }, - }) - }, -} diff --git a/framework/shopify/provider.ts b/framework/shopify/provider.ts deleted file mode 100644 index 00db5c1d3..000000000 --- a/framework/shopify/provider.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SHOPIFY_CHECKOUT_ID_COOKIE } from './const' - -import { handler as useCart } from './cart/use-cart' -import { handler as useAddItem } from './cart/use-add-item' -import { handler as useUpdateItem } from './cart/use-update-item' -import { handler as useRemoveItem } from './cart/use-remove-item' - -import { handler as useCustomer } from './customer/use-customer' -import { handler as useSearch } from './product/use-search' - -import { handler as useLogin } from './auth/use-login' -import { handler as useLogout } from './auth/use-logout' -import { handler as useSignup } from './auth/use-signup' - -import fetcher from './fetcher' - -export const shopifyProvider = { - locale: 'en-us', - cartCookie: SHOPIFY_CHECKOUT_ID_COOKIE, - fetcher, - cart: { useCart, useAddItem, useUpdateItem, useRemoveItem }, - customer: { useCustomer }, - products: { useSearch }, - auth: { useLogin, useLogout, useSignup }, -} - -export type ShopifyProvider = typeof shopifyProvider diff --git a/framework/shopify/schema.d.ts b/framework/shopify/schema.d.ts deleted file mode 100644 index 328f0ff1b..000000000 --- a/framework/shopify/schema.d.ts +++ /dev/null @@ -1,5586 +0,0 @@ -export type Maybe = T | null -export type Exact = { - [K in keyof T]: T[K] -} -export type MakeOptional = Omit & - { [SubKey in K]?: Maybe } -export type MakeMaybe = Omit & - { [SubKey in K]: Maybe } -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string - String: string - Boolean: boolean - Int: number - Float: number - /** An ISO-8601 encoded UTC date time string. Example value: `"2019-07-03T20:47:55Z"`. */ - DateTime: any - /** A signed decimal number, which supports arbitrary precision and is serialized as a string. Example value: `"29.99"`. */ - Decimal: any - /** A string containing HTML code. Example value: `"

Grey cotton knit sweater.

"`. */ - HTML: any - /** A monetary value string. Example value: `"100.57"`. */ - Money: any - /** - * An RFC 3986 and RFC 3987 compliant URI string. - * - * Example value: `"https://johns-apparel.myshopify.com"`. - * - */ - URL: any -} - -/** A version of the API. */ -export type ApiVersion = { - __typename?: 'ApiVersion' - /** The human-readable name of the version. */ - displayName: Scalars['String'] - /** The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. */ - handle: Scalars['String'] - /** Whether the version is actively supported by Shopify. Supported API versions are guaranteed to be stable. Unsupported API versions include unstable, release candidate, and end-of-life versions that are marked as unsupported. For more information, refer to [Versioning](https://shopify.dev/concepts/about-apis/versioning). */ - supported: Scalars['Boolean'] -} - -/** Details about the gift card used on the checkout. */ -export type AppliedGiftCard = Node & { - __typename?: 'AppliedGiftCard' - /** - * The amount that was taken from the gift card by applying it. - * @deprecated Use `amountUsedV2` instead - */ - amountUsed: Scalars['Money'] - /** The amount that was taken from the gift card by applying it. */ - amountUsedV2: MoneyV2 - /** - * The amount left on the gift card. - * @deprecated Use `balanceV2` instead - */ - balance: Scalars['Money'] - /** The amount left on the gift card. */ - balanceV2: MoneyV2 - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The last characters of the gift card. */ - lastCharacters: Scalars['String'] - /** The amount that was applied to the checkout in its currency. */ - presentmentAmountUsed: MoneyV2 -} - -/** An article in an online store blog. */ -export type Article = Node & { - __typename?: 'Article' - /** - * The article's author. - * @deprecated Use `authorV2` instead - */ - author: ArticleAuthor - /** The article's author. */ - authorV2?: Maybe - /** The blog that the article belongs to. */ - blog: Blog - /** List of comments posted on the article. */ - comments: CommentConnection - /** Stripped content of the article, single line with HTML tags removed. */ - content: Scalars['String'] - /** The content of the article, complete with HTML formatting. */ - contentHtml: Scalars['HTML'] - /** Stripped excerpt of the article, single line with HTML tags removed. */ - excerpt?: Maybe - /** The excerpt of the article, complete with HTML formatting. */ - excerptHtml?: Maybe - /** A human-friendly unique string for the Article automatically generated from its title. */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The image associated with the article. */ - image?: Maybe - /** The date and time when the article was published. */ - publishedAt: Scalars['DateTime'] - /** The article’s SEO information. */ - seo?: Maybe - /** A categorization that a article can be tagged with. */ - tags: Array - /** The article’s name. */ - title: Scalars['String'] - /** The url pointing to the article accessible from the web. */ - url: Scalars['URL'] -} - -/** An article in an online store blog. */ -export type ArticleCommentsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** An article in an online store blog. */ -export type ArticleContentArgs = { - truncateAt?: Maybe -} - -/** An article in an online store blog. */ -export type ArticleExcerptArgs = { - truncateAt?: Maybe -} - -/** An article in an online store blog. */ -export type ArticleImageArgs = { - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe -} - -/** The author of an article. */ -export type ArticleAuthor = { - __typename?: 'ArticleAuthor' - /** The author's bio. */ - bio?: Maybe - /** The author’s email. */ - email: Scalars['String'] - /** The author's first name. */ - firstName: Scalars['String'] - /** The author's last name. */ - lastName: Scalars['String'] - /** The author's full name. */ - name: Scalars['String'] -} - -/** An auto-generated type for paginating through multiple Articles. */ -export type ArticleConnection = { - __typename?: 'ArticleConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Article and a cursor during pagination. */ -export type ArticleEdge = { - __typename?: 'ArticleEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ArticleEdge. */ - node: Article -} - -/** The set of valid sort keys for the Article query. */ -export enum ArticleSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `blog_title` value. */ - BlogTitle = 'BLOG_TITLE', - /** Sort by the `author` value. */ - Author = 'AUTHOR', - /** Sort by the `updated_at` value. */ - UpdatedAt = 'UPDATED_AT', - /** Sort by the `published_at` value. */ - PublishedAt = 'PUBLISHED_AT', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** Represents a generic custom attribute. */ -export type Attribute = { - __typename?: 'Attribute' - /** Key or name of the attribute. */ - key: Scalars['String'] - /** Value of the attribute. */ - value?: Maybe -} - -/** Specifies the input fields required for an attribute. */ -export type AttributeInput = { - /** Key or name of the attribute. */ - key: Scalars['String'] - /** Value of the attribute. */ - value: Scalars['String'] -} - -/** Automatic discount applications capture the intentions of a discount that was automatically applied. */ -export type AutomaticDiscountApplication = DiscountApplication & { - __typename?: 'AutomaticDiscountApplication' - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The title of the application. */ - title: Scalars['String'] - /** The value of the discount application. */ - value: PricingValue -} - -/** A collection of available shipping rates for a checkout. */ -export type AvailableShippingRates = { - __typename?: 'AvailableShippingRates' - /** - * Whether or not the shipping rates are ready. - * The `shippingRates` field is `null` when this value is `false`. - * This field should be polled until its value becomes `true`. - */ - ready: Scalars['Boolean'] - /** The fetched shipping rates. `null` until the `ready` field is `true`. */ - shippingRates?: Maybe> -} - -/** An online store blog. */ -export type Blog = Node & { - __typename?: 'Blog' - /** Find an article by its handle. */ - articleByHandle?: Maybe
- /** List of the blog's articles. */ - articles: ArticleConnection - /** The authors who have contributed to the blog. */ - authors: Array - /** A human-friendly unique string for the Blog automatically generated from its title. */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The blog's SEO information. */ - seo?: Maybe - /** The blogs’s title. */ - title: Scalars['String'] - /** The url pointing to the blog accessible from the web. */ - url: Scalars['URL'] -} - -/** An online store blog. */ -export type BlogArticleByHandleArgs = { - handle: Scalars['String'] -} - -/** An online store blog. */ -export type BlogArticlesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** An auto-generated type for paginating through multiple Blogs. */ -export type BlogConnection = { - __typename?: 'BlogConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Blog and a cursor during pagination. */ -export type BlogEdge = { - __typename?: 'BlogEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of BlogEdge. */ - node: Blog -} - -/** The set of valid sort keys for the Blog query. */ -export enum BlogSortKeys { - /** Sort by the `handle` value. */ - Handle = 'HANDLE', - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** Card brand, such as Visa or Mastercard, which can be used for payments. */ -export enum CardBrand { - /** Visa. */ - Visa = 'VISA', - /** Mastercard. */ - Mastercard = 'MASTERCARD', - /** Discover. */ - Discover = 'DISCOVER', - /** American Express. */ - AmericanExpress = 'AMERICAN_EXPRESS', - /** Diners Club. */ - DinersClub = 'DINERS_CLUB', - /** JCB. */ - Jcb = 'JCB', -} - -/** A container for all the information required to checkout items and pay. */ -export type Checkout = Node & { - __typename?: 'Checkout' - /** The gift cards used on the checkout. */ - appliedGiftCards: Array - /** - * The available shipping rates for this Checkout. - * Should only be used when checkout `requiresShipping` is `true` and - * the shipping address is valid. - */ - availableShippingRates?: Maybe - /** The date and time when the checkout was completed. */ - completedAt?: Maybe - /** The date and time when the checkout was created. */ - createdAt: Scalars['DateTime'] - /** The currency code for the Checkout. */ - currencyCode: CurrencyCode - /** A list of extra information that is added to the checkout. */ - customAttributes: Array - /** - * The customer associated with the checkout. - * @deprecated This field will always return null. If you have an authentication token for the customer, you can use the `customer` field on the query root to retrieve it. - */ - customer?: Maybe - /** Discounts that have been applied on the checkout. */ - discountApplications: DiscountApplicationConnection - /** The email attached to this checkout. */ - email?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** A list of line item objects, each one containing information about an item in the checkout. */ - lineItems: CheckoutLineItemConnection - /** The sum of all the prices of all the items in the checkout. Duties, taxes, shipping and discounts excluded. */ - lineItemsSubtotalPrice: MoneyV2 - /** The note associated with the checkout. */ - note?: Maybe - /** The resulting order from a paid checkout. */ - order?: Maybe - /** The Order Status Page for this Checkout, null when checkout is not completed. */ - orderStatusUrl?: Maybe - /** - * The amount left to be paid. This is equal to the cost of the line items, taxes and shipping minus discounts and gift cards. - * @deprecated Use `paymentDueV2` instead - */ - paymentDue: Scalars['Money'] - /** The amount left to be paid. This is equal to the cost of the line items, duties, taxes and shipping minus discounts and gift cards. */ - paymentDueV2: MoneyV2 - /** - * Whether or not the Checkout is ready and can be completed. Checkouts may - * have asynchronous operations that can take time to finish. If you want - * to complete a checkout or ensure all the fields are populated and up to - * date, polling is required until the value is true. - */ - ready: Scalars['Boolean'] - /** States whether or not the fulfillment requires shipping. */ - requiresShipping: Scalars['Boolean'] - /** The shipping address to where the line items will be shipped. */ - shippingAddress?: Maybe - /** The discounts that have been allocated onto the shipping line by discount applications. */ - shippingDiscountAllocations: Array - /** Once a shipping rate is selected by the customer it is transitioned to a `shipping_line` object. */ - shippingLine?: Maybe - /** - * Price of the checkout before shipping and taxes. - * @deprecated Use `subtotalPriceV2` instead - */ - subtotalPrice: Scalars['Money'] - /** Price of the checkout before duties, shipping and taxes. */ - subtotalPriceV2: MoneyV2 - /** Specifies if the Checkout is tax exempt. */ - taxExempt: Scalars['Boolean'] - /** Specifies if taxes are included in the line item and shipping line prices. */ - taxesIncluded: Scalars['Boolean'] - /** - * The sum of all the prices of all the items in the checkout, taxes and discounts included. - * @deprecated Use `totalPriceV2` instead - */ - totalPrice: Scalars['Money'] - /** The sum of all the prices of all the items in the checkout, duties, taxes and discounts included. */ - totalPriceV2: MoneyV2 - /** - * The sum of all the taxes applied to the line items and shipping lines in the checkout. - * @deprecated Use `totalTaxV2` instead - */ - totalTax: Scalars['Money'] - /** The sum of all the taxes applied to the line items and shipping lines in the checkout. */ - totalTaxV2: MoneyV2 - /** The date and time when the checkout was last updated. */ - updatedAt: Scalars['DateTime'] - /** The url pointing to the checkout accessible from the web. */ - webUrl: Scalars['URL'] -} - -/** A container for all the information required to checkout items and pay. */ -export type CheckoutDiscountApplicationsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** A container for all the information required to checkout items and pay. */ -export type CheckoutLineItemsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** Specifies the fields required to update a checkout's attributes. */ -export type CheckoutAttributesUpdateInput = { - /** The text of an optional note that a shop owner can attach to the checkout. */ - note?: Maybe - /** A list of extra information that is added to the checkout. */ - customAttributes?: Maybe> - /** - * Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - * The required attributes are city, province, and country. - * Full validation of the addresses is still done at complete time. - */ - allowPartialAddresses?: Maybe -} - -/** Return type for `checkoutAttributesUpdate` mutation. */ -export type CheckoutAttributesUpdatePayload = { - __typename?: 'CheckoutAttributesUpdatePayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to update a checkout's attributes. */ -export type CheckoutAttributesUpdateV2Input = { - /** The text of an optional note that a shop owner can attach to the checkout. */ - note?: Maybe - /** A list of extra information that is added to the checkout. */ - customAttributes?: Maybe> - /** - * Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - * The required attributes are city, province, and country. - * Full validation of the addresses is still done at complete time. - */ - allowPartialAddresses?: Maybe -} - -/** Return type for `checkoutAttributesUpdateV2` mutation. */ -export type CheckoutAttributesUpdateV2Payload = { - __typename?: 'CheckoutAttributesUpdateV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteFree` mutation. */ -export type CheckoutCompleteFreePayload = { - __typename?: 'CheckoutCompleteFreePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithCreditCard` mutation. */ -export type CheckoutCompleteWithCreditCardPayload = { - __typename?: 'CheckoutCompleteWithCreditCardPayload' - /** The checkout on which the payment was applied. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithCreditCardV2` mutation. */ -export type CheckoutCompleteWithCreditCardV2Payload = { - __typename?: 'CheckoutCompleteWithCreditCardV2Payload' - /** The checkout on which the payment was applied. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithTokenizedPayment` mutation. */ -export type CheckoutCompleteWithTokenizedPaymentPayload = { - __typename?: 'CheckoutCompleteWithTokenizedPaymentPayload' - /** The checkout on which the payment was applied. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithTokenizedPaymentV2` mutation. */ -export type CheckoutCompleteWithTokenizedPaymentV2Payload = { - __typename?: 'CheckoutCompleteWithTokenizedPaymentV2Payload' - /** The checkout on which the payment was applied. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithTokenizedPaymentV3` mutation. */ -export type CheckoutCompleteWithTokenizedPaymentV3Payload = { - __typename?: 'CheckoutCompleteWithTokenizedPaymentV3Payload' - /** The checkout on which the payment was applied. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to create a checkout. */ -export type CheckoutCreateInput = { - /** The email with which the customer wants to checkout. */ - email?: Maybe - /** A list of line item objects, each one containing information about an item in the checkout. */ - lineItems?: Maybe> - /** The shipping address to where the line items will be shipped. */ - shippingAddress?: Maybe - /** The text of an optional note that a shop owner can attach to the checkout. */ - note?: Maybe - /** A list of extra information that is added to the checkout. */ - customAttributes?: Maybe> - /** - * Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - * The required attributes are city, province, and country. - * Full validation of addresses is still done at complete time. - */ - allowPartialAddresses?: Maybe - /** - * The three-letter currency code of one of the shop's enabled presentment currencies. - * Including this field creates a checkout in the specified currency. By default, new - * checkouts are created in the shop's primary currency. - */ - presentmentCurrencyCode?: Maybe -} - -/** Return type for `checkoutCreate` mutation. */ -export type CheckoutCreatePayload = { - __typename?: 'CheckoutCreatePayload' - /** The new checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCustomerAssociate` mutation. */ -export type CheckoutCustomerAssociatePayload = { - __typename?: 'CheckoutCustomerAssociatePayload' - /** The updated checkout object. */ - checkout: Checkout - /** The associated customer object. */ - customer?: Maybe - /** List of errors that occurred executing the mutation. */ - userErrors: Array -} - -/** Return type for `checkoutCustomerAssociateV2` mutation. */ -export type CheckoutCustomerAssociateV2Payload = { - __typename?: 'CheckoutCustomerAssociateV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** The associated customer object. */ - customer?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCustomerDisassociate` mutation. */ -export type CheckoutCustomerDisassociatePayload = { - __typename?: 'CheckoutCustomerDisassociatePayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCustomerDisassociateV2` mutation. */ -export type CheckoutCustomerDisassociateV2Payload = { - __typename?: 'CheckoutCustomerDisassociateV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutDiscountCodeApply` mutation. */ -export type CheckoutDiscountCodeApplyPayload = { - __typename?: 'CheckoutDiscountCodeApplyPayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutDiscountCodeApplyV2` mutation. */ -export type CheckoutDiscountCodeApplyV2Payload = { - __typename?: 'CheckoutDiscountCodeApplyV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutDiscountCodeRemove` mutation. */ -export type CheckoutDiscountCodeRemovePayload = { - __typename?: 'CheckoutDiscountCodeRemovePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutEmailUpdate` mutation. */ -export type CheckoutEmailUpdatePayload = { - __typename?: 'CheckoutEmailUpdatePayload' - /** The checkout object with the updated email. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutEmailUpdateV2` mutation. */ -export type CheckoutEmailUpdateV2Payload = { - __typename?: 'CheckoutEmailUpdateV2Payload' - /** The checkout object with the updated email. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Possible error codes that could be returned by CheckoutUserError. */ -export enum CheckoutErrorCode { - /** Input value is blank. */ - Blank = 'BLANK', - /** Input value is invalid. */ - Invalid = 'INVALID', - /** Input value is too long. */ - TooLong = 'TOO_LONG', - /** Input value is not present. */ - Present = 'PRESENT', - /** Input value should be less than maximum allowed value. */ - LessThan = 'LESS_THAN', - /** Input value should be greater than or equal to minimum allowed value. */ - GreaterThanOrEqualTo = 'GREATER_THAN_OR_EQUAL_TO', - /** Input value should be less or equal to maximum allowed value. */ - LessThanOrEqualTo = 'LESS_THAN_OR_EQUAL_TO', - /** Checkout is already completed. */ - AlreadyCompleted = 'ALREADY_COMPLETED', - /** Checkout is locked. */ - Locked = 'LOCKED', - /** Input value is not supported. */ - NotSupported = 'NOT_SUPPORTED', - /** Input email contains an invalid domain name. */ - BadDomain = 'BAD_DOMAIN', - /** Input Zip is invalid for country provided. */ - InvalidForCountry = 'INVALID_FOR_COUNTRY', - /** Input Zip is invalid for country and province provided. */ - InvalidForCountryAndProvince = 'INVALID_FOR_COUNTRY_AND_PROVINCE', - /** Invalid state in country. */ - InvalidStateInCountry = 'INVALID_STATE_IN_COUNTRY', - /** Invalid province in country. */ - InvalidProvinceInCountry = 'INVALID_PROVINCE_IN_COUNTRY', - /** Invalid region in country. */ - InvalidRegionInCountry = 'INVALID_REGION_IN_COUNTRY', - /** Shipping rate expired. */ - ShippingRateExpired = 'SHIPPING_RATE_EXPIRED', - /** Gift card cannot be applied to a checkout that contains a gift card. */ - GiftCardUnusable = 'GIFT_CARD_UNUSABLE', - /** Gift card is disabled. */ - GiftCardDisabled = 'GIFT_CARD_DISABLED', - /** Gift card code is invalid. */ - GiftCardCodeInvalid = 'GIFT_CARD_CODE_INVALID', - /** Gift card has already been applied. */ - GiftCardAlreadyApplied = 'GIFT_CARD_ALREADY_APPLIED', - /** Gift card currency does not match checkout currency. */ - GiftCardCurrencyMismatch = 'GIFT_CARD_CURRENCY_MISMATCH', - /** Gift card is expired. */ - GiftCardExpired = 'GIFT_CARD_EXPIRED', - /** Gift card has no funds left. */ - GiftCardDepleted = 'GIFT_CARD_DEPLETED', - /** Gift card was not found. */ - GiftCardNotFound = 'GIFT_CARD_NOT_FOUND', - /** Cart does not meet discount requirements notice. */ - CartDoesNotMeetDiscountRequirementsNotice = 'CART_DOES_NOT_MEET_DISCOUNT_REQUIREMENTS_NOTICE', - /** Discount expired. */ - DiscountExpired = 'DISCOUNT_EXPIRED', - /** Discount disabled. */ - DiscountDisabled = 'DISCOUNT_DISABLED', - /** Discount limit reached. */ - DiscountLimitReached = 'DISCOUNT_LIMIT_REACHED', - /** Discount not found. */ - DiscountNotFound = 'DISCOUNT_NOT_FOUND', - /** Customer already used once per customer discount notice. */ - CustomerAlreadyUsedOncePerCustomerDiscountNotice = 'CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE', - /** Checkout is already completed. */ - Empty = 'EMPTY', - /** Not enough in stock. */ - NotEnoughInStock = 'NOT_ENOUGH_IN_STOCK', - /** Missing payment input. */ - MissingPaymentInput = 'MISSING_PAYMENT_INPUT', - /** The amount of the payment does not match the value to be paid. */ - TotalPriceMismatch = 'TOTAL_PRICE_MISMATCH', - /** Line item was not found in checkout. */ - LineItemNotFound = 'LINE_ITEM_NOT_FOUND', - /** Unable to apply discount. */ - UnableToApply = 'UNABLE_TO_APPLY', - /** Discount already applied. */ - DiscountAlreadyApplied = 'DISCOUNT_ALREADY_APPLIED', -} - -/** Return type for `checkoutGiftCardApply` mutation. */ -export type CheckoutGiftCardApplyPayload = { - __typename?: 'CheckoutGiftCardApplyPayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutGiftCardRemove` mutation. */ -export type CheckoutGiftCardRemovePayload = { - __typename?: 'CheckoutGiftCardRemovePayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutGiftCardRemoveV2` mutation. */ -export type CheckoutGiftCardRemoveV2Payload = { - __typename?: 'CheckoutGiftCardRemoveV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutGiftCardsAppend` mutation. */ -export type CheckoutGiftCardsAppendPayload = { - __typename?: 'CheckoutGiftCardsAppendPayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** A single line item in the checkout, grouped by variant and attributes. */ -export type CheckoutLineItem = Node & { - __typename?: 'CheckoutLineItem' - /** Extra information in the form of an array of Key-Value pairs about the line item. */ - customAttributes: Array - /** The discounts that have been allocated onto the checkout line item by discount applications. */ - discountAllocations: Array - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The quantity of the line item. */ - quantity: Scalars['Int'] - /** Title of the line item. Defaults to the product's title. */ - title: Scalars['String'] - /** Unit price of the line item. */ - unitPrice?: Maybe - /** Product variant of the line item. */ - variant?: Maybe -} - -/** An auto-generated type for paginating through multiple CheckoutLineItems. */ -export type CheckoutLineItemConnection = { - __typename?: 'CheckoutLineItemConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one CheckoutLineItem and a cursor during pagination. */ -export type CheckoutLineItemEdge = { - __typename?: 'CheckoutLineItemEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of CheckoutLineItemEdge. */ - node: CheckoutLineItem -} - -/** Specifies the input fields to create a line item on a checkout. */ -export type CheckoutLineItemInput = { - /** Extra information in the form of an array of Key-Value pairs about the line item. */ - customAttributes?: Maybe> - /** The quantity of the line item. */ - quantity: Scalars['Int'] - /** The identifier of the product variant for the line item. */ - variantId: Scalars['ID'] -} - -/** Specifies the input fields to update a line item on the checkout. */ -export type CheckoutLineItemUpdateInput = { - /** The identifier of the line item. */ - id?: Maybe - /** The variant identifier of the line item. */ - variantId?: Maybe - /** The quantity of the line item. */ - quantity?: Maybe - /** Extra information in the form of an array of Key-Value pairs about the line item. */ - customAttributes?: Maybe> -} - -/** Return type for `checkoutLineItemsAdd` mutation. */ -export type CheckoutLineItemsAddPayload = { - __typename?: 'CheckoutLineItemsAddPayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutLineItemsRemove` mutation. */ -export type CheckoutLineItemsRemovePayload = { - __typename?: 'CheckoutLineItemsRemovePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutLineItemsReplace` mutation. */ -export type CheckoutLineItemsReplacePayload = { - __typename?: 'CheckoutLineItemsReplacePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - userErrors: Array -} - -/** Return type for `checkoutLineItemsUpdate` mutation. */ -export type CheckoutLineItemsUpdatePayload = { - __typename?: 'CheckoutLineItemsUpdatePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutShippingAddressUpdate` mutation. */ -export type CheckoutShippingAddressUpdatePayload = { - __typename?: 'CheckoutShippingAddressUpdatePayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutShippingAddressUpdateV2` mutation. */ -export type CheckoutShippingAddressUpdateV2Payload = { - __typename?: 'CheckoutShippingAddressUpdateV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutShippingLineUpdate` mutation. */ -export type CheckoutShippingLineUpdatePayload = { - __typename?: 'CheckoutShippingLineUpdatePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Represents an error that happens during execution of a checkout mutation. */ -export type CheckoutUserError = DisplayableError & { - __typename?: 'CheckoutUserError' - /** Error code to uniquely identify the error. */ - code?: Maybe - /** Path to the input field which caused the error. */ - field?: Maybe> - /** The error message. */ - message: Scalars['String'] -} - -/** A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. */ -export type Collection = Node & { - __typename?: 'Collection' - /** Stripped description of the collection, single line with HTML tags removed. */ - description: Scalars['String'] - /** The description of the collection, complete with HTML formatting. */ - descriptionHtml: Scalars['HTML'] - /** - * A human-friendly unique string for the collection automatically generated from its title. - * Limit of 255 characters. - */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** Image associated with the collection. */ - image?: Maybe - /** List of products in the collection. */ - products: ProductConnection - /** The collection’s name. Limit of 255 characters. */ - title: Scalars['String'] - /** The date and time when the collection was last modified. */ - updatedAt: Scalars['DateTime'] -} - -/** A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. */ -export type CollectionDescriptionArgs = { - truncateAt?: Maybe -} - -/** A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. */ -export type CollectionImageArgs = { - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe -} - -/** A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. */ -export type CollectionProductsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe -} - -/** An auto-generated type for paginating through multiple Collections. */ -export type CollectionConnection = { - __typename?: 'CollectionConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Collection and a cursor during pagination. */ -export type CollectionEdge = { - __typename?: 'CollectionEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of CollectionEdge. */ - node: Collection -} - -/** The set of valid sort keys for the Collection query. */ -export enum CollectionSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `updated_at` value. */ - UpdatedAt = 'UPDATED_AT', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** A comment on an article. */ -export type Comment = Node & { - __typename?: 'Comment' - /** The comment’s author. */ - author: CommentAuthor - /** Stripped content of the comment, single line with HTML tags removed. */ - content: Scalars['String'] - /** The content of the comment, complete with HTML formatting. */ - contentHtml: Scalars['HTML'] - /** Globally unique identifier. */ - id: Scalars['ID'] -} - -/** A comment on an article. */ -export type CommentContentArgs = { - truncateAt?: Maybe -} - -/** The author of a comment. */ -export type CommentAuthor = { - __typename?: 'CommentAuthor' - /** The author's email. */ - email: Scalars['String'] - /** The author’s name. */ - name: Scalars['String'] -} - -/** An auto-generated type for paginating through multiple Comments. */ -export type CommentConnection = { - __typename?: 'CommentConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Comment and a cursor during pagination. */ -export type CommentEdge = { - __typename?: 'CommentEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of CommentEdge. */ - node: Comment -} - -/** ISO 3166-1 alpha-2 country codes with some differences. */ -export enum CountryCode { - /** Afghanistan. */ - Af = 'AF', - /** Åland Islands. */ - Ax = 'AX', - /** Albania. */ - Al = 'AL', - /** Algeria. */ - Dz = 'DZ', - /** Andorra. */ - Ad = 'AD', - /** Angola. */ - Ao = 'AO', - /** Anguilla. */ - Ai = 'AI', - /** Antigua & Barbuda. */ - Ag = 'AG', - /** Argentina. */ - Ar = 'AR', - /** Armenia. */ - Am = 'AM', - /** Aruba. */ - Aw = 'AW', - /** Ascension Island. */ - Ac = 'AC', - /** Australia. */ - Au = 'AU', - /** Austria. */ - At = 'AT', - /** Azerbaijan. */ - Az = 'AZ', - /** Bahamas. */ - Bs = 'BS', - /** Bahrain. */ - Bh = 'BH', - /** Bangladesh. */ - Bd = 'BD', - /** Barbados. */ - Bb = 'BB', - /** Belarus. */ - By = 'BY', - /** Belgium. */ - Be = 'BE', - /** Belize. */ - Bz = 'BZ', - /** Benin. */ - Bj = 'BJ', - /** Bermuda. */ - Bm = 'BM', - /** Bhutan. */ - Bt = 'BT', - /** Bolivia. */ - Bo = 'BO', - /** Bosnia & Herzegovina. */ - Ba = 'BA', - /** Botswana. */ - Bw = 'BW', - /** Bouvet Island. */ - Bv = 'BV', - /** Brazil. */ - Br = 'BR', - /** British Indian Ocean Territory. */ - Io = 'IO', - /** Brunei. */ - Bn = 'BN', - /** Bulgaria. */ - Bg = 'BG', - /** Burkina Faso. */ - Bf = 'BF', - /** Burundi. */ - Bi = 'BI', - /** Cambodia. */ - Kh = 'KH', - /** Canada. */ - Ca = 'CA', - /** Cape Verde. */ - Cv = 'CV', - /** Caribbean Netherlands. */ - Bq = 'BQ', - /** Cayman Islands. */ - Ky = 'KY', - /** Central African Republic. */ - Cf = 'CF', - /** Chad. */ - Td = 'TD', - /** Chile. */ - Cl = 'CL', - /** China. */ - Cn = 'CN', - /** Christmas Island. */ - Cx = 'CX', - /** Cocos (Keeling) Islands. */ - Cc = 'CC', - /** Colombia. */ - Co = 'CO', - /** Comoros. */ - Km = 'KM', - /** Congo - Brazzaville. */ - Cg = 'CG', - /** Congo - Kinshasa. */ - Cd = 'CD', - /** Cook Islands. */ - Ck = 'CK', - /** Costa Rica. */ - Cr = 'CR', - /** Croatia. */ - Hr = 'HR', - /** Cuba. */ - Cu = 'CU', - /** Curaçao. */ - Cw = 'CW', - /** Cyprus. */ - Cy = 'CY', - /** Czechia. */ - Cz = 'CZ', - /** Côte d’Ivoire. */ - Ci = 'CI', - /** Denmark. */ - Dk = 'DK', - /** Djibouti. */ - Dj = 'DJ', - /** Dominica. */ - Dm = 'DM', - /** Dominican Republic. */ - Do = 'DO', - /** Ecuador. */ - Ec = 'EC', - /** Egypt. */ - Eg = 'EG', - /** El Salvador. */ - Sv = 'SV', - /** Equatorial Guinea. */ - Gq = 'GQ', - /** Eritrea. */ - Er = 'ER', - /** Estonia. */ - Ee = 'EE', - /** Eswatini. */ - Sz = 'SZ', - /** Ethiopia. */ - Et = 'ET', - /** Falkland Islands. */ - Fk = 'FK', - /** Faroe Islands. */ - Fo = 'FO', - /** Fiji. */ - Fj = 'FJ', - /** Finland. */ - Fi = 'FI', - /** France. */ - Fr = 'FR', - /** French Guiana. */ - Gf = 'GF', - /** French Polynesia. */ - Pf = 'PF', - /** French Southern Territories. */ - Tf = 'TF', - /** Gabon. */ - Ga = 'GA', - /** Gambia. */ - Gm = 'GM', - /** Georgia. */ - Ge = 'GE', - /** Germany. */ - De = 'DE', - /** Ghana. */ - Gh = 'GH', - /** Gibraltar. */ - Gi = 'GI', - /** Greece. */ - Gr = 'GR', - /** Greenland. */ - Gl = 'GL', - /** Grenada. */ - Gd = 'GD', - /** Guadeloupe. */ - Gp = 'GP', - /** Guatemala. */ - Gt = 'GT', - /** Guernsey. */ - Gg = 'GG', - /** Guinea. */ - Gn = 'GN', - /** Guinea-Bissau. */ - Gw = 'GW', - /** Guyana. */ - Gy = 'GY', - /** Haiti. */ - Ht = 'HT', - /** Heard & McDonald Islands. */ - Hm = 'HM', - /** Vatican City. */ - Va = 'VA', - /** Honduras. */ - Hn = 'HN', - /** Hong Kong SAR. */ - Hk = 'HK', - /** Hungary. */ - Hu = 'HU', - /** Iceland. */ - Is = 'IS', - /** India. */ - In = 'IN', - /** Indonesia. */ - Id = 'ID', - /** Iran. */ - Ir = 'IR', - /** Iraq. */ - Iq = 'IQ', - /** Ireland. */ - Ie = 'IE', - /** Isle of Man. */ - Im = 'IM', - /** Israel. */ - Il = 'IL', - /** Italy. */ - It = 'IT', - /** Jamaica. */ - Jm = 'JM', - /** Japan. */ - Jp = 'JP', - /** Jersey. */ - Je = 'JE', - /** Jordan. */ - Jo = 'JO', - /** Kazakhstan. */ - Kz = 'KZ', - /** Kenya. */ - Ke = 'KE', - /** Kiribati. */ - Ki = 'KI', - /** North Korea. */ - Kp = 'KP', - /** Kosovo. */ - Xk = 'XK', - /** Kuwait. */ - Kw = 'KW', - /** Kyrgyzstan. */ - Kg = 'KG', - /** Laos. */ - La = 'LA', - /** Latvia. */ - Lv = 'LV', - /** Lebanon. */ - Lb = 'LB', - /** Lesotho. */ - Ls = 'LS', - /** Liberia. */ - Lr = 'LR', - /** Libya. */ - Ly = 'LY', - /** Liechtenstein. */ - Li = 'LI', - /** Lithuania. */ - Lt = 'LT', - /** Luxembourg. */ - Lu = 'LU', - /** Macao SAR. */ - Mo = 'MO', - /** Madagascar. */ - Mg = 'MG', - /** Malawi. */ - Mw = 'MW', - /** Malaysia. */ - My = 'MY', - /** Maldives. */ - Mv = 'MV', - /** Mali. */ - Ml = 'ML', - /** Malta. */ - Mt = 'MT', - /** Martinique. */ - Mq = 'MQ', - /** Mauritania. */ - Mr = 'MR', - /** Mauritius. */ - Mu = 'MU', - /** Mayotte. */ - Yt = 'YT', - /** Mexico. */ - Mx = 'MX', - /** Moldova. */ - Md = 'MD', - /** Monaco. */ - Mc = 'MC', - /** Mongolia. */ - Mn = 'MN', - /** Montenegro. */ - Me = 'ME', - /** Montserrat. */ - Ms = 'MS', - /** Morocco. */ - Ma = 'MA', - /** Mozambique. */ - Mz = 'MZ', - /** Myanmar (Burma). */ - Mm = 'MM', - /** Namibia. */ - Na = 'NA', - /** Nauru. */ - Nr = 'NR', - /** Nepal. */ - Np = 'NP', - /** Netherlands. */ - Nl = 'NL', - /** Netherlands Antilles. */ - An = 'AN', - /** New Caledonia. */ - Nc = 'NC', - /** New Zealand. */ - Nz = 'NZ', - /** Nicaragua. */ - Ni = 'NI', - /** Niger. */ - Ne = 'NE', - /** Nigeria. */ - Ng = 'NG', - /** Niue. */ - Nu = 'NU', - /** Norfolk Island. */ - Nf = 'NF', - /** North Macedonia. */ - Mk = 'MK', - /** Norway. */ - No = 'NO', - /** Oman. */ - Om = 'OM', - /** Pakistan. */ - Pk = 'PK', - /** Palestinian Territories. */ - Ps = 'PS', - /** Panama. */ - Pa = 'PA', - /** Papua New Guinea. */ - Pg = 'PG', - /** Paraguay. */ - Py = 'PY', - /** Peru. */ - Pe = 'PE', - /** Philippines. */ - Ph = 'PH', - /** Pitcairn Islands. */ - Pn = 'PN', - /** Poland. */ - Pl = 'PL', - /** Portugal. */ - Pt = 'PT', - /** Qatar. */ - Qa = 'QA', - /** Cameroon. */ - Cm = 'CM', - /** Réunion. */ - Re = 'RE', - /** Romania. */ - Ro = 'RO', - /** Russia. */ - Ru = 'RU', - /** Rwanda. */ - Rw = 'RW', - /** St. Barthélemy. */ - Bl = 'BL', - /** St. Helena. */ - Sh = 'SH', - /** St. Kitts & Nevis. */ - Kn = 'KN', - /** St. Lucia. */ - Lc = 'LC', - /** St. Martin. */ - Mf = 'MF', - /** St. Pierre & Miquelon. */ - Pm = 'PM', - /** Samoa. */ - Ws = 'WS', - /** San Marino. */ - Sm = 'SM', - /** São Tomé & Príncipe. */ - St = 'ST', - /** Saudi Arabia. */ - Sa = 'SA', - /** Senegal. */ - Sn = 'SN', - /** Serbia. */ - Rs = 'RS', - /** Seychelles. */ - Sc = 'SC', - /** Sierra Leone. */ - Sl = 'SL', - /** Singapore. */ - Sg = 'SG', - /** Sint Maarten. */ - Sx = 'SX', - /** Slovakia. */ - Sk = 'SK', - /** Slovenia. */ - Si = 'SI', - /** Solomon Islands. */ - Sb = 'SB', - /** Somalia. */ - So = 'SO', - /** South Africa. */ - Za = 'ZA', - /** South Georgia & South Sandwich Islands. */ - Gs = 'GS', - /** South Korea. */ - Kr = 'KR', - /** South Sudan. */ - Ss = 'SS', - /** Spain. */ - Es = 'ES', - /** Sri Lanka. */ - Lk = 'LK', - /** St. Vincent & Grenadines. */ - Vc = 'VC', - /** Sudan. */ - Sd = 'SD', - /** Suriname. */ - Sr = 'SR', - /** Svalbard & Jan Mayen. */ - Sj = 'SJ', - /** Sweden. */ - Se = 'SE', - /** Switzerland. */ - Ch = 'CH', - /** Syria. */ - Sy = 'SY', - /** Taiwan. */ - Tw = 'TW', - /** Tajikistan. */ - Tj = 'TJ', - /** Tanzania. */ - Tz = 'TZ', - /** Thailand. */ - Th = 'TH', - /** Timor-Leste. */ - Tl = 'TL', - /** Togo. */ - Tg = 'TG', - /** Tokelau. */ - Tk = 'TK', - /** Tonga. */ - To = 'TO', - /** Trinidad & Tobago. */ - Tt = 'TT', - /** Tristan da Cunha. */ - Ta = 'TA', - /** Tunisia. */ - Tn = 'TN', - /** Turkey. */ - Tr = 'TR', - /** Turkmenistan. */ - Tm = 'TM', - /** Turks & Caicos Islands. */ - Tc = 'TC', - /** Tuvalu. */ - Tv = 'TV', - /** Uganda. */ - Ug = 'UG', - /** Ukraine. */ - Ua = 'UA', - /** United Arab Emirates. */ - Ae = 'AE', - /** United Kingdom. */ - Gb = 'GB', - /** United States. */ - Us = 'US', - /** U.S. Outlying Islands. */ - Um = 'UM', - /** Uruguay. */ - Uy = 'UY', - /** Uzbekistan. */ - Uz = 'UZ', - /** Vanuatu. */ - Vu = 'VU', - /** Venezuela. */ - Ve = 'VE', - /** Vietnam. */ - Vn = 'VN', - /** British Virgin Islands. */ - Vg = 'VG', - /** Wallis & Futuna. */ - Wf = 'WF', - /** Western Sahara. */ - Eh = 'EH', - /** Yemen. */ - Ye = 'YE', - /** Zambia. */ - Zm = 'ZM', - /** Zimbabwe. */ - Zw = 'ZW', -} - -/** Credit card information used for a payment. */ -export type CreditCard = { - __typename?: 'CreditCard' - /** The brand of the credit card. */ - brand?: Maybe - /** The expiry month of the credit card. */ - expiryMonth?: Maybe - /** The expiry year of the credit card. */ - expiryYear?: Maybe - /** The credit card's BIN number. */ - firstDigits?: Maybe - /** The first name of the card holder. */ - firstName?: Maybe - /** The last 4 digits of the credit card. */ - lastDigits?: Maybe - /** The last name of the card holder. */ - lastName?: Maybe - /** The masked credit card number with only the last 4 digits displayed. */ - maskedNumber?: Maybe -} - -/** - * Specifies the fields required to complete a checkout with - * a Shopify vaulted credit card payment. - */ -export type CreditCardPaymentInput = { - /** The amount of the payment. */ - amount: Scalars['Money'] - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** The ID returned by Shopify's Card Vault. */ - vaultId: Scalars['String'] - /** Executes the payment in test mode if possible. Defaults to `false`. */ - test?: Maybe -} - -/** - * Specifies the fields required to complete a checkout with - * a Shopify vaulted credit card payment. - */ -export type CreditCardPaymentInputV2 = { - /** The amount and currency of the payment. */ - paymentAmount: MoneyInput - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** The ID returned by Shopify's Card Vault. */ - vaultId: Scalars['String'] - /** Executes the payment in test mode if possible. Defaults to `false`. */ - test?: Maybe -} - -/** The part of the image that should remain after cropping. */ -export enum CropRegion { - /** Keep the center of the image. */ - Center = 'CENTER', - /** Keep the top of the image. */ - Top = 'TOP', - /** Keep the bottom of the image. */ - Bottom = 'BOTTOM', - /** Keep the left of the image. */ - Left = 'LEFT', - /** Keep the right of the image. */ - Right = 'RIGHT', -} - -/** Currency codes. */ -export enum CurrencyCode { - /** United States Dollars (USD). */ - Usd = 'USD', - /** Euro (EUR). */ - Eur = 'EUR', - /** United Kingdom Pounds (GBP). */ - Gbp = 'GBP', - /** Canadian Dollars (CAD). */ - Cad = 'CAD', - /** Afghan Afghani (AFN). */ - Afn = 'AFN', - /** Albanian Lek (ALL). */ - All = 'ALL', - /** Algerian Dinar (DZD). */ - Dzd = 'DZD', - /** Angolan Kwanza (AOA). */ - Aoa = 'AOA', - /** Argentine Pesos (ARS). */ - Ars = 'ARS', - /** Armenian Dram (AMD). */ - Amd = 'AMD', - /** Aruban Florin (AWG). */ - Awg = 'AWG', - /** Australian Dollars (AUD). */ - Aud = 'AUD', - /** Barbadian Dollar (BBD). */ - Bbd = 'BBD', - /** Azerbaijani Manat (AZN). */ - Azn = 'AZN', - /** Bangladesh Taka (BDT). */ - Bdt = 'BDT', - /** Bahamian Dollar (BSD). */ - Bsd = 'BSD', - /** Bahraini Dinar (BHD). */ - Bhd = 'BHD', - /** Burundian Franc (BIF). */ - Bif = 'BIF', - /** Belize Dollar (BZD). */ - Bzd = 'BZD', - /** Bermudian Dollar (BMD). */ - Bmd = 'BMD', - /** Bhutanese Ngultrum (BTN). */ - Btn = 'BTN', - /** Bosnia and Herzegovina Convertible Mark (BAM). */ - Bam = 'BAM', - /** Brazilian Real (BRL). */ - Brl = 'BRL', - /** Bolivian Boliviano (BOB). */ - Bob = 'BOB', - /** Botswana Pula (BWP). */ - Bwp = 'BWP', - /** Brunei Dollar (BND). */ - Bnd = 'BND', - /** Bulgarian Lev (BGN). */ - Bgn = 'BGN', - /** Burmese Kyat (MMK). */ - Mmk = 'MMK', - /** Cambodian Riel. */ - Khr = 'KHR', - /** Cape Verdean escudo (CVE). */ - Cve = 'CVE', - /** Cayman Dollars (KYD). */ - Kyd = 'KYD', - /** Central African CFA Franc (XAF). */ - Xaf = 'XAF', - /** Chilean Peso (CLP). */ - Clp = 'CLP', - /** Chinese Yuan Renminbi (CNY). */ - Cny = 'CNY', - /** Colombian Peso (COP). */ - Cop = 'COP', - /** Comorian Franc (KMF). */ - Kmf = 'KMF', - /** Congolese franc (CDF). */ - Cdf = 'CDF', - /** Costa Rican Colones (CRC). */ - Crc = 'CRC', - /** Croatian Kuna (HRK). */ - Hrk = 'HRK', - /** Czech Koruny (CZK). */ - Czk = 'CZK', - /** Danish Kroner (DKK). */ - Dkk = 'DKK', - /** Dominican Peso (DOP). */ - Dop = 'DOP', - /** East Caribbean Dollar (XCD). */ - Xcd = 'XCD', - /** Egyptian Pound (EGP). */ - Egp = 'EGP', - /** Ethiopian Birr (ETB). */ - Etb = 'ETB', - /** CFP Franc (XPF). */ - Xpf = 'XPF', - /** Fijian Dollars (FJD). */ - Fjd = 'FJD', - /** Gambian Dalasi (GMD). */ - Gmd = 'GMD', - /** Ghanaian Cedi (GHS). */ - Ghs = 'GHS', - /** Guatemalan Quetzal (GTQ). */ - Gtq = 'GTQ', - /** Guyanese Dollar (GYD). */ - Gyd = 'GYD', - /** Georgian Lari (GEL). */ - Gel = 'GEL', - /** Haitian Gourde (HTG). */ - Htg = 'HTG', - /** Honduran Lempira (HNL). */ - Hnl = 'HNL', - /** Hong Kong Dollars (HKD). */ - Hkd = 'HKD', - /** Hungarian Forint (HUF). */ - Huf = 'HUF', - /** Icelandic Kronur (ISK). */ - Isk = 'ISK', - /** Indian Rupees (INR). */ - Inr = 'INR', - /** Indonesian Rupiah (IDR). */ - Idr = 'IDR', - /** Israeli New Shekel (NIS). */ - Ils = 'ILS', - /** Iraqi Dinar (IQD). */ - Iqd = 'IQD', - /** Jamaican Dollars (JMD). */ - Jmd = 'JMD', - /** Japanese Yen (JPY). */ - Jpy = 'JPY', - /** Jersey Pound. */ - Jep = 'JEP', - /** Jordanian Dinar (JOD). */ - Jod = 'JOD', - /** Kazakhstani Tenge (KZT). */ - Kzt = 'KZT', - /** Kenyan Shilling (KES). */ - Kes = 'KES', - /** Kuwaiti Dinar (KWD). */ - Kwd = 'KWD', - /** Kyrgyzstani Som (KGS). */ - Kgs = 'KGS', - /** Laotian Kip (LAK). */ - Lak = 'LAK', - /** Latvian Lati (LVL). */ - Lvl = 'LVL', - /** Lebanese Pounds (LBP). */ - Lbp = 'LBP', - /** Lesotho Loti (LSL). */ - Lsl = 'LSL', - /** Liberian Dollar (LRD). */ - Lrd = 'LRD', - /** Lithuanian Litai (LTL). */ - Ltl = 'LTL', - /** Malagasy Ariary (MGA). */ - Mga = 'MGA', - /** Macedonia Denar (MKD). */ - Mkd = 'MKD', - /** Macanese Pataca (MOP). */ - Mop = 'MOP', - /** Malawian Kwacha (MWK). */ - Mwk = 'MWK', - /** Maldivian Rufiyaa (MVR). */ - Mvr = 'MVR', - /** Mexican Pesos (MXN). */ - Mxn = 'MXN', - /** Malaysian Ringgits (MYR). */ - Myr = 'MYR', - /** Mauritian Rupee (MUR). */ - Mur = 'MUR', - /** Moldovan Leu (MDL). */ - Mdl = 'MDL', - /** Moroccan Dirham. */ - Mad = 'MAD', - /** Mongolian Tugrik. */ - Mnt = 'MNT', - /** Mozambican Metical. */ - Mzn = 'MZN', - /** Namibian Dollar. */ - Nad = 'NAD', - /** Nepalese Rupee (NPR). */ - Npr = 'NPR', - /** Netherlands Antillean Guilder. */ - Ang = 'ANG', - /** New Zealand Dollars (NZD). */ - Nzd = 'NZD', - /** Nicaraguan Córdoba (NIO). */ - Nio = 'NIO', - /** Nigerian Naira (NGN). */ - Ngn = 'NGN', - /** Norwegian Kroner (NOK). */ - Nok = 'NOK', - /** Omani Rial (OMR). */ - Omr = 'OMR', - /** Panamian Balboa (PAB). */ - Pab = 'PAB', - /** Pakistani Rupee (PKR). */ - Pkr = 'PKR', - /** Papua New Guinean Kina (PGK). */ - Pgk = 'PGK', - /** Paraguayan Guarani (PYG). */ - Pyg = 'PYG', - /** Peruvian Nuevo Sol (PEN). */ - Pen = 'PEN', - /** Philippine Peso (PHP). */ - Php = 'PHP', - /** Polish Zlotych (PLN). */ - Pln = 'PLN', - /** Qatari Rial (QAR). */ - Qar = 'QAR', - /** Romanian Lei (RON). */ - Ron = 'RON', - /** Russian Rubles (RUB). */ - Rub = 'RUB', - /** Rwandan Franc (RWF). */ - Rwf = 'RWF', - /** Samoan Tala (WST). */ - Wst = 'WST', - /** Saudi Riyal (SAR). */ - Sar = 'SAR', - /** Sao Tome And Principe Dobra (STD). */ - Std = 'STD', - /** Serbian dinar (RSD). */ - Rsd = 'RSD', - /** Seychellois Rupee (SCR). */ - Scr = 'SCR', - /** Singapore Dollars (SGD). */ - Sgd = 'SGD', - /** Sudanese Pound (SDG). */ - Sdg = 'SDG', - /** Syrian Pound (SYP). */ - Syp = 'SYP', - /** South African Rand (ZAR). */ - Zar = 'ZAR', - /** South Korean Won (KRW). */ - Krw = 'KRW', - /** South Sudanese Pound (SSP). */ - Ssp = 'SSP', - /** Solomon Islands Dollar (SBD). */ - Sbd = 'SBD', - /** Sri Lankan Rupees (LKR). */ - Lkr = 'LKR', - /** Surinamese Dollar (SRD). */ - Srd = 'SRD', - /** Swazi Lilangeni (SZL). */ - Szl = 'SZL', - /** Swedish Kronor (SEK). */ - Sek = 'SEK', - /** Swiss Francs (CHF). */ - Chf = 'CHF', - /** Taiwan Dollars (TWD). */ - Twd = 'TWD', - /** Thai baht (THB). */ - Thb = 'THB', - /** Tanzanian Shilling (TZS). */ - Tzs = 'TZS', - /** Trinidad and Tobago Dollars (TTD). */ - Ttd = 'TTD', - /** Tunisian Dinar (TND). */ - Tnd = 'TND', - /** Turkish Lira (TRY). */ - Try = 'TRY', - /** Turkmenistani Manat (TMT). */ - Tmt = 'TMT', - /** Ugandan Shilling (UGX). */ - Ugx = 'UGX', - /** Ukrainian Hryvnia (UAH). */ - Uah = 'UAH', - /** United Arab Emirates Dirham (AED). */ - Aed = 'AED', - /** Uruguayan Pesos (UYU). */ - Uyu = 'UYU', - /** Uzbekistan som (UZS). */ - Uzs = 'UZS', - /** Vanuatu Vatu (VUV). */ - Vuv = 'VUV', - /** Vietnamese đồng (VND). */ - Vnd = 'VND', - /** West African CFA franc (XOF). */ - Xof = 'XOF', - /** Yemeni Rial (YER). */ - Yer = 'YER', - /** Zambian Kwacha (ZMW). */ - Zmw = 'ZMW', - /** Belarusian Ruble (BYN). */ - Byn = 'BYN', - /** Belarusian Ruble (BYR). */ - Byr = 'BYR', - /** Djiboutian Franc (DJF). */ - Djf = 'DJF', - /** Eritrean Nakfa (ERN). */ - Ern = 'ERN', - /** Falkland Islands Pounds (FKP). */ - Fkp = 'FKP', - /** Gibraltar Pounds (GIP). */ - Gip = 'GIP', - /** Guinean Franc (GNF). */ - Gnf = 'GNF', - /** Iranian Rial (IRR). */ - Irr = 'IRR', - /** Kiribati Dollar (KID). */ - Kid = 'KID', - /** Libyan Dinar (LYD). */ - Lyd = 'LYD', - /** Mauritanian Ouguiya (MRU). */ - Mru = 'MRU', - /** Sierra Leonean Leone (SLL). */ - Sll = 'SLL', - /** Saint Helena Pounds (SHP). */ - Shp = 'SHP', - /** Somali Shilling (SOS). */ - Sos = 'SOS', - /** Tajikistani Somoni (TJS). */ - Tjs = 'TJS', - /** Tongan Pa'anga (TOP). */ - Top = 'TOP', - /** Venezuelan Bolivares (VEF). */ - Vef = 'VEF', - /** Venezuelan Bolivares (VES). */ - Ves = 'VES', -} - -/** A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. */ -export type Customer = { - __typename?: 'Customer' - /** Indicates whether the customer has consented to be sent marketing material via email. */ - acceptsMarketing: Scalars['Boolean'] - /** A list of addresses for the customer. */ - addresses: MailingAddressConnection - /** The date and time when the customer was created. */ - createdAt: Scalars['DateTime'] - /** The customer’s default address. */ - defaultAddress?: Maybe - /** The customer’s name, email or phone number. */ - displayName: Scalars['String'] - /** The customer’s email address. */ - email?: Maybe - /** The customer’s first name. */ - firstName?: Maybe - /** A unique identifier for the customer. */ - id: Scalars['ID'] - /** The customer's most recently updated, incomplete checkout. */ - lastIncompleteCheckout?: Maybe - /** The customer’s last name. */ - lastName?: Maybe - /** The orders associated with the customer. */ - orders: OrderConnection - /** The customer’s phone number. */ - phone?: Maybe - /** - * A comma separated list of tags that have been added to the customer. - * Additional access scope required: unauthenticated_read_customer_tags. - */ - tags: Array - /** The date and time when the customer information was updated. */ - updatedAt: Scalars['DateTime'] -} - -/** A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. */ -export type CustomerAddressesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. */ -export type CustomerOrdersArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** A CustomerAccessToken represents the unique token required to make modifications to the customer object. */ -export type CustomerAccessToken = { - __typename?: 'CustomerAccessToken' - /** The customer’s access token. */ - accessToken: Scalars['String'] - /** The date and time when the customer access token expires. */ - expiresAt: Scalars['DateTime'] -} - -/** Specifies the input fields required to create a customer access token. */ -export type CustomerAccessTokenCreateInput = { - /** The email associated to the customer. */ - email: Scalars['String'] - /** The login password to be used by the customer. */ - password: Scalars['String'] -} - -/** Return type for `customerAccessTokenCreate` mutation. */ -export type CustomerAccessTokenCreatePayload = { - __typename?: 'CustomerAccessTokenCreatePayload' - /** The newly created customer access token object. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerAccessTokenCreateWithMultipass` mutation. */ -export type CustomerAccessTokenCreateWithMultipassPayload = { - __typename?: 'CustomerAccessTokenCreateWithMultipassPayload' - /** An access token object associated with the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array -} - -/** Return type for `customerAccessTokenDelete` mutation. */ -export type CustomerAccessTokenDeletePayload = { - __typename?: 'CustomerAccessTokenDeletePayload' - /** The destroyed access token. */ - deletedAccessToken?: Maybe - /** ID of the destroyed customer access token. */ - deletedCustomerAccessTokenId?: Maybe - /** List of errors that occurred executing the mutation. */ - userErrors: Array -} - -/** Return type for `customerAccessTokenRenew` mutation. */ -export type CustomerAccessTokenRenewPayload = { - __typename?: 'CustomerAccessTokenRenewPayload' - /** The renewed customer access token object. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - userErrors: Array -} - -/** Return type for `customerActivateByUrl` mutation. */ -export type CustomerActivateByUrlPayload = { - __typename?: 'CustomerActivateByUrlPayload' - /** The customer that was activated. */ - customer?: Maybe - /** A new customer access token for the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array -} - -/** Specifies the input fields required to activate a customer. */ -export type CustomerActivateInput = { - /** The activation token required to activate the customer. */ - activationToken: Scalars['String'] - /** New password that will be set during activation. */ - password: Scalars['String'] -} - -/** Return type for `customerActivate` mutation. */ -export type CustomerActivatePayload = { - __typename?: 'CustomerActivatePayload' - /** The customer object. */ - customer?: Maybe - /** A newly created customer access token object for the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerAddressCreate` mutation. */ -export type CustomerAddressCreatePayload = { - __typename?: 'CustomerAddressCreatePayload' - /** The new customer address object. */ - customerAddress?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerAddressDelete` mutation. */ -export type CustomerAddressDeletePayload = { - __typename?: 'CustomerAddressDeletePayload' - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** ID of the deleted customer address. */ - deletedCustomerAddressId?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerAddressUpdate` mutation. */ -export type CustomerAddressUpdatePayload = { - __typename?: 'CustomerAddressUpdatePayload' - /** The customer’s updated mailing address. */ - customerAddress?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to create a new customer. */ -export type CustomerCreateInput = { - /** The customer’s first name. */ - firstName?: Maybe - /** The customer’s last name. */ - lastName?: Maybe - /** The customer’s email. */ - email: Scalars['String'] - /** - * A unique phone number for the customer. - * - * Formatted using E.164 standard. For example, _+16135551111_. - */ - phone?: Maybe - /** The login password used by the customer. */ - password: Scalars['String'] - /** Indicates whether the customer has consented to be sent marketing material via email. */ - acceptsMarketing?: Maybe -} - -/** Return type for `customerCreate` mutation. */ -export type CustomerCreatePayload = { - __typename?: 'CustomerCreatePayload' - /** The created customer object. */ - customer?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerDefaultAddressUpdate` mutation. */ -export type CustomerDefaultAddressUpdatePayload = { - __typename?: 'CustomerDefaultAddressUpdatePayload' - /** The updated customer object. */ - customer?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Possible error codes that could be returned by CustomerUserError. */ -export enum CustomerErrorCode { - /** Input value is blank. */ - Blank = 'BLANK', - /** Input value is invalid. */ - Invalid = 'INVALID', - /** Input value is already taken. */ - Taken = 'TAKEN', - /** Input value is too long. */ - TooLong = 'TOO_LONG', - /** Input value is too short. */ - TooShort = 'TOO_SHORT', - /** Unidentified customer. */ - UnidentifiedCustomer = 'UNIDENTIFIED_CUSTOMER', - /** Customer is disabled. */ - CustomerDisabled = 'CUSTOMER_DISABLED', - /** Input password starts or ends with whitespace. */ - PasswordStartsOrEndsWithWhitespace = 'PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE', - /** Input contains HTML tags. */ - ContainsHtmlTags = 'CONTAINS_HTML_TAGS', - /** Input contains URL. */ - ContainsUrl = 'CONTAINS_URL', - /** Invalid activation token. */ - TokenInvalid = 'TOKEN_INVALID', - /** Customer already enabled. */ - AlreadyEnabled = 'ALREADY_ENABLED', - /** Address does not exist. */ - NotFound = 'NOT_FOUND', - /** Input email contains an invalid domain name. */ - BadDomain = 'BAD_DOMAIN', - /** Multipass token is not valid. */ - InvalidMultipassRequest = 'INVALID_MULTIPASS_REQUEST', -} - -/** Return type for `customerRecover` mutation. */ -export type CustomerRecoverPayload = { - __typename?: 'CustomerRecoverPayload' - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerResetByUrl` mutation. */ -export type CustomerResetByUrlPayload = { - __typename?: 'CustomerResetByUrlPayload' - /** The customer object which was reset. */ - customer?: Maybe - /** A newly created customer access token object for the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to reset a customer’s password. */ -export type CustomerResetInput = { - /** The reset token required to reset the customer’s password. */ - resetToken: Scalars['String'] - /** New password that will be set as part of the reset password process. */ - password: Scalars['String'] -} - -/** Return type for `customerReset` mutation. */ -export type CustomerResetPayload = { - __typename?: 'CustomerResetPayload' - /** The customer object which was reset. */ - customer?: Maybe - /** A newly created customer access token object for the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to update the Customer information. */ -export type CustomerUpdateInput = { - /** The customer’s first name. */ - firstName?: Maybe - /** The customer’s last name. */ - lastName?: Maybe - /** The customer’s email. */ - email?: Maybe - /** - * A unique phone number for the customer. - * - * Formatted using E.164 standard. For example, _+16135551111_. To remove the phone number, specify `null`. - */ - phone?: Maybe - /** The login password used by the customer. */ - password?: Maybe - /** Indicates whether the customer has consented to be sent marketing material via email. */ - acceptsMarketing?: Maybe -} - -/** Return type for `customerUpdate` mutation. */ -export type CustomerUpdatePayload = { - __typename?: 'CustomerUpdatePayload' - /** The updated customer object. */ - customer?: Maybe - /** - * The newly created customer access token. If the customer's password is updated, all previous access tokens - * (including the one used to perform this mutation) become invalid, and a new token is generated. - */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Represents an error that happens during execution of a customer mutation. */ -export type CustomerUserError = DisplayableError & { - __typename?: 'CustomerUserError' - /** Error code to uniquely identify the error. */ - code?: Maybe - /** Path to the input field which caused the error. */ - field?: Maybe> - /** The error message. */ - message: Scalars['String'] -} - -/** Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. */ -export enum DigitalWallet { - /** Apple Pay. */ - ApplePay = 'APPLE_PAY', - /** Android Pay. */ - AndroidPay = 'ANDROID_PAY', - /** Google Pay. */ - GooglePay = 'GOOGLE_PAY', - /** Shopify Pay. */ - ShopifyPay = 'SHOPIFY_PAY', -} - -/** An amount discounting the line that has been allocated by a discount. */ -export type DiscountAllocation = { - __typename?: 'DiscountAllocation' - /** Amount of discount allocated. */ - allocatedAmount: MoneyV2 - /** The discount this allocated amount originated from. */ - discountApplication: DiscountApplication -} - -/** - * Discount applications capture the intentions of a discount source at - * the time of application. - */ -export type DiscountApplication = { - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The value of the discount application. */ - value: PricingValue -} - -/** The method by which the discount's value is allocated onto its entitled lines. */ -export enum DiscountApplicationAllocationMethod { - /** The value is spread across all entitled lines. */ - Across = 'ACROSS', - /** The value is applied onto every entitled line. */ - Each = 'EACH', - /** The value is specifically applied onto a particular line. */ - One = 'ONE', -} - -/** An auto-generated type for paginating through multiple DiscountApplications. */ -export type DiscountApplicationConnection = { - __typename?: 'DiscountApplicationConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one DiscountApplication and a cursor during pagination. */ -export type DiscountApplicationEdge = { - __typename?: 'DiscountApplicationEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of DiscountApplicationEdge. */ - node: DiscountApplication -} - -/** - * Which lines on the order that the discount is allocated over, of the type - * defined by the Discount Application's target_type. - */ -export enum DiscountApplicationTargetSelection { - /** The discount is allocated onto all the lines. */ - All = 'ALL', - /** The discount is allocated onto only the lines it is entitled for. */ - Entitled = 'ENTITLED', - /** The discount is allocated onto explicitly chosen lines. */ - Explicit = 'EXPLICIT', -} - -/** The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. */ -export enum DiscountApplicationTargetType { - /** The discount applies onto line items. */ - LineItem = 'LINE_ITEM', - /** The discount applies onto shipping lines. */ - ShippingLine = 'SHIPPING_LINE', -} - -/** - * Discount code applications capture the intentions of a discount code at - * the time that it is applied. - */ -export type DiscountCodeApplication = DiscountApplication & { - __typename?: 'DiscountCodeApplication' - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** Specifies whether the discount code was applied successfully. */ - applicable: Scalars['Boolean'] - /** The string identifying the discount code that was used at the time of application. */ - code: Scalars['String'] - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The value of the discount application. */ - value: PricingValue -} - -/** Represents an error in the input of a mutation. */ -export type DisplayableError = { - /** Path to the input field which caused the error. */ - field?: Maybe> - /** The error message. */ - message: Scalars['String'] -} - -/** Represents a web address. */ -export type Domain = { - __typename?: 'Domain' - /** The host name of the domain (eg: `example.com`). */ - host: Scalars['String'] - /** Whether SSL is enabled or not. */ - sslEnabled: Scalars['Boolean'] - /** The URL of the domain (eg: `https://example.com`). */ - url: Scalars['URL'] -} - -/** Represents a video hosted outside of Shopify. */ -export type ExternalVideo = Node & - Media & { - __typename?: 'ExternalVideo' - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** The URL. */ - embeddedUrl: Scalars['URL'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe - } - -/** Represents a single fulfillment in an order. */ -export type Fulfillment = { - __typename?: 'Fulfillment' - /** List of the fulfillment's line items. */ - fulfillmentLineItems: FulfillmentLineItemConnection - /** The name of the tracking company. */ - trackingCompany?: Maybe - /** - * Tracking information associated with the fulfillment, - * such as the tracking number and tracking URL. - */ - trackingInfo: Array -} - -/** Represents a single fulfillment in an order. */ -export type FulfillmentFulfillmentLineItemsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** Represents a single fulfillment in an order. */ -export type FulfillmentTrackingInfoArgs = { - first?: Maybe -} - -/** Represents a single line item in a fulfillment. There is at most one fulfillment line item for each order line item. */ -export type FulfillmentLineItem = { - __typename?: 'FulfillmentLineItem' - /** The associated order's line item. */ - lineItem: OrderLineItem - /** The amount fulfilled in this fulfillment. */ - quantity: Scalars['Int'] -} - -/** An auto-generated type for paginating through multiple FulfillmentLineItems. */ -export type FulfillmentLineItemConnection = { - __typename?: 'FulfillmentLineItemConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. */ -export type FulfillmentLineItemEdge = { - __typename?: 'FulfillmentLineItemEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of FulfillmentLineItemEdge. */ - node: FulfillmentLineItem -} - -/** Tracking information associated with the fulfillment. */ -export type FulfillmentTrackingInfo = { - __typename?: 'FulfillmentTrackingInfo' - /** The tracking number of the fulfillment. */ - number?: Maybe - /** The URL to track the fulfillment. */ - url?: Maybe -} - -/** Represents information about the metafields associated to the specified resource. */ -export type HasMetafields = { - /** The metafield associated with the resource. */ - metafield?: Maybe - /** A paginated list of metafields associated with the resource. */ - metafields: MetafieldConnection -} - -/** Represents information about the metafields associated to the specified resource. */ -export type HasMetafieldsMetafieldArgs = { - namespace: Scalars['String'] - key: Scalars['String'] -} - -/** Represents information about the metafields associated to the specified resource. */ -export type HasMetafieldsMetafieldsArgs = { - namespace?: Maybe - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** Represents an image resource. */ -export type Image = { - __typename?: 'Image' - /** A word or phrase to share the nature or contents of an image. */ - altText?: Maybe - /** The original height of the image in pixels. Returns `null` if the image is not hosted by Shopify. */ - height?: Maybe - /** A unique identifier for the image. */ - id?: Maybe - /** - * The location of the original image as a URL. - * - * If there are any existing transformations in the original source URL, they will remain and not be stripped. - */ - originalSrc: Scalars['URL'] - /** - * The location of the image as a URL. - * @deprecated Previously an image had a single `src` field. This could either return the original image - * location or a URL that contained transformations such as sizing or scale. - * - * These transformations were specified by arguments on the parent field. - * - * Now an image has two distinct URL fields: `originalSrc` and `transformedSrc`. - * - * * `originalSrc` - the original unmodified image URL - * * `transformedSrc` - the image URL with the specified transformations included - * - * To migrate to the new fields, image transformations should be moved from the parent field to `transformedSrc`. - * - * Before: - * ```graphql - * { - * shop { - * productImages(maxWidth: 200, scale: 2) { - * edges { - * node { - * src - * } - * } - * } - * } - * } - * ``` - * - * After: - * ```graphql - * { - * shop { - * productImages { - * edges { - * node { - * transformedSrc(maxWidth: 200, scale: 2) - * } - * } - * } - * } - * } - * ``` - * - */ - src: Scalars['URL'] - /** - * The location of the transformed image as a URL. - * - * All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. - * Otherwise any transformations which an image type does not support will be ignored. - */ - transformedSrc: Scalars['URL'] - /** The original width of the image in pixels. Returns `null` if the image is not hosted by Shopify. */ - width?: Maybe -} - -/** Represents an image resource. */ -export type ImageTransformedSrcArgs = { - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe - preferredContentType?: Maybe -} - -/** An auto-generated type for paginating through multiple Images. */ -export type ImageConnection = { - __typename?: 'ImageConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** List of supported image content types. */ -export enum ImageContentType { - /** A PNG image. */ - Png = 'PNG', - /** A JPG image. */ - Jpg = 'JPG', - /** A WEBP image. */ - Webp = 'WEBP', -} - -/** An auto-generated type which holds one Image and a cursor during pagination. */ -export type ImageEdge = { - __typename?: 'ImageEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ImageEdge. */ - node: Image -} - -/** Represents a mailing address for customers and shipping. */ -export type MailingAddress = Node & { - __typename?: 'MailingAddress' - /** The first line of the address. Typically the street address or PO Box number. */ - address1?: Maybe - /** The second line of the address. Typically the number of the apartment, suite, or unit. */ - address2?: Maybe - /** The name of the city, district, village, or town. */ - city?: Maybe - /** The name of the customer's company or organization. */ - company?: Maybe - /** The name of the country. */ - country?: Maybe - /** - * The two-letter code for the country of the address. - * - * For example, US. - * @deprecated Use `countryCodeV2` instead - */ - countryCode?: Maybe - /** - * The two-letter code for the country of the address. - * - * For example, US. - */ - countryCodeV2?: Maybe - /** The first name of the customer. */ - firstName?: Maybe - /** A formatted version of the address, customized by the provided arguments. */ - formatted: Array - /** A comma-separated list of the values for city, province, and country. */ - formattedArea?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The last name of the customer. */ - lastName?: Maybe - /** The latitude coordinate of the customer address. */ - latitude?: Maybe - /** The longitude coordinate of the customer address. */ - longitude?: Maybe - /** The full name of the customer, based on firstName and lastName. */ - name?: Maybe - /** - * A unique phone number for the customer. - * - * Formatted using E.164 standard. For example, _+16135551111_. - */ - phone?: Maybe - /** The region of the address, such as the province, state, or district. */ - province?: Maybe - /** - * The two-letter code for the region. - * - * For example, ON. - */ - provinceCode?: Maybe - /** The zip or postal code of the address. */ - zip?: Maybe -} - -/** Represents a mailing address for customers and shipping. */ -export type MailingAddressFormattedArgs = { - withName?: Maybe - withCompany?: Maybe -} - -/** An auto-generated type for paginating through multiple MailingAddresses. */ -export type MailingAddressConnection = { - __typename?: 'MailingAddressConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one MailingAddress and a cursor during pagination. */ -export type MailingAddressEdge = { - __typename?: 'MailingAddressEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of MailingAddressEdge. */ - node: MailingAddress -} - -/** Specifies the fields accepted to create or update a mailing address. */ -export type MailingAddressInput = { - /** The first line of the address. Typically the street address or PO Box number. */ - address1?: Maybe - /** The second line of the address. Typically the number of the apartment, suite, or unit. */ - address2?: Maybe - /** The name of the city, district, village, or town. */ - city?: Maybe - /** The name of the customer's company or organization. */ - company?: Maybe - /** The name of the country. */ - country?: Maybe - /** The first name of the customer. */ - firstName?: Maybe - /** The last name of the customer. */ - lastName?: Maybe - /** - * A unique phone number for the customer. - * - * Formatted using E.164 standard. For example, _+16135551111_. - */ - phone?: Maybe - /** The region of the address, such as the province, state, or district. */ - province?: Maybe - /** The zip or postal code of the address. */ - zip?: Maybe -} - -/** Manual discount applications capture the intentions of a discount that was manually created. */ -export type ManualDiscountApplication = DiscountApplication & { - __typename?: 'ManualDiscountApplication' - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** The description of the application. */ - description?: Maybe - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The title of the application. */ - title: Scalars['String'] - /** The value of the discount application. */ - value: PricingValue -} - -/** Represents a media interface. */ -export type Media = { - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe -} - -/** An auto-generated type for paginating through multiple Media. */ -export type MediaConnection = { - __typename?: 'MediaConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** The possible content types for a media object. */ -export enum MediaContentType { - /** An externally hosted video. */ - ExternalVideo = 'EXTERNAL_VIDEO', - /** A Shopify hosted image. */ - Image = 'IMAGE', - /** A 3d model. */ - Model_3D = 'MODEL_3D', - /** A Shopify hosted video. */ - Video = 'VIDEO', -} - -/** An auto-generated type which holds one Media and a cursor during pagination. */ -export type MediaEdge = { - __typename?: 'MediaEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of MediaEdge. */ - node: Media -} - -/** Represents a Shopify hosted image. */ -export type MediaImage = Node & - Media & { - __typename?: 'MediaImage' - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The image for the media. */ - image?: Maybe - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe - } - -/** - * Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are - * comprised of keys, values, and value types. - */ -export type Metafield = Node & { - __typename?: 'Metafield' - /** The date and time when the storefront metafield was created. */ - createdAt: Scalars['DateTime'] - /** The description of a metafield. */ - description?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The key name for a metafield. */ - key: Scalars['String'] - /** The namespace for a metafield. */ - namespace: Scalars['String'] - /** The parent object that the metafield belongs to. */ - parentResource: MetafieldParentResource - /** The date and time when the storefront metafield was updated. */ - updatedAt: Scalars['DateTime'] - /** The value of a metafield. */ - value: Scalars['String'] - /** Represents the metafield value type. */ - valueType: MetafieldValueType -} - -/** An auto-generated type for paginating through multiple Metafields. */ -export type MetafieldConnection = { - __typename?: 'MetafieldConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Metafield and a cursor during pagination. */ -export type MetafieldEdge = { - __typename?: 'MetafieldEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of MetafieldEdge. */ - node: Metafield -} - -/** A resource that the metafield belongs to. */ -export type MetafieldParentResource = Product | ProductVariant - -/** Metafield value types. */ -export enum MetafieldValueType { - /** A string metafield. */ - String = 'STRING', - /** An integer metafield. */ - Integer = 'INTEGER', - /** A json string metafield. */ - JsonString = 'JSON_STRING', -} - -/** Represents a Shopify hosted 3D model. */ -export type Model3d = Node & - Media & { - __typename?: 'Model3d' - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe - /** The sources for a 3d model. */ - sources: Array - } - -/** Represents a source for a Shopify hosted 3d model. */ -export type Model3dSource = { - __typename?: 'Model3dSource' - /** The filesize of the 3d model. */ - filesize: Scalars['Int'] - /** The format of the 3d model. */ - format: Scalars['String'] - /** The MIME type of the 3d model. */ - mimeType: Scalars['String'] - /** The URL of the 3d model. */ - url: Scalars['String'] -} - -/** Specifies the fields for a monetary value with currency. */ -export type MoneyInput = { - /** Decimal money amount. */ - amount: Scalars['Decimal'] - /** Currency of the money. */ - currencyCode: CurrencyCode -} - -/** - * A monetary value with currency. - * - * To format currencies, combine this type's amount and currencyCode fields with your client's locale. - * - * For example, in JavaScript you could use Intl.NumberFormat: - * - * ```js - * new Intl.NumberFormat(locale, { - * style: 'currency', - * currency: currencyCode - * }).format(amount); - * ``` - * - * Other formatting libraries include: - * - * * iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter) - * * Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html) - * * PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php) - * - * For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations - * (such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)). - */ -export type MoneyV2 = { - __typename?: 'MoneyV2' - /** Decimal money amount. */ - amount: Scalars['Decimal'] - /** Currency of the money. */ - currencyCode: CurrencyCode -} - -/** An auto-generated type for paginating through multiple MoneyV2s. */ -export type MoneyV2Connection = { - __typename?: 'MoneyV2Connection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one MoneyV2 and a cursor during pagination. */ -export type MoneyV2Edge = { - __typename?: 'MoneyV2Edge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of MoneyV2Edge. */ - node: MoneyV2 -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type Mutation = { - __typename?: 'Mutation' - /** - * Updates the attributes of a checkout. - * @deprecated Use `checkoutAttributesUpdateV2` instead - */ - checkoutAttributesUpdate?: Maybe - /** Updates the attributes of a checkout. */ - checkoutAttributesUpdateV2?: Maybe - /** Completes a checkout without providing payment information. You can use this mutation for free items or items whose purchase price is covered by a gift card. */ - checkoutCompleteFree?: Maybe - /** - * Completes a checkout using a credit card token from Shopify's Vault. - * @deprecated Use `checkoutCompleteWithCreditCardV2` instead - */ - checkoutCompleteWithCreditCard?: Maybe - /** Completes a checkout using a credit card token from Shopify's card vault. Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, you need to [_request payment processing_](https://help.shopify.com/api/guides/sales-channel-sdk/getting-started#request-payment-processing). */ - checkoutCompleteWithCreditCardV2?: Maybe - /** - * Completes a checkout with a tokenized payment. - * @deprecated Use `checkoutCompleteWithTokenizedPaymentV2` instead - */ - checkoutCompleteWithTokenizedPayment?: Maybe - /** - * Completes a checkout with a tokenized payment. - * @deprecated Use `checkoutCompleteWithTokenizedPaymentV3` instead - */ - checkoutCompleteWithTokenizedPaymentV2?: Maybe - /** Completes a checkout with a tokenized payment. */ - checkoutCompleteWithTokenizedPaymentV3?: Maybe - /** Creates a new checkout. */ - checkoutCreate?: Maybe - /** - * Associates a customer to the checkout. - * @deprecated Use `checkoutCustomerAssociateV2` instead - */ - checkoutCustomerAssociate?: Maybe - /** Associates a customer to the checkout. */ - checkoutCustomerAssociateV2?: Maybe - /** - * Disassociates the current checkout customer from the checkout. - * @deprecated Use `checkoutCustomerDisassociateV2` instead - */ - checkoutCustomerDisassociate?: Maybe - /** Disassociates the current checkout customer from the checkout. */ - checkoutCustomerDisassociateV2?: Maybe - /** - * Applies a discount to an existing checkout using a discount code. - * @deprecated Use `checkoutDiscountCodeApplyV2` instead - */ - checkoutDiscountCodeApply?: Maybe - /** Applies a discount to an existing checkout using a discount code. */ - checkoutDiscountCodeApplyV2?: Maybe - /** Removes the applied discount from an existing checkout. */ - checkoutDiscountCodeRemove?: Maybe - /** - * Updates the email on an existing checkout. - * @deprecated Use `checkoutEmailUpdateV2` instead - */ - checkoutEmailUpdate?: Maybe - /** Updates the email on an existing checkout. */ - checkoutEmailUpdateV2?: Maybe - /** - * Applies a gift card to an existing checkout using a gift card code. This will replace all currently applied gift cards. - * @deprecated Use `checkoutGiftCardsAppend` instead - */ - checkoutGiftCardApply?: Maybe - /** - * Removes an applied gift card from the checkout. - * @deprecated Use `checkoutGiftCardRemoveV2` instead - */ - checkoutGiftCardRemove?: Maybe - /** Removes an applied gift card from the checkout. */ - checkoutGiftCardRemoveV2?: Maybe - /** Appends gift cards to an existing checkout. */ - checkoutGiftCardsAppend?: Maybe - /** Adds a list of line items to a checkout. */ - checkoutLineItemsAdd?: Maybe - /** Removes line items from an existing checkout. */ - checkoutLineItemsRemove?: Maybe - /** Sets a list of line items to a checkout. */ - checkoutLineItemsReplace?: Maybe - /** Updates line items on a checkout. */ - checkoutLineItemsUpdate?: Maybe - /** - * Updates the shipping address of an existing checkout. - * @deprecated Use `checkoutShippingAddressUpdateV2` instead - */ - checkoutShippingAddressUpdate?: Maybe - /** Updates the shipping address of an existing checkout. */ - checkoutShippingAddressUpdateV2?: Maybe - /** Updates the shipping lines on an existing checkout. */ - checkoutShippingLineUpdate?: Maybe - /** - * Creates a customer access token. - * The customer access token is required to modify the customer object in any way. - */ - customerAccessTokenCreate?: Maybe - /** - * Creates a customer access token using a multipass token instead of email and password. - * A customer record is created if customer does not exist. If a customer record already - * exists but the record is disabled, then it's enabled. - */ - customerAccessTokenCreateWithMultipass?: Maybe - /** Permanently destroys a customer access token. */ - customerAccessTokenDelete?: Maybe - /** - * Renews a customer access token. - * - * Access token renewal must happen *before* a token expires. - * If a token has already expired, a new one should be created instead via `customerAccessTokenCreate`. - */ - customerAccessTokenRenew?: Maybe - /** Activates a customer. */ - customerActivate?: Maybe - /** Activates a customer with the activation url received from `customerCreate`. */ - customerActivateByUrl?: Maybe - /** Creates a new address for a customer. */ - customerAddressCreate?: Maybe - /** Permanently deletes the address of an existing customer. */ - customerAddressDelete?: Maybe - /** Updates the address of an existing customer. */ - customerAddressUpdate?: Maybe - /** Creates a new customer. */ - customerCreate?: Maybe - /** Updates the default address of an existing customer. */ - customerDefaultAddressUpdate?: Maybe - /** Sends a reset password email to the customer, as the first step in the reset password process. */ - customerRecover?: Maybe - /** Resets a customer’s password with a token received from `CustomerRecover`. */ - customerReset?: Maybe - /** Resets a customer’s password with the reset password url received from `CustomerRecover`. */ - customerResetByUrl?: Maybe - /** Updates an existing customer. */ - customerUpdate?: Maybe -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutAttributesUpdateArgs = { - checkoutId: Scalars['ID'] - input: CheckoutAttributesUpdateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutAttributesUpdateV2Args = { - checkoutId: Scalars['ID'] - input: CheckoutAttributesUpdateV2Input -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteFreeArgs = { - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithCreditCardArgs = { - checkoutId: Scalars['ID'] - payment: CreditCardPaymentInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithCreditCardV2Args = { - checkoutId: Scalars['ID'] - payment: CreditCardPaymentInputV2 -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithTokenizedPaymentArgs = { - checkoutId: Scalars['ID'] - payment: TokenizedPaymentInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithTokenizedPaymentV2Args = { - checkoutId: Scalars['ID'] - payment: TokenizedPaymentInputV2 -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithTokenizedPaymentV3Args = { - checkoutId: Scalars['ID'] - payment: TokenizedPaymentInputV3 -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCreateArgs = { - input: CheckoutCreateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCustomerAssociateArgs = { - checkoutId: Scalars['ID'] - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCustomerAssociateV2Args = { - checkoutId: Scalars['ID'] - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCustomerDisassociateArgs = { - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCustomerDisassociateV2Args = { - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutDiscountCodeApplyArgs = { - discountCode: Scalars['String'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutDiscountCodeApplyV2Args = { - discountCode: Scalars['String'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutDiscountCodeRemoveArgs = { - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutEmailUpdateArgs = { - checkoutId: Scalars['ID'] - email: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutEmailUpdateV2Args = { - checkoutId: Scalars['ID'] - email: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutGiftCardApplyArgs = { - giftCardCode: Scalars['String'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutGiftCardRemoveArgs = { - appliedGiftCardId: Scalars['ID'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutGiftCardRemoveV2Args = { - appliedGiftCardId: Scalars['ID'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutGiftCardsAppendArgs = { - giftCardCodes: Array - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutLineItemsAddArgs = { - lineItems: Array - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutLineItemsRemoveArgs = { - checkoutId: Scalars['ID'] - lineItemIds: Array -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutLineItemsReplaceArgs = { - lineItems: Array - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutLineItemsUpdateArgs = { - checkoutId: Scalars['ID'] - lineItems: Array -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutShippingAddressUpdateArgs = { - shippingAddress: MailingAddressInput - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutShippingAddressUpdateV2Args = { - shippingAddress: MailingAddressInput - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutShippingLineUpdateArgs = { - checkoutId: Scalars['ID'] - shippingRateHandle: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAccessTokenCreateArgs = { - input: CustomerAccessTokenCreateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAccessTokenCreateWithMultipassArgs = { - multipassToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAccessTokenDeleteArgs = { - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAccessTokenRenewArgs = { - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerActivateArgs = { - id: Scalars['ID'] - input: CustomerActivateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerActivateByUrlArgs = { - activationUrl: Scalars['URL'] - password: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAddressCreateArgs = { - customerAccessToken: Scalars['String'] - address: MailingAddressInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAddressDeleteArgs = { - id: Scalars['ID'] - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAddressUpdateArgs = { - customerAccessToken: Scalars['String'] - id: Scalars['ID'] - address: MailingAddressInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerCreateArgs = { - input: CustomerCreateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerDefaultAddressUpdateArgs = { - customerAccessToken: Scalars['String'] - addressId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerRecoverArgs = { - email: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerResetArgs = { - id: Scalars['ID'] - input: CustomerResetInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerResetByUrlArgs = { - resetUrl: Scalars['URL'] - password: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerUpdateArgs = { - customerAccessToken: Scalars['String'] - customer: CustomerUpdateInput -} - -/** An object with an ID to support global identification. */ -export type Node = { - /** Globally unique identifier. */ - id: Scalars['ID'] -} - -/** An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. */ -export type Order = Node & { - __typename?: 'Order' - /** The reason for the order's cancellation. Returns `null` if the order wasn't canceled. */ - cancelReason?: Maybe - /** The date and time when the order was canceled. Returns null if the order wasn't canceled. */ - canceledAt?: Maybe - /** The code of the currency used for the payment. */ - currencyCode: CurrencyCode - /** The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes are not included unless the order is a taxes-included order. */ - currentSubtotalPrice: MoneyV2 - /** The total amount of the order, including duties, taxes and discounts, minus amounts for line items that have been removed. */ - currentTotalPrice: MoneyV2 - /** The total of all taxes applied to the order, excluding taxes for returned line items. */ - currentTotalTax: MoneyV2 - /** The locale code in which this specific order happened. */ - customerLocale?: Maybe - /** The unique URL that the customer can use to access the order. */ - customerUrl?: Maybe - /** Discounts that have been applied on the order. */ - discountApplications: DiscountApplicationConnection - /** Whether the order has had any edits applied or not. */ - edited: Scalars['Boolean'] - /** The customer's email address. */ - email?: Maybe - /** The financial status of the order. */ - financialStatus?: Maybe - /** The fulfillment status for the order. */ - fulfillmentStatus: OrderFulfillmentStatus - /** Globally unique identifier. */ - id: Scalars['ID'] - /** List of the order’s line items. */ - lineItems: OrderLineItemConnection - /** - * Unique identifier for the order that appears on the order. - * For example, _#1000_ or _Store1001. - */ - name: Scalars['String'] - /** A unique numeric identifier for the order for use by shop owner and customer. */ - orderNumber: Scalars['Int'] - /** The total price of the order before any applied edits. */ - originalTotalPrice: MoneyV2 - /** The customer's phone number for receiving SMS notifications. */ - phone?: Maybe - /** - * The date and time when the order was imported. - * This value can be set to dates in the past when importing from other systems. - * If no value is provided, it will be auto-generated based on current date and time. - */ - processedAt: Scalars['DateTime'] - /** The address to where the order will be shipped. */ - shippingAddress?: Maybe - /** The discounts that have been allocated onto the shipping line by discount applications. */ - shippingDiscountAllocations: Array - /** The unique URL for the order's status page. */ - statusUrl: Scalars['URL'] - /** - * Price of the order before shipping and taxes. - * @deprecated Use `subtotalPriceV2` instead - */ - subtotalPrice?: Maybe - /** Price of the order before duties, shipping and taxes. */ - subtotalPriceV2?: Maybe - /** List of the order’s successful fulfillments. */ - successfulFulfillments?: Maybe> - /** - * The sum of all the prices of all the items in the order, taxes and discounts included (must be positive). - * @deprecated Use `totalPriceV2` instead - */ - totalPrice: Scalars['Money'] - /** The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). */ - totalPriceV2: MoneyV2 - /** - * The total amount that has been refunded. - * @deprecated Use `totalRefundedV2` instead - */ - totalRefunded: Scalars['Money'] - /** The total amount that has been refunded. */ - totalRefundedV2: MoneyV2 - /** - * The total cost of shipping. - * @deprecated Use `totalShippingPriceV2` instead - */ - totalShippingPrice: Scalars['Money'] - /** The total cost of shipping. */ - totalShippingPriceV2: MoneyV2 - /** - * The total cost of taxes. - * @deprecated Use `totalTaxV2` instead - */ - totalTax?: Maybe - /** The total cost of taxes. */ - totalTaxV2?: Maybe -} - -/** An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. */ -export type OrderDiscountApplicationsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. */ -export type OrderLineItemsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. */ -export type OrderSuccessfulFulfillmentsArgs = { - first?: Maybe -} - -/** Represents the reason for the order's cancellation. */ -export enum OrderCancelReason { - /** The customer wanted to cancel the order. */ - Customer = 'CUSTOMER', - /** The order was fraudulent. */ - Fraud = 'FRAUD', - /** There was insufficient inventory. */ - Inventory = 'INVENTORY', - /** Payment was declined. */ - Declined = 'DECLINED', - /** The order was canceled for an unlisted reason. */ - Other = 'OTHER', -} - -/** An auto-generated type for paginating through multiple Orders. */ -export type OrderConnection = { - __typename?: 'OrderConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Order and a cursor during pagination. */ -export type OrderEdge = { - __typename?: 'OrderEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of OrderEdge. */ - node: Order -} - -/** Represents the order's current financial status. */ -export enum OrderFinancialStatus { - /** Displayed as **Pending**. */ - Pending = 'PENDING', - /** Displayed as **Authorized**. */ - Authorized = 'AUTHORIZED', - /** Displayed as **Partially paid**. */ - PartiallyPaid = 'PARTIALLY_PAID', - /** Displayed as **Partially refunded**. */ - PartiallyRefunded = 'PARTIALLY_REFUNDED', - /** Displayed as **Voided**. */ - Voided = 'VOIDED', - /** Displayed as **Paid**. */ - Paid = 'PAID', - /** Displayed as **Refunded**. */ - Refunded = 'REFUNDED', -} - -/** Represents the order's current fulfillment status. */ -export enum OrderFulfillmentStatus { - /** Displayed as **Unfulfilled**. */ - Unfulfilled = 'UNFULFILLED', - /** Displayed as **Partially fulfilled**. */ - PartiallyFulfilled = 'PARTIALLY_FULFILLED', - /** Displayed as **Fulfilled**. */ - Fulfilled = 'FULFILLED', - /** Displayed as **Restocked**. */ - Restocked = 'RESTOCKED', - /** Displayed as **Pending fulfillment**. */ - PendingFulfillment = 'PENDING_FULFILLMENT', - /** Displayed as **Open**. */ - Open = 'OPEN', - /** Displayed as **In progress**. */ - InProgress = 'IN_PROGRESS', - /** Displayed as **Scheduled**. */ - Scheduled = 'SCHEDULED', -} - -/** Represents a single line in an order. There is one line item for each distinct product variant. */ -export type OrderLineItem = { - __typename?: 'OrderLineItem' - /** The number of entries associated to the line item minus the items that have been removed. */ - currentQuantity: Scalars['Int'] - /** List of custom attributes associated to the line item. */ - customAttributes: Array - /** The discounts that have been allocated onto the order line item by discount applications. */ - discountAllocations: Array - /** The total price of the line item, including discounts, and displayed in the presentment currency. */ - discountedTotalPrice: MoneyV2 - /** The total price of the line item, not including any discounts. The total price is calculated using the original unit price multiplied by the quantity, and it is displayed in the presentment currency. */ - originalTotalPrice: MoneyV2 - /** The number of products variants associated to the line item. */ - quantity: Scalars['Int'] - /** The title of the product combined with title of the variant. */ - title: Scalars['String'] - /** The product variant object associated to the line item. */ - variant?: Maybe -} - -/** An auto-generated type for paginating through multiple OrderLineItems. */ -export type OrderLineItemConnection = { - __typename?: 'OrderLineItemConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one OrderLineItem and a cursor during pagination. */ -export type OrderLineItemEdge = { - __typename?: 'OrderLineItemEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of OrderLineItemEdge. */ - node: OrderLineItem -} - -/** The set of valid sort keys for the Order query. */ -export enum OrderSortKeys { - /** Sort by the `processed_at` value. */ - ProcessedAt = 'PROCESSED_AT', - /** Sort by the `total_price` value. */ - TotalPrice = 'TOTAL_PRICE', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** Shopify merchants can create pages to hold static HTML content. Each Page object represents a custom page on the online store. */ -export type Page = Node & { - __typename?: 'Page' - /** The description of the page, complete with HTML formatting. */ - body: Scalars['HTML'] - /** Summary of the page body. */ - bodySummary: Scalars['String'] - /** The timestamp of the page creation. */ - createdAt: Scalars['DateTime'] - /** A human-friendly unique string for the page automatically generated from its title. */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The page's SEO information. */ - seo?: Maybe - /** The title of the page. */ - title: Scalars['String'] - /** The timestamp of the latest page update. */ - updatedAt: Scalars['DateTime'] - /** The url pointing to the page accessible from the web. */ - url: Scalars['URL'] -} - -/** An auto-generated type for paginating through multiple Pages. */ -export type PageConnection = { - __typename?: 'PageConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Page and a cursor during pagination. */ -export type PageEdge = { - __typename?: 'PageEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of PageEdge. */ - node: Page -} - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo' - /** Indicates if there are more pages to fetch. */ - hasNextPage: Scalars['Boolean'] - /** Indicates if there are any pages prior to the current page. */ - hasPreviousPage: Scalars['Boolean'] -} - -/** The set of valid sort keys for the Page query. */ -export enum PageSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `updated_at` value. */ - UpdatedAt = 'UPDATED_AT', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** A payment applied to a checkout. */ -export type Payment = Node & { - __typename?: 'Payment' - /** - * The amount of the payment. - * @deprecated Use `amountV2` instead - */ - amount: Scalars['Money'] - /** The amount of the payment. */ - amountV2: MoneyV2 - /** The billing address for the payment. */ - billingAddress?: Maybe - /** The checkout to which the payment belongs. */ - checkout: Checkout - /** The credit card used for the payment in the case of direct payments. */ - creditCard?: Maybe - /** A message describing a processing error during asynchronous processing. */ - errorMessage?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** - * A client-side generated token to identify a payment and perform idempotent operations. - * For more information, refer to - * [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). - */ - idempotencyKey?: Maybe - /** The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. */ - nextActionUrl?: Maybe - /** Whether or not the payment is still processing asynchronously. */ - ready: Scalars['Boolean'] - /** A flag to indicate if the payment is to be done in test mode for gateways that support it. */ - test: Scalars['Boolean'] - /** The actual transaction recorded by Shopify after having processed the payment with the gateway. */ - transaction?: Maybe -} - -/** Settings related to payments. */ -export type PaymentSettings = { - __typename?: 'PaymentSettings' - /** List of the card brands which the shop accepts. */ - acceptedCardBrands: Array - /** The url pointing to the endpoint to vault credit cards. */ - cardVaultUrl: Scalars['URL'] - /** The country where the shop is located. */ - countryCode: CountryCode - /** The three-letter code for the shop's primary currency. */ - currencyCode: CurrencyCode - /** A list of enabled currencies (ISO 4217 format) that the shop accepts. Merchants can enable currencies from their Shopify Payments settings in the Shopify admin. */ - enabledPresentmentCurrencies: Array - /** The shop’s Shopify Payments account id. */ - shopifyPaymentsAccountId?: Maybe - /** List of the digital wallets which the shop supports. */ - supportedDigitalWallets: Array -} - -/** The valid values for the types of payment token. */ -export enum PaymentTokenType { - /** Apple Pay token type. */ - ApplePay = 'APPLE_PAY', - /** Vault payment token type. */ - Vault = 'VAULT', - /** Shopify Pay token type. */ - ShopifyPay = 'SHOPIFY_PAY', - /** Google Pay token type. */ - GooglePay = 'GOOGLE_PAY', -} - -/** The value of the percentage pricing object. */ -export type PricingPercentageValue = { - __typename?: 'PricingPercentageValue' - /** The percentage value of the object. */ - percentage: Scalars['Float'] -} - -/** The price value (fixed or percentage) for a discount application. */ -export type PricingValue = MoneyV2 | PricingPercentageValue - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type Product = Node & - HasMetafields & { - __typename?: 'Product' - /** Indicates if at least one product variant is available for sale. */ - availableForSale: Scalars['Boolean'] - /** List of collections a product belongs to. */ - collections: CollectionConnection - /** The compare at price of the product across all variants. */ - compareAtPriceRange: ProductPriceRange - /** The date and time when the product was created. */ - createdAt: Scalars['DateTime'] - /** Stripped description of the product, single line with HTML tags removed. */ - description: Scalars['String'] - /** The description of the product, complete with HTML formatting. */ - descriptionHtml: Scalars['HTML'] - /** - * A human-friendly unique string for the Product automatically generated from its title. - * They are used by the Liquid templating language to refer to objects. - */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** List of images associated with the product. */ - images: ImageConnection - /** The media associated with the product. */ - media: MediaConnection - /** The metafield associated with the resource. */ - metafield?: Maybe - /** A paginated list of metafields associated with the resource. */ - metafields: MetafieldConnection - /** - * The online store URL for the product. - * A value of `null` indicates that the product is not published to the Online Store sales channel. - */ - onlineStoreUrl?: Maybe - /** List of product options. */ - options: Array - /** List of price ranges in the presentment currencies for this shop. */ - presentmentPriceRanges: ProductPriceRangeConnection - /** The price range. */ - priceRange: ProductPriceRange - /** A categorization that a product can be tagged with, commonly used for filtering and searching. */ - productType: Scalars['String'] - /** The date and time when the product was published to the channel. */ - publishedAt: Scalars['DateTime'] - /** The product's SEO information. */ - seo: Seo - /** - * A comma separated list of tags that have been added to the product. - * Additional access scope required for private apps: unauthenticated_read_product_tags. - */ - tags: Array - /** The product’s title. */ - title: Scalars['String'] - /** The total quantity of inventory in stock for this Product. */ - totalInventory?: Maybe - /** - * The date and time when the product was last modified. - * A product's `updatedAt` value can change for different reasons. For example, if an order - * is placed for a product that has inventory tracking set up, then the inventory adjustment - * is counted as an update. - */ - updatedAt: Scalars['DateTime'] - /** - * Find a product’s variant based on its selected options. - * This is useful for converting a user’s selection of product options into a single matching variant. - * If there is not a variant for the selected options, `null` will be returned. - */ - variantBySelectedOptions?: Maybe - /** List of the product’s variants. */ - variants: ProductVariantConnection - /** The product’s vendor name. */ - vendor: Scalars['String'] - } - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductCollectionsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductDescriptionArgs = { - truncateAt?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductImagesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductMediaArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductMetafieldArgs = { - namespace: Scalars['String'] - key: Scalars['String'] -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductMetafieldsArgs = { - namespace?: Maybe - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductOptionsArgs = { - first?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductPresentmentPriceRangesArgs = { - presentmentCurrencies?: Maybe> - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductVariantBySelectedOptionsArgs = { - selectedOptions: Array -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductVariantsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe -} - -/** The set of valid sort keys for the ProductCollection query. */ -export enum ProductCollectionSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `price` value. */ - Price = 'PRICE', - /** Sort by the `best-selling` value. */ - BestSelling = 'BEST_SELLING', - /** Sort by the `created` value. */ - Created = 'CREATED', - /** Sort by the `id` value. */ - Id = 'ID', - /** Sort by the `manual` value. */ - Manual = 'MANUAL', - /** Sort by the `collection-default` value. */ - CollectionDefault = 'COLLECTION_DEFAULT', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** An auto-generated type for paginating through multiple Products. */ -export type ProductConnection = { - __typename?: 'ProductConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Product and a cursor during pagination. */ -export type ProductEdge = { - __typename?: 'ProductEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ProductEdge. */ - node: Product -} - -/** The set of valid sort keys for the ProductImage query. */ -export enum ProductImageSortKeys { - /** Sort by the `created_at` value. */ - CreatedAt = 'CREATED_AT', - /** Sort by the `position` value. */ - Position = 'POSITION', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** The set of valid sort keys for the ProductMedia query. */ -export enum ProductMediaSortKeys { - /** Sort by the `position` value. */ - Position = 'POSITION', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** - * Product property names like "Size", "Color", and "Material" that the customers can select. - * Variants are selected based on permutations of these options. - * 255 characters limit each. - */ -export type ProductOption = Node & { - __typename?: 'ProductOption' - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The product option’s name. */ - name: Scalars['String'] - /** The corresponding value to the product option name. */ - values: Array -} - -/** The price range of the product. */ -export type ProductPriceRange = { - __typename?: 'ProductPriceRange' - /** The highest variant's price. */ - maxVariantPrice: MoneyV2 - /** The lowest variant's price. */ - minVariantPrice: MoneyV2 -} - -/** An auto-generated type for paginating through multiple ProductPriceRanges. */ -export type ProductPriceRangeConnection = { - __typename?: 'ProductPriceRangeConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one ProductPriceRange and a cursor during pagination. */ -export type ProductPriceRangeEdge = { - __typename?: 'ProductPriceRangeEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ProductPriceRangeEdge. */ - node: ProductPriceRange -} - -/** The set of valid sort keys for the Product query. */ -export enum ProductSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `product_type` value. */ - ProductType = 'PRODUCT_TYPE', - /** Sort by the `vendor` value. */ - Vendor = 'VENDOR', - /** Sort by the `updated_at` value. */ - UpdatedAt = 'UPDATED_AT', - /** Sort by the `created_at` value. */ - CreatedAt = 'CREATED_AT', - /** Sort by the `best_selling` value. */ - BestSelling = 'BEST_SELLING', - /** Sort by the `price` value. */ - Price = 'PRICE', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariant = Node & - HasMetafields & { - __typename?: 'ProductVariant' - /** - * Indicates if the product variant is in stock. - * @deprecated Use `availableForSale` instead - */ - available?: Maybe - /** Indicates if the product variant is available for sale. */ - availableForSale: Scalars['Boolean'] - /** - * The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPrice` is higher than `price`. - * @deprecated Use `compareAtPriceV2` instead - */ - compareAtPrice?: Maybe - /** The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPriceV2` is higher than `priceV2`. */ - compareAtPriceV2?: Maybe - /** Whether a product is out of stock but still available for purchase (used for backorders). */ - currentlyNotInStock: Scalars['Boolean'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** Image associated with the product variant. This field falls back to the product image if no image is available. */ - image?: Maybe - /** The metafield associated with the resource. */ - metafield?: Maybe - /** A paginated list of metafields associated with the resource. */ - metafields: MetafieldConnection - /** List of prices and compare-at prices in the presentment currencies for this shop. */ - presentmentPrices: ProductVariantPricePairConnection - /** List of unit prices in the presentment currencies for this shop. */ - presentmentUnitPrices: MoneyV2Connection - /** - * The product variant’s price. - * @deprecated Use `priceV2` instead - */ - price: Scalars['Money'] - /** The product variant’s price. */ - priceV2: MoneyV2 - /** The product object that the product variant belongs to. */ - product: Product - /** The total sellable quantity of the variant for online sales channels. */ - quantityAvailable?: Maybe - /** Whether a customer needs to provide a shipping address when placing an order for the product variant. */ - requiresShipping: Scalars['Boolean'] - /** List of product options applied to the variant. */ - selectedOptions: Array - /** The SKU (stock keeping unit) associated with the variant. */ - sku?: Maybe - /** The product variant’s title. */ - title: Scalars['String'] - /** The unit price value for the variant based on the variant's measurement. */ - unitPrice?: Maybe - /** The unit price measurement for the variant. */ - unitPriceMeasurement?: Maybe - /** The weight of the product variant in the unit system specified with `weight_unit`. */ - weight?: Maybe - /** Unit of measurement for weight. */ - weightUnit: WeightUnit - } - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantImageArgs = { - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantMetafieldArgs = { - namespace: Scalars['String'] - key: Scalars['String'] -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantMetafieldsArgs = { - namespace?: Maybe - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantPresentmentPricesArgs = { - presentmentCurrencies?: Maybe> - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantPresentmentUnitPricesArgs = { - presentmentCurrencies?: Maybe> - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** An auto-generated type for paginating through multiple ProductVariants. */ -export type ProductVariantConnection = { - __typename?: 'ProductVariantConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one ProductVariant and a cursor during pagination. */ -export type ProductVariantEdge = { - __typename?: 'ProductVariantEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ProductVariantEdge. */ - node: ProductVariant -} - -/** The compare-at price and price of a variant sharing a currency. */ -export type ProductVariantPricePair = { - __typename?: 'ProductVariantPricePair' - /** The compare-at price of the variant with associated currency. */ - compareAtPrice?: Maybe - /** The price of the variant with associated currency. */ - price: MoneyV2 -} - -/** An auto-generated type for paginating through multiple ProductVariantPricePairs. */ -export type ProductVariantPricePairConnection = { - __typename?: 'ProductVariantPricePairConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. */ -export type ProductVariantPricePairEdge = { - __typename?: 'ProductVariantPricePairEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ProductVariantPricePairEdge. */ - node: ProductVariantPricePair -} - -/** The set of valid sort keys for the ProductVariant query. */ -export enum ProductVariantSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `sku` value. */ - Sku = 'SKU', - /** Sort by the `position` value. */ - Position = 'POSITION', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRoot = { - __typename?: 'QueryRoot' - /** List of the shop's articles. */ - articles: ArticleConnection - /** Find a blog by its handle. */ - blogByHandle?: Maybe - /** List of the shop's blogs. */ - blogs: BlogConnection - /** Find a collection by its handle. */ - collectionByHandle?: Maybe - /** List of the shop’s collections. */ - collections: CollectionConnection - /** Find a customer by its access token. */ - customer?: Maybe - /** Returns a specific node by ID. */ - node?: Maybe - /** Returns the list of nodes with the given IDs. */ - nodes: Array> - /** Find a page by its handle. */ - pageByHandle?: Maybe - /** List of the shop's pages. */ - pages: PageConnection - /** Find a product by its handle. */ - productByHandle?: Maybe - /** - * Find recommended products related to a given `product_id`. - * To learn more about how recommendations are generated, see - * [*Showing product recommendations on product pages*](https://help.shopify.com/themes/development/recommended-products). - */ - productRecommendations?: Maybe> - /** - * Tags added to products. - * Additional access scope required: unauthenticated_read_product_tags. - */ - productTags: StringConnection - /** List of product types for the shop's products that are published to your app. */ - productTypes: StringConnection - /** List of the shop’s products. */ - products: ProductConnection - /** The list of public Storefront API versions, including supported, release candidate and unstable versions. */ - publicApiVersions: Array - /** The shop associated with the storefront access token. */ - shop: Shop -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootArticlesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootBlogByHandleArgs = { - handle: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootBlogsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootCollectionByHandleArgs = { - handle: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootCollectionsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootCustomerArgs = { - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootNodeArgs = { - id: Scalars['ID'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootNodesArgs = { - ids: Array -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootPageByHandleArgs = { - handle: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootPagesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductByHandleArgs = { - handle: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductRecommendationsArgs = { - productId: Scalars['ID'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductTagsArgs = { - first: Scalars['Int'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductTypesArgs = { - first: Scalars['Int'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** SEO information. */ -export type Seo = { - __typename?: 'SEO' - /** The meta description. */ - description?: Maybe - /** The SEO title. */ - title?: Maybe -} - -/** - * Script discount applications capture the intentions of a discount that - * was created by a Shopify Script. - */ -export type ScriptDiscountApplication = DiscountApplication & { - __typename?: 'ScriptDiscountApplication' - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** - * The description of the application as defined by the Script. - * @deprecated Use `title` instead - */ - description: Scalars['String'] - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The title of the application as defined by the Script. */ - title: Scalars['String'] - /** The value of the discount application. */ - value: PricingValue -} - -/** - * Properties used by customers to select a product variant. - * Products can have multiple options, like different sizes or colors. - */ -export type SelectedOption = { - __typename?: 'SelectedOption' - /** The product option’s name. */ - name: Scalars['String'] - /** The product option’s value. */ - value: Scalars['String'] -} - -/** Specifies the input fields required for a selected option. */ -export type SelectedOptionInput = { - /** The product option’s name. */ - name: Scalars['String'] - /** The product option’s value. */ - value: Scalars['String'] -} - -/** A shipping rate to be applied to a checkout. */ -export type ShippingRate = { - __typename?: 'ShippingRate' - /** Human-readable unique identifier for this shipping rate. */ - handle: Scalars['String'] - /** - * Price of this shipping rate. - * @deprecated Use `priceV2` instead - */ - price: Scalars['Money'] - /** Price of this shipping rate. */ - priceV2: MoneyV2 - /** Title of this shipping rate. */ - title: Scalars['String'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type Shop = { - __typename?: 'Shop' - /** - * List of the shop' articles. - * @deprecated Use `QueryRoot.articles` instead. - */ - articles: ArticleConnection - /** - * List of the shop' blogs. - * @deprecated Use `QueryRoot.blogs` instead. - */ - blogs: BlogConnection - /** - * Find a collection by its handle. - * @deprecated Use `QueryRoot.collectionByHandle` instead. - */ - collectionByHandle?: Maybe - /** - * List of the shop’s collections. - * @deprecated Use `QueryRoot.collections` instead. - */ - collections: CollectionConnection - /** - * The three-letter code for the currency that the shop accepts. - * @deprecated Use `paymentSettings` instead - */ - currencyCode: CurrencyCode - /** A description of the shop. */ - description?: Maybe - /** A string representing the way currency is formatted when the currency isn’t specified. */ - moneyFormat: Scalars['String'] - /** The shop’s name. */ - name: Scalars['String'] - /** Settings related to payments. */ - paymentSettings: PaymentSettings - /** The shop’s primary domain. */ - primaryDomain: Domain - /** The shop’s privacy policy. */ - privacyPolicy?: Maybe - /** - * Find a product by its handle. - * @deprecated Use `QueryRoot.productByHandle` instead. - */ - productByHandle?: Maybe - /** - * A list of tags that have been added to products. - * Additional access scope required: unauthenticated_read_product_tags. - * @deprecated Use `QueryRoot.productTags` instead. - */ - productTags: StringConnection - /** - * List of the shop’s product types. - * @deprecated Use `QueryRoot.productTypes` instead. - */ - productTypes: StringConnection - /** - * List of the shop’s products. - * @deprecated Use `QueryRoot.products` instead. - */ - products: ProductConnection - /** The shop’s refund policy. */ - refundPolicy?: Maybe - /** The shop’s shipping policy. */ - shippingPolicy?: Maybe - /** Countries that the shop ships to. */ - shipsToCountries: Array - /** - * The shop’s Shopify Payments account id. - * @deprecated Use `paymentSettings` instead - */ - shopifyPaymentsAccountId?: Maybe - /** The shop’s terms of service. */ - termsOfService?: Maybe -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopArticlesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopBlogsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopCollectionByHandleArgs = { - handle: Scalars['String'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopCollectionsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopProductByHandleArgs = { - handle: Scalars['String'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopProductTagsArgs = { - first: Scalars['Int'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopProductTypesArgs = { - first: Scalars['Int'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopProductsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** Policy that a merchant has configured for their store, such as their refund or privacy policy. */ -export type ShopPolicy = Node & { - __typename?: 'ShopPolicy' - /** Policy text, maximum size of 64kb. */ - body: Scalars['String'] - /** Policy’s handle. */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** Policy’s title. */ - title: Scalars['String'] - /** Public URL to the policy. */ - url: Scalars['URL'] -} - -/** An auto-generated type for paginating through multiple Strings. */ -export type StringConnection = { - __typename?: 'StringConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one String and a cursor during pagination. */ -export type StringEdge = { - __typename?: 'StringEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of StringEdge. */ - node: Scalars['String'] -} - -/** - * Specifies the fields required to complete a checkout with - * a tokenized payment. - */ -export type TokenizedPaymentInput = { - /** The amount of the payment. */ - amount: Scalars['Money'] - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** The type of payment token. */ - type: Scalars['String'] - /** A simple string or JSON containing the required payment data for the tokenized payment. */ - paymentData: Scalars['String'] - /** Executes the payment in test mode if possible. Defaults to `false`. */ - test?: Maybe - /** Public Hash Key used for AndroidPay payments only. */ - identifier?: Maybe -} - -/** - * Specifies the fields required to complete a checkout with - * a tokenized payment. - */ -export type TokenizedPaymentInputV2 = { - /** The amount and currency of the payment. */ - paymentAmount: MoneyInput - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** A simple string or JSON containing the required payment data for the tokenized payment. */ - paymentData: Scalars['String'] - /** Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. */ - test?: Maybe - /** Public Hash Key used for AndroidPay payments only. */ - identifier?: Maybe - /** The type of payment token. */ - type: Scalars['String'] -} - -/** - * Specifies the fields required to complete a checkout with - * a tokenized payment. - */ -export type TokenizedPaymentInputV3 = { - /** The amount and currency of the payment. */ - paymentAmount: MoneyInput - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** A simple string or JSON containing the required payment data for the tokenized payment. */ - paymentData: Scalars['String'] - /** Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. */ - test?: Maybe - /** Public Hash Key used for AndroidPay payments only. */ - identifier?: Maybe - /** The type of payment token. */ - type: PaymentTokenType -} - -/** An object representing exchange of money for a product or service. */ -export type Transaction = { - __typename?: 'Transaction' - /** - * The amount of money that the transaction was for. - * @deprecated Use `amountV2` instead - */ - amount: Scalars['Money'] - /** The amount of money that the transaction was for. */ - amountV2: MoneyV2 - /** The kind of the transaction. */ - kind: TransactionKind - /** - * The status of the transaction. - * @deprecated Use `statusV2` instead - */ - status: TransactionStatus - /** The status of the transaction. */ - statusV2?: Maybe - /** Whether the transaction was done in test mode or not. */ - test: Scalars['Boolean'] -} - -/** The different kinds of order transactions. */ -export enum TransactionKind { - /** An authorization and capture performed together in a single step. */ - Sale = 'SALE', - /** A transfer of the money that was reserved during the authorization stage. */ - Capture = 'CAPTURE', - /** - * An amount reserved against the cardholder's funding source. - * Money does not change hands until the authorization is captured. - */ - Authorization = 'AUTHORIZATION', - /** An authorization for a payment taken with an EMV credit card reader. */ - EmvAuthorization = 'EMV_AUTHORIZATION', - /** Money returned to the customer when they have paid too much. */ - Change = 'CHANGE', -} - -/** Transaction statuses describe the status of a transaction. */ -export enum TransactionStatus { - /** The transaction is pending. */ - Pending = 'PENDING', - /** The transaction succeeded. */ - Success = 'SUCCESS', - /** The transaction failed. */ - Failure = 'FAILURE', - /** There was an error while processing the transaction. */ - Error = 'ERROR', -} - -/** The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). */ -export type UnitPriceMeasurement = { - __typename?: 'UnitPriceMeasurement' - /** The type of unit of measurement for the unit price measurement. */ - measuredType?: Maybe - /** The quantity unit for the unit price measurement. */ - quantityUnit?: Maybe - /** The quantity value for the unit price measurement. */ - quantityValue: Scalars['Float'] - /** The reference unit for the unit price measurement. */ - referenceUnit?: Maybe - /** The reference value for the unit price measurement. */ - referenceValue: Scalars['Int'] -} - -/** The accepted types of unit of measurement. */ -export enum UnitPriceMeasurementMeasuredType { - /** Unit of measurements representing volumes. */ - Volume = 'VOLUME', - /** Unit of measurements representing weights. */ - Weight = 'WEIGHT', - /** Unit of measurements representing lengths. */ - Length = 'LENGTH', - /** Unit of measurements representing areas. */ - Area = 'AREA', -} - -/** The valid units of measurement for a unit price measurement. */ -export enum UnitPriceMeasurementMeasuredUnit { - /** 1000 milliliters equals 1 liter. */ - Ml = 'ML', - /** 100 centiliters equals 1 liter. */ - Cl = 'CL', - /** Metric system unit of volume. */ - L = 'L', - /** 1 cubic meter equals 1000 liters. */ - M3 = 'M3', - /** 1000 milligrams equals 1 gram. */ - Mg = 'MG', - /** Metric system unit of weight. */ - G = 'G', - /** 1 kilogram equals 1000 grams. */ - Kg = 'KG', - /** 1000 millimeters equals 1 meter. */ - Mm = 'MM', - /** 100 centimeters equals 1 meter. */ - Cm = 'CM', - /** Metric system unit of length. */ - M = 'M', - /** Metric system unit of area. */ - M2 = 'M2', -} - -/** Represents an error in the input of a mutation. */ -export type UserError = DisplayableError & { - __typename?: 'UserError' - /** Path to the input field which caused the error. */ - field?: Maybe> - /** The error message. */ - message: Scalars['String'] -} - -/** Represents a Shopify hosted video. */ -export type Video = Node & - Media & { - __typename?: 'Video' - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe - /** The sources for a video. */ - sources: Array - } - -/** Represents a source for a Shopify hosted video. */ -export type VideoSource = { - __typename?: 'VideoSource' - /** The format of the video source. */ - format: Scalars['String'] - /** The height of the video. */ - height: Scalars['Int'] - /** The video MIME type. */ - mimeType: Scalars['String'] - /** The URL of the video. */ - url: Scalars['String'] - /** The width of the video. */ - width: Scalars['Int'] -} - -/** Units of measurement for weight. */ -export enum WeightUnit { - /** 1 kilogram equals 1000 grams. */ - Kilograms = 'KILOGRAMS', - /** Metric system unit of mass. */ - Grams = 'GRAMS', - /** 1 pound equals 16 ounces. */ - Pounds = 'POUNDS', - /** Imperial system unit of mass. */ - Ounces = 'OUNCES', -} - -export type AssociateCustomerWithCheckoutMutationVariables = Exact<{ - checkoutId: Scalars['ID'] - customerAccessToken: Scalars['String'] -}> - -export type AssociateCustomerWithCheckoutMutation = { - __typename?: 'Mutation' -} & { - checkoutCustomerAssociateV2?: Maybe< - { __typename?: 'CheckoutCustomerAssociateV2Payload' } & { - checkout?: Maybe<{ __typename?: 'Checkout' } & Pick> - checkoutUserErrors: Array< - { __typename?: 'CheckoutUserError' } & Pick< - CheckoutUserError, - 'code' | 'field' | 'message' - > - > - customer?: Maybe<{ __typename?: 'Customer' } & Pick> - } - > -} - -export type CheckoutCreateMutationVariables = Exact<{ - input?: Maybe -}> - -export type CheckoutCreateMutation = { __typename?: 'Mutation' } & { - checkoutCreate?: Maybe< - { __typename?: 'CheckoutCreatePayload' } & { - checkoutUserErrors: Array< - { __typename?: 'CheckoutUserError' } & Pick< - CheckoutUserError, - 'code' | 'field' | 'message' - > - > - checkout?: Maybe<{ __typename?: 'Checkout' } & CheckoutDetailsFragment> - } - > -} - -export type CheckoutLineItemAddMutationVariables = Exact<{ - checkoutId: Scalars['ID'] - lineItems: Array | CheckoutLineItemInput -}> - -export type CheckoutLineItemAddMutation = { __typename?: 'Mutation' } & { - checkoutLineItemsAdd?: Maybe< - { __typename?: 'CheckoutLineItemsAddPayload' } & { - checkoutUserErrors: Array< - { __typename?: 'CheckoutUserError' } & Pick< - CheckoutUserError, - 'code' | 'field' | 'message' - > - > - checkout?: Maybe<{ __typename?: 'Checkout' } & CheckoutDetailsFragment> - } - > -} - -export type CheckoutLineItemRemoveMutationVariables = Exact<{ - checkoutId: Scalars['ID'] - lineItemIds: Array | Scalars['ID'] -}> - -export type CheckoutLineItemRemoveMutation = { __typename?: 'Mutation' } & { - checkoutLineItemsRemove?: Maybe< - { __typename?: 'CheckoutLineItemsRemovePayload' } & { - checkoutUserErrors: Array< - { __typename?: 'CheckoutUserError' } & Pick< - CheckoutUserError, - 'code' | 'field' | 'message' - > - > - checkout?: Maybe<{ __typename?: 'Checkout' } & CheckoutDetailsFragment> - } - > -} - -export type CheckoutLineItemUpdateMutationVariables = Exact<{ - checkoutId: Scalars['ID'] - lineItems: Array | CheckoutLineItemUpdateInput -}> - -export type CheckoutLineItemUpdateMutation = { __typename?: 'Mutation' } & { - checkoutLineItemsUpdate?: Maybe< - { __typename?: 'CheckoutLineItemsUpdatePayload' } & { - checkoutUserErrors: Array< - { __typename?: 'CheckoutUserError' } & Pick< - CheckoutUserError, - 'code' | 'field' | 'message' - > - > - checkout?: Maybe<{ __typename?: 'Checkout' } & CheckoutDetailsFragment> - } - > -} - -export type CustomerAccessTokenCreateMutationVariables = Exact<{ - input: CustomerAccessTokenCreateInput -}> - -export type CustomerAccessTokenCreateMutation = { __typename?: 'Mutation' } & { - customerAccessTokenCreate?: Maybe< - { __typename?: 'CustomerAccessTokenCreatePayload' } & { - customerAccessToken?: Maybe< - { __typename?: 'CustomerAccessToken' } & Pick< - CustomerAccessToken, - 'accessToken' | 'expiresAt' - > - > - customerUserErrors: Array< - { __typename?: 'CustomerUserError' } & Pick< - CustomerUserError, - 'code' | 'field' | 'message' - > - > - } - > -} - -export type CustomerAccessTokenDeleteMutationVariables = Exact<{ - customerAccessToken: Scalars['String'] -}> - -export type CustomerAccessTokenDeleteMutation = { __typename?: 'Mutation' } & { - customerAccessTokenDelete?: Maybe< - { __typename?: 'CustomerAccessTokenDeletePayload' } & Pick< - CustomerAccessTokenDeletePayload, - 'deletedAccessToken' | 'deletedCustomerAccessTokenId' - > & { - userErrors: Array< - { __typename?: 'UserError' } & Pick - > - } - > -} - -export type CustomerActivateByUrlMutationVariables = Exact<{ - activationUrl: Scalars['URL'] - password: Scalars['String'] -}> - -export type CustomerActivateByUrlMutation = { __typename?: 'Mutation' } & { - customerActivateByUrl?: Maybe< - { __typename?: 'CustomerActivateByUrlPayload' } & { - customer?: Maybe<{ __typename?: 'Customer' } & Pick> - customerAccessToken?: Maybe< - { __typename?: 'CustomerAccessToken' } & Pick< - CustomerAccessToken, - 'accessToken' | 'expiresAt' - > - > - customerUserErrors: Array< - { __typename?: 'CustomerUserError' } & Pick< - CustomerUserError, - 'code' | 'field' | 'message' - > - > - } - > -} - -export type CustomerActivateMutationVariables = Exact<{ - id: Scalars['ID'] - input: CustomerActivateInput -}> - -export type CustomerActivateMutation = { __typename?: 'Mutation' } & { - customerActivate?: Maybe< - { __typename?: 'CustomerActivatePayload' } & { - customer?: Maybe<{ __typename?: 'Customer' } & Pick> - customerAccessToken?: Maybe< - { __typename?: 'CustomerAccessToken' } & Pick< - CustomerAccessToken, - 'accessToken' | 'expiresAt' - > - > - customerUserErrors: Array< - { __typename?: 'CustomerUserError' } & Pick< - CustomerUserError, - 'code' | 'field' | 'message' - > - > - } - > -} - -export type CustomerCreateMutationVariables = Exact<{ - input: CustomerCreateInput -}> - -export type CustomerCreateMutation = { __typename?: 'Mutation' } & { - customerCreate?: Maybe< - { __typename?: 'CustomerCreatePayload' } & { - customerUserErrors: Array< - { __typename?: 'CustomerUserError' } & Pick< - CustomerUserError, - 'code' | 'field' | 'message' - > - > - customer?: Maybe<{ __typename?: 'Customer' } & Pick> - } - > -} - -export type GetSiteCollectionsQueryVariables = Exact<{ - first: Scalars['Int'] -}> - -export type GetSiteCollectionsQuery = { __typename?: 'QueryRoot' } & { - collections: { __typename?: 'CollectionConnection' } & { - edges: Array< - { __typename?: 'CollectionEdge' } & { - node: { __typename?: 'Collection' } & Pick< - Collection, - 'id' | 'title' | 'handle' - > - } - > - } -} - -export type GetAllPagesQueryVariables = Exact<{ - first?: Maybe -}> - -export type GetAllPagesQuery = { __typename?: 'QueryRoot' } & { - pages: { __typename?: 'PageConnection' } & { - edges: Array< - { __typename?: 'PageEdge' } & { - node: { __typename?: 'Page' } & Pick - } - > - } -} - -export type GetAllProductVendorsQueryVariables = Exact<{ - first?: Maybe - cursor?: Maybe -}> - -export type GetAllProductVendorsQuery = { __typename?: 'QueryRoot' } & { - products: { __typename?: 'ProductConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'hasNextPage' | 'hasPreviousPage' - > - edges: Array< - { __typename?: 'ProductEdge' } & Pick & { - node: { __typename?: 'Product' } & Pick - } - > - } -} - -export type GetAllProductPathsQueryVariables = Exact<{ - first?: Maybe - cursor?: Maybe -}> - -export type GetAllProductPathsQuery = { __typename?: 'QueryRoot' } & { - products: { __typename?: 'ProductConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'hasNextPage' | 'hasPreviousPage' - > - edges: Array< - { __typename?: 'ProductEdge' } & Pick & { - node: { __typename?: 'Product' } & Pick - } - > - } -} - -export type ProductConnectionFragment = { __typename?: 'ProductConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'hasNextPage' | 'hasPreviousPage' - > - edges: Array< - { __typename?: 'ProductEdge' } & { - node: { __typename?: 'Product' } & Pick< - Product, - 'id' | 'title' | 'vendor' | 'handle' - > & { - priceRange: { __typename?: 'ProductPriceRange' } & { - minVariantPrice: { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - } - images: { __typename?: 'ImageConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'hasNextPage' | 'hasPreviousPage' - > - edges: Array< - { __typename?: 'ImageEdge' } & { - node: { __typename?: 'Image' } & Pick< - Image, - 'originalSrc' | 'altText' | 'width' | 'height' - > - } - > - } - } - } - > -} - -export type GetAllProductsQueryVariables = Exact<{ - first?: Maybe - query?: Maybe - sortKey?: Maybe - reverse?: Maybe -}> - -export type GetAllProductsQuery = { __typename?: 'QueryRoot' } & { - products: { __typename?: 'ProductConnection' } & ProductConnectionFragment -} - -export type CheckoutDetailsFragment = { __typename?: 'Checkout' } & Pick< - Checkout, - 'id' | 'webUrl' | 'completedAt' | 'createdAt' | 'taxesIncluded' -> & { - subtotalPriceV2: { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - totalTaxV2: { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - totalPriceV2: { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - lineItems: { __typename?: 'CheckoutLineItemConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'hasNextPage' | 'hasPreviousPage' - > - edges: Array< - { __typename?: 'CheckoutLineItemEdge' } & { - node: { __typename?: 'CheckoutLineItem' } & Pick< - CheckoutLineItem, - 'id' | 'title' | 'quantity' - > & { - variant?: Maybe< - { __typename?: 'ProductVariant' } & Pick< - ProductVariant, - 'id' | 'sku' | 'title' - > & { - image?: Maybe< - { __typename?: 'Image' } & Pick< - Image, - 'originalSrc' | 'altText' | 'width' | 'height' - > - > - priceV2: { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - compareAtPriceV2?: Maybe< - { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - > - product: { __typename?: 'Product' } & Pick< - Product, - 'handle' - > - } - > - } - } - > - } - } - -export type GetCheckoutQueryVariables = Exact<{ - checkoutId: Scalars['ID'] -}> - -export type GetCheckoutQuery = { __typename?: 'QueryRoot' } & { - node?: Maybe< - | { __typename?: 'AppliedGiftCard' } - | { __typename?: 'Article' } - | { __typename?: 'Blog' } - | ({ __typename?: 'Checkout' } & CheckoutDetailsFragment) - | { __typename?: 'CheckoutLineItem' } - | { __typename?: 'Collection' } - | { __typename?: 'Comment' } - | { __typename?: 'ExternalVideo' } - | { __typename?: 'MailingAddress' } - | { __typename?: 'MediaImage' } - | { __typename?: 'Metafield' } - | { __typename?: 'Model3d' } - | { __typename?: 'Order' } - | { __typename?: 'Page' } - | { __typename?: 'Payment' } - | { __typename?: 'Product' } - | { __typename?: 'ProductOption' } - | { __typename?: 'ProductVariant' } - | { __typename?: 'ShopPolicy' } - | { __typename?: 'Video' } - > -} - -export type GetProductsFromCollectionQueryVariables = Exact<{ - categoryId: Scalars['ID'] - first?: Maybe - sortKey?: Maybe - reverse?: Maybe -}> - -export type GetProductsFromCollectionQuery = { __typename?: 'QueryRoot' } & { - node?: Maybe< - | ({ __typename?: 'AppliedGiftCard' } & Pick) - | ({ __typename?: 'Article' } & Pick) - | ({ __typename?: 'Blog' } & Pick) - | ({ __typename?: 'Checkout' } & Pick) - | ({ __typename?: 'CheckoutLineItem' } & Pick) - | ({ __typename?: 'Collection' } & Pick & { - products: { - __typename?: 'ProductConnection' - } & ProductConnectionFragment - }) - | ({ __typename?: 'Comment' } & Pick) - | ({ __typename?: 'ExternalVideo' } & Pick) - | ({ __typename?: 'MailingAddress' } & Pick) - | ({ __typename?: 'MediaImage' } & Pick) - | ({ __typename?: 'Metafield' } & Pick) - | ({ __typename?: 'Model3d' } & Pick) - | ({ __typename?: 'Order' } & Pick) - | ({ __typename?: 'Page' } & Pick) - | ({ __typename?: 'Payment' } & Pick) - | ({ __typename?: 'Product' } & Pick) - | ({ __typename?: 'ProductOption' } & Pick) - | ({ __typename?: 'ProductVariant' } & Pick) - | ({ __typename?: 'ShopPolicy' } & Pick) - | ({ __typename?: 'Video' } & Pick) - > -} - -export type GetCustomerIdQueryVariables = Exact<{ - customerAccessToken: Scalars['String'] -}> - -export type GetCustomerIdQuery = { __typename?: 'QueryRoot' } & { - customer?: Maybe<{ __typename?: 'Customer' } & Pick> -} - -export type GetCustomerQueryVariables = Exact<{ - customerAccessToken: Scalars['String'] -}> - -export type GetCustomerQuery = { __typename?: 'QueryRoot' } & { - customer?: Maybe< - { __typename?: 'Customer' } & Pick< - Customer, - | 'id' - | 'firstName' - | 'lastName' - | 'displayName' - | 'email' - | 'phone' - | 'tags' - | 'acceptsMarketing' - | 'createdAt' - > - > -} - -export type GetPageQueryVariables = Exact<{ - id: Scalars['ID'] -}> - -export type GetPageQuery = { __typename?: 'QueryRoot' } & { - node?: Maybe< - | ({ __typename?: 'AppliedGiftCard' } & Pick) - | ({ __typename?: 'Article' } & Pick) - | ({ __typename?: 'Blog' } & Pick) - | ({ __typename?: 'Checkout' } & Pick) - | ({ __typename?: 'CheckoutLineItem' } & Pick) - | ({ __typename?: 'Collection' } & Pick) - | ({ __typename?: 'Comment' } & Pick) - | ({ __typename?: 'ExternalVideo' } & Pick) - | ({ __typename?: 'MailingAddress' } & Pick) - | ({ __typename?: 'MediaImage' } & Pick) - | ({ __typename?: 'Metafield' } & Pick) - | ({ __typename?: 'Model3d' } & Pick) - | ({ __typename?: 'Order' } & Pick) - | ({ __typename?: 'Page' } & Pick< - Page, - 'title' | 'handle' | 'body' | 'bodySummary' | 'id' - >) - | ({ __typename?: 'Payment' } & Pick) - | ({ __typename?: 'Product' } & Pick) - | ({ __typename?: 'ProductOption' } & Pick) - | ({ __typename?: 'ProductVariant' } & Pick) - | ({ __typename?: 'ShopPolicy' } & Pick) - | ({ __typename?: 'Video' } & Pick) - > -} - -export type GetProductBySlugQueryVariables = Exact<{ - slug: Scalars['String'] -}> - -export type GetProductBySlugQuery = { __typename?: 'QueryRoot' } & { - productByHandle?: Maybe< - { __typename?: 'Product' } & Pick< - Product, - | 'id' - | 'handle' - | 'title' - | 'productType' - | 'vendor' - | 'description' - | 'descriptionHtml' - > & { - options: Array< - { __typename?: 'ProductOption' } & Pick< - ProductOption, - 'id' | 'name' | 'values' - > - > - priceRange: { __typename?: 'ProductPriceRange' } & { - maxVariantPrice: { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - minVariantPrice: { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - } - variants: { __typename?: 'ProductVariantConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'hasNextPage' | 'hasPreviousPage' - > - edges: Array< - { __typename?: 'ProductVariantEdge' } & { - node: { __typename?: 'ProductVariant' } & Pick< - ProductVariant, - 'id' | 'title' | 'sku' - > & { - selectedOptions: Array< - { __typename?: 'SelectedOption' } & Pick< - SelectedOption, - 'name' | 'value' - > - > - priceV2: { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - compareAtPriceV2?: Maybe< - { __typename?: 'MoneyV2' } & Pick< - MoneyV2, - 'amount' | 'currencyCode' - > - > - } - } - > - } - images: { __typename?: 'ImageConnection' } & { - pageInfo: { __typename?: 'PageInfo' } & Pick< - PageInfo, - 'hasNextPage' | 'hasPreviousPage' - > - edges: Array< - { __typename?: 'ImageEdge' } & { - node: { __typename?: 'Image' } & Pick< - Image, - 'originalSrc' | 'altText' | 'width' | 'height' - > - } - > - } - } - > -} - -export type GetSiteInfoQueryVariables = Exact<{ [key: string]: never }> - -export type GetSiteInfoQuery = { __typename?: 'QueryRoot' } & { - shop: { __typename?: 'Shop' } & Pick -} diff --git a/framework/shopify/schema.graphql b/framework/shopify/schema.graphql deleted file mode 100644 index 9c657fe43..000000000 --- a/framework/shopify/schema.graphql +++ /dev/null @@ -1,9702 +0,0 @@ -schema { - query: QueryRoot - mutation: Mutation -} - -""" -Marks an element of a GraphQL schema as having restricted access. -""" -directive @accessRestricted( - """ - Explains the reason around this restriction - """ - reason: String = null -) on FIELD_DEFINITION | OBJECT - -""" -Contextualize data. -""" -directive @inContext( - """ - The country code for context. - """ - country: CountryCode! -) on QUERY | MUTATION - -""" -A version of the API. -""" -type ApiVersion { - """ - The human-readable name of the version. - """ - displayName: String! - - """ - The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. - """ - handle: String! - - """ - Whether the version is actively supported by Shopify. Supported API versions are guaranteed to be stable. Unsupported API versions include unstable, release candidate, and end-of-life versions that are marked as unsupported. For more information, refer to [Versioning](https://shopify.dev/concepts/about-apis/versioning). - """ - supported: Boolean! -} - -""" -Details about the gift card used on the checkout. -""" -type AppliedGiftCard implements Node { - """ - The amount that was taken from the gift card by applying it. - """ - amountUsed: Money! @deprecated(reason: "Use `amountUsedV2` instead") - - """ - The amount that was taken from the gift card by applying it. - """ - amountUsedV2: MoneyV2! - - """ - The amount left on the gift card. - """ - balance: Money! @deprecated(reason: "Use `balanceV2` instead") - - """ - The amount left on the gift card. - """ - balanceV2: MoneyV2! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The last characters of the gift card. - """ - lastCharacters: String! - - """ - The amount that was applied to the checkout in its currency. - """ - presentmentAmountUsed: MoneyV2! -} - -""" -An article in an online store blog. -""" -type Article implements Node { - """ - The article's author. - """ - author: ArticleAuthor! @deprecated(reason: "Use `authorV2` instead") - - """ - The article's author. - """ - authorV2: ArticleAuthor - - """ - The blog that the article belongs to. - """ - blog: Blog! - - """ - List of comments posted on the article. - """ - comments( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CommentConnection! - - """ - Stripped content of the article, single line with HTML tags removed. - """ - content( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String! - - """ - The content of the article, complete with HTML formatting. - """ - contentHtml: HTML! - - """ - Stripped excerpt of the article, single line with HTML tags removed. - """ - excerpt( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String - - """ - The excerpt of the article, complete with HTML formatting. - """ - excerptHtml: HTML - - """ - A human-friendly unique string for the Article automatically generated from its title. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The image associated with the article. - """ - image( - """ - Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. - """ - scale: Int = 1 - ): Image - - """ - The date and time when the article was published. - """ - publishedAt: DateTime! - - """ - The article’s SEO information. - """ - seo: SEO - - """ - A categorization that a article can be tagged with. - """ - tags: [String!]! - - """ - The article’s name. - """ - title: String! - - """ - The url pointing to the article accessible from the web. - """ - url: URL! -} - -""" -The author of an article. -""" -type ArticleAuthor { - """ - The author's bio. - """ - bio: String - - """ - The author’s email. - """ - email: String! - - """ - The author's first name. - """ - firstName: String! - - """ - The author's last name. - """ - lastName: String! - - """ - The author's full name. - """ - name: String! -} - -""" -An auto-generated type for paginating through multiple Articles. -""" -type ArticleConnection { - """ - A list of edges. - """ - edges: [ArticleEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Article and a cursor during pagination. -""" -type ArticleEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ArticleEdge. - """ - node: Article! -} - -""" -The set of valid sort keys for the Article query. -""" -enum ArticleSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `blog_title` value. - """ - BLOG_TITLE - - """ - Sort by the `author` value. - """ - AUTHOR - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT - - """ - Sort by the `published_at` value. - """ - PUBLISHED_AT - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -Represents a generic custom attribute. -""" -type Attribute { - """ - Key or name of the attribute. - """ - key: String! - - """ - Value of the attribute. - """ - value: String -} - -""" -Specifies the input fields required for an attribute. -""" -input AttributeInput { - """ - Key or name of the attribute. - """ - key: String! - - """ - Value of the attribute. - """ - value: String! -} - -""" -Automatic discount applications capture the intentions of a discount that was automatically applied. -""" -type AutomaticDiscountApplication implements DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The title of the application. - """ - title: String! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -A collection of available shipping rates for a checkout. -""" -type AvailableShippingRates { - """ - Whether or not the shipping rates are ready. - The `shippingRates` field is `null` when this value is `false`. - This field should be polled until its value becomes `true`. - """ - ready: Boolean! - - """ - The fetched shipping rates. `null` until the `ready` field is `true`. - """ - shippingRates: [ShippingRate!] -} - -""" -An online store blog. -""" -type Blog implements Node { - """ - Find an article by its handle. - """ - articleByHandle( - """ - The handle of the article. - """ - handle: String! - ): Article - - """ - List of the blog's articles. - """ - articles( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ArticleSortKeys = ID - - """ - Supported filter parameters: - - `author` - - `blog_title` - - `created_at` - - `tag` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ArticleConnection! - - """ - The authors who have contributed to the blog. - """ - authors: [ArticleAuthor!]! - - """ - A human-friendly unique string for the Blog automatically generated from its title. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The blog's SEO information. - """ - seo: SEO - - """ - The blogs’s title. - """ - title: String! - - """ - The url pointing to the blog accessible from the web. - """ - url: URL! -} - -""" -An auto-generated type for paginating through multiple Blogs. -""" -type BlogConnection { - """ - A list of edges. - """ - edges: [BlogEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Blog and a cursor during pagination. -""" -type BlogEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of BlogEdge. - """ - node: Blog! -} - -""" -The set of valid sort keys for the Blog query. -""" -enum BlogSortKeys { - """ - Sort by the `handle` value. - """ - HANDLE - - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -Card brand, such as Visa or Mastercard, which can be used for payments. -""" -enum CardBrand { - """ - Visa. - """ - VISA - - """ - Mastercard. - """ - MASTERCARD - - """ - Discover. - """ - DISCOVER - - """ - American Express. - """ - AMERICAN_EXPRESS - - """ - Diners Club. - """ - DINERS_CLUB - - """ - JCB. - """ - JCB -} - -""" -A container for all the information required to checkout items and pay. -""" -type Checkout implements Node { - """ - The gift cards used on the checkout. - """ - appliedGiftCards: [AppliedGiftCard!]! - - """ - The available shipping rates for this Checkout. - Should only be used when checkout `requiresShipping` is `true` and - the shipping address is valid. - """ - availableShippingRates: AvailableShippingRates - - """ - The date and time when the checkout was completed. - """ - completedAt: DateTime - - """ - The date and time when the checkout was created. - """ - createdAt: DateTime! - - """ - The currency code for the Checkout. - """ - currencyCode: CurrencyCode! - - """ - A list of extra information that is added to the checkout. - """ - customAttributes: [Attribute!]! - - """ - The customer associated with the checkout. - """ - customer: Customer - @deprecated( - reason: "This field will always return null. If you have an authentication token for the customer, you can use the `customer` field on the query root to retrieve it." - ) - - """ - Discounts that have been applied on the checkout. - """ - discountApplications( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DiscountApplicationConnection! - - """ - The email attached to this checkout. - """ - email: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - A list of line item objects, each one containing information about an item in the checkout. - """ - lineItems( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CheckoutLineItemConnection! - - """ - The sum of all the prices of all the items in the checkout. Duties, taxes, shipping and discounts excluded. - """ - lineItemsSubtotalPrice: MoneyV2! - - """ - The note associated with the checkout. - """ - note: String - - """ - The resulting order from a paid checkout. - """ - order: Order - - """ - The Order Status Page for this Checkout, null when checkout is not completed. - """ - orderStatusUrl: URL - - """ - The amount left to be paid. This is equal to the cost of the line items, taxes and shipping minus discounts and gift cards. - """ - paymentDue: Money! @deprecated(reason: "Use `paymentDueV2` instead") - - """ - The amount left to be paid. This is equal to the cost of the line items, duties, taxes and shipping minus discounts and gift cards. - """ - paymentDueV2: MoneyV2! - - """ - Whether or not the Checkout is ready and can be completed. Checkouts may - have asynchronous operations that can take time to finish. If you want - to complete a checkout or ensure all the fields are populated and up to - date, polling is required until the value is true. - """ - ready: Boolean! - - """ - States whether or not the fulfillment requires shipping. - """ - requiresShipping: Boolean! - - """ - The shipping address to where the line items will be shipped. - """ - shippingAddress: MailingAddress - - """ - The discounts that have been allocated onto the shipping line by discount applications. - """ - shippingDiscountAllocations: [DiscountAllocation!]! - - """ - Once a shipping rate is selected by the customer it is transitioned to a `shipping_line` object. - """ - shippingLine: ShippingRate - - """ - Price of the checkout before shipping and taxes. - """ - subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceV2` instead") - - """ - Price of the checkout before duties, shipping and taxes. - """ - subtotalPriceV2: MoneyV2! - - """ - Specifies if the Checkout is tax exempt. - """ - taxExempt: Boolean! - - """ - Specifies if taxes are included in the line item and shipping line prices. - """ - taxesIncluded: Boolean! - - """ - The sum of all the prices of all the items in the checkout, taxes and discounts included. - """ - totalPrice: Money! @deprecated(reason: "Use `totalPriceV2` instead") - - """ - The sum of all the prices of all the items in the checkout, duties, taxes and discounts included. - """ - totalPriceV2: MoneyV2! - - """ - The sum of all the taxes applied to the line items and shipping lines in the checkout. - """ - totalTax: Money! @deprecated(reason: "Use `totalTaxV2` instead") - - """ - The sum of all the taxes applied to the line items and shipping lines in the checkout. - """ - totalTaxV2: MoneyV2! - - """ - The date and time when the checkout was last updated. - """ - updatedAt: DateTime! - - """ - The url pointing to the checkout accessible from the web. - """ - webUrl: URL! -} - -""" -Specifies the fields required to update a checkout's attributes. -""" -input CheckoutAttributesUpdateInput { - """ - The text of an optional note that a shop owner can attach to the checkout. - """ - note: String - - """ - A list of extra information that is added to the checkout. - """ - customAttributes: [AttributeInput!] - - """ - Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - The required attributes are city, province, and country. - Full validation of the addresses is still done at complete time. - """ - allowPartialAddresses: Boolean -} - -""" -Return type for `checkoutAttributesUpdate` mutation. -""" -type CheckoutAttributesUpdatePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Specifies the fields required to update a checkout's attributes. -""" -input CheckoutAttributesUpdateV2Input { - """ - The text of an optional note that a shop owner can attach to the checkout. - """ - note: String - - """ - A list of extra information that is added to the checkout. - """ - customAttributes: [AttributeInput!] - - """ - Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - The required attributes are city, province, and country. - Full validation of the addresses is still done at complete time. - """ - allowPartialAddresses: Boolean -} - -""" -Return type for `checkoutAttributesUpdateV2` mutation. -""" -type CheckoutAttributesUpdateV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteFree` mutation. -""" -type CheckoutCompleteFreePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithCreditCard` mutation. -""" -type CheckoutCompleteWithCreditCardPayload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithCreditCardV2` mutation. -""" -type CheckoutCompleteWithCreditCardV2Payload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithTokenizedPayment` mutation. -""" -type CheckoutCompleteWithTokenizedPaymentPayload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithTokenizedPaymentV2` mutation. -""" -type CheckoutCompleteWithTokenizedPaymentV2Payload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithTokenizedPaymentV3` mutation. -""" -type CheckoutCompleteWithTokenizedPaymentV3Payload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Specifies the fields required to create a checkout. -""" -input CheckoutCreateInput { - """ - The email with which the customer wants to checkout. - """ - email: String - - """ - A list of line item objects, each one containing information about an item in the checkout. - """ - lineItems: [CheckoutLineItemInput!] - - """ - The shipping address to where the line items will be shipped. - """ - shippingAddress: MailingAddressInput - - """ - The text of an optional note that a shop owner can attach to the checkout. - """ - note: String - - """ - A list of extra information that is added to the checkout. - """ - customAttributes: [AttributeInput!] - - """ - Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - The required attributes are city, province, and country. - Full validation of addresses is still done at complete time. - """ - allowPartialAddresses: Boolean - - """ - The three-letter currency code of one of the shop's enabled presentment currencies. - Including this field creates a checkout in the specified currency. By default, new - checkouts are created in the shop's primary currency. - """ - presentmentCurrencyCode: CurrencyCode -} - -""" -Return type for `checkoutCreate` mutation. -""" -type CheckoutCreatePayload { - """ - The new checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCustomerAssociate` mutation. -""" -type CheckoutCustomerAssociatePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - The associated customer object. - """ - customer: Customer - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `checkoutCustomerAssociateV2` mutation. -""" -type CheckoutCustomerAssociateV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - The associated customer object. - """ - customer: Customer - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCustomerDisassociate` mutation. -""" -type CheckoutCustomerDisassociatePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCustomerDisassociateV2` mutation. -""" -type CheckoutCustomerDisassociateV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutDiscountCodeApply` mutation. -""" -type CheckoutDiscountCodeApplyPayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutDiscountCodeApplyV2` mutation. -""" -type CheckoutDiscountCodeApplyV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutDiscountCodeRemove` mutation. -""" -type CheckoutDiscountCodeRemovePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutEmailUpdate` mutation. -""" -type CheckoutEmailUpdatePayload { - """ - The checkout object with the updated email. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutEmailUpdateV2` mutation. -""" -type CheckoutEmailUpdateV2Payload { - """ - The checkout object with the updated email. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Possible error codes that could be returned by CheckoutUserError. -""" -enum CheckoutErrorCode { - """ - Input value is blank. - """ - BLANK - - """ - Input value is invalid. - """ - INVALID - - """ - Input value is too long. - """ - TOO_LONG - - """ - Input value is not present. - """ - PRESENT - - """ - Input value should be less than maximum allowed value. - """ - LESS_THAN - - """ - Input value should be greater than or equal to minimum allowed value. - """ - GREATER_THAN_OR_EQUAL_TO - - """ - Input value should be less or equal to maximum allowed value. - """ - LESS_THAN_OR_EQUAL_TO - - """ - Checkout is already completed. - """ - ALREADY_COMPLETED - - """ - Checkout is locked. - """ - LOCKED - - """ - Input value is not supported. - """ - NOT_SUPPORTED - - """ - Input email contains an invalid domain name. - """ - BAD_DOMAIN - - """ - Input Zip is invalid for country provided. - """ - INVALID_FOR_COUNTRY - - """ - Input Zip is invalid for country and province provided. - """ - INVALID_FOR_COUNTRY_AND_PROVINCE - - """ - Invalid state in country. - """ - INVALID_STATE_IN_COUNTRY - - """ - Invalid province in country. - """ - INVALID_PROVINCE_IN_COUNTRY - - """ - Invalid region in country. - """ - INVALID_REGION_IN_COUNTRY - - """ - Shipping rate expired. - """ - SHIPPING_RATE_EXPIRED - - """ - Gift card cannot be applied to a checkout that contains a gift card. - """ - GIFT_CARD_UNUSABLE - - """ - Gift card is disabled. - """ - GIFT_CARD_DISABLED - - """ - Gift card code is invalid. - """ - GIFT_CARD_CODE_INVALID - - """ - Gift card has already been applied. - """ - GIFT_CARD_ALREADY_APPLIED - - """ - Gift card currency does not match checkout currency. - """ - GIFT_CARD_CURRENCY_MISMATCH - - """ - Gift card is expired. - """ - GIFT_CARD_EXPIRED - - """ - Gift card has no funds left. - """ - GIFT_CARD_DEPLETED - - """ - Gift card was not found. - """ - GIFT_CARD_NOT_FOUND - - """ - Cart does not meet discount requirements notice. - """ - CART_DOES_NOT_MEET_DISCOUNT_REQUIREMENTS_NOTICE - - """ - Discount expired. - """ - DISCOUNT_EXPIRED - - """ - Discount disabled. - """ - DISCOUNT_DISABLED - - """ - Discount limit reached. - """ - DISCOUNT_LIMIT_REACHED - - """ - Discount not found. - """ - DISCOUNT_NOT_FOUND - - """ - Customer already used once per customer discount notice. - """ - CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE - - """ - Checkout is already completed. - """ - EMPTY - - """ - Not enough in stock. - """ - NOT_ENOUGH_IN_STOCK - - """ - Missing payment input. - """ - MISSING_PAYMENT_INPUT - - """ - The amount of the payment does not match the value to be paid. - """ - TOTAL_PRICE_MISMATCH - - """ - Line item was not found in checkout. - """ - LINE_ITEM_NOT_FOUND - - """ - Unable to apply discount. - """ - UNABLE_TO_APPLY - - """ - Discount already applied. - """ - DISCOUNT_ALREADY_APPLIED -} - -""" -Return type for `checkoutGiftCardApply` mutation. -""" -type CheckoutGiftCardApplyPayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutGiftCardRemove` mutation. -""" -type CheckoutGiftCardRemovePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutGiftCardRemoveV2` mutation. -""" -type CheckoutGiftCardRemoveV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutGiftCardsAppend` mutation. -""" -type CheckoutGiftCardsAppendPayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -A single line item in the checkout, grouped by variant and attributes. -""" -type CheckoutLineItem implements Node { - """ - Extra information in the form of an array of Key-Value pairs about the line item. - """ - customAttributes: [Attribute!]! - - """ - The discounts that have been allocated onto the checkout line item by discount applications. - """ - discountAllocations: [DiscountAllocation!]! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The quantity of the line item. - """ - quantity: Int! - - """ - Title of the line item. Defaults to the product's title. - """ - title: String! - - """ - Unit price of the line item. - """ - unitPrice: MoneyV2 - - """ - Product variant of the line item. - """ - variant: ProductVariant -} - -""" -An auto-generated type for paginating through multiple CheckoutLineItems. -""" -type CheckoutLineItemConnection { - """ - A list of edges. - """ - edges: [CheckoutLineItemEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one CheckoutLineItem and a cursor during pagination. -""" -type CheckoutLineItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of CheckoutLineItemEdge. - """ - node: CheckoutLineItem! -} - -""" -Specifies the input fields to create a line item on a checkout. -""" -input CheckoutLineItemInput { - """ - Extra information in the form of an array of Key-Value pairs about the line item. - """ - customAttributes: [AttributeInput!] - - """ - The quantity of the line item. - """ - quantity: Int! - - """ - The identifier of the product variant for the line item. - """ - variantId: ID! -} - -""" -Specifies the input fields to update a line item on the checkout. -""" -input CheckoutLineItemUpdateInput { - """ - The identifier of the line item. - """ - id: ID - - """ - The variant identifier of the line item. - """ - variantId: ID - - """ - The quantity of the line item. - """ - quantity: Int - - """ - Extra information in the form of an array of Key-Value pairs about the line item. - """ - customAttributes: [AttributeInput!] -} - -""" -Return type for `checkoutLineItemsAdd` mutation. -""" -type CheckoutLineItemsAddPayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutLineItemsRemove` mutation. -""" -type CheckoutLineItemsRemovePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutLineItemsReplace` mutation. -""" -type CheckoutLineItemsReplacePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [CheckoutUserError!]! -} - -""" -Return type for `checkoutLineItemsUpdate` mutation. -""" -type CheckoutLineItemsUpdatePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutShippingAddressUpdate` mutation. -""" -type CheckoutShippingAddressUpdatePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutShippingAddressUpdateV2` mutation. -""" -type CheckoutShippingAddressUpdateV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutShippingLineUpdate` mutation. -""" -type CheckoutShippingLineUpdatePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Represents an error that happens during execution of a checkout mutation. -""" -type CheckoutUserError implements DisplayableError { - """ - Error code to uniquely identify the error. - """ - code: CheckoutErrorCode - - """ - Path to the input field which caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. -""" -type Collection implements Node { - """ - Stripped description of the collection, single line with HTML tags removed. - """ - description( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String! - - """ - The description of the collection, complete with HTML formatting. - """ - descriptionHtml: HTML! - - """ - A human-friendly unique string for the collection automatically generated from its title. - Limit of 255 characters. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - Image associated with the collection. - """ - image( - """ - Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. - """ - scale: Int = 1 - ): Image - - """ - List of products in the collection. - """ - products( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductCollectionSortKeys = COLLECTION_DEFAULT - ): ProductConnection! - - """ - The collection’s name. Limit of 255 characters. - """ - title: String! - - """ - The date and time when the collection was last modified. - """ - updatedAt: DateTime! -} - -""" -An auto-generated type for paginating through multiple Collections. -""" -type CollectionConnection { - """ - A list of edges. - """ - edges: [CollectionEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Collection and a cursor during pagination. -""" -type CollectionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of CollectionEdge. - """ - node: Collection! -} - -""" -The set of valid sort keys for the Collection query. -""" -enum CollectionSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -A comment on an article. -""" -type Comment implements Node { - """ - The comment’s author. - """ - author: CommentAuthor! - - """ - Stripped content of the comment, single line with HTML tags removed. - """ - content( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String! - - """ - The content of the comment, complete with HTML formatting. - """ - contentHtml: HTML! - - """ - Globally unique identifier. - """ - id: ID! -} - -""" -The author of a comment. -""" -type CommentAuthor { - """ - The author's email. - """ - email: String! - - """ - The author’s name. - """ - name: String! -} - -""" -An auto-generated type for paginating through multiple Comments. -""" -type CommentConnection { - """ - A list of edges. - """ - edges: [CommentEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Comment and a cursor during pagination. -""" -type CommentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of CommentEdge. - """ - node: Comment! -} - -""" -ISO 3166-1 alpha-2 country codes with some differences. -""" -enum CountryCode { - """ - Afghanistan. - """ - AF - - """ - Åland Islands. - """ - AX - - """ - Albania. - """ - AL - - """ - Algeria. - """ - DZ - - """ - Andorra. - """ - AD - - """ - Angola. - """ - AO - - """ - Anguilla. - """ - AI - - """ - Antigua & Barbuda. - """ - AG - - """ - Argentina. - """ - AR - - """ - Armenia. - """ - AM - - """ - Aruba. - """ - AW - - """ - Ascension Island. - """ - AC - - """ - Australia. - """ - AU - - """ - Austria. - """ - AT - - """ - Azerbaijan. - """ - AZ - - """ - Bahamas. - """ - BS - - """ - Bahrain. - """ - BH - - """ - Bangladesh. - """ - BD - - """ - Barbados. - """ - BB - - """ - Belarus. - """ - BY - - """ - Belgium. - """ - BE - - """ - Belize. - """ - BZ - - """ - Benin. - """ - BJ - - """ - Bermuda. - """ - BM - - """ - Bhutan. - """ - BT - - """ - Bolivia. - """ - BO - - """ - Bosnia & Herzegovina. - """ - BA - - """ - Botswana. - """ - BW - - """ - Bouvet Island. - """ - BV - - """ - Brazil. - """ - BR - - """ - British Indian Ocean Territory. - """ - IO - - """ - Brunei. - """ - BN - - """ - Bulgaria. - """ - BG - - """ - Burkina Faso. - """ - BF - - """ - Burundi. - """ - BI - - """ - Cambodia. - """ - KH - - """ - Canada. - """ - CA - - """ - Cape Verde. - """ - CV - - """ - Caribbean Netherlands. - """ - BQ - - """ - Cayman Islands. - """ - KY - - """ - Central African Republic. - """ - CF - - """ - Chad. - """ - TD - - """ - Chile. - """ - CL - - """ - China. - """ - CN - - """ - Christmas Island. - """ - CX - - """ - Cocos (Keeling) Islands. - """ - CC - - """ - Colombia. - """ - CO - - """ - Comoros. - """ - KM - - """ - Congo - Brazzaville. - """ - CG - - """ - Congo - Kinshasa. - """ - CD - - """ - Cook Islands. - """ - CK - - """ - Costa Rica. - """ - CR - - """ - Croatia. - """ - HR - - """ - Cuba. - """ - CU - - """ - Curaçao. - """ - CW - - """ - Cyprus. - """ - CY - - """ - Czechia. - """ - CZ - - """ - Côte d’Ivoire. - """ - CI - - """ - Denmark. - """ - DK - - """ - Djibouti. - """ - DJ - - """ - Dominica. - """ - DM - - """ - Dominican Republic. - """ - DO - - """ - Ecuador. - """ - EC - - """ - Egypt. - """ - EG - - """ - El Salvador. - """ - SV - - """ - Equatorial Guinea. - """ - GQ - - """ - Eritrea. - """ - ER - - """ - Estonia. - """ - EE - - """ - Eswatini. - """ - SZ - - """ - Ethiopia. - """ - ET - - """ - Falkland Islands. - """ - FK - - """ - Faroe Islands. - """ - FO - - """ - Fiji. - """ - FJ - - """ - Finland. - """ - FI - - """ - France. - """ - FR - - """ - French Guiana. - """ - GF - - """ - French Polynesia. - """ - PF - - """ - French Southern Territories. - """ - TF - - """ - Gabon. - """ - GA - - """ - Gambia. - """ - GM - - """ - Georgia. - """ - GE - - """ - Germany. - """ - DE - - """ - Ghana. - """ - GH - - """ - Gibraltar. - """ - GI - - """ - Greece. - """ - GR - - """ - Greenland. - """ - GL - - """ - Grenada. - """ - GD - - """ - Guadeloupe. - """ - GP - - """ - Guatemala. - """ - GT - - """ - Guernsey. - """ - GG - - """ - Guinea. - """ - GN - - """ - Guinea-Bissau. - """ - GW - - """ - Guyana. - """ - GY - - """ - Haiti. - """ - HT - - """ - Heard & McDonald Islands. - """ - HM - - """ - Vatican City. - """ - VA - - """ - Honduras. - """ - HN - - """ - Hong Kong SAR. - """ - HK - - """ - Hungary. - """ - HU - - """ - Iceland. - """ - IS - - """ - India. - """ - IN - - """ - Indonesia. - """ - ID - - """ - Iran. - """ - IR - - """ - Iraq. - """ - IQ - - """ - Ireland. - """ - IE - - """ - Isle of Man. - """ - IM - - """ - Israel. - """ - IL - - """ - Italy. - """ - IT - - """ - Jamaica. - """ - JM - - """ - Japan. - """ - JP - - """ - Jersey. - """ - JE - - """ - Jordan. - """ - JO - - """ - Kazakhstan. - """ - KZ - - """ - Kenya. - """ - KE - - """ - Kiribati. - """ - KI - - """ - North Korea. - """ - KP - - """ - Kosovo. - """ - XK - - """ - Kuwait. - """ - KW - - """ - Kyrgyzstan. - """ - KG - - """ - Laos. - """ - LA - - """ - Latvia. - """ - LV - - """ - Lebanon. - """ - LB - - """ - Lesotho. - """ - LS - - """ - Liberia. - """ - LR - - """ - Libya. - """ - LY - - """ - Liechtenstein. - """ - LI - - """ - Lithuania. - """ - LT - - """ - Luxembourg. - """ - LU - - """ - Macao SAR. - """ - MO - - """ - Madagascar. - """ - MG - - """ - Malawi. - """ - MW - - """ - Malaysia. - """ - MY - - """ - Maldives. - """ - MV - - """ - Mali. - """ - ML - - """ - Malta. - """ - MT - - """ - Martinique. - """ - MQ - - """ - Mauritania. - """ - MR - - """ - Mauritius. - """ - MU - - """ - Mayotte. - """ - YT - - """ - Mexico. - """ - MX - - """ - Moldova. - """ - MD - - """ - Monaco. - """ - MC - - """ - Mongolia. - """ - MN - - """ - Montenegro. - """ - ME - - """ - Montserrat. - """ - MS - - """ - Morocco. - """ - MA - - """ - Mozambique. - """ - MZ - - """ - Myanmar (Burma). - """ - MM - - """ - Namibia. - """ - NA - - """ - Nauru. - """ - NR - - """ - Nepal. - """ - NP - - """ - Netherlands. - """ - NL - - """ - Netherlands Antilles. - """ - AN - - """ - New Caledonia. - """ - NC - - """ - New Zealand. - """ - NZ - - """ - Nicaragua. - """ - NI - - """ - Niger. - """ - NE - - """ - Nigeria. - """ - NG - - """ - Niue. - """ - NU - - """ - Norfolk Island. - """ - NF - - """ - North Macedonia. - """ - MK - - """ - Norway. - """ - NO - - """ - Oman. - """ - OM - - """ - Pakistan. - """ - PK - - """ - Palestinian Territories. - """ - PS - - """ - Panama. - """ - PA - - """ - Papua New Guinea. - """ - PG - - """ - Paraguay. - """ - PY - - """ - Peru. - """ - PE - - """ - Philippines. - """ - PH - - """ - Pitcairn Islands. - """ - PN - - """ - Poland. - """ - PL - - """ - Portugal. - """ - PT - - """ - Qatar. - """ - QA - - """ - Cameroon. - """ - CM - - """ - Réunion. - """ - RE - - """ - Romania. - """ - RO - - """ - Russia. - """ - RU - - """ - Rwanda. - """ - RW - - """ - St. Barthélemy. - """ - BL - - """ - St. Helena. - """ - SH - - """ - St. Kitts & Nevis. - """ - KN - - """ - St. Lucia. - """ - LC - - """ - St. Martin. - """ - MF - - """ - St. Pierre & Miquelon. - """ - PM - - """ - Samoa. - """ - WS - - """ - San Marino. - """ - SM - - """ - São Tomé & Príncipe. - """ - ST - - """ - Saudi Arabia. - """ - SA - - """ - Senegal. - """ - SN - - """ - Serbia. - """ - RS - - """ - Seychelles. - """ - SC - - """ - Sierra Leone. - """ - SL - - """ - Singapore. - """ - SG - - """ - Sint Maarten. - """ - SX - - """ - Slovakia. - """ - SK - - """ - Slovenia. - """ - SI - - """ - Solomon Islands. - """ - SB - - """ - Somalia. - """ - SO - - """ - South Africa. - """ - ZA - - """ - South Georgia & South Sandwich Islands. - """ - GS - - """ - South Korea. - """ - KR - - """ - South Sudan. - """ - SS - - """ - Spain. - """ - ES - - """ - Sri Lanka. - """ - LK - - """ - St. Vincent & Grenadines. - """ - VC - - """ - Sudan. - """ - SD - - """ - Suriname. - """ - SR - - """ - Svalbard & Jan Mayen. - """ - SJ - - """ - Sweden. - """ - SE - - """ - Switzerland. - """ - CH - - """ - Syria. - """ - SY - - """ - Taiwan. - """ - TW - - """ - Tajikistan. - """ - TJ - - """ - Tanzania. - """ - TZ - - """ - Thailand. - """ - TH - - """ - Timor-Leste. - """ - TL - - """ - Togo. - """ - TG - - """ - Tokelau. - """ - TK - - """ - Tonga. - """ - TO - - """ - Trinidad & Tobago. - """ - TT - - """ - Tristan da Cunha. - """ - TA - - """ - Tunisia. - """ - TN - - """ - Turkey. - """ - TR - - """ - Turkmenistan. - """ - TM - - """ - Turks & Caicos Islands. - """ - TC - - """ - Tuvalu. - """ - TV - - """ - Uganda. - """ - UG - - """ - Ukraine. - """ - UA - - """ - United Arab Emirates. - """ - AE - - """ - United Kingdom. - """ - GB - - """ - United States. - """ - US - - """ - U.S. Outlying Islands. - """ - UM - - """ - Uruguay. - """ - UY - - """ - Uzbekistan. - """ - UZ - - """ - Vanuatu. - """ - VU - - """ - Venezuela. - """ - VE - - """ - Vietnam. - """ - VN - - """ - British Virgin Islands. - """ - VG - - """ - Wallis & Futuna. - """ - WF - - """ - Western Sahara. - """ - EH - - """ - Yemen. - """ - YE - - """ - Zambia. - """ - ZM - - """ - Zimbabwe. - """ - ZW -} - -""" -Credit card information used for a payment. -""" -type CreditCard { - """ - The brand of the credit card. - """ - brand: String - - """ - The expiry month of the credit card. - """ - expiryMonth: Int - - """ - The expiry year of the credit card. - """ - expiryYear: Int - - """ - The credit card's BIN number. - """ - firstDigits: String - - """ - The first name of the card holder. - """ - firstName: String - - """ - The last 4 digits of the credit card. - """ - lastDigits: String - - """ - The last name of the card holder. - """ - lastName: String - - """ - The masked credit card number with only the last 4 digits displayed. - """ - maskedNumber: String -} - -""" -Specifies the fields required to complete a checkout with -a Shopify vaulted credit card payment. -""" -input CreditCardPaymentInput { - """ - The amount of the payment. - """ - amount: Money! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - The ID returned by Shopify's Card Vault. - """ - vaultId: String! - - """ - Executes the payment in test mode if possible. Defaults to `false`. - """ - test: Boolean -} - -""" -Specifies the fields required to complete a checkout with -a Shopify vaulted credit card payment. -""" -input CreditCardPaymentInputV2 { - """ - The amount and currency of the payment. - """ - paymentAmount: MoneyInput! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - The ID returned by Shopify's Card Vault. - """ - vaultId: String! - - """ - Executes the payment in test mode if possible. Defaults to `false`. - """ - test: Boolean -} - -""" -The part of the image that should remain after cropping. -""" -enum CropRegion { - """ - Keep the center of the image. - """ - CENTER - - """ - Keep the top of the image. - """ - TOP - - """ - Keep the bottom of the image. - """ - BOTTOM - - """ - Keep the left of the image. - """ - LEFT - - """ - Keep the right of the image. - """ - RIGHT -} - -""" -Currency codes. -""" -enum CurrencyCode { - """ - United States Dollars (USD). - """ - USD - - """ - Euro (EUR). - """ - EUR - - """ - United Kingdom Pounds (GBP). - """ - GBP - - """ - Canadian Dollars (CAD). - """ - CAD - - """ - Afghan Afghani (AFN). - """ - AFN - - """ - Albanian Lek (ALL). - """ - ALL - - """ - Algerian Dinar (DZD). - """ - DZD - - """ - Angolan Kwanza (AOA). - """ - AOA - - """ - Argentine Pesos (ARS). - """ - ARS - - """ - Armenian Dram (AMD). - """ - AMD - - """ - Aruban Florin (AWG). - """ - AWG - - """ - Australian Dollars (AUD). - """ - AUD - - """ - Barbadian Dollar (BBD). - """ - BBD - - """ - Azerbaijani Manat (AZN). - """ - AZN - - """ - Bangladesh Taka (BDT). - """ - BDT - - """ - Bahamian Dollar (BSD). - """ - BSD - - """ - Bahraini Dinar (BHD). - """ - BHD - - """ - Burundian Franc (BIF). - """ - BIF - - """ - Belize Dollar (BZD). - """ - BZD - - """ - Bermudian Dollar (BMD). - """ - BMD - - """ - Bhutanese Ngultrum (BTN). - """ - BTN - - """ - Bosnia and Herzegovina Convertible Mark (BAM). - """ - BAM - - """ - Brazilian Real (BRL). - """ - BRL - - """ - Bolivian Boliviano (BOB). - """ - BOB - - """ - Botswana Pula (BWP). - """ - BWP - - """ - Brunei Dollar (BND). - """ - BND - - """ - Bulgarian Lev (BGN). - """ - BGN - - """ - Burmese Kyat (MMK). - """ - MMK - - """ - Cambodian Riel. - """ - KHR - - """ - Cape Verdean escudo (CVE). - """ - CVE - - """ - Cayman Dollars (KYD). - """ - KYD - - """ - Central African CFA Franc (XAF). - """ - XAF - - """ - Chilean Peso (CLP). - """ - CLP - - """ - Chinese Yuan Renminbi (CNY). - """ - CNY - - """ - Colombian Peso (COP). - """ - COP - - """ - Comorian Franc (KMF). - """ - KMF - - """ - Congolese franc (CDF). - """ - CDF - - """ - Costa Rican Colones (CRC). - """ - CRC - - """ - Croatian Kuna (HRK). - """ - HRK - - """ - Czech Koruny (CZK). - """ - CZK - - """ - Danish Kroner (DKK). - """ - DKK - - """ - Dominican Peso (DOP). - """ - DOP - - """ - East Caribbean Dollar (XCD). - """ - XCD - - """ - Egyptian Pound (EGP). - """ - EGP - - """ - Ethiopian Birr (ETB). - """ - ETB - - """ - CFP Franc (XPF). - """ - XPF - - """ - Fijian Dollars (FJD). - """ - FJD - - """ - Gambian Dalasi (GMD). - """ - GMD - - """ - Ghanaian Cedi (GHS). - """ - GHS - - """ - Guatemalan Quetzal (GTQ). - """ - GTQ - - """ - Guyanese Dollar (GYD). - """ - GYD - - """ - Georgian Lari (GEL). - """ - GEL - - """ - Haitian Gourde (HTG). - """ - HTG - - """ - Honduran Lempira (HNL). - """ - HNL - - """ - Hong Kong Dollars (HKD). - """ - HKD - - """ - Hungarian Forint (HUF). - """ - HUF - - """ - Icelandic Kronur (ISK). - """ - ISK - - """ - Indian Rupees (INR). - """ - INR - - """ - Indonesian Rupiah (IDR). - """ - IDR - - """ - Israeli New Shekel (NIS). - """ - ILS - - """ - Iraqi Dinar (IQD). - """ - IQD - - """ - Jamaican Dollars (JMD). - """ - JMD - - """ - Japanese Yen (JPY). - """ - JPY - - """ - Jersey Pound. - """ - JEP - - """ - Jordanian Dinar (JOD). - """ - JOD - - """ - Kazakhstani Tenge (KZT). - """ - KZT - - """ - Kenyan Shilling (KES). - """ - KES - - """ - Kuwaiti Dinar (KWD). - """ - KWD - - """ - Kyrgyzstani Som (KGS). - """ - KGS - - """ - Laotian Kip (LAK). - """ - LAK - - """ - Latvian Lati (LVL). - """ - LVL - - """ - Lebanese Pounds (LBP). - """ - LBP - - """ - Lesotho Loti (LSL). - """ - LSL - - """ - Liberian Dollar (LRD). - """ - LRD - - """ - Lithuanian Litai (LTL). - """ - LTL - - """ - Malagasy Ariary (MGA). - """ - MGA - - """ - Macedonia Denar (MKD). - """ - MKD - - """ - Macanese Pataca (MOP). - """ - MOP - - """ - Malawian Kwacha (MWK). - """ - MWK - - """ - Maldivian Rufiyaa (MVR). - """ - MVR - - """ - Mexican Pesos (MXN). - """ - MXN - - """ - Malaysian Ringgits (MYR). - """ - MYR - - """ - Mauritian Rupee (MUR). - """ - MUR - - """ - Moldovan Leu (MDL). - """ - MDL - - """ - Moroccan Dirham. - """ - MAD - - """ - Mongolian Tugrik. - """ - MNT - - """ - Mozambican Metical. - """ - MZN - - """ - Namibian Dollar. - """ - NAD - - """ - Nepalese Rupee (NPR). - """ - NPR - - """ - Netherlands Antillean Guilder. - """ - ANG - - """ - New Zealand Dollars (NZD). - """ - NZD - - """ - Nicaraguan Córdoba (NIO). - """ - NIO - - """ - Nigerian Naira (NGN). - """ - NGN - - """ - Norwegian Kroner (NOK). - """ - NOK - - """ - Omani Rial (OMR). - """ - OMR - - """ - Panamian Balboa (PAB). - """ - PAB - - """ - Pakistani Rupee (PKR). - """ - PKR - - """ - Papua New Guinean Kina (PGK). - """ - PGK - - """ - Paraguayan Guarani (PYG). - """ - PYG - - """ - Peruvian Nuevo Sol (PEN). - """ - PEN - - """ - Philippine Peso (PHP). - """ - PHP - - """ - Polish Zlotych (PLN). - """ - PLN - - """ - Qatari Rial (QAR). - """ - QAR - - """ - Romanian Lei (RON). - """ - RON - - """ - Russian Rubles (RUB). - """ - RUB - - """ - Rwandan Franc (RWF). - """ - RWF - - """ - Samoan Tala (WST). - """ - WST - - """ - Saudi Riyal (SAR). - """ - SAR - - """ - Sao Tome And Principe Dobra (STD). - """ - STD - - """ - Serbian dinar (RSD). - """ - RSD - - """ - Seychellois Rupee (SCR). - """ - SCR - - """ - Singapore Dollars (SGD). - """ - SGD - - """ - Sudanese Pound (SDG). - """ - SDG - - """ - Syrian Pound (SYP). - """ - SYP - - """ - South African Rand (ZAR). - """ - ZAR - - """ - South Korean Won (KRW). - """ - KRW - - """ - South Sudanese Pound (SSP). - """ - SSP - - """ - Solomon Islands Dollar (SBD). - """ - SBD - - """ - Sri Lankan Rupees (LKR). - """ - LKR - - """ - Surinamese Dollar (SRD). - """ - SRD - - """ - Swazi Lilangeni (SZL). - """ - SZL - - """ - Swedish Kronor (SEK). - """ - SEK - - """ - Swiss Francs (CHF). - """ - CHF - - """ - Taiwan Dollars (TWD). - """ - TWD - - """ - Thai baht (THB). - """ - THB - - """ - Tanzanian Shilling (TZS). - """ - TZS - - """ - Trinidad and Tobago Dollars (TTD). - """ - TTD - - """ - Tunisian Dinar (TND). - """ - TND - - """ - Turkish Lira (TRY). - """ - TRY - - """ - Turkmenistani Manat (TMT). - """ - TMT - - """ - Ugandan Shilling (UGX). - """ - UGX - - """ - Ukrainian Hryvnia (UAH). - """ - UAH - - """ - United Arab Emirates Dirham (AED). - """ - AED - - """ - Uruguayan Pesos (UYU). - """ - UYU - - """ - Uzbekistan som (UZS). - """ - UZS - - """ - Vanuatu Vatu (VUV). - """ - VUV - - """ - Vietnamese đồng (VND). - """ - VND - - """ - West African CFA franc (XOF). - """ - XOF - - """ - Yemeni Rial (YER). - """ - YER - - """ - Zambian Kwacha (ZMW). - """ - ZMW - - """ - Belarusian Ruble (BYN). - """ - BYN - - """ - Belarusian Ruble (BYR). - """ - BYR - - """ - Djiboutian Franc (DJF). - """ - DJF - - """ - Eritrean Nakfa (ERN). - """ - ERN - - """ - Falkland Islands Pounds (FKP). - """ - FKP - - """ - Gibraltar Pounds (GIP). - """ - GIP - - """ - Guinean Franc (GNF). - """ - GNF - - """ - Iranian Rial (IRR). - """ - IRR - - """ - Kiribati Dollar (KID). - """ - KID - - """ - Libyan Dinar (LYD). - """ - LYD - - """ - Mauritanian Ouguiya (MRU). - """ - MRU - - """ - Sierra Leonean Leone (SLL). - """ - SLL - - """ - Saint Helena Pounds (SHP). - """ - SHP - - """ - Somali Shilling (SOS). - """ - SOS - - """ - Tajikistani Somoni (TJS). - """ - TJS - - """ - Tongan Pa'anga (TOP). - """ - TOP - - """ - Venezuelan Bolivares (VEF). - """ - VEF - - """ - Venezuelan Bolivares (VES). - """ - VES -} - -""" -A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. -""" -type Customer { - """ - Indicates whether the customer has consented to be sent marketing material via email. - """ - acceptsMarketing: Boolean! - - """ - A list of addresses for the customer. - """ - addresses( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MailingAddressConnection! - - """ - The date and time when the customer was created. - """ - createdAt: DateTime! - - """ - The customer’s default address. - """ - defaultAddress: MailingAddress - - """ - The customer’s name, email or phone number. - """ - displayName: String! - - """ - The customer’s email address. - """ - email: String - - """ - The customer’s first name. - """ - firstName: String - - """ - A unique identifier for the customer. - """ - id: ID! - - """ - The customer's most recently updated, incomplete checkout. - """ - lastIncompleteCheckout: Checkout - - """ - The customer’s last name. - """ - lastName: String - - """ - The orders associated with the customer. - """ - orders( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: OrderSortKeys = ID - - """ - Supported filter parameters: - - `processed_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): OrderConnection! - - """ - The customer’s phone number. - """ - phone: String - - """ - A comma separated list of tags that have been added to the customer. - Additional access scope required: unauthenticated_read_customer_tags. - """ - tags: [String!]! - - """ - The date and time when the customer information was updated. - """ - updatedAt: DateTime! -} - -""" -A CustomerAccessToken represents the unique token required to make modifications to the customer object. -""" -type CustomerAccessToken { - """ - The customer’s access token. - """ - accessToken: String! - - """ - The date and time when the customer access token expires. - """ - expiresAt: DateTime! -} - -""" -Specifies the input fields required to create a customer access token. -""" -input CustomerAccessTokenCreateInput { - """ - The email associated to the customer. - """ - email: String! - - """ - The login password to be used by the customer. - """ - password: String! -} - -""" -Return type for `customerAccessTokenCreate` mutation. -""" -type CustomerAccessTokenCreatePayload { - """ - The newly created customer access token object. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerAccessTokenCreateWithMultipass` mutation. -""" -type CustomerAccessTokenCreateWithMultipassPayload { - """ - An access token object associated with the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! -} - -""" -Return type for `customerAccessTokenDelete` mutation. -""" -type CustomerAccessTokenDeletePayload { - """ - The destroyed access token. - """ - deletedAccessToken: String - - """ - ID of the destroyed customer access token. - """ - deletedCustomerAccessTokenId: String - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `customerAccessTokenRenew` mutation. -""" -type CustomerAccessTokenRenewPayload { - """ - The renewed customer access token object. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `customerActivateByUrl` mutation. -""" -type CustomerActivateByUrlPayload { - """ - The customer that was activated. - """ - customer: Customer - - """ - A new customer access token for the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! -} - -""" -Specifies the input fields required to activate a customer. -""" -input CustomerActivateInput { - """ - The activation token required to activate the customer. - """ - activationToken: String! - - """ - New password that will be set during activation. - """ - password: String! -} - -""" -Return type for `customerActivate` mutation. -""" -type CustomerActivatePayload { - """ - The customer object. - """ - customer: Customer - - """ - A newly created customer access token object for the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerAddressCreate` mutation. -""" -type CustomerAddressCreatePayload { - """ - The new customer address object. - """ - customerAddress: MailingAddress - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerAddressDelete` mutation. -""" -type CustomerAddressDeletePayload { - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - ID of the deleted customer address. - """ - deletedCustomerAddressId: String - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerAddressUpdate` mutation. -""" -type CustomerAddressUpdatePayload { - """ - The customer’s updated mailing address. - """ - customerAddress: MailingAddress - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Specifies the fields required to create a new customer. -""" -input CustomerCreateInput { - """ - The customer’s first name. - """ - firstName: String - - """ - The customer’s last name. - """ - lastName: String - - """ - The customer’s email. - """ - email: String! - - """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. - """ - phone: String - - """ - The login password used by the customer. - """ - password: String! - - """ - Indicates whether the customer has consented to be sent marketing material via email. - """ - acceptsMarketing: Boolean -} - -""" -Return type for `customerCreate` mutation. -""" -type CustomerCreatePayload { - """ - The created customer object. - """ - customer: Customer - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerDefaultAddressUpdate` mutation. -""" -type CustomerDefaultAddressUpdatePayload { - """ - The updated customer object. - """ - customer: Customer - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Possible error codes that could be returned by CustomerUserError. -""" -enum CustomerErrorCode { - """ - Input value is blank. - """ - BLANK - - """ - Input value is invalid. - """ - INVALID - - """ - Input value is already taken. - """ - TAKEN - - """ - Input value is too long. - """ - TOO_LONG - - """ - Input value is too short. - """ - TOO_SHORT - - """ - Unidentified customer. - """ - UNIDENTIFIED_CUSTOMER - - """ - Customer is disabled. - """ - CUSTOMER_DISABLED - - """ - Input password starts or ends with whitespace. - """ - PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE - - """ - Input contains HTML tags. - """ - CONTAINS_HTML_TAGS - - """ - Input contains URL. - """ - CONTAINS_URL - - """ - Invalid activation token. - """ - TOKEN_INVALID - - """ - Customer already enabled. - """ - ALREADY_ENABLED - - """ - Address does not exist. - """ - NOT_FOUND - - """ - Input email contains an invalid domain name. - """ - BAD_DOMAIN - - """ - Multipass token is not valid. - """ - INVALID_MULTIPASS_REQUEST -} - -""" -Return type for `customerRecover` mutation. -""" -type CustomerRecoverPayload { - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerResetByUrl` mutation. -""" -type CustomerResetByUrlPayload { - """ - The customer object which was reset. - """ - customer: Customer - - """ - A newly created customer access token object for the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Specifies the fields required to reset a customer’s password. -""" -input CustomerResetInput { - """ - The reset token required to reset the customer’s password. - """ - resetToken: String! - - """ - New password that will be set as part of the reset password process. - """ - password: String! -} - -""" -Return type for `customerReset` mutation. -""" -type CustomerResetPayload { - """ - The customer object which was reset. - """ - customer: Customer - - """ - A newly created customer access token object for the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Specifies the fields required to update the Customer information. -""" -input CustomerUpdateInput { - """ - The customer’s first name. - """ - firstName: String - - """ - The customer’s last name. - """ - lastName: String - - """ - The customer’s email. - """ - email: String - - """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. To remove the phone number, specify `null`. - """ - phone: String - - """ - The login password used by the customer. - """ - password: String - - """ - Indicates whether the customer has consented to be sent marketing material via email. - """ - acceptsMarketing: Boolean -} - -""" -Return type for `customerUpdate` mutation. -""" -type CustomerUpdatePayload { - """ - The updated customer object. - """ - customer: Customer - - """ - The newly created customer access token. If the customer's password is updated, all previous access tokens - (including the one used to perform this mutation) become invalid, and a new token is generated. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Represents an error that happens during execution of a customer mutation. -""" -type CustomerUserError implements DisplayableError { - """ - Error code to uniquely identify the error. - """ - code: CustomerErrorCode - - """ - Path to the input field which caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -An ISO-8601 encoded UTC date time string. Example value: `"2019-07-03T20:47:55Z"`. -""" -scalar DateTime - -""" -A signed decimal number, which supports arbitrary precision and is serialized as a string. Example value: `"29.99"`. -""" -scalar Decimal - -""" -Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. -""" -enum DigitalWallet { - """ - Apple Pay. - """ - APPLE_PAY - - """ - Android Pay. - """ - ANDROID_PAY - - """ - Google Pay. - """ - GOOGLE_PAY - - """ - Shopify Pay. - """ - SHOPIFY_PAY -} - -""" -An amount discounting the line that has been allocated by a discount. -""" -type DiscountAllocation { - """ - Amount of discount allocated. - """ - allocatedAmount: MoneyV2! - - """ - The discount this allocated amount originated from. - """ - discountApplication: DiscountApplication! -} - -""" -Discount applications capture the intentions of a discount source at -the time of application. -""" -interface DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -The method by which the discount's value is allocated onto its entitled lines. -""" -enum DiscountApplicationAllocationMethod { - """ - The value is spread across all entitled lines. - """ - ACROSS - - """ - The value is applied onto every entitled line. - """ - EACH - - """ - The value is specifically applied onto a particular line. - """ - ONE -} - -""" -An auto-generated type for paginating through multiple DiscountApplications. -""" -type DiscountApplicationConnection { - """ - A list of edges. - """ - edges: [DiscountApplicationEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one DiscountApplication and a cursor during pagination. -""" -type DiscountApplicationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of DiscountApplicationEdge. - """ - node: DiscountApplication! -} - -""" -Which lines on the order that the discount is allocated over, of the type -defined by the Discount Application's target_type. -""" -enum DiscountApplicationTargetSelection { - """ - The discount is allocated onto all the lines. - """ - ALL - - """ - The discount is allocated onto only the lines it is entitled for. - """ - ENTITLED - - """ - The discount is allocated onto explicitly chosen lines. - """ - EXPLICIT -} - -""" -The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. -""" -enum DiscountApplicationTargetType { - """ - The discount applies onto line items. - """ - LINE_ITEM - - """ - The discount applies onto shipping lines. - """ - SHIPPING_LINE -} - -""" -Discount code applications capture the intentions of a discount code at -the time that it is applied. -""" -type DiscountCodeApplication implements DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - Specifies whether the discount code was applied successfully. - """ - applicable: Boolean! - - """ - The string identifying the discount code that was used at the time of application. - """ - code: String! - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -Represents an error in the input of a mutation. -""" -interface DisplayableError { - """ - Path to the input field which caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -Represents a web address. -""" -type Domain { - """ - The host name of the domain (eg: `example.com`). - """ - host: String! - - """ - Whether SSL is enabled or not. - """ - sslEnabled: Boolean! - - """ - The URL of the domain (eg: `https://example.com`). - """ - url: URL! -} - -""" -Represents a video hosted outside of Shopify. -""" -type ExternalVideo implements Node & Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - The URL. - """ - embeddedUrl: URL! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image -} - -""" -Represents a single fulfillment in an order. -""" -type Fulfillment { - """ - List of the fulfillment's line items. - """ - fulfillmentLineItems( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): FulfillmentLineItemConnection! - - """ - The name of the tracking company. - """ - trackingCompany: String - - """ - Tracking information associated with the fulfillment, - such as the tracking number and tracking URL. - """ - trackingInfo( - """ - Truncate the array result to this size. - """ - first: Int - ): [FulfillmentTrackingInfo!]! -} - -""" -Represents a single line item in a fulfillment. There is at most one fulfillment line item for each order line item. -""" -type FulfillmentLineItem { - """ - The associated order's line item. - """ - lineItem: OrderLineItem! - - """ - The amount fulfilled in this fulfillment. - """ - quantity: Int! -} - -""" -An auto-generated type for paginating through multiple FulfillmentLineItems. -""" -type FulfillmentLineItemConnection { - """ - A list of edges. - """ - edges: [FulfillmentLineItemEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. -""" -type FulfillmentLineItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of FulfillmentLineItemEdge. - """ - node: FulfillmentLineItem! -} - -""" -Tracking information associated with the fulfillment. -""" -type FulfillmentTrackingInfo { - """ - The tracking number of the fulfillment. - """ - number: String - - """ - The URL to track the fulfillment. - """ - url: URL -} - -""" -A string containing HTML code. Example value: `"

Grey cotton knit sweater.

"`. -""" -scalar HTML - -""" -Represents information about the metafields associated to the specified resource. -""" -interface HasMetafields { - """ - The metafield associated with the resource. - """ - metafield( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String! - - """ - Identifier for the metafield (maximum of 30 characters). - """ - key: String! - ): Metafield - - """ - A paginated list of metafields associated with the resource. - """ - metafields( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! -} - -""" -Represents an image resource. -""" -type Image { - """ - A word or phrase to share the nature or contents of an image. - """ - altText: String - - """ - The original height of the image in pixels. Returns `null` if the image is not hosted by Shopify. - """ - height: Int - - """ - A unique identifier for the image. - """ - id: ID - - """ - The location of the original image as a URL. - - If there are any existing transformations in the original source URL, they will remain and not be stripped. - """ - originalSrc: URL! - - """ - The location of the image as a URL. - """ - src: URL! - @deprecated( - reason: "Previously an image had a single `src` field. This could either return the original image\nlocation or a URL that contained transformations such as sizing or scale.\n\nThese transformations were specified by arguments on the parent field.\n\nNow an image has two distinct URL fields: `originalSrc` and `transformedSrc`.\n\n* `originalSrc` - the original unmodified image URL\n* `transformedSrc` - the image URL with the specified transformations included\n\nTo migrate to the new fields, image transformations should be moved from the parent field to `transformedSrc`.\n\nBefore:\n```graphql\n{\n shop {\n productImages(maxWidth: 200, scale: 2) {\n edges {\n node {\n src\n }\n }\n }\n }\n}\n```\n\nAfter:\n```graphql\n{\n shop {\n productImages {\n edges {\n node {\n transformedSrc(maxWidth: 200, scale: 2)\n }\n }\n }\n }\n}\n```\n" - ) - - """ - The location of the transformed image as a URL. - - All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. - Otherwise any transformations which an image type does not support will be ignored. - """ - transformedSrc( - """ - Image width in pixels between 1 and 5760. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 5760. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. - """ - scale: Int = 1 - - """ - Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported). - """ - preferredContentType: ImageContentType - ): URL! - - """ - The original width of the image in pixels. Returns `null` if the image is not hosted by Shopify. - """ - width: Int -} - -""" -An auto-generated type for paginating through multiple Images. -""" -type ImageConnection { - """ - A list of edges. - """ - edges: [ImageEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -List of supported image content types. -""" -enum ImageContentType { - """ - A PNG image. - """ - PNG - - """ - A JPG image. - """ - JPG - - """ - A WEBP image. - """ - WEBP -} - -""" -An auto-generated type which holds one Image and a cursor during pagination. -""" -type ImageEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ImageEdge. - """ - node: Image! -} - -""" -Represents a mailing address for customers and shipping. -""" -type MailingAddress implements Node { - """ - The first line of the address. Typically the street address or PO Box number. - """ - address1: String - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - address2: String - - """ - The name of the city, district, village, or town. - """ - city: String - - """ - The name of the customer's company or organization. - """ - company: String - - """ - The name of the country. - """ - country: String - - """ - The two-letter code for the country of the address. - - For example, US. - """ - countryCode: String @deprecated(reason: "Use `countryCodeV2` instead") - - """ - The two-letter code for the country of the address. - - For example, US. - """ - countryCodeV2: CountryCode - - """ - The first name of the customer. - """ - firstName: String - - """ - A formatted version of the address, customized by the provided arguments. - """ - formatted( - """ - Whether to include the customer's name in the formatted address. - """ - withName: Boolean = false - - """ - Whether to include the customer's company in the formatted address. - """ - withCompany: Boolean = true - ): [String!]! - - """ - A comma-separated list of the values for city, province, and country. - """ - formattedArea: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The last name of the customer. - """ - lastName: String - - """ - The latitude coordinate of the customer address. - """ - latitude: Float - - """ - The longitude coordinate of the customer address. - """ - longitude: Float - - """ - The full name of the customer, based on firstName and lastName. - """ - name: String - - """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. - """ - phone: String - - """ - The region of the address, such as the province, state, or district. - """ - province: String - - """ - The two-letter code for the region. - - For example, ON. - """ - provinceCode: String - - """ - The zip or postal code of the address. - """ - zip: String -} - -""" -An auto-generated type for paginating through multiple MailingAddresses. -""" -type MailingAddressConnection { - """ - A list of edges. - """ - edges: [MailingAddressEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one MailingAddress and a cursor during pagination. -""" -type MailingAddressEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of MailingAddressEdge. - """ - node: MailingAddress! -} - -""" -Specifies the fields accepted to create or update a mailing address. -""" -input MailingAddressInput { - """ - The first line of the address. Typically the street address or PO Box number. - """ - address1: String - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - address2: String - - """ - The name of the city, district, village, or town. - """ - city: String - - """ - The name of the customer's company or organization. - """ - company: String - - """ - The name of the country. - """ - country: String - - """ - The first name of the customer. - """ - firstName: String - - """ - The last name of the customer. - """ - lastName: String - - """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. - """ - phone: String - - """ - The region of the address, such as the province, state, or district. - """ - province: String - - """ - The zip or postal code of the address. - """ - zip: String -} - -""" -Manual discount applications capture the intentions of a discount that was manually created. -""" -type ManualDiscountApplication implements DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - The description of the application. - """ - description: String - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The title of the application. - """ - title: String! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -Represents a media interface. -""" -interface Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image -} - -""" -An auto-generated type for paginating through multiple Media. -""" -type MediaConnection { - """ - A list of edges. - """ - edges: [MediaEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -The possible content types for a media object. -""" -enum MediaContentType { - """ - An externally hosted video. - """ - EXTERNAL_VIDEO - - """ - A Shopify hosted image. - """ - IMAGE - - """ - A 3d model. - """ - MODEL_3D - - """ - A Shopify hosted video. - """ - VIDEO -} - -""" -An auto-generated type which holds one Media and a cursor during pagination. -""" -type MediaEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of MediaEdge. - """ - node: Media! -} - -""" -Represents a Shopify hosted image. -""" -type MediaImage implements Node & Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The image for the media. - """ - image: Image - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image -} - -""" -Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are -comprised of keys, values, and value types. -""" -type Metafield implements Node { - """ - The date and time when the storefront metafield was created. - """ - createdAt: DateTime! - - """ - The description of a metafield. - """ - description: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The key name for a metafield. - """ - key: String! - - """ - The namespace for a metafield. - """ - namespace: String! - - """ - The parent object that the metafield belongs to. - """ - parentResource: MetafieldParentResource! - - """ - The date and time when the storefront metafield was updated. - """ - updatedAt: DateTime! - - """ - The value of a metafield. - """ - value: String! - - """ - Represents the metafield value type. - """ - valueType: MetafieldValueType! -} - -""" -An auto-generated type for paginating through multiple Metafields. -""" -type MetafieldConnection { - """ - A list of edges. - """ - edges: [MetafieldEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Metafield and a cursor during pagination. -""" -type MetafieldEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of MetafieldEdge. - """ - node: Metafield! -} - -""" -A resource that the metafield belongs to. -""" -union MetafieldParentResource = Product | ProductVariant - -""" -Metafield value types. -""" -enum MetafieldValueType { - """ - A string metafield. - """ - STRING - - """ - An integer metafield. - """ - INTEGER - - """ - A json string metafield. - """ - JSON_STRING -} - -""" -Represents a Shopify hosted 3D model. -""" -type Model3d implements Node & Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image - - """ - The sources for a 3d model. - """ - sources: [Model3dSource!]! -} - -""" -Represents a source for a Shopify hosted 3d model. -""" -type Model3dSource { - """ - The filesize of the 3d model. - """ - filesize: Int! - - """ - The format of the 3d model. - """ - format: String! - - """ - The MIME type of the 3d model. - """ - mimeType: String! - - """ - The URL of the 3d model. - """ - url: String! -} - -""" -A monetary value string. Example value: `"100.57"`. -""" -scalar Money - -""" -Specifies the fields for a monetary value with currency. -""" -input MoneyInput { - """ - Decimal money amount. - """ - amount: Decimal! - - """ - Currency of the money. - """ - currencyCode: CurrencyCode! -} - -""" -A monetary value with currency. - -To format currencies, combine this type's amount and currencyCode fields with your client's locale. - -For example, in JavaScript you could use Intl.NumberFormat: - -```js -new Intl.NumberFormat(locale, { - style: 'currency', - currency: currencyCode -}).format(amount); -``` - -Other formatting libraries include: - -* iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter) -* Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html) -* PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php) - -For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations -(such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)). -""" -type MoneyV2 { - """ - Decimal money amount. - """ - amount: Decimal! - - """ - Currency of the money. - """ - currencyCode: CurrencyCode! -} - -""" -An auto-generated type for paginating through multiple MoneyV2s. -""" -type MoneyV2Connection { - """ - A list of edges. - """ - edges: [MoneyV2Edge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one MoneyV2 and a cursor during pagination. -""" -type MoneyV2Edge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of MoneyV2Edge. - """ - node: MoneyV2! -} - -""" -The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. -""" -type Mutation { - """ - Updates the attributes of a checkout. - """ - checkoutAttributesUpdate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The fields used to update a checkout's attributes. - """ - input: CheckoutAttributesUpdateInput! - ): CheckoutAttributesUpdatePayload - @deprecated(reason: "Use `checkoutAttributesUpdateV2` instead") - - """ - Updates the attributes of a checkout. - """ - checkoutAttributesUpdateV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The checkout attributes to update. - """ - input: CheckoutAttributesUpdateV2Input! - ): CheckoutAttributesUpdateV2Payload - - """ - Completes a checkout without providing payment information. You can use this mutation for free items or items whose purchase price is covered by a gift card. - """ - checkoutCompleteFree( - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutCompleteFreePayload - - """ - Completes a checkout using a credit card token from Shopify's Vault. - """ - checkoutCompleteWithCreditCard( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The credit card info to apply as a payment. - """ - payment: CreditCardPaymentInput! - ): CheckoutCompleteWithCreditCardPayload - @deprecated(reason: "Use `checkoutCompleteWithCreditCardV2` instead") - - """ - Completes a checkout using a credit card token from Shopify's card vault. Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, you need to [_request payment processing_](https://help.shopify.com/api/guides/sales-channel-sdk/getting-started#request-payment-processing). - """ - checkoutCompleteWithCreditCardV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The credit card info to apply as a payment. - """ - payment: CreditCardPaymentInputV2! - ): CheckoutCompleteWithCreditCardV2Payload - - """ - Completes a checkout with a tokenized payment. - """ - checkoutCompleteWithTokenizedPayment( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The info to apply as a tokenized payment. - """ - payment: TokenizedPaymentInput! - ): CheckoutCompleteWithTokenizedPaymentPayload - @deprecated(reason: "Use `checkoutCompleteWithTokenizedPaymentV2` instead") - - """ - Completes a checkout with a tokenized payment. - """ - checkoutCompleteWithTokenizedPaymentV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The info to apply as a tokenized payment. - """ - payment: TokenizedPaymentInputV2! - ): CheckoutCompleteWithTokenizedPaymentV2Payload - @deprecated(reason: "Use `checkoutCompleteWithTokenizedPaymentV3` instead") - - """ - Completes a checkout with a tokenized payment. - """ - checkoutCompleteWithTokenizedPaymentV3( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The info to apply as a tokenized payment. - """ - payment: TokenizedPaymentInputV3! - ): CheckoutCompleteWithTokenizedPaymentV3Payload - - """ - Creates a new checkout. - """ - checkoutCreate( - """ - The fields used to create a checkout. - """ - input: CheckoutCreateInput! - ): CheckoutCreatePayload - - """ - Associates a customer to the checkout. - """ - checkoutCustomerAssociate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The customer access token of the customer to associate. - """ - customerAccessToken: String! - ): CheckoutCustomerAssociatePayload - @deprecated(reason: "Use `checkoutCustomerAssociateV2` instead") - - """ - Associates a customer to the checkout. - """ - checkoutCustomerAssociateV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The customer access token of the customer to associate. - """ - customerAccessToken: String! - ): CheckoutCustomerAssociateV2Payload - - """ - Disassociates the current checkout customer from the checkout. - """ - checkoutCustomerDisassociate( - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutCustomerDisassociatePayload - @deprecated(reason: "Use `checkoutCustomerDisassociateV2` instead") - - """ - Disassociates the current checkout customer from the checkout. - """ - checkoutCustomerDisassociateV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutCustomerDisassociateV2Payload - - """ - Applies a discount to an existing checkout using a discount code. - """ - checkoutDiscountCodeApply( - """ - The discount code to apply to the checkout. - """ - discountCode: String! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutDiscountCodeApplyPayload - @deprecated(reason: "Use `checkoutDiscountCodeApplyV2` instead") - - """ - Applies a discount to an existing checkout using a discount code. - """ - checkoutDiscountCodeApplyV2( - """ - The discount code to apply to the checkout. - """ - discountCode: String! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutDiscountCodeApplyV2Payload - - """ - Removes the applied discount from an existing checkout. - """ - checkoutDiscountCodeRemove( - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutDiscountCodeRemovePayload - - """ - Updates the email on an existing checkout. - """ - checkoutEmailUpdate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The email to update the checkout with. - """ - email: String! - ): CheckoutEmailUpdatePayload - @deprecated(reason: "Use `checkoutEmailUpdateV2` instead") - - """ - Updates the email on an existing checkout. - """ - checkoutEmailUpdateV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The email to update the checkout with. - """ - email: String! - ): CheckoutEmailUpdateV2Payload - - """ - Applies a gift card to an existing checkout using a gift card code. This will replace all currently applied gift cards. - """ - checkoutGiftCardApply( - """ - The code of the gift card to apply on the checkout. - """ - giftCardCode: String! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutGiftCardApplyPayload - @deprecated(reason: "Use `checkoutGiftCardsAppend` instead") - - """ - Removes an applied gift card from the checkout. - """ - checkoutGiftCardRemove( - """ - The ID of the Applied Gift Card to remove from the Checkout. - """ - appliedGiftCardId: ID! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutGiftCardRemovePayload - @deprecated(reason: "Use `checkoutGiftCardRemoveV2` instead") - - """ - Removes an applied gift card from the checkout. - """ - checkoutGiftCardRemoveV2( - """ - The ID of the Applied Gift Card to remove from the Checkout. - """ - appliedGiftCardId: ID! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutGiftCardRemoveV2Payload - - """ - Appends gift cards to an existing checkout. - """ - checkoutGiftCardsAppend( - """ - A list of gift card codes to append to the checkout. - """ - giftCardCodes: [String!]! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutGiftCardsAppendPayload - - """ - Adds a list of line items to a checkout. - """ - checkoutLineItemsAdd( - """ - A list of line item objects to add to the checkout. - """ - lineItems: [CheckoutLineItemInput!]! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutLineItemsAddPayload - - """ - Removes line items from an existing checkout. - """ - checkoutLineItemsRemove( - """ - The checkout on which to remove line items. - """ - checkoutId: ID! - - """ - Line item ids to remove. - """ - lineItemIds: [ID!]! - ): CheckoutLineItemsRemovePayload - - """ - Sets a list of line items to a checkout. - """ - checkoutLineItemsReplace( - """ - A list of line item objects to set on the checkout. - """ - lineItems: [CheckoutLineItemInput!]! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutLineItemsReplacePayload - - """ - Updates line items on a checkout. - """ - checkoutLineItemsUpdate( - """ - The checkout on which to update line items. - """ - checkoutId: ID! - - """ - Line items to update. - """ - lineItems: [CheckoutLineItemUpdateInput!]! - ): CheckoutLineItemsUpdatePayload - - """ - Updates the shipping address of an existing checkout. - """ - checkoutShippingAddressUpdate( - """ - The shipping address to where the line items will be shipped. - """ - shippingAddress: MailingAddressInput! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutShippingAddressUpdatePayload - @deprecated(reason: "Use `checkoutShippingAddressUpdateV2` instead") - - """ - Updates the shipping address of an existing checkout. - """ - checkoutShippingAddressUpdateV2( - """ - The shipping address to where the line items will be shipped. - """ - shippingAddress: MailingAddressInput! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutShippingAddressUpdateV2Payload - - """ - Updates the shipping lines on an existing checkout. - """ - checkoutShippingLineUpdate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - A unique identifier to a Checkout’s shipping provider, price, and title combination, enabling the customer to select the availableShippingRates. - """ - shippingRateHandle: String! - ): CheckoutShippingLineUpdatePayload - - """ - Creates a customer access token. - The customer access token is required to modify the customer object in any way. - """ - customerAccessTokenCreate( - """ - The fields used to create a customer access token. - """ - input: CustomerAccessTokenCreateInput! - ): CustomerAccessTokenCreatePayload - - """ - Creates a customer access token using a multipass token instead of email and password. - A customer record is created if customer does not exist. If a customer record already - exists but the record is disabled, then it's enabled. - """ - customerAccessTokenCreateWithMultipass( - """ - A valid multipass token to be authenticated. - """ - multipassToken: String! - ): CustomerAccessTokenCreateWithMultipassPayload - - """ - Permanently destroys a customer access token. - """ - customerAccessTokenDelete( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - ): CustomerAccessTokenDeletePayload - - """ - Renews a customer access token. - - Access token renewal must happen *before* a token expires. - If a token has already expired, a new one should be created instead via `customerAccessTokenCreate`. - """ - customerAccessTokenRenew( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - ): CustomerAccessTokenRenewPayload - - """ - Activates a customer. - """ - customerActivate( - """ - Specifies the customer to activate. - """ - id: ID! - - """ - The fields used to activate a customer. - """ - input: CustomerActivateInput! - ): CustomerActivatePayload - - """ - Activates a customer with the activation url received from `customerCreate`. - """ - customerActivateByUrl( - """ - The customer activation URL. - """ - activationUrl: URL! - - """ - A new password set during activation. - """ - password: String! - ): CustomerActivateByUrlPayload - - """ - Creates a new address for a customer. - """ - customerAddressCreate( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - - """ - The customer mailing address to create. - """ - address: MailingAddressInput! - ): CustomerAddressCreatePayload - - """ - Permanently deletes the address of an existing customer. - """ - customerAddressDelete( - """ - Specifies the address to delete. - """ - id: ID! - - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - ): CustomerAddressDeletePayload - - """ - Updates the address of an existing customer. - """ - customerAddressUpdate( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - - """ - Specifies the customer address to update. - """ - id: ID! - - """ - The customer’s mailing address. - """ - address: MailingAddressInput! - ): CustomerAddressUpdatePayload - - """ - Creates a new customer. - """ - customerCreate( - """ - The fields used to create a new customer. - """ - input: CustomerCreateInput! - ): CustomerCreatePayload - - """ - Updates the default address of an existing customer. - """ - customerDefaultAddressUpdate( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - - """ - ID of the address to set as the new default for the customer. - """ - addressId: ID! - ): CustomerDefaultAddressUpdatePayload - - """ - Sends a reset password email to the customer, as the first step in the reset password process. - """ - customerRecover( - """ - The email address of the customer to recover. - """ - email: String! - ): CustomerRecoverPayload - - """ - Resets a customer’s password with a token received from `CustomerRecover`. - """ - customerReset( - """ - Specifies the customer to reset. - """ - id: ID! - - """ - The fields used to reset a customer’s password. - """ - input: CustomerResetInput! - ): CustomerResetPayload - - """ - Resets a customer’s password with the reset password url received from `CustomerRecover`. - """ - customerResetByUrl( - """ - The customer's reset password url. - """ - resetUrl: URL! - - """ - New password that will be set as part of the reset password process. - """ - password: String! - ): CustomerResetByUrlPayload - - """ - Updates an existing customer. - """ - customerUpdate( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - - """ - The customer object input. - """ - customer: CustomerUpdateInput! - ): CustomerUpdatePayload -} - -""" -An object with an ID to support global identification. -""" -interface Node { - """ - Globally unique identifier. - """ - id: ID! -} - -""" -An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. -""" -type Order implements Node { - """ - The reason for the order's cancellation. Returns `null` if the order wasn't canceled. - """ - cancelReason: OrderCancelReason - - """ - The date and time when the order was canceled. Returns null if the order wasn't canceled. - """ - canceledAt: DateTime - - """ - The code of the currency used for the payment. - """ - currencyCode: CurrencyCode! - - """ - The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes are not included unless the order is a taxes-included order. - """ - currentSubtotalPrice: MoneyV2! - - """ - The total amount of the order, including duties, taxes and discounts, minus amounts for line items that have been removed. - """ - currentTotalPrice: MoneyV2! - - """ - The total of all taxes applied to the order, excluding taxes for returned line items. - """ - currentTotalTax: MoneyV2! - - """ - The locale code in which this specific order happened. - """ - customerLocale: String - - """ - The unique URL that the customer can use to access the order. - """ - customerUrl: URL - - """ - Discounts that have been applied on the order. - """ - discountApplications( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DiscountApplicationConnection! - - """ - Whether the order has had any edits applied or not. - """ - edited: Boolean! - - """ - The customer's email address. - """ - email: String - - """ - The financial status of the order. - """ - financialStatus: OrderFinancialStatus - - """ - The fulfillment status for the order. - """ - fulfillmentStatus: OrderFulfillmentStatus! - - """ - Globally unique identifier. - """ - id: ID! - - """ - List of the order’s line items. - """ - lineItems( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): OrderLineItemConnection! - - """ - Unique identifier for the order that appears on the order. - For example, _#1000_ or _Store1001. - """ - name: String! - - """ - A unique numeric identifier for the order for use by shop owner and customer. - """ - orderNumber: Int! - - """ - The total price of the order before any applied edits. - """ - originalTotalPrice: MoneyV2! - - """ - The customer's phone number for receiving SMS notifications. - """ - phone: String - - """ - The date and time when the order was imported. - This value can be set to dates in the past when importing from other systems. - If no value is provided, it will be auto-generated based on current date and time. - """ - processedAt: DateTime! - - """ - The address to where the order will be shipped. - """ - shippingAddress: MailingAddress - - """ - The discounts that have been allocated onto the shipping line by discount applications. - """ - shippingDiscountAllocations: [DiscountAllocation!]! - - """ - The unique URL for the order's status page. - """ - statusUrl: URL! - - """ - Price of the order before shipping and taxes. - """ - subtotalPrice: Money @deprecated(reason: "Use `subtotalPriceV2` instead") - - """ - Price of the order before duties, shipping and taxes. - """ - subtotalPriceV2: MoneyV2 - - """ - List of the order’s successful fulfillments. - """ - successfulFulfillments( - """ - Truncate the array result to this size. - """ - first: Int - ): [Fulfillment!] - - """ - The sum of all the prices of all the items in the order, taxes and discounts included (must be positive). - """ - totalPrice: Money! @deprecated(reason: "Use `totalPriceV2` instead") - - """ - The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). - """ - totalPriceV2: MoneyV2! - - """ - The total amount that has been refunded. - """ - totalRefunded: Money! @deprecated(reason: "Use `totalRefundedV2` instead") - - """ - The total amount that has been refunded. - """ - totalRefundedV2: MoneyV2! - - """ - The total cost of shipping. - """ - totalShippingPrice: Money! - @deprecated(reason: "Use `totalShippingPriceV2` instead") - - """ - The total cost of shipping. - """ - totalShippingPriceV2: MoneyV2! - - """ - The total cost of taxes. - """ - totalTax: Money @deprecated(reason: "Use `totalTaxV2` instead") - - """ - The total cost of taxes. - """ - totalTaxV2: MoneyV2 -} - -""" -Represents the reason for the order's cancellation. -""" -enum OrderCancelReason { - """ - The customer wanted to cancel the order. - """ - CUSTOMER - - """ - The order was fraudulent. - """ - FRAUD - - """ - There was insufficient inventory. - """ - INVENTORY - - """ - Payment was declined. - """ - DECLINED - - """ - The order was canceled for an unlisted reason. - """ - OTHER -} - -""" -An auto-generated type for paginating through multiple Orders. -""" -type OrderConnection { - """ - A list of edges. - """ - edges: [OrderEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Order and a cursor during pagination. -""" -type OrderEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of OrderEdge. - """ - node: Order! -} - -""" -Represents the order's current financial status. -""" -enum OrderFinancialStatus { - """ - Displayed as **Pending**. - """ - PENDING - - """ - Displayed as **Authorized**. - """ - AUTHORIZED - - """ - Displayed as **Partially paid**. - """ - PARTIALLY_PAID - - """ - Displayed as **Partially refunded**. - """ - PARTIALLY_REFUNDED - - """ - Displayed as **Voided**. - """ - VOIDED - - """ - Displayed as **Paid**. - """ - PAID - - """ - Displayed as **Refunded**. - """ - REFUNDED -} - -""" -Represents the order's current fulfillment status. -""" -enum OrderFulfillmentStatus { - """ - Displayed as **Unfulfilled**. - """ - UNFULFILLED - - """ - Displayed as **Partially fulfilled**. - """ - PARTIALLY_FULFILLED - - """ - Displayed as **Fulfilled**. - """ - FULFILLED - - """ - Displayed as **Restocked**. - """ - RESTOCKED - - """ - Displayed as **Pending fulfillment**. - """ - PENDING_FULFILLMENT - - """ - Displayed as **Open**. - """ - OPEN - - """ - Displayed as **In progress**. - """ - IN_PROGRESS - - """ - Displayed as **Scheduled**. - """ - SCHEDULED -} - -""" -Represents a single line in an order. There is one line item for each distinct product variant. -""" -type OrderLineItem { - """ - The number of entries associated to the line item minus the items that have been removed. - """ - currentQuantity: Int! - - """ - List of custom attributes associated to the line item. - """ - customAttributes: [Attribute!]! - - """ - The discounts that have been allocated onto the order line item by discount applications. - """ - discountAllocations: [DiscountAllocation!]! - - """ - The total price of the line item, including discounts, and displayed in the presentment currency. - """ - discountedTotalPrice: MoneyV2! - - """ - The total price of the line item, not including any discounts. The total price is calculated using the original unit price multiplied by the quantity, and it is displayed in the presentment currency. - """ - originalTotalPrice: MoneyV2! - - """ - The number of products variants associated to the line item. - """ - quantity: Int! - - """ - The title of the product combined with title of the variant. - """ - title: String! - - """ - The product variant object associated to the line item. - """ - variant: ProductVariant -} - -""" -An auto-generated type for paginating through multiple OrderLineItems. -""" -type OrderLineItemConnection { - """ - A list of edges. - """ - edges: [OrderLineItemEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one OrderLineItem and a cursor during pagination. -""" -type OrderLineItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of OrderLineItemEdge. - """ - node: OrderLineItem! -} - -""" -The set of valid sort keys for the Order query. -""" -enum OrderSortKeys { - """ - Sort by the `processed_at` value. - """ - PROCESSED_AT - - """ - Sort by the `total_price` value. - """ - TOTAL_PRICE - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -Shopify merchants can create pages to hold static HTML content. Each Page object represents a custom page on the online store. -""" -type Page implements Node { - """ - The description of the page, complete with HTML formatting. - """ - body: HTML! - - """ - Summary of the page body. - """ - bodySummary: String! - - """ - The timestamp of the page creation. - """ - createdAt: DateTime! - - """ - A human-friendly unique string for the page automatically generated from its title. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The page's SEO information. - """ - seo: SEO - - """ - The title of the page. - """ - title: String! - - """ - The timestamp of the latest page update. - """ - updatedAt: DateTime! - - """ - The url pointing to the page accessible from the web. - """ - url: URL! -} - -""" -An auto-generated type for paginating through multiple Pages. -""" -type PageConnection { - """ - A list of edges. - """ - edges: [PageEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Page and a cursor during pagination. -""" -type PageEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of PageEdge. - """ - node: Page! -} - -""" -Information about pagination in a connection. -""" -type PageInfo { - """ - Indicates if there are more pages to fetch. - """ - hasNextPage: Boolean! - - """ - Indicates if there are any pages prior to the current page. - """ - hasPreviousPage: Boolean! -} - -""" -The set of valid sort keys for the Page query. -""" -enum PageSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -A payment applied to a checkout. -""" -type Payment implements Node { - """ - The amount of the payment. - """ - amount: Money! @deprecated(reason: "Use `amountV2` instead") - - """ - The amount of the payment. - """ - amountV2: MoneyV2! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddress - - """ - The checkout to which the payment belongs. - """ - checkout: Checkout! - - """ - The credit card used for the payment in the case of direct payments. - """ - creditCard: CreditCard - - """ - A message describing a processing error during asynchronous processing. - """ - errorMessage: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - A client-side generated token to identify a payment and perform idempotent operations. - For more information, refer to - [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). - """ - idempotencyKey: String - - """ - The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. - """ - nextActionUrl: URL - - """ - Whether or not the payment is still processing asynchronously. - """ - ready: Boolean! - - """ - A flag to indicate if the payment is to be done in test mode for gateways that support it. - """ - test: Boolean! - - """ - The actual transaction recorded by Shopify after having processed the payment with the gateway. - """ - transaction: Transaction -} - -""" -Settings related to payments. -""" -type PaymentSettings { - """ - List of the card brands which the shop accepts. - """ - acceptedCardBrands: [CardBrand!]! - - """ - The url pointing to the endpoint to vault credit cards. - """ - cardVaultUrl: URL! - - """ - The country where the shop is located. - """ - countryCode: CountryCode! - - """ - The three-letter code for the shop's primary currency. - """ - currencyCode: CurrencyCode! - - """ - A list of enabled currencies (ISO 4217 format) that the shop accepts. Merchants can enable currencies from their Shopify Payments settings in the Shopify admin. - """ - enabledPresentmentCurrencies: [CurrencyCode!]! - - """ - The shop’s Shopify Payments account id. - """ - shopifyPaymentsAccountId: String - - """ - List of the digital wallets which the shop supports. - """ - supportedDigitalWallets: [DigitalWallet!]! -} - -""" -The valid values for the types of payment token. -""" -enum PaymentTokenType { - """ - Apple Pay token type. - """ - APPLE_PAY - - """ - Vault payment token type. - """ - VAULT - - """ - Shopify Pay token type. - """ - SHOPIFY_PAY - - """ - Google Pay token type. - """ - GOOGLE_PAY -} - -""" -The value of the percentage pricing object. -""" -type PricingPercentageValue { - """ - The percentage value of the object. - """ - percentage: Float! -} - -""" -The price value (fixed or percentage) for a discount application. -""" -union PricingValue = MoneyV2 | PricingPercentageValue - -""" -A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. -For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). -""" -type Product implements Node & HasMetafields { - """ - Indicates if at least one product variant is available for sale. - """ - availableForSale: Boolean! - - """ - List of collections a product belongs to. - """ - collections( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CollectionConnection! - - """ - The compare at price of the product across all variants. - """ - compareAtPriceRange: ProductPriceRange! - - """ - The date and time when the product was created. - """ - createdAt: DateTime! - - """ - Stripped description of the product, single line with HTML tags removed. - """ - description( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String! - - """ - The description of the product, complete with HTML formatting. - """ - descriptionHtml: HTML! - - """ - A human-friendly unique string for the Product automatically generated from its title. - They are used by the Liquid templating language to refer to objects. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - List of images associated with the product. - """ - images( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductImageSortKeys = POSITION - - """ - Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. - """ - scale: Int = 1 - ): ImageConnection! - - """ - The media associated with the product. - """ - media( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductMediaSortKeys = POSITION - ): MediaConnection! - - """ - The metafield associated with the resource. - """ - metafield( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String! - - """ - Identifier for the metafield (maximum of 30 characters). - """ - key: String! - ): Metafield - - """ - A paginated list of metafields associated with the resource. - """ - metafields( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The online store URL for the product. - A value of `null` indicates that the product is not published to the Online Store sales channel. - """ - onlineStoreUrl: URL - - """ - List of product options. - """ - options( - """ - Truncate the array result to this size. - """ - first: Int - ): [ProductOption!]! - - """ - List of price ranges in the presentment currencies for this shop. - """ - presentmentPriceRanges( - """ - Specifies the presentment currencies to return a price range in. - """ - presentmentCurrencies: [CurrencyCode!] - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductPriceRangeConnection! - - """ - The price range. - """ - priceRange: ProductPriceRange! - - """ - A categorization that a product can be tagged with, commonly used for filtering and searching. - """ - productType: String! - - """ - The date and time when the product was published to the channel. - """ - publishedAt: DateTime! - - """ - The product's SEO information. - """ - seo: SEO! - - """ - A comma separated list of tags that have been added to the product. - Additional access scope required for private apps: unauthenticated_read_product_tags. - """ - tags: [String!]! - - """ - The product’s title. - """ - title: String! - - """ - The total quantity of inventory in stock for this Product. - """ - totalInventory: Int - - """ - The date and time when the product was last modified. - A product's `updatedAt` value can change for different reasons. For example, if an order - is placed for a product that has inventory tracking set up, then the inventory adjustment - is counted as an update. - """ - updatedAt: DateTime! - - """ - Find a product’s variant based on its selected options. - This is useful for converting a user’s selection of product options into a single matching variant. - If there is not a variant for the selected options, `null` will be returned. - """ - variantBySelectedOptions( - """ - The input fields used for a selected option. - """ - selectedOptions: [SelectedOptionInput!]! - ): ProductVariant - - """ - List of the product’s variants. - """ - variants( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductVariantSortKeys = POSITION - ): ProductVariantConnection! - - """ - The product’s vendor name. - """ - vendor: String! -} - -""" -The set of valid sort keys for the ProductCollection query. -""" -enum ProductCollectionSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `price` value. - """ - PRICE - - """ - Sort by the `best-selling` value. - """ - BEST_SELLING - - """ - Sort by the `created` value. - """ - CREATED - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `manual` value. - """ - MANUAL - - """ - Sort by the `collection-default` value. - """ - COLLECTION_DEFAULT - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -An auto-generated type for paginating through multiple Products. -""" -type ProductConnection { - """ - A list of edges. - """ - edges: [ProductEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Product and a cursor during pagination. -""" -type ProductEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ProductEdge. - """ - node: Product! -} - -""" -The set of valid sort keys for the ProductImage query. -""" -enum ProductImageSortKeys { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `position` value. - """ - POSITION - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -The set of valid sort keys for the ProductMedia query. -""" -enum ProductMediaSortKeys { - """ - Sort by the `position` value. - """ - POSITION - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -Product property names like "Size", "Color", and "Material" that the customers can select. -Variants are selected based on permutations of these options. -255 characters limit each. -""" -type ProductOption implements Node { - """ - Globally unique identifier. - """ - id: ID! - - """ - The product option’s name. - """ - name: String! - - """ - The corresponding value to the product option name. - """ - values: [String!]! -} - -""" -The price range of the product. -""" -type ProductPriceRange { - """ - The highest variant's price. - """ - maxVariantPrice: MoneyV2! - - """ - The lowest variant's price. - """ - minVariantPrice: MoneyV2! -} - -""" -An auto-generated type for paginating through multiple ProductPriceRanges. -""" -type ProductPriceRangeConnection { - """ - A list of edges. - """ - edges: [ProductPriceRangeEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one ProductPriceRange and a cursor during pagination. -""" -type ProductPriceRangeEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ProductPriceRangeEdge. - """ - node: ProductPriceRange! -} - -""" -The set of valid sort keys for the Product query. -""" -enum ProductSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `product_type` value. - """ - PRODUCT_TYPE - - """ - Sort by the `vendor` value. - """ - VENDOR - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT - - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `best_selling` value. - """ - BEST_SELLING - - """ - Sort by the `price` value. - """ - PRICE - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -A product variant represents a different version of a product, such as differing sizes or differing colors. -""" -type ProductVariant implements Node & HasMetafields { - """ - Indicates if the product variant is in stock. - """ - available: Boolean @deprecated(reason: "Use `availableForSale` instead") - - """ - Indicates if the product variant is available for sale. - """ - availableForSale: Boolean! - - """ - The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPrice` is higher than `price`. - """ - compareAtPrice: Money @deprecated(reason: "Use `compareAtPriceV2` instead") - - """ - The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPriceV2` is higher than `priceV2`. - """ - compareAtPriceV2: MoneyV2 - - """ - Whether a product is out of stock but still available for purchase (used for backorders). - """ - currentlyNotInStock: Boolean! - - """ - Globally unique identifier. - """ - id: ID! - - """ - Image associated with the product variant. This field falls back to the product image if no image is available. - """ - image( - """ - Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. - """ - scale: Int = 1 - ): Image - - """ - The metafield associated with the resource. - """ - metafield( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String! - - """ - Identifier for the metafield (maximum of 30 characters). - """ - key: String! - ): Metafield - - """ - A paginated list of metafields associated with the resource. - """ - metafields( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - List of prices and compare-at prices in the presentment currencies for this shop. - """ - presentmentPrices( - """ - The presentment currencies prices should return in. - """ - presentmentCurrencies: [CurrencyCode!] - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantPricePairConnection! - - """ - List of unit prices in the presentment currencies for this shop. - """ - presentmentUnitPrices( - """ - Specify the currencies in which to return presentment unit prices. - """ - presentmentCurrencies: [CurrencyCode!] - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MoneyV2Connection! - - """ - The product variant’s price. - """ - price: Money! @deprecated(reason: "Use `priceV2` instead") - - """ - The product variant’s price. - """ - priceV2: MoneyV2! - - """ - The product object that the product variant belongs to. - """ - product: Product! - - """ - The total sellable quantity of the variant for online sales channels. - """ - quantityAvailable: Int - - """ - Whether a customer needs to provide a shipping address when placing an order for the product variant. - """ - requiresShipping: Boolean! - - """ - List of product options applied to the variant. - """ - selectedOptions: [SelectedOption!]! - - """ - The SKU (stock keeping unit) associated with the variant. - """ - sku: String - - """ - The product variant’s title. - """ - title: String! - - """ - The unit price value for the variant based on the variant's measurement. - """ - unitPrice: MoneyV2 - - """ - The unit price measurement for the variant. - """ - unitPriceMeasurement: UnitPriceMeasurement - - """ - The weight of the product variant in the unit system specified with `weight_unit`. - """ - weight: Float - - """ - Unit of measurement for weight. - """ - weightUnit: WeightUnit! -} - -""" -An auto-generated type for paginating through multiple ProductVariants. -""" -type ProductVariantConnection { - """ - A list of edges. - """ - edges: [ProductVariantEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one ProductVariant and a cursor during pagination. -""" -type ProductVariantEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ProductVariantEdge. - """ - node: ProductVariant! -} - -""" -The compare-at price and price of a variant sharing a currency. -""" -type ProductVariantPricePair { - """ - The compare-at price of the variant with associated currency. - """ - compareAtPrice: MoneyV2 - - """ - The price of the variant with associated currency. - """ - price: MoneyV2! -} - -""" -An auto-generated type for paginating through multiple ProductVariantPricePairs. -""" -type ProductVariantPricePairConnection { - """ - A list of edges. - """ - edges: [ProductVariantPricePairEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. -""" -type ProductVariantPricePairEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ProductVariantPricePairEdge. - """ - node: ProductVariantPricePair! -} - -""" -The set of valid sort keys for the ProductVariant query. -""" -enum ProductVariantSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `sku` value. - """ - SKU - - """ - Sort by the `position` value. - """ - POSITION - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. -""" -type QueryRoot { - """ - List of the shop's articles. - """ - articles( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ArticleSortKeys = ID - - """ - Supported filter parameters: - - `author` - - `blog_title` - - `created_at` - - `tag` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ArticleConnection! - - """ - Find a blog by its handle. - """ - blogByHandle( - """ - The handle of the blog. - """ - handle: String! - ): Blog - - """ - List of the shop's blogs. - """ - blogs( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: BlogSortKeys = ID - - """ - Supported filter parameters: - - `created_at` - - `handle` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): BlogConnection! - - """ - Find a collection by its handle. - """ - collectionByHandle( - """ - The handle of the collection. - """ - handle: String! - ): Collection - - """ - List of the shop’s collections. - """ - collections( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CollectionSortKeys = ID - - """ - Supported filter parameters: - - `collection_type` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): CollectionConnection! - - """ - Find a customer by its access token. - """ - customer( - """ - The customer access token. - """ - customerAccessToken: String! - ): Customer - - """ - Returns a specific node by ID. - """ - node( - """ - The ID of the Node to return. - """ - id: ID! - ): Node - - """ - Returns the list of nodes with the given IDs. - """ - nodes( - """ - The IDs of the Nodes to return. - """ - ids: [ID!]! - ): [Node]! - - """ - Find a page by its handle. - """ - pageByHandle( - """ - The handle of the page. - """ - handle: String! - ): Page - - """ - List of the shop's pages. - """ - pages( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: PageSortKeys = ID - - """ - Supported filter parameters: - - `created_at` - - `handle` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): PageConnection! - - """ - Find a product by its handle. - """ - productByHandle( - """ - The handle of the product. - """ - handle: String! - ): Product - - """ - Find recommended products related to a given `product_id`. - To learn more about how recommendations are generated, see - [*Showing product recommendations on product pages*](https://help.shopify.com/themes/development/recommended-products). - """ - productRecommendations( - """ - The id of the product. - """ - productId: ID! - ): [Product!] - - """ - Tags added to products. - Additional access scope required: unauthenticated_read_product_tags. - """ - productTags( - """ - Returns up to the first `n` elements from the list. - """ - first: Int! - ): StringConnection! - - """ - List of product types for the shop's products that are published to your app. - """ - productTypes( - """ - Returns up to the first `n` elements from the list. - """ - first: Int! - ): StringConnection! - - """ - List of the shop’s products. - """ - products( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductSortKeys = ID - - """ - Supported filter parameters: - - `available_for_sale` - - `created_at` - - `product_type` - - `tag` - - `title` - - `updated_at` - - `variants.price` - - `vendor` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ProductConnection! - - """ - The list of public Storefront API versions, including supported, release candidate and unstable versions. - """ - publicApiVersions: [ApiVersion!]! - - """ - The shop associated with the storefront access token. - """ - shop: Shop! -} - -""" -SEO information. -""" -type SEO { - """ - The meta description. - """ - description: String - - """ - The SEO title. - """ - title: String -} - -""" -Script discount applications capture the intentions of a discount that -was created by a Shopify Script. -""" -type ScriptDiscountApplication implements DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - The description of the application as defined by the Script. - """ - description: String! @deprecated(reason: "Use `title` instead") - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The title of the application as defined by the Script. - """ - title: String! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -Properties used by customers to select a product variant. -Products can have multiple options, like different sizes or colors. -""" -type SelectedOption { - """ - The product option’s name. - """ - name: String! - - """ - The product option’s value. - """ - value: String! -} - -""" -Specifies the input fields required for a selected option. -""" -input SelectedOptionInput { - """ - The product option’s name. - """ - name: String! - - """ - The product option’s value. - """ - value: String! -} - -""" -A shipping rate to be applied to a checkout. -""" -type ShippingRate { - """ - Human-readable unique identifier for this shipping rate. - """ - handle: String! - - """ - Price of this shipping rate. - """ - price: Money! @deprecated(reason: "Use `priceV2` instead") - - """ - Price of this shipping rate. - """ - priceV2: MoneyV2! - - """ - Title of this shipping rate. - """ - title: String! -} - -""" -Shop represents a collection of the general settings and information about the shop. -""" -type Shop { - """ - List of the shop' articles. - """ - articles( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ArticleSortKeys = ID - - """ - Supported filter parameters: - - `author` - - `blog_title` - - `created_at` - - `tag` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ArticleConnection! @deprecated(reason: "Use `QueryRoot.articles` instead.") - - """ - List of the shop' blogs. - """ - blogs( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: BlogSortKeys = ID - - """ - Supported filter parameters: - - `created_at` - - `handle` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): BlogConnection! @deprecated(reason: "Use `QueryRoot.blogs` instead.") - - """ - Find a collection by its handle. - """ - collectionByHandle( - """ - The handle of the collection. - """ - handle: String! - ): Collection - @deprecated(reason: "Use `QueryRoot.collectionByHandle` instead.") - - """ - List of the shop’s collections. - """ - collections( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CollectionSortKeys = ID - - """ - Supported filter parameters: - - `collection_type` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): CollectionConnection! - @deprecated(reason: "Use `QueryRoot.collections` instead.") - - """ - The three-letter code for the currency that the shop accepts. - """ - currencyCode: CurrencyCode! - @deprecated(reason: "Use `paymentSettings` instead") - - """ - A description of the shop. - """ - description: String - - """ - A string representing the way currency is formatted when the currency isn’t specified. - """ - moneyFormat: String! - - """ - The shop’s name. - """ - name: String! - - """ - Settings related to payments. - """ - paymentSettings: PaymentSettings! - - """ - The shop’s primary domain. - """ - primaryDomain: Domain! - - """ - The shop’s privacy policy. - """ - privacyPolicy: ShopPolicy - - """ - Find a product by its handle. - """ - productByHandle( - """ - The handle of the product. - """ - handle: String! - ): Product @deprecated(reason: "Use `QueryRoot.productByHandle` instead.") - - """ - A list of tags that have been added to products. - Additional access scope required: unauthenticated_read_product_tags. - """ - productTags( - """ - Returns up to the first `n` elements from the list. - """ - first: Int! - ): StringConnection! - @deprecated(reason: "Use `QueryRoot.productTags` instead.") - - """ - List of the shop’s product types. - """ - productTypes( - """ - Returns up to the first `n` elements from the list. - """ - first: Int! - ): StringConnection! - @deprecated(reason: "Use `QueryRoot.productTypes` instead.") - - """ - List of the shop’s products. - """ - products( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductSortKeys = ID - - """ - Supported filter parameters: - - `available_for_sale` - - `created_at` - - `product_type` - - `tag` - - `title` - - `updated_at` - - `variants.price` - - `vendor` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ProductConnection! @deprecated(reason: "Use `QueryRoot.products` instead.") - - """ - The shop’s refund policy. - """ - refundPolicy: ShopPolicy - - """ - The shop’s shipping policy. - """ - shippingPolicy: ShopPolicy - - """ - Countries that the shop ships to. - """ - shipsToCountries: [CountryCode!]! - - """ - The shop’s Shopify Payments account id. - """ - shopifyPaymentsAccountId: String - @deprecated(reason: "Use `paymentSettings` instead") - - """ - The shop’s terms of service. - """ - termsOfService: ShopPolicy -} - -""" -Policy that a merchant has configured for their store, such as their refund or privacy policy. -""" -type ShopPolicy implements Node { - """ - Policy text, maximum size of 64kb. - """ - body: String! - - """ - Policy’s handle. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - Policy’s title. - """ - title: String! - - """ - Public URL to the policy. - """ - url: URL! -} - -""" -An auto-generated type for paginating through multiple Strings. -""" -type StringConnection { - """ - A list of edges. - """ - edges: [StringEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one String and a cursor during pagination. -""" -type StringEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of StringEdge. - """ - node: String! -} - -""" -Specifies the fields required to complete a checkout with -a tokenized payment. -""" -input TokenizedPaymentInput { - """ - The amount of the payment. - """ - amount: Money! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - The type of payment token. - """ - type: String! - - """ - A simple string or JSON containing the required payment data for the tokenized payment. - """ - paymentData: String! - - """ - Executes the payment in test mode if possible. Defaults to `false`. - """ - test: Boolean - - """ - Public Hash Key used for AndroidPay payments only. - """ - identifier: String -} - -""" -Specifies the fields required to complete a checkout with -a tokenized payment. -""" -input TokenizedPaymentInputV2 { - """ - The amount and currency of the payment. - """ - paymentAmount: MoneyInput! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - A simple string or JSON containing the required payment data for the tokenized payment. - """ - paymentData: String! - - """ - Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. - """ - test: Boolean - - """ - Public Hash Key used for AndroidPay payments only. - """ - identifier: String - - """ - The type of payment token. - """ - type: String! -} - -""" -Specifies the fields required to complete a checkout with -a tokenized payment. -""" -input TokenizedPaymentInputV3 { - """ - The amount and currency of the payment. - """ - paymentAmount: MoneyInput! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/concepts/about-apis/idempotent-requests). - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - A simple string or JSON containing the required payment data for the tokenized payment. - """ - paymentData: String! - - """ - Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. - """ - test: Boolean - - """ - Public Hash Key used for AndroidPay payments only. - """ - identifier: String - - """ - The type of payment token. - """ - type: PaymentTokenType! -} - -""" -An object representing exchange of money for a product or service. -""" -type Transaction { - """ - The amount of money that the transaction was for. - """ - amount: Money! @deprecated(reason: "Use `amountV2` instead") - - """ - The amount of money that the transaction was for. - """ - amountV2: MoneyV2! - - """ - The kind of the transaction. - """ - kind: TransactionKind! - - """ - The status of the transaction. - """ - status: TransactionStatus! @deprecated(reason: "Use `statusV2` instead") - - """ - The status of the transaction. - """ - statusV2: TransactionStatus - - """ - Whether the transaction was done in test mode or not. - """ - test: Boolean! -} - -""" -The different kinds of order transactions. -""" -enum TransactionKind { - """ - An authorization and capture performed together in a single step. - """ - SALE - - """ - A transfer of the money that was reserved during the authorization stage. - """ - CAPTURE - - """ - An amount reserved against the cardholder's funding source. - Money does not change hands until the authorization is captured. - """ - AUTHORIZATION - - """ - An authorization for a payment taken with an EMV credit card reader. - """ - EMV_AUTHORIZATION - - """ - Money returned to the customer when they have paid too much. - """ - CHANGE -} - -""" -Transaction statuses describe the status of a transaction. -""" -enum TransactionStatus { - """ - The transaction is pending. - """ - PENDING - - """ - The transaction succeeded. - """ - SUCCESS - - """ - The transaction failed. - """ - FAILURE - - """ - There was an error while processing the transaction. - """ - ERROR -} - -""" -An RFC 3986 and RFC 3987 compliant URI string. - -Example value: `"https://johns-apparel.myshopify.com"`. -""" -scalar URL - -""" -The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). -""" -type UnitPriceMeasurement { - """ - The type of unit of measurement for the unit price measurement. - """ - measuredType: UnitPriceMeasurementMeasuredType - - """ - The quantity unit for the unit price measurement. - """ - quantityUnit: UnitPriceMeasurementMeasuredUnit - - """ - The quantity value for the unit price measurement. - """ - quantityValue: Float! - - """ - The reference unit for the unit price measurement. - """ - referenceUnit: UnitPriceMeasurementMeasuredUnit - - """ - The reference value for the unit price measurement. - """ - referenceValue: Int! -} - -""" -The accepted types of unit of measurement. -""" -enum UnitPriceMeasurementMeasuredType { - """ - Unit of measurements representing volumes. - """ - VOLUME - - """ - Unit of measurements representing weights. - """ - WEIGHT - - """ - Unit of measurements representing lengths. - """ - LENGTH - - """ - Unit of measurements representing areas. - """ - AREA -} - -""" -The valid units of measurement for a unit price measurement. -""" -enum UnitPriceMeasurementMeasuredUnit { - """ - 1000 milliliters equals 1 liter. - """ - ML - - """ - 100 centiliters equals 1 liter. - """ - CL - - """ - Metric system unit of volume. - """ - L - - """ - 1 cubic meter equals 1000 liters. - """ - M3 - - """ - 1000 milligrams equals 1 gram. - """ - MG - - """ - Metric system unit of weight. - """ - G - - """ - 1 kilogram equals 1000 grams. - """ - KG - - """ - 1000 millimeters equals 1 meter. - """ - MM - - """ - 100 centimeters equals 1 meter. - """ - CM - - """ - Metric system unit of length. - """ - M - - """ - Metric system unit of area. - """ - M2 -} - -""" -Represents an error in the input of a mutation. -""" -type UserError implements DisplayableError { - """ - Path to the input field which caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -Represents a Shopify hosted video. -""" -type Video implements Node & Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image - - """ - The sources for a video. - """ - sources: [VideoSource!]! -} - -""" -Represents a source for a Shopify hosted video. -""" -type VideoSource { - """ - The format of the video source. - """ - format: String! - - """ - The height of the video. - """ - height: Int! - - """ - The video MIME type. - """ - mimeType: String! - - """ - The URL of the video. - """ - url: String! - - """ - The width of the video. - """ - width: Int! -} - -""" -Units of measurement for weight. -""" -enum WeightUnit { - """ - 1 kilogram equals 1000 grams. - """ - KILOGRAMS - - """ - Metric system unit of mass. - """ - GRAMS - - """ - 1 pound equals 16 ounces. - """ - POUNDS - - """ - Imperial system unit of mass. - """ - OUNCES -} diff --git a/framework/shopify/types/cart.ts b/framework/shopify/types/cart.ts deleted file mode 100644 index 09410740a..000000000 --- a/framework/shopify/types/cart.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as Core from '@commerce/types/cart' - -export * from '@commerce/types/cart' - -export type ShopifyCart = {} - -/** - * Extend core cart types - */ - -export type Cart = Core.Cart & { - lineItems: Core.LineItem[] - url?: string -} - -export type CartTypes = Core.CartTypes - -export type CartHooks = Core.CartHooks - -export type GetCartHook = CartHooks['getCart'] -export type AddItemHook = CartHooks['addItem'] -export type UpdateItemHook = CartHooks['updateItem'] -export type RemoveItemHook = CartHooks['removeItem'] - -export type CartSchema = Core.CartSchema - -export type CartHandlers = Core.CartHandlers - -export type GetCartHandler = CartHandlers['getCart'] -export type AddItemHandler = CartHandlers['addItem'] -export type UpdateItemHandler = CartHandlers['updateItem'] -export type RemoveItemHandler = CartHandlers['removeItem'] diff --git a/framework/shopify/types/checkout.ts b/framework/shopify/types/checkout.ts deleted file mode 100644 index 4e2412ef6..000000000 --- a/framework/shopify/types/checkout.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/checkout' diff --git a/framework/shopify/types/common.ts b/framework/shopify/types/common.ts deleted file mode 100644 index b52c33a4d..000000000 --- a/framework/shopify/types/common.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/common' diff --git a/framework/shopify/types/customer.ts b/framework/shopify/types/customer.ts deleted file mode 100644 index 427bc0b03..000000000 --- a/framework/shopify/types/customer.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as Core from '@commerce/types/customer' - -export * from '@commerce/types/customer' - -export type CustomerSchema = Core.CustomerSchema diff --git a/framework/shopify/types/index.ts b/framework/shopify/types/index.ts deleted file mode 100644 index 7ab0b7f64..000000000 --- a/framework/shopify/types/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as Cart from './cart' -import * as Checkout from './checkout' -import * as Common from './common' -import * as Customer from './customer' -import * as Login from './login' -import * as Logout from './logout' -import * as Page from './page' -import * as Product from './product' -import * as Signup from './signup' -import * as Site from './site' -import * as Wishlist from './wishlist' - -export type { - Cart, - Checkout, - Common, - Customer, - Login, - Logout, - Page, - Product, - Signup, - Site, - Wishlist, -} diff --git a/framework/shopify/types/login.ts b/framework/shopify/types/login.ts deleted file mode 100644 index 964ac89e2..000000000 --- a/framework/shopify/types/login.ts +++ /dev/null @@ -1,8 +0,0 @@ -import * as Core from '@commerce/types/login' -import type { CustomerAccessTokenCreateInput } from '../schema' - -export * from '@commerce/types/login' - -export type LoginOperation = Core.LoginOperation & { - variables: CustomerAccessTokenCreateInput -} diff --git a/framework/shopify/types/logout.ts b/framework/shopify/types/logout.ts deleted file mode 100644 index 9f0a466af..000000000 --- a/framework/shopify/types/logout.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/logout' diff --git a/framework/shopify/types/page.ts b/framework/shopify/types/page.ts deleted file mode 100644 index 2bccfade2..000000000 --- a/framework/shopify/types/page.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as Core from '@commerce/types/page' -export * from '@commerce/types/page' - -export type Page = Core.Page - -export type PageTypes = { - page: Page -} - -export type GetAllPagesOperation = Core.GetAllPagesOperation -export type GetPageOperation = Core.GetPageOperation diff --git a/framework/shopify/types/product.ts b/framework/shopify/types/product.ts deleted file mode 100644 index c776d58fa..000000000 --- a/framework/shopify/types/product.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/product' diff --git a/framework/shopify/types/signup.ts b/framework/shopify/types/signup.ts deleted file mode 100644 index 58543c6f6..000000000 --- a/framework/shopify/types/signup.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/signup' diff --git a/framework/shopify/types/site.ts b/framework/shopify/types/site.ts deleted file mode 100644 index bfef69cf9..000000000 --- a/framework/shopify/types/site.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/site' diff --git a/framework/shopify/types/wishlist.ts b/framework/shopify/types/wishlist.ts deleted file mode 100644 index 8907fbf82..000000000 --- a/framework/shopify/types/wishlist.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/wishlist' diff --git a/framework/shopify/utils/checkout-create.ts b/framework/shopify/utils/checkout-create.ts deleted file mode 100644 index 359d16315..000000000 --- a/framework/shopify/utils/checkout-create.ts +++ /dev/null @@ -1,33 +0,0 @@ -import Cookies from 'js-cookie' - -import { - SHOPIFY_CHECKOUT_ID_COOKIE, - SHOPIFY_CHECKOUT_URL_COOKIE, - SHOPIFY_COOKIE_EXPIRE, -} from '../const' - -import checkoutCreateMutation from './mutations/checkout-create' -import { CheckoutCreatePayload } from '../schema' - -export const checkoutCreate = async ( - fetch: any -): Promise => { - const data = await fetch({ - query: checkoutCreateMutation, - }) - - const checkout = data.checkoutCreate?.checkout - const checkoutId = checkout?.id - - if (checkoutId) { - const options = { - expires: SHOPIFY_COOKIE_EXPIRE, - } - Cookies.set(SHOPIFY_CHECKOUT_ID_COOKIE, checkoutId, options) - Cookies.set(SHOPIFY_CHECKOUT_URL_COOKIE, checkout.webUrl, options) - } - - return checkout -} - -export default checkoutCreate diff --git a/framework/shopify/utils/checkout-to-cart.ts b/framework/shopify/utils/checkout-to-cart.ts deleted file mode 100644 index e2531cc78..000000000 --- a/framework/shopify/utils/checkout-to-cart.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { Cart } from '../types/cart' -import { CommerceError } from '@commerce/utils/errors' - -import { - CheckoutLineItemsAddPayload, - CheckoutLineItemsRemovePayload, - CheckoutLineItemsUpdatePayload, - CheckoutCreatePayload, - CheckoutUserError, - Checkout, - Maybe, -} from '../schema' - -import { normalizeCart } from './normalize' -import throwUserErrors from './throw-user-errors' - -export type CheckoutQuery = { - checkout: Checkout - checkoutUserErrors?: Array -} - -export type CheckoutPayload = - | CheckoutLineItemsAddPayload - | CheckoutLineItemsUpdatePayload - | CheckoutLineItemsRemovePayload - | CheckoutCreatePayload - | CheckoutQuery - -const checkoutToCart = (checkoutPayload?: Maybe): Cart => { - const checkout = checkoutPayload?.checkout - throwUserErrors(checkoutPayload?.checkoutUserErrors) - - if (!checkout) { - throw new CommerceError({ - message: 'Missing checkout object from response', - }) - } - - return normalizeCart(checkout) -} - -export default checkoutToCart diff --git a/framework/shopify/utils/customer-token.ts b/framework/shopify/utils/customer-token.ts deleted file mode 100644 index 85454cb83..000000000 --- a/framework/shopify/utils/customer-token.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Cookies, { CookieAttributes } from 'js-cookie' -import { SHOPIFY_COOKIE_EXPIRE, SHOPIFY_CUSTOMER_TOKEN_COOKIE } from '../const' - -export const getCustomerToken = () => Cookies.get(SHOPIFY_CUSTOMER_TOKEN_COOKIE) - -export const setCustomerToken = ( - token: string | null, - options?: CookieAttributes -) => { - if (!token) { - Cookies.remove(SHOPIFY_CUSTOMER_TOKEN_COOKIE) - } else { - Cookies.set( - SHOPIFY_CUSTOMER_TOKEN_COOKIE, - token, - options ?? { - expires: SHOPIFY_COOKIE_EXPIRE, - } - ) - } -} diff --git a/framework/shopify/utils/get-brands.ts b/framework/shopify/utils/get-brands.ts deleted file mode 100644 index 3065e4ae8..000000000 --- a/framework/shopify/utils/get-brands.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - GetAllProductVendorsQuery, - GetAllProductVendorsQueryVariables, -} from '../schema' -import { ShopifyConfig } from '../api' -import getAllProductVendors from './queries/get-all-product-vendors-query' - -export type Brand = { - entityId: string - name: string - path: string -} - -export type BrandEdge = { - node: Brand -} - -export type Brands = BrandEdge[] - -const getBrands = async (config: ShopifyConfig): Promise => { - const { data } = await config.fetch< - GetAllProductVendorsQuery, - GetAllProductVendorsQueryVariables - >(getAllProductVendors, { - variables: { - first: 250, - }, - }) - - let vendorsStrings = data.products.edges.map(({ node: { vendor } }) => vendor) - - return [...new Set(vendorsStrings)].map((v) => { - const id = v.replace(/\s+/g, '-').toLowerCase() - return { - node: { - entityId: id, - name: v, - path: `brands/${id}`, - }, - } - }) -} - -export default getBrands diff --git a/framework/shopify/utils/get-categories.ts b/framework/shopify/utils/get-categories.ts deleted file mode 100644 index 543ee2fa1..000000000 --- a/framework/shopify/utils/get-categories.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { Category } from '../types/site' -import { ShopifyConfig } from '../api' -import { CollectionEdge } from '../schema' -import { normalizeCategory } from './normalize' -import getSiteCollectionsQuery from './queries/get-all-collections-query' - -const getCategories = async ({ - fetch, - locale, -}: ShopifyConfig): Promise => { - const { data } = await fetch( - getSiteCollectionsQuery, - { - variables: { - first: 250, - }, - }, - { - ...(locale && { - headers: { - 'Accept-Language': locale, - }, - }), - } - ) - - return ( - data.collections?.edges?.map(({ node }: CollectionEdge) => - normalizeCategory(node) - ) ?? [] - ) -} - -export default getCategories diff --git a/framework/shopify/utils/get-checkout-id.ts b/framework/shopify/utils/get-checkout-id.ts deleted file mode 100644 index 11e3802d9..000000000 --- a/framework/shopify/utils/get-checkout-id.ts +++ /dev/null @@ -1,8 +0,0 @@ -import Cookies from 'js-cookie' -import { SHOPIFY_CHECKOUT_ID_COOKIE } from '../const' - -const getCheckoutId = (id?: string) => { - return id ?? Cookies.get(SHOPIFY_CHECKOUT_ID_COOKIE) -} - -export default getCheckoutId diff --git a/framework/shopify/utils/get-search-variables.ts b/framework/shopify/utils/get-search-variables.ts deleted file mode 100644 index f4863650d..000000000 --- a/framework/shopify/utils/get-search-variables.ts +++ /dev/null @@ -1,31 +0,0 @@ -import getSortVariables from './get-sort-variables' -import { SearchProductsBody } from '../types/product' - -export const getSearchVariables = ({ - brandId, - search, - categoryId, - sort, - locale, -}: SearchProductsBody) => { - let query = '' - - if (search) { - query += `product_type:${search} OR title:${search} OR tag:${search} ` - } - - if (brandId) { - query += `${search ? 'AND ' : ''}vendor:${brandId}` - } - - return { - categoryId, - query, - ...getSortVariables(sort, !!categoryId), - ...(locale && { - locale, - }), - } -} - -export default getSearchVariables diff --git a/framework/shopify/utils/get-sort-variables.ts b/framework/shopify/utils/get-sort-variables.ts deleted file mode 100644 index 141d9a180..000000000 --- a/framework/shopify/utils/get-sort-variables.ts +++ /dev/null @@ -1,32 +0,0 @@ -const getSortVariables = (sort?: string, isCategory: boolean = false) => { - let output = {} - switch (sort) { - case 'price-asc': - output = { - sortKey: 'PRICE', - reverse: false, - } - break - case 'price-desc': - output = { - sortKey: 'PRICE', - reverse: true, - } - break - case 'trending-desc': - output = { - sortKey: 'BEST_SELLING', - reverse: false, - } - break - case 'latest-desc': - output = { - sortKey: isCategory ? 'CREATED' : 'CREATED_AT', - reverse: true, - } - break - } - return output -} - -export default getSortVariables diff --git a/framework/shopify/utils/handle-account-activation.ts b/framework/shopify/utils/handle-account-activation.ts deleted file mode 100644 index d11f80ba1..000000000 --- a/framework/shopify/utils/handle-account-activation.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { FetcherOptions } from '@commerce/utils/types' -import throwUserErrors from './throw-user-errors' - -import { - MutationCustomerActivateArgs, - MutationCustomerActivateByUrlArgs, -} from '../schema' -import { Mutation } from '../schema' -import { customerActivateByUrlMutation } from './mutations' - -const handleAccountActivation = async ( - fetch: (options: FetcherOptions) => Promise, - input: MutationCustomerActivateByUrlArgs -) => { - try { - const { customerActivateByUrl } = await fetch< - Mutation, - MutationCustomerActivateArgs - >({ - query: customerActivateByUrlMutation, - variables: { - input, - }, - }) - - throwUserErrors(customerActivateByUrl?.customerUserErrors) - } catch (error) {} -} - -export default handleAccountActivation diff --git a/framework/shopify/utils/handle-fetch-response.ts b/framework/shopify/utils/handle-fetch-response.ts deleted file mode 100644 index 91d362d7d..000000000 --- a/framework/shopify/utils/handle-fetch-response.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { FetcherError } from '@commerce/utils/errors' - -export function getError(errors: any[] | null, status: number) { - errors = errors ?? [{ message: 'Failed to fetch Shopify API' }] - return new FetcherError({ errors, status }) -} - -export async function getAsyncError(res: Response) { - const data = await res.json() - return getError(data.errors, res.status) -} - -const handleFetchResponse = async (res: Response) => { - if (res.ok) { - const { data, errors } = await res.json() - - if (errors && errors.length) { - throw getError(errors, res.status) - } - - return data - } - - throw await getAsyncError(res) -} - -export default handleFetchResponse diff --git a/framework/shopify/utils/handle-login.ts b/framework/shopify/utils/handle-login.ts deleted file mode 100644 index de86fa1d2..000000000 --- a/framework/shopify/utils/handle-login.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { FetcherOptions } from '@commerce/utils/types' -import { CustomerAccessTokenCreateInput } from '../schema' -import { setCustomerToken } from './customer-token' -import { customerAccessTokenCreateMutation } from './mutations' -import throwUserErrors from './throw-user-errors' - -const handleLogin = (data: any) => { - const response = data.customerAccessTokenCreate - throwUserErrors(response?.customerUserErrors) - - const customerAccessToken = response?.customerAccessToken - const accessToken = customerAccessToken?.accessToken - - if (accessToken) { - setCustomerToken(accessToken) - } - - return customerAccessToken -} - -export const handleAutomaticLogin = async ( - fetch: (options: FetcherOptions) => Promise, - input: CustomerAccessTokenCreateInput -) => { - try { - const loginData = await fetch({ - query: customerAccessTokenCreateMutation, - variables: { - input, - }, - }) - handleLogin(loginData) - } catch (error) {} -} - -export default handleLogin diff --git a/framework/shopify/utils/index.ts b/framework/shopify/utils/index.ts deleted file mode 100644 index a8454ffca..000000000 --- a/framework/shopify/utils/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -export { default as handleFetchResponse } from './handle-fetch-response' -export { default as getSearchVariables } from './get-search-variables' -export { default as getSortVariables } from './get-sort-variables' -export { default as getBrands } from './get-brands' -export { default as getCategories } from './get-categories' -export { default as getCheckoutId } from './get-checkout-id' -export { default as checkoutCreate } from './checkout-create' -export { default as checkoutToCart } from './checkout-to-cart' -export { default as handleLogin, handleAutomaticLogin } from './handle-login' -export { default as handleAccountActivation } from './handle-account-activation' -export { default as throwUserErrors } from './throw-user-errors' -export * from './queries' -export * from './mutations' -export * from './normalize' -export * from './customer-token' diff --git a/framework/shopify/utils/mutations/associate-customer-with-checkout.ts b/framework/shopify/utils/mutations/associate-customer-with-checkout.ts deleted file mode 100644 index 6b1350e05..000000000 --- a/framework/shopify/utils/mutations/associate-customer-with-checkout.ts +++ /dev/null @@ -1,18 +0,0 @@ -const associateCustomerWithCheckoutMutation = /* GraphQl */ ` -mutation associateCustomerWithCheckout($checkoutId: ID!, $customerAccessToken: String!) { - checkoutCustomerAssociateV2(checkoutId: $checkoutId, customerAccessToken: $customerAccessToken) { - checkout { - id - } - checkoutUserErrors { - code - field - message - } - customer { - id - } - } - } -` -export default associateCustomerWithCheckoutMutation diff --git a/framework/shopify/utils/mutations/checkout-create.ts b/framework/shopify/utils/mutations/checkout-create.ts deleted file mode 100644 index 7bff7e757..000000000 --- a/framework/shopify/utils/mutations/checkout-create.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { checkoutDetailsFragment } from '../queries/get-checkout-query' - -const checkoutCreateMutation = /* GraphQL */ ` - mutation checkoutCreate($input: CheckoutCreateInput = {}) { - checkoutCreate(input: $input) { - checkoutUserErrors { - code - field - message - } - checkout { - ...checkoutDetails - } - } - } - - ${checkoutDetailsFragment} -` -export default checkoutCreateMutation diff --git a/framework/shopify/utils/mutations/checkout-line-item-add.ts b/framework/shopify/utils/mutations/checkout-line-item-add.ts deleted file mode 100644 index 02f5b7107..000000000 --- a/framework/shopify/utils/mutations/checkout-line-item-add.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { checkoutDetailsFragment } from '../queries/get-checkout-query' - -const checkoutLineItemAddMutation = /* GraphQL */ ` - mutation checkoutLineItemAdd( - $checkoutId: ID! - $lineItems: [CheckoutLineItemInput!]! - ) { - checkoutLineItemsAdd(checkoutId: $checkoutId, lineItems: $lineItems) { - checkoutUserErrors { - code - field - message - } - checkout { - ...checkoutDetails - } - } - } - - ${checkoutDetailsFragment} -` -export default checkoutLineItemAddMutation diff --git a/framework/shopify/utils/mutations/checkout-line-item-remove.ts b/framework/shopify/utils/mutations/checkout-line-item-remove.ts deleted file mode 100644 index 30cb83028..000000000 --- a/framework/shopify/utils/mutations/checkout-line-item-remove.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { checkoutDetailsFragment } from '../queries/get-checkout-query' - -const checkoutLineItemRemoveMutation = /* GraphQL */ ` - mutation checkoutLineItemRemove($checkoutId: ID!, $lineItemIds: [ID!]!) { - checkoutLineItemsRemove( - checkoutId: $checkoutId - lineItemIds: $lineItemIds - ) { - checkoutUserErrors { - code - field - message - } - checkout { - ...checkoutDetails - } - } - } - ${checkoutDetailsFragment} -` -export default checkoutLineItemRemoveMutation diff --git a/framework/shopify/utils/mutations/checkout-line-item-update.ts b/framework/shopify/utils/mutations/checkout-line-item-update.ts deleted file mode 100644 index fca617fb7..000000000 --- a/framework/shopify/utils/mutations/checkout-line-item-update.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { checkoutDetailsFragment } from '../queries/get-checkout-query' - -const checkoutLineItemUpdateMutation = /* GraphQL */ ` - mutation checkoutLineItemUpdate( - $checkoutId: ID! - $lineItems: [CheckoutLineItemUpdateInput!]! - ) { - checkoutLineItemsUpdate(checkoutId: $checkoutId, lineItems: $lineItems) { - checkoutUserErrors { - code - field - message - } - checkout { - ...checkoutDetails - } - } - } - - ${checkoutDetailsFragment} -` -export default checkoutLineItemUpdateMutation diff --git a/framework/shopify/utils/mutations/customer-access-token-create.ts b/framework/shopify/utils/mutations/customer-access-token-create.ts deleted file mode 100644 index 7a45c3f49..000000000 --- a/framework/shopify/utils/mutations/customer-access-token-create.ts +++ /dev/null @@ -1,16 +0,0 @@ -const customerAccessTokenCreateMutation = /* GraphQL */ ` - mutation customerAccessTokenCreate($input: CustomerAccessTokenCreateInput!) { - customerAccessTokenCreate(input: $input) { - customerAccessToken { - accessToken - expiresAt - } - customerUserErrors { - code - field - message - } - } - } -` -export default customerAccessTokenCreateMutation diff --git a/framework/shopify/utils/mutations/customer-access-token-delete.ts b/framework/shopify/utils/mutations/customer-access-token-delete.ts deleted file mode 100644 index c46eff1e5..000000000 --- a/framework/shopify/utils/mutations/customer-access-token-delete.ts +++ /dev/null @@ -1,14 +0,0 @@ -const customerAccessTokenDeleteMutation = /* GraphQL */ ` - mutation customerAccessTokenDelete($customerAccessToken: String!) { - customerAccessTokenDelete(customerAccessToken: $customerAccessToken) { - deletedAccessToken - deletedCustomerAccessTokenId - userErrors { - field - message - } - } - } -` - -export default customerAccessTokenDeleteMutation diff --git a/framework/shopify/utils/mutations/customer-activate-by-url.ts b/framework/shopify/utils/mutations/customer-activate-by-url.ts deleted file mode 100644 index 345d502bd..000000000 --- a/framework/shopify/utils/mutations/customer-activate-by-url.ts +++ /dev/null @@ -1,19 +0,0 @@ -const customerActivateByUrlMutation = /* GraphQL */ ` - mutation customerActivateByUrl($activationUrl: URL!, $password: String!) { - customerActivateByUrl(activationUrl: $activationUrl, password: $password) { - customer { - id - } - customerAccessToken { - accessToken - expiresAt - } - customerUserErrors { - code - field - message - } - } - } -` -export default customerActivateByUrlMutation diff --git a/framework/shopify/utils/mutations/customer-activate.ts b/framework/shopify/utils/mutations/customer-activate.ts deleted file mode 100644 index b1d057c69..000000000 --- a/framework/shopify/utils/mutations/customer-activate.ts +++ /dev/null @@ -1,19 +0,0 @@ -const customerActivateMutation = /* GraphQL */ ` - mutation customerActivate($id: ID!, $input: CustomerActivateInput!) { - customerActivate(id: $id, input: $input) { - customer { - id - } - customerAccessToken { - accessToken - expiresAt - } - customerUserErrors { - code - field - message - } - } - } -` -export default customerActivateMutation diff --git a/framework/shopify/utils/mutations/customer-create.ts b/framework/shopify/utils/mutations/customer-create.ts deleted file mode 100644 index 05c728a25..000000000 --- a/framework/shopify/utils/mutations/customer-create.ts +++ /dev/null @@ -1,15 +0,0 @@ -const customerCreateMutation = /* GraphQL */ ` - mutation customerCreate($input: CustomerCreateInput!) { - customerCreate(input: $input) { - customerUserErrors { - code - field - message - } - customer { - id - } - } - } -` -export default customerCreateMutation diff --git a/framework/shopify/utils/mutations/index.ts b/framework/shopify/utils/mutations/index.ts deleted file mode 100644 index 165fb192d..000000000 --- a/framework/shopify/utils/mutations/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { default as customerCreateMutation } from './customer-create' -export { default as checkoutCreateMutation } from './checkout-create' -export { default as checkoutLineItemAddMutation } from './checkout-line-item-add' -export { default as checkoutLineItemUpdateMutation } from './checkout-line-item-update' -export { default as checkoutLineItemRemoveMutation } from './checkout-line-item-remove' -export { default as customerAccessTokenCreateMutation } from './customer-access-token-create' -export { default as customerAccessTokenDeleteMutation } from './customer-access-token-delete' -export { default as customerActivateMutation } from './customer-activate' -export { default as customerActivateByUrlMutation } from './customer-activate-by-url' diff --git a/framework/shopify/utils/normalize.ts b/framework/shopify/utils/normalize.ts deleted file mode 100644 index 96262f418..000000000 --- a/framework/shopify/utils/normalize.ts +++ /dev/null @@ -1,197 +0,0 @@ -import type { Page } from '../types/page' -import type { Product } from '../types/product' -import type { Cart, LineItem } from '../types/cart' -import type { Category } from '../types/site' - -import { - Product as ShopifyProduct, - Checkout, - CheckoutLineItemEdge, - SelectedOption, - ImageConnection, - ProductVariantConnection, - MoneyV2, - ProductOption, - Page as ShopifyPage, - PageEdge, - Collection, -} from '../schema' -import { colorMap } from '@lib/colors' - -const money = ({ amount, currencyCode }: MoneyV2) => { - return { - value: +amount, - currencyCode, - } -} - -const normalizeProductOption = ({ - id, - name: displayName, - values, -}: ProductOption) => { - return { - __typename: 'MultipleChoiceOption', - id, - displayName: displayName.toLowerCase(), - values: values.map((value) => { - let output: any = { - label: value, - } - if (displayName.match(/colou?r/gi)) { - const mapedColor = colorMap[value.toLowerCase().replace(/ /g, '')] - if (mapedColor) { - output = { - ...output, - hexColors: [mapedColor], - } - } - } - return output - }), - } -} - -const normalizeProductImages = ({ edges }: ImageConnection) => - edges?.map(({ node: { originalSrc: url, ...rest } }) => ({ - url, - ...rest, - })) - -const normalizeProductVariants = ({ edges }: ProductVariantConnection) => { - return edges?.map( - ({ - node: { - id, - selectedOptions, - sku, - title, - priceV2, - compareAtPriceV2, - requiresShipping, - availableForSale, - }, - }) => { - return { - id, - name: title, - sku: sku ?? id, - price: +priceV2.amount, - listPrice: +compareAtPriceV2?.amount, - requiresShipping, - availableForSale, - options: selectedOptions.map(({ name, value }: SelectedOption) => { - const options = normalizeProductOption({ - id, - name, - values: [value], - }) - - return options - }), - } - } - ) -} - -export function normalizeProduct({ - id, - title: name, - vendor, - images, - variants, - description, - descriptionHtml, - handle, - priceRange, - options, - metafields, - ...rest -}: ShopifyProduct): Product { - return { - id, - name, - vendor, - path: `/${handle}`, - slug: handle?.replace(/^\/+|\/+$/g, ''), - price: money(priceRange?.minVariantPrice), - images: normalizeProductImages(images), - variants: variants ? normalizeProductVariants(variants) : [], - options: options - ? options - .filter((o) => o.name !== 'Title') // By default Shopify adds a 'Title' name when there's only one option. We don't need it. https://community.shopify.com/c/Shopify-APIs-SDKs/Adding-new-product-variant-is-automatically-adding-quot-Default/td-p/358095 - .map((o) => normalizeProductOption(o)) - : [], - ...(description && { description }), - ...(descriptionHtml && { descriptionHtml }), - ...rest, - } -} - -export function normalizeCart(checkout: Checkout): Cart { - return { - id: checkout.id, - url: checkout.webUrl, - customerId: '', - email: '', - createdAt: checkout.createdAt, - currency: { - code: checkout.totalPriceV2?.currencyCode, - }, - taxesIncluded: checkout.taxesIncluded, - lineItems: checkout.lineItems?.edges.map(normalizeLineItem), - lineItemsSubtotalPrice: +checkout.subtotalPriceV2?.amount, - subtotalPrice: +checkout.subtotalPriceV2?.amount, - totalPrice: checkout.totalPriceV2?.amount, - discounts: [], - } -} - -function normalizeLineItem({ - node: { id, title, variant, quantity }, -}: CheckoutLineItemEdge): LineItem { - return { - id, - variantId: String(variant?.id), - productId: String(variant?.id), - name: `${title}`, - quantity, - variant: { - id: String(variant?.id), - sku: variant?.sku ?? '', - name: variant?.title!, - image: { - url: variant?.image?.originalSrc || '/product-img-placeholder.svg', - }, - requiresShipping: variant?.requiresShipping ?? false, - price: variant?.priceV2?.amount, - listPrice: variant?.compareAtPriceV2?.amount, - }, - path: String(variant?.product?.handle), - discounts: [], - options: variant?.title == 'Default Title' ? [] : variant?.selectedOptions, - } -} - -export const normalizePage = ( - { title: name, handle, ...page }: ShopifyPage, - locale: string = 'en-US' -): Page => ({ - ...page, - url: `/${locale}/${handle}`, - name, -}) - -export const normalizePages = (edges: PageEdge[], locale?: string): Page[] => - edges?.map((edge) => normalizePage(edge.node, locale)) - -export const normalizeCategory = ({ - title: name, - handle, - id, -}: Collection): Category => ({ - id, - name, - slug: handle, - path: `/${handle}`, -}) diff --git a/framework/shopify/utils/queries/get-all-collections-query.ts b/framework/shopify/utils/queries/get-all-collections-query.ts deleted file mode 100644 index 2abf374d6..000000000 --- a/framework/shopify/utils/queries/get-all-collections-query.ts +++ /dev/null @@ -1,14 +0,0 @@ -const getSiteCollectionsQuery = /* GraphQL */ ` - query getSiteCollections($first: Int!) { - collections(first: $first) { - edges { - node { - id - title - handle - } - } - } - } -` -export default getSiteCollectionsQuery diff --git a/framework/shopify/utils/queries/get-all-pages-query.ts b/framework/shopify/utils/queries/get-all-pages-query.ts deleted file mode 100644 index e3aee1f10..000000000 --- a/framework/shopify/utils/queries/get-all-pages-query.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const getAllPagesQuery = /* GraphQL */ ` - query getAllPages($first: Int = 250) { - pages(first: $first) { - edges { - node { - id - title - handle - } - } - } - } -` -export default getAllPagesQuery diff --git a/framework/shopify/utils/queries/get-all-product-vendors-query.ts b/framework/shopify/utils/queries/get-all-product-vendors-query.ts deleted file mode 100644 index be08b8ec6..000000000 --- a/framework/shopify/utils/queries/get-all-product-vendors-query.ts +++ /dev/null @@ -1,17 +0,0 @@ -const getAllProductVendors = /* GraphQL */ ` - query getAllProductVendors($first: Int = 250, $cursor: String) { - products(first: $first, after: $cursor) { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - vendor - } - cursor - } - } - } -` -export default getAllProductVendors diff --git a/framework/shopify/utils/queries/get-all-products-paths-query.ts b/framework/shopify/utils/queries/get-all-products-paths-query.ts deleted file mode 100644 index 56298c204..000000000 --- a/framework/shopify/utils/queries/get-all-products-paths-query.ts +++ /dev/null @@ -1,17 +0,0 @@ -const getAllProductsPathsQuery = /* GraphQL */ ` - query getAllProductPaths($first: Int = 250, $cursor: String) { - products(first: $first, after: $cursor) { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - handle - } - cursor - } - } - } -` -export default getAllProductsPathsQuery diff --git a/framework/shopify/utils/queries/get-all-products-query.ts b/framework/shopify/utils/queries/get-all-products-query.ts deleted file mode 100644 index 179cf9812..000000000 --- a/framework/shopify/utils/queries/get-all-products-query.ts +++ /dev/null @@ -1,57 +0,0 @@ -export const productConnectionFragment = /* GraphQL */ ` - fragment productConnection on ProductConnection { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - id - title - vendor - handle - priceRange { - minVariantPrice { - amount - currencyCode - } - } - images(first: 1) { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - originalSrc - altText - width - height - } - } - } - } - } - } -` - -const getAllProductsQuery = /* GraphQL */ ` - query getAllProducts( - $first: Int = 250 - $query: String = "" - $sortKey: ProductSortKeys = RELEVANCE - $reverse: Boolean = false - ) { - products( - first: $first - sortKey: $sortKey - reverse: $reverse - query: $query - ) { - ...productConnection - } - } - - ${productConnectionFragment} -` -export default getAllProductsQuery diff --git a/framework/shopify/utils/queries/get-checkout-query.ts b/framework/shopify/utils/queries/get-checkout-query.ts deleted file mode 100644 index 9969e67c0..000000000 --- a/framework/shopify/utils/queries/get-checkout-query.ts +++ /dev/null @@ -1,70 +0,0 @@ -export const checkoutDetailsFragment = /* GraphQL */ ` - fragment checkoutDetails on Checkout { - id - webUrl - subtotalPriceV2 { - amount - currencyCode - } - totalTaxV2 { - amount - currencyCode - } - totalPriceV2 { - amount - currencyCode - } - completedAt - createdAt - taxesIncluded - lineItems(first: 250) { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - id - title - variant { - id - sku - title - selectedOptions { - name - value - } - image { - originalSrc - altText - width - height - } - priceV2 { - amount - currencyCode - } - compareAtPriceV2 { - amount - currencyCode - } - product { - handle - } - } - quantity - } - } - } - } -` - -const getCheckoutQuery = /* GraphQL */ ` - query getCheckout($checkoutId: ID!) { - node(id: $checkoutId) { - ...checkoutDetails - } - } - ${checkoutDetailsFragment} -` -export default getCheckoutQuery diff --git a/framework/shopify/utils/queries/get-collection-products-query.ts b/framework/shopify/utils/queries/get-collection-products-query.ts deleted file mode 100644 index b773a7e65..000000000 --- a/framework/shopify/utils/queries/get-collection-products-query.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { productConnectionFragment } from './get-all-products-query' - -const getCollectionProductsQuery = /* GraphQL */ ` - query getProductsFromCollection( - $categoryId: ID! - $first: Int = 250 - $sortKey: ProductCollectionSortKeys = RELEVANCE - $reverse: Boolean = false - ) { - node(id: $categoryId) { - id - ... on Collection { - products(first: $first, sortKey: $sortKey, reverse: $reverse) { - ...productConnection - } - } - } - } - ${productConnectionFragment} -` -export default getCollectionProductsQuery diff --git a/framework/shopify/utils/queries/get-customer-id-query.ts b/framework/shopify/utils/queries/get-customer-id-query.ts deleted file mode 100644 index 076ceb10b..000000000 --- a/framework/shopify/utils/queries/get-customer-id-query.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const getCustomerQuery = /* GraphQL */ ` - query getCustomerId($customerAccessToken: String!) { - customer(customerAccessToken: $customerAccessToken) { - id - } - } -` -export default getCustomerQuery diff --git a/framework/shopify/utils/queries/get-customer-query.ts b/framework/shopify/utils/queries/get-customer-query.ts deleted file mode 100644 index 87e37e68d..000000000 --- a/framework/shopify/utils/queries/get-customer-query.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const getCustomerQuery = /* GraphQL */ ` - query getCustomer($customerAccessToken: String!) { - customer(customerAccessToken: $customerAccessToken) { - id - firstName - lastName - displayName - email - phone - tags - acceptsMarketing - createdAt - } - } -` -export default getCustomerQuery diff --git a/framework/shopify/utils/queries/get-page-query.ts b/framework/shopify/utils/queries/get-page-query.ts deleted file mode 100644 index 7939f0278..000000000 --- a/framework/shopify/utils/queries/get-page-query.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const getPageQuery = /* GraphQL */ ` - query getPage($id: ID!) { - node(id: $id) { - id - ... on Page { - title - handle - body - bodySummary - } - } - } -` -export default getPageQuery diff --git a/framework/shopify/utils/queries/get-product-query.ts b/framework/shopify/utils/queries/get-product-query.ts deleted file mode 100644 index b2998a40a..000000000 --- a/framework/shopify/utils/queries/get-product-query.ts +++ /dev/null @@ -1,72 +0,0 @@ -const getProductQuery = /* GraphQL */ ` - query getProductBySlug($slug: String!) { - productByHandle(handle: $slug) { - id - handle - availableForSale - title - productType - vendor - description - descriptionHtml - options { - id - name - values - } - priceRange { - maxVariantPrice { - amount - currencyCode - } - minVariantPrice { - amount - currencyCode - } - } - variants(first: 250) { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - id - title - sku - availableForSale - requiresShipping - selectedOptions { - name - value - } - priceV2 { - amount - currencyCode - } - compareAtPriceV2 { - amount - currencyCode - } - } - } - } - images(first: 250) { - pageInfo { - hasNextPage - hasPreviousPage - } - edges { - node { - originalSrc - altText - width - height - } - } - } - } - } -` - -export default getProductQuery diff --git a/framework/shopify/utils/queries/get-site-info-query.ts b/framework/shopify/utils/queries/get-site-info-query.ts deleted file mode 100644 index 74215572a..000000000 --- a/framework/shopify/utils/queries/get-site-info-query.ts +++ /dev/null @@ -1,8 +0,0 @@ -const getSiteInfoQuery = /* GraphQL */ ` - query getSiteInfo { - shop { - name - } - } -` -export default getSiteInfoQuery diff --git a/framework/shopify/utils/queries/index.ts b/framework/shopify/utils/queries/index.ts deleted file mode 100644 index 953113491..000000000 --- a/framework/shopify/utils/queries/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export { default as getSiteCollectionsQuery } from './get-all-collections-query' -export { default as getProductQuery } from './get-product-query' -export { default as getAllProductsQuery } from './get-all-products-query' -export { default as getAllProductsPathtsQuery } from './get-all-products-paths-query' -export { default as getAllProductVendors } from './get-all-product-vendors-query' -export { default as getCollectionProductsQuery } from './get-collection-products-query' -export { default as getCheckoutQuery } from './get-checkout-query' -export { default as getAllPagesQuery } from './get-all-pages-query' -export { default as getPageQuery } from './get-page-query' -export { default as getCustomerQuery } from './get-customer-query' -export { default as getSiteInfoQuery } from './get-site-info-query' diff --git a/framework/shopify/utils/throw-user-errors.ts b/framework/shopify/utils/throw-user-errors.ts deleted file mode 100644 index 5488ba282..000000000 --- a/framework/shopify/utils/throw-user-errors.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ValidationError } from '@commerce/utils/errors' - -import { - CheckoutErrorCode, - CheckoutUserError, - CustomerErrorCode, - CustomerUserError, -} from '../schema' - -export type UserErrors = Array - -export type UserErrorCode = - | CustomerErrorCode - | CheckoutErrorCode - | null - | undefined - -const getCustomMessage = (code: UserErrorCode, message: string) => { - switch (code) { - case 'UNIDENTIFIED_CUSTOMER': - message = 'Cannot find an account that matches the provided credentials' - break - } - return message -} - -export const throwUserErrors = (errors?: UserErrors) => { - if (errors && errors.length) { - throw new ValidationError({ - errors: errors.map(({ code, message }) => ({ - code: code ?? 'validation_error', - message: getCustomMessage(code, message), - })), - }) - } -} - -export default throwUserErrors diff --git a/framework/shopify/wishlist/use-add-item.tsx b/framework/shopify/wishlist/use-add-item.tsx deleted file mode 100644 index 75f067c3a..000000000 --- a/framework/shopify/wishlist/use-add-item.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { useCallback } from 'react' - -export function emptyHook() { - const useEmptyHook = async (options = {}) => { - return useCallback(async function () { - return Promise.resolve() - }, []) - } - - return useEmptyHook -} - -export default emptyHook diff --git a/framework/shopify/wishlist/use-remove-item.tsx b/framework/shopify/wishlist/use-remove-item.tsx deleted file mode 100644 index a2d3a8a05..000000000 --- a/framework/shopify/wishlist/use-remove-item.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { useCallback } from 'react' - -type Options = { - includeProducts?: boolean -} - -export function emptyHook(options?: Options) { - const useEmptyHook = async ({ id }: { id: string | number }) => { - return useCallback(async function () { - return Promise.resolve() - }, []) - } - - return useEmptyHook -} - -export default emptyHook diff --git a/framework/shopify/wishlist/use-wishlist.tsx b/framework/shopify/wishlist/use-wishlist.tsx deleted file mode 100644 index d2ce9db5b..000000000 --- a/framework/shopify/wishlist/use-wishlist.tsx +++ /dev/null @@ -1,46 +0,0 @@ -// TODO: replace this hook and other wishlist hooks with a handler, or remove them if -// Shopify doesn't have a wishlist - -import { HookFetcher } from '@commerce/utils/types' -import { Product } from '../schema' - -const defaultOpts = {} - -export type Wishlist = { - items: [ - { - product_id: number - variant_id: number - id: number - product: Product - } - ] -} - -export interface UseWishlistOptions { - includeProducts?: boolean -} - -export interface UseWishlistInput extends UseWishlistOptions { - customerId?: number -} - -export const fetcher: HookFetcher = () => { - return null -} - -export function extendHook( - customFetcher: typeof fetcher, - // swrOptions?: SwrOptions - swrOptions?: any -) { - const useWishlist = ({ includeProducts }: UseWishlistOptions = {}) => { - return { data: null } - } - - useWishlist.extend = extendHook - - return useWishlist -} - -export default extendHook(fetcher) diff --git a/framework/swell/.env.template b/framework/swell/.env.template deleted file mode 100644 index 43c931f45..000000000 --- a/framework/swell/.env.template +++ /dev/null @@ -1,5 +0,0 @@ -SWELL_STORE_DOMAIN= -SWELL_STOREFRONT_ACCESS_TOKEN= - -NEXT_PUBLIC_SWELL_STORE_ID= -NEXT_PUBLIC_SWELL_PUBLIC_KEY= diff --git a/framework/swell/api/cart/index.ts b/framework/swell/api/cart/index.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/swell/api/cart/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/swell/api/catalog/index.ts b/framework/swell/api/catalog/index.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/swell/api/catalog/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/swell/api/catalog/products.ts b/framework/swell/api/catalog/products.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/swell/api/catalog/products.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/swell/api/customer.ts b/framework/swell/api/customer.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/swell/api/customer.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/swell/api/customers/index.ts b/framework/swell/api/customers/index.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/swell/api/customers/index.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/swell/api/customers/logout.ts b/framework/swell/api/customers/logout.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/swell/api/customers/logout.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/swell/api/customers/signup.ts b/framework/swell/api/customers/signup.ts deleted file mode 100644 index ea9b101e1..000000000 --- a/framework/swell/api/customers/signup.ts +++ /dev/null @@ -1 +0,0 @@ -export default function () {} diff --git a/framework/swell/api/endpoints/cart.ts b/framework/swell/api/endpoints/cart.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/swell/api/endpoints/cart.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/swell/api/endpoints/catalog/products.ts b/framework/swell/api/endpoints/catalog/products.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/swell/api/endpoints/catalog/products.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/swell/api/endpoints/checkout/index.ts b/framework/swell/api/endpoints/checkout/index.ts deleted file mode 100644 index ab17a3767..000000000 --- a/framework/swell/api/endpoints/checkout/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { CommerceAPI, createEndpoint, GetAPISchema } from '@commerce/api' -import { CheckoutSchema } from '@commerce/types/checkout' -import { SWELL_CHECKOUT_URL_COOKIE } from '../../../const' -import checkoutEndpoint from '@commerce/api/endpoints/checkout' - -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ - req, - res, - config, -}) => { - const { cookies } = req - const checkoutUrl = cookies[SWELL_CHECKOUT_URL_COOKIE] - - if (checkoutUrl) { - res.redirect(checkoutUrl) - } else { - res.redirect('/cart') - } -} -export const handlers: CheckoutEndpoint['handlers'] = { checkout } - -export type CheckoutAPI = GetAPISchema -export type CheckoutEndpoint = CheckoutAPI['endpoint'] - -const checkoutApi = createEndpoint({ - handler: checkoutEndpoint, - handlers, -}) - -export default checkoutApi diff --git a/framework/swell/api/endpoints/customer.ts b/framework/swell/api/endpoints/customer.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/swell/api/endpoints/customer.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/swell/api/endpoints/login.ts b/framework/swell/api/endpoints/login.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/swell/api/endpoints/login.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/swell/api/endpoints/logout.ts b/framework/swell/api/endpoints/logout.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/swell/api/endpoints/logout.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/swell/api/endpoints/signup.ts b/framework/swell/api/endpoints/signup.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/swell/api/endpoints/signup.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/swell/api/endpoints/wishlist.ts b/framework/swell/api/endpoints/wishlist.ts deleted file mode 100644 index d09c976c3..000000000 --- a/framework/swell/api/endpoints/wishlist.ts +++ /dev/null @@ -1 +0,0 @@ -export default function (_commerce: any) {} diff --git a/framework/swell/api/index.ts b/framework/swell/api/index.ts deleted file mode 100644 index 463c42fae..000000000 --- a/framework/swell/api/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { - CommerceAPI, - CommerceAPIConfig, - getCommerceApi as commerceApi, -} from '@commerce/api' -import { - SWELL_CHECKOUT_ID_COOKIE, - SWELL_CUSTOMER_TOKEN_COOKIE, - SWELL_COOKIE_EXPIRE, -} from '../const' - -import fetchApi from './utils/fetch-swell-api' -import login from './operations/login' -import getAllPages from './operations/get-all-pages' -import getPage from './operations/get-page' -import getSiteInfo from './operations/get-site-info' -import getAllProductPaths from './operations/get-all-product-paths' -import getAllProducts from './operations/get-all-products' -import getProduct from './operations/get-product' - -export interface SwellConfig extends CommerceAPIConfig { - fetch: any -} - -const config: SwellConfig = { - locale: 'en-US', - commerceUrl: '', - apiToken: ''!, - cartCookie: SWELL_CHECKOUT_ID_COOKIE, - cartCookieMaxAge: SWELL_COOKIE_EXPIRE, - fetch: fetchApi, - customerCookie: SWELL_CUSTOMER_TOKEN_COOKIE, -} - -const operations = { - login, - getAllPages, - getPage, - getSiteInfo, - getAllProductPaths, - getAllProducts, - getProduct, -} - -export const provider = { config, operations } - -export type Provider = typeof provider - -export function getCommerceApi

( - customProvider: P = provider as any -): CommerceAPI

{ - return commerceApi(customProvider) -} diff --git a/framework/swell/api/operations/get-all-pages.ts b/framework/swell/api/operations/get-all-pages.ts deleted file mode 100644 index 6abaa155c..000000000 --- a/framework/swell/api/operations/get-all-pages.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Provider, SwellConfig } from '..' -import type { OperationContext } from '@commerce/api/operations' -import type { Page } from '../../types/page' - -export type GetAllPagesResult< - T extends { pages: any[] } = { pages: Page[] } -> = T - -export default function getAllPagesOperation({ - commerce, -}: OperationContext) { - async function getAllPages(opts?: { - config?: Partial - preview?: boolean - }): Promise - - async function getAllPages(opts: { - url: string - config?: Partial - preview?: boolean - }): Promise> - - async function getAllPages({ - config: cfg, - preview, - }: { - url?: string - config?: Partial - preview?: boolean - } = {}): Promise { - const config = commerce.getConfig(cfg) - const { locale, fetch } = config - const data = await fetch('content', 'list', ['pages']) - const pages = - data?.results?.map(({ slug, ...rest }: { slug: string }) => ({ - url: `/${locale}/${slug}`, - ...rest, - })) ?? [] - return { - pages, - } - } - - return getAllPages -} diff --git a/framework/swell/api/operations/get-all-product-paths.ts b/framework/swell/api/operations/get-all-product-paths.ts deleted file mode 100644 index 4d95253e8..000000000 --- a/framework/swell/api/operations/get-all-product-paths.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { SwellProduct } from '../../types' -import { SwellConfig, Provider } from '..' -import { OperationContext, OperationOptions } from '@commerce/api/operations' -import { GetAllProductPathsOperation } from '@commerce/types/product' - -export default function getAllProductPathsOperation({ - commerce, -}: OperationContext) { - async function getAllProductPaths< - T extends GetAllProductPathsOperation - >(opts?: { - variables?: T['variables'] - config?: SwellConfig - }): Promise - - async function getAllProductPaths( - opts: { - variables?: T['variables'] - config?: SwellConfig - } & OperationOptions - ): Promise - - async function getAllProductPaths({ - variables, - config: cfg, - }: { - query?: string - variables?: T['variables'] - config?: SwellConfig - } = {}): Promise { - const config = commerce.getConfig(cfg) - // RecursivePartial forces the method to check for every prop in the data, which is - // required in case there's a custom `query` - const { results } = await config.fetch('products', 'list', [ - { - limit: variables?.first, - }, - ]) - - return { - products: results?.map(({ slug: handle }: SwellProduct) => ({ - path: `/${handle}`, - })), - } - } - - return getAllProductPaths -} diff --git a/framework/swell/api/operations/get-all-products.ts b/framework/swell/api/operations/get-all-products.ts deleted file mode 100644 index 7e8e99a5c..000000000 --- a/framework/swell/api/operations/get-all-products.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { normalizeProduct } from '../../utils/normalize' -import { SwellProduct } from '../../types' -import { Product } from '@commerce/types/product' -import { Provider, SwellConfig } from '../' -import { OperationContext } from '@commerce/api/operations' - -export type ProductVariables = { first?: number } - -export default function getAllProductsOperation({ - commerce, -}: OperationContext) { - async function getAllProducts(opts?: { - variables?: ProductVariables - config?: Partial - preview?: boolean - }): Promise<{ products: Product[] }> - - async function getAllProducts({ - config: cfg, - variables = { first: 250 }, - }: { - query?: string - variables?: ProductVariables - config?: Partial - preview?: boolean - } = {}): Promise<{ products: Product[] | any[] }> { - const config = commerce.getConfig(cfg) - const { results } = await config.fetch('products', 'list', [ - { - limit: variables.first, - }, - ]) - const products = results.map((product: SwellProduct) => - normalizeProduct(product) - ) - - return { - products, - } - } - - return getAllProducts -} diff --git a/framework/swell/api/operations/get-page.ts b/framework/swell/api/operations/get-page.ts deleted file mode 100644 index 99fbac04d..000000000 --- a/framework/swell/api/operations/get-page.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Page } from '../../schema' -import { SwellConfig, Provider } from '..' -import { OperationContext, OperationOptions } from '@commerce/api/operations' -import { GetPageOperation } from '../../types/page' - -export type GetPageResult = T - -export type PageVariables = { - id: number -} - -export default function getPageOperation({ - commerce, -}: OperationContext) { - async function getPage(opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise - - async function getPage( - opts: { - variables: T['variables'] - config?: Partial - preview?: boolean - } & OperationOptions - ): Promise - - async function getPage({ - variables, - config, - }: { - query?: string - variables: T['variables'] - config?: Partial - preview?: boolean - }): Promise { - const { fetch, locale = 'en-US' } = commerce.getConfig(config) - const id = variables.id - const result = await fetch('content', 'get', ['pages', id]) - const page = result - - return { - page: page - ? { - ...page, - url: `/${locale}/${page.slug}`, - } - : null, - } - } - - return getPage -} diff --git a/framework/swell/api/operations/get-product.ts b/framework/swell/api/operations/get-product.ts deleted file mode 100644 index c9a3d6f1d..000000000 --- a/framework/swell/api/operations/get-product.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { normalizeProduct } from '../../utils' - -import { Product } from '@commerce/types/product' -import { OperationContext } from '@commerce/api/operations' -import { Provider, SwellConfig } from '../' - -export default function getProductOperation({ - commerce, -}: OperationContext) { - async function getProduct({ - variables, - config: cfg, - }: { - query?: string - variables: { slug: string } - config?: Partial - preview?: boolean - }): Promise { - const config = commerce.getConfig(cfg) - - const product = await config.fetch('products', 'get', [variables.slug]) - - if (product && product.variants) { - product.variants = product.variants?.results - } - - return { - product: product ? normalizeProduct(product) : null, - } - } - - return getProduct -} diff --git a/framework/swell/api/operations/get-site-info.ts b/framework/swell/api/operations/get-site-info.ts deleted file mode 100644 index ffb0c1542..000000000 --- a/framework/swell/api/operations/get-site-info.ts +++ /dev/null @@ -1,37 +0,0 @@ -import getCategories from '../../utils/get-categories' -import getVendors, { Brands } from '../../utils/get-vendors' -import { Provider, SwellConfig } from '../' -import type { OperationContext } from '@commerce/api/operations' -import type { Category } from '@commerce/types/site' - -export type GetSiteInfoResult< - T extends { categories: any[]; brands: any[] } = { - categories: Category[] - brands: Brands - } -> = T - -export default function getSiteInfoOperation({ - commerce, -}: OperationContext) { - async function getSiteInfo({ - variables, - config: cfg, - }: { - query?: string - variables?: any - config?: Partial - preview?: boolean - } = {}): Promise { - const config = commerce.getConfig(cfg) - const categories = await getCategories(config) - const brands = await getVendors(config) - - return { - categories, - brands, - } - } - - return getSiteInfo -} diff --git a/framework/swell/api/operations/login.ts b/framework/swell/api/operations/login.ts deleted file mode 100644 index 33e1e2948..000000000 --- a/framework/swell/api/operations/login.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { ServerResponse } from 'http' -import type { - OperationContext, - OperationOptions, -} from '@commerce/api/operations' -import type { LoginOperation } from '../../types/login' -import { Provider, SwellConfig } from '..' - -export default function loginOperation({ - commerce, -}: OperationContext) { - async function login(opts: { - variables: T['variables'] - config?: Partial - res: ServerResponse - }): Promise - - async function login( - opts: { - variables: T['variables'] - config?: Partial - res: ServerResponse - } & OperationOptions - ): Promise - - async function login({ - variables, - res: response, - config: cfg, - }: { - query?: string - variables: T['variables'] - res: ServerResponse - config?: Partial - }): Promise { - const config = commerce.getConfig(cfg) - - const { data } = await config.fetch('account', 'login', [variables]) - - return { - result: data, - } - } - - return login -} diff --git a/framework/swell/api/utils/fetch-swell-api.ts b/framework/swell/api/utils/fetch-swell-api.ts deleted file mode 100644 index 65caed763..000000000 --- a/framework/swell/api/utils/fetch-swell-api.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { swellConfig } from '../..' - -const fetchApi = async (query: string, method: string, variables: [] = []) => { - const { swell } = swellConfig - return swell[query][method](...variables) -} -export default fetchApi diff --git a/framework/swell/api/utils/fetch.ts b/framework/swell/api/utils/fetch.ts deleted file mode 100644 index 0b8367102..000000000 --- a/framework/swell/api/utils/fetch.ts +++ /dev/null @@ -1,2 +0,0 @@ -import zeitFetch from '@vercel/fetch' -export default zeitFetch() diff --git a/framework/swell/api/utils/is-allowed-method.ts b/framework/swell/api/utils/is-allowed-method.ts deleted file mode 100644 index 78bbba568..000000000 --- a/framework/swell/api/utils/is-allowed-method.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { NextApiRequest, NextApiResponse } from 'next' - -export default function isAllowedMethod( - req: NextApiRequest, - res: NextApiResponse, - allowedMethods: string[] -) { - const methods = allowedMethods.includes('OPTIONS') - ? allowedMethods - : [...allowedMethods, 'OPTIONS'] - - if (!req.method || !methods.includes(req.method)) { - res.status(405) - res.setHeader('Allow', methods.join(', ')) - res.end() - return false - } - - if (req.method === 'OPTIONS') { - res.status(200) - res.setHeader('Allow', methods.join(', ')) - res.setHeader('Content-Length', '0') - res.end() - return false - } - - return true -} diff --git a/framework/swell/api/wishlist/index.tsx b/framework/swell/api/wishlist/index.tsx deleted file mode 100644 index a72856673..000000000 --- a/framework/swell/api/wishlist/index.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export type WishlistItem = { product: any; id: number } -export default function () {} diff --git a/framework/swell/auth/use-login.tsx b/framework/swell/auth/use-login.tsx deleted file mode 100644 index 587163d97..000000000 --- a/framework/swell/auth/use-login.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError, ValidationError } from '@commerce/utils/errors' -import useCustomer from '../customer/use-customer' -import { - CustomerUserError, - Mutation, - MutationCheckoutCreateArgs, -} from '../schema' -import useLogin, { UseLogin } from '@commerce/auth/use-login' -import { LoginHook } from '../types/login' -import { setCustomerToken } from '../utils' - -export default useLogin as UseLogin - -const getErrorMessage = ({ code, message }: CustomerUserError) => { - switch (code) { - case 'UNIDENTIFIED_CUSTOMER': - message = 'Cannot find an account that matches the provided credentials' - break - } - return message -} - -export const handler: MutationHook = { - fetchOptions: { - query: 'account', - method: 'login', - }, - async fetcher({ input: { email, password }, options, fetch }) { - if (!(email && password)) { - throw new CommerceError({ - message: - 'A first name, last name, email and password are required to login', - }) - } - - const { customerAccessTokenCreate } = await fetch< - Mutation, - MutationCheckoutCreateArgs - >({ - ...options, - variables: [email, password], - }) - - const errors = customerAccessTokenCreate?.customerUserErrors - - if (errors && errors.length) { - throw new ValidationError({ - message: getErrorMessage(errors[0]), - }) - } - const customerAccessToken = customerAccessTokenCreate?.customerAccessToken - const accessToken = customerAccessToken?.accessToken - - if (accessToken) { - setCustomerToken(accessToken) - } - - return null - }, - useHook: ({ fetch }) => () => { - const { revalidate } = useCustomer() - - return useCallback( - async function login(input) { - const data = await fetch({ input }) - await revalidate() - return data - }, - [fetch, revalidate] - ) - }, -} diff --git a/framework/swell/auth/use-logout.tsx b/framework/swell/auth/use-logout.tsx deleted file mode 100644 index 7dc7411ec..000000000 --- a/framework/swell/auth/use-logout.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import useLogout, { UseLogout } from '@commerce/auth/use-logout' -import useCustomer from '../customer/use-customer' -import { getCustomerToken, setCustomerToken } from '../utils/customer-token' -import { LogoutHook } from '../types/logout' - -export default useLogout as UseLogout - -export const handler: MutationHook = { - fetchOptions: { - query: 'account', - method: 'logout', - }, - async fetcher({ options, fetch }) { - await fetch({ - ...options, - variables: { - customerAccessToken: getCustomerToken(), - }, - }) - setCustomerToken(null) - return null - }, - useHook: ({ fetch }) => () => { - const { mutate } = useCustomer() - - return useCallback( - async function logout() { - const data = await fetch() - await mutate(null, false) - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/swell/auth/use-signup.tsx b/framework/swell/auth/use-signup.tsx deleted file mode 100644 index 674b9861f..000000000 --- a/framework/swell/auth/use-signup.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { useCallback } from 'react' -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useSignup, { UseSignup } from '@commerce/auth/use-signup' -import useCustomer from '../customer/use-customer' -import { SignupHook } from '../types/signup' -import handleLogin from '../utils/handle-login' - -export default useSignup as UseSignup - -export const handler: MutationHook = { - fetchOptions: { - query: 'account', - method: 'create', - }, - async fetcher({ - input: { firstName, lastName, email, password }, - options, - fetch, - }) { - if (!(firstName && lastName && email && password)) { - throw new CommerceError({ - message: - 'A first name, last name, email and password are required to signup', - }) - } - const data = await fetch({ - ...options, - variables: { - first_name: firstName, - last_name: lastName, - email, - password, - }, - }) - - try { - const loginData = await fetch({ - query: 'account', - method: 'login', - variables: [email, password], - }) - handleLogin(loginData) - } catch (error) {} - return data - }, - useHook: ({ fetch }) => () => { - const { revalidate } = useCustomer() - - return useCallback( - async function signup(input) { - const data = await fetch({ input }) - await revalidate() - return data - }, - [fetch, revalidate] - ) - }, -} diff --git a/framework/swell/cart/index.ts b/framework/swell/cart/index.ts deleted file mode 100644 index 3d288b1df..000000000 --- a/framework/swell/cart/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as useCart } from './use-cart' -export { default as useAddItem } from './use-add-item' -export { default as useRemoveItem } from './use-remove-item' diff --git a/framework/swell/cart/use-add-item.tsx b/framework/swell/cart/use-add-item.tsx deleted file mode 100644 index e324a44d9..000000000 --- a/framework/swell/cart/use-add-item.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import type { MutationHook } from '@commerce/utils/types' -import { CommerceError } from '@commerce/utils/errors' -import useAddItem, { UseAddItem } from '@commerce/cart/use-add-item' -import useCart from './use-cart' -import { checkoutToCart } from './utils' -import { getCheckoutId } from '../utils' -import { useCallback } from 'react' -import { AddItemHook } from '../types/cart' - -export default useAddItem as UseAddItem - -export const handler: MutationHook = { - fetchOptions: { - query: 'cart', - method: 'addItem', - }, - async fetcher({ input: item, options, fetch }) { - if ( - item.quantity && - (!Number.isInteger(item.quantity) || item.quantity! < 1) - ) { - throw new CommerceError({ - message: 'The item quantity has to be a valid integer greater than 0', - }) - } - const variables: { - product_id: string | undefined - variant_id?: string - checkoutId?: string - quantity?: number - } = { - checkoutId: getCheckoutId(), - product_id: item.productId, - quantity: item.quantity, - } - if (item.productId !== item.variantId) { - variables.variant_id = item.variantId - } - - const response = await fetch({ - ...options, - variables, - }) - - return checkoutToCart(response) as any - }, - useHook: ({ fetch }) => () => { - const { mutate } = useCart() - - return useCallback( - async function addItem(input) { - const data = await fetch({ input }) - await mutate(data, false) - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/swell/cart/use-cart.tsx b/framework/swell/cart/use-cart.tsx deleted file mode 100644 index 885f889f5..000000000 --- a/framework/swell/cart/use-cart.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import useCart, { UseCart } from '@commerce/cart/use-cart' -import { SWRHook } from '@commerce/utils/types' -import { useMemo } from 'react' -import { normalizeCart } from '../utils/normalize' -import { checkoutCreate, checkoutToCart } from './utils' -import type { GetCartHook } from '@commerce/types/cart' - -export default useCart as UseCart - -export const handler: SWRHook = { - fetchOptions: { - query: 'cart', - method: 'get', - }, - async fetcher({ fetch }) { - const cart = await checkoutCreate(fetch) - - return cart ? normalizeCart(cart) : null - }, - useHook: ({ useData }) => (input) => { - const response = useData({ - swrOptions: { revalidateOnFocus: false, ...input?.swrOptions }, - }) - return useMemo( - () => - Object.create(response, { - isEmpty: { - get() { - return (response.data?.lineItems.length ?? 0) <= 0 - }, - enumerable: true, - }, - }), - [response] - ) - }, -} diff --git a/framework/swell/cart/use-remove-item.tsx b/framework/swell/cart/use-remove-item.tsx deleted file mode 100644 index 7ef3af7cd..000000000 --- a/framework/swell/cart/use-remove-item.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { useCallback } from 'react' -import type { - MutationHookContext, - HookFetcherContext, -} from '@commerce/utils/types' - -import useRemoveItem, { UseRemoveItem } from '@commerce/cart/use-remove-item' -import type { Cart, LineItem, RemoveItemHook } from '@commerce/types/cart' -import useCart from './use-cart' -import { checkoutToCart } from './utils' - -export type RemoveItemFn = T extends LineItem - ? (input?: RemoveItemActionInput) => Promise - : (input: RemoveItemActionInput) => Promise - -export type RemoveItemActionInput = T extends LineItem - ? Partial - : RemoveItemHook['actionInput'] - -export default useRemoveItem as UseRemoveItem - -export const handler = { - fetchOptions: { - query: 'cart', - method: 'removeItem', - }, - async fetcher({ - input: { itemId }, - options, - fetch, - }: HookFetcherContext) { - const response = await fetch({ ...options, variables: [itemId] }) - - return checkoutToCart(response) - }, - useHook: ({ fetch }: MutationHookContext) => () => { - const { mutate } = useCart() - - return useCallback( - async function removeItem(input) { - const data = await fetch({ input: { itemId: input.id } }) - await mutate(data, false) - - return data - }, - [fetch, mutate] - ) - }, -} diff --git a/framework/swell/cart/use-update-item.tsx b/framework/swell/cart/use-update-item.tsx deleted file mode 100644 index 631a394f6..000000000 --- a/framework/swell/cart/use-update-item.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { useCallback } from 'react' -import debounce from 'lodash.debounce' -import type { - HookFetcherContext, - MutationHook, - MutationHookContext, -} from '@commerce/utils/types' -import { ValidationError } from '@commerce/utils/errors' -// import useUpdateItem, { -// UpdateItemInput as UpdateItemInputBase, -// UseUpdateItem, -// } from '@commerce/cart/use-update-item' -import useUpdateItem, { UseUpdateItem } from '@commerce/cart/use-update-item' -import useCart from './use-cart' -import { handler as removeItemHandler } from './use-remove-item' -import { CartItemBody, LineItem } from '@commerce/types/cart' -import { checkoutToCart } from './utils' -import { UpdateItemHook } from '../types/cart' -// export type UpdateItemInput = T extends LineItem -// ? Partial> -// : UpdateItemInputBase - -export default useUpdateItem as UseUpdateItem - -export type UpdateItemActionInput = T extends LineItem - ? Partial - : UpdateItemHook['actionInput'] - -export const handler = { - fetchOptions: { - query: 'cart', - method: 'updateItem', - }, - async fetcher({ - input: { itemId, item }, - options, - fetch, - }: HookFetcherContext) { - if (Number.isInteger(item.quantity)) { - // Also allow the update hook to remove an item if the quantity is lower than 1 - if (item.quantity! < 1) { - return removeItemHandler.fetcher({ - options: removeItemHandler.fetchOptions, - input: { itemId }, - fetch, - }) - } - } else if (item.quantity) { - throw new ValidationError({ - message: 'The item quantity has to be a valid integer', - }) - } - const response = await fetch({ - ...options, - variables: [itemId, { quantity: item.quantity }], - }) - - return checkoutToCart(response) - }, - useHook: ({ fetch }: MutationHookContext) => < - T extends LineItem | undefined = undefined - >( - ctx: { - item?: T - wait?: number - } = {} - ) => { - const { item } = ctx - const { mutate, data: cartData } = useCart() as any - - return useCallback( - debounce(async (input: UpdateItemActionInput) => { - const firstLineItem = cartData.lineItems[0] - const itemId = item?.id || firstLineItem.id - const productId = item?.productId || firstLineItem.productId - const variantId = item?.variant.id || firstLineItem.variant.id - if (!itemId || !productId) { - throw new ValidationError({ - message: 'Invalid input used for this operation', - }) - } - - const data = await fetch({ - input: { - item: { - productId, - variantId, - quantity: input.quantity, - }, - itemId, - }, - }) - await mutate(data, false) - return data - }, ctx.wait ?? 500), - [fetch, mutate] - ) - }, -} diff --git a/framework/swell/cart/utils/checkout-create.ts b/framework/swell/cart/utils/checkout-create.ts deleted file mode 100644 index a4b82d849..000000000 --- a/framework/swell/cart/utils/checkout-create.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { SWELL_CHECKOUT_URL_COOKIE } from '../../const' - -import Cookies from 'js-cookie' - -export const checkoutCreate = async (fetch: any) => { - const cart = await fetch({ - query: 'cart', - method: 'get', - }) - - if (!cart) { - await fetch({ - query: 'cart', - method: 'setItems', - variables: [[]], - }) - } - - const checkoutUrl = cart?.checkout_url - - if (checkoutUrl) { - Cookies.set(SWELL_CHECKOUT_URL_COOKIE, checkoutUrl) - } - - return cart -} - -export default checkoutCreate diff --git a/framework/swell/cart/utils/checkout-to-cart.ts b/framework/swell/cart/utils/checkout-to-cart.ts deleted file mode 100644 index d6dfda206..000000000 --- a/framework/swell/cart/utils/checkout-to-cart.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Cart } from '../../types' -import { CommerceError } from '@commerce/utils/errors' - -import { - CheckoutLineItemsAddPayload, - CheckoutLineItemsRemovePayload, - CheckoutLineItemsUpdatePayload, - Maybe, -} from '../../schema' -import { normalizeCart } from '../../utils' - -export type CheckoutPayload = - | CheckoutLineItemsAddPayload - | CheckoutLineItemsUpdatePayload - | CheckoutLineItemsRemovePayload - -const checkoutToCart = (checkoutPayload?: Maybe): Cart => { - if (!checkoutPayload) { - throw new CommerceError({ - message: 'Invalid response from Swell', - }) - } - return normalizeCart(checkoutPayload as any) -} - -export default checkoutToCart diff --git a/framework/swell/cart/utils/index.ts b/framework/swell/cart/utils/index.ts deleted file mode 100644 index 20d04955d..000000000 --- a/framework/swell/cart/utils/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as checkoutToCart } from './checkout-to-cart' -export { default as checkoutCreate } from './checkout-create' diff --git a/framework/swell/commerce.config.json b/framework/swell/commerce.config.json deleted file mode 100644 index 01c9bf919..000000000 --- a/framework/swell/commerce.config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "provider": "swell", - "features": { - "wishlist": false - } -} diff --git a/framework/swell/const.ts b/framework/swell/const.ts deleted file mode 100644 index 669194298..000000000 --- a/framework/swell/const.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const SWELL_CHECKOUT_ID_COOKIE = 'SWELL_checkoutId' - -export const SWELL_CHECKOUT_URL_COOKIE = 'swell_checkoutUrl' - -export const SWELL_CUSTOMER_TOKEN_COOKIE = 'swell_customerToken' - -export const STORE_DOMAIN = process.env.NEXT_PUBLIC_SWELL_STORE_DOMAIN - -export const SWELL_COOKIE_EXPIRE = 30 - -export const SWELL_STORE_ID = process.env.NEXT_PUBLIC_SWELL_STORE_ID - -export const SWELL_PUBLIC_KEY = process.env.NEXT_PUBLIC_SWELL_PUBLIC_KEY diff --git a/framework/swell/customer/index.ts b/framework/swell/customer/index.ts deleted file mode 100644 index 6c903ecc5..000000000 --- a/framework/swell/customer/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as useCustomer } from './use-customer' diff --git a/framework/swell/customer/use-customer.tsx b/framework/swell/customer/use-customer.tsx deleted file mode 100644 index 50e85d3f6..000000000 --- a/framework/swell/customer/use-customer.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import useCustomer, { UseCustomer } from '@commerce/customer/use-customer' -import { SWRHook } from '@commerce/utils/types' -import { normalizeCustomer } from '../utils/normalize' -import type { CustomerHook } from '../types/customer' - -export default useCustomer as UseCustomer - -export const handler: SWRHook = { - fetchOptions: { - query: 'account', - method: 'get', - }, - async fetcher({ options, fetch }) { - const data = await fetch({ - ...options, - }) - return data ? normalizeCustomer(data) : null - }, - useHook: ({ useData }) => (input) => { - return useData({ - swrOptions: { - revalidateOnFocus: false, - ...input?.swrOptions, - }, - }) - }, -} diff --git a/framework/swell/fetcher.ts b/framework/swell/fetcher.ts deleted file mode 100644 index f18dcf667..000000000 --- a/framework/swell/fetcher.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Fetcher } from '@commerce/utils/types' -import { handleFetchResponse } from './utils' -import { swellConfig } from './index' -import { CommerceError } from '@commerce/utils/errors' - -const fetcher: Fetcher = async ({ method = 'get', variables, query }) => { - const { swell } = swellConfig - - async function callSwell() { - if (Array.isArray(variables)) { - const arg1 = variables[0] - const arg2 = variables[1] - const response = await swell[query!][method](arg1, arg2) - return handleFetchResponse(response) - } else { - const response = await swell[query!][method](variables) - return handleFetchResponse(response) - } - } - - if (query && query in swell) { - return await callSwell() - } else { - throw new CommerceError({ message: 'Invalid query argument!' }) - } -} - -export default fetcher diff --git a/framework/swell/index.tsx b/framework/swell/index.tsx deleted file mode 100644 index 28f60b394..000000000 --- a/framework/swell/index.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import * as React from 'react' -import swell from 'swell-js' -import { ReactNode } from 'react' - -import { - CommerceConfig, - CommerceProvider as CoreCommerceProvider, - useCommerce as useCoreCommerce, -} from '@commerce' - -import { swellProvider, SwellProvider } from './provider' -import { - SWELL_CHECKOUT_ID_COOKIE, - SWELL_STORE_ID, - SWELL_PUBLIC_KEY, -} from './const' -swell.init(SWELL_STORE_ID, SWELL_PUBLIC_KEY) - -export { swellProvider } -export type { SwellProvider } - -export const swellConfig: any = { - locale: 'en-us', - cartCookie: SWELL_CHECKOUT_ID_COOKIE, - swell, -} - -export type SwellConfig = Partial - -export type SwellProps = { - children?: ReactNode - locale: string -} & SwellConfig - -export function CommerceProvider({ children, ...config }: SwellProps) { - return ( - - {children} - - ) -} - -export const useCommerce = () => useCoreCommerce() diff --git a/framework/swell/next.config.js b/framework/swell/next.config.js deleted file mode 100644 index f6ac38345..000000000 --- a/framework/swell/next.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const commerce = require('./commerce.config.json') - -module.exports = { - commerce, - images: { - domains: ['cdn.schema.io'], - }, -} diff --git a/framework/swell/product/index.ts b/framework/swell/product/index.ts deleted file mode 100644 index 426a3edcd..000000000 --- a/framework/swell/product/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as usePrice } from './use-price' -export { default as useSearch } from './use-search' diff --git a/framework/swell/product/use-price.tsx b/framework/swell/product/use-price.tsx deleted file mode 100644 index 0174faf5e..000000000 --- a/framework/swell/product/use-price.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export * from '@commerce/product/use-price' -export { default } from '@commerce/product/use-price' diff --git a/framework/swell/product/use-search.tsx b/framework/swell/product/use-search.tsx deleted file mode 100644 index bdcca3ff2..000000000 --- a/framework/swell/product/use-search.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { SWRHook } from '@commerce/utils/types' -import useSearch, { UseSearch } from '@commerce/product/use-search' -import { normalizeProduct } from '../utils' -import { SwellProduct } from '../types' -import type { SearchProductsHook } from '../types/product' - -export default useSearch as UseSearch - -export type SearchProductsInput = { - search?: string - categoryId?: string - brandId?: string - sort?: string -} - -export const handler: SWRHook = { - fetchOptions: { - query: 'products', - method: 'list', - }, - async fetcher({ input, options, fetch }) { - const sortMap = new Map([ - ['latest-desc', ''], - ['price-asc', 'price_asc'], - ['price-desc', 'price_desc'], - ['trending-desc', 'popularity'], - ]) - const { categoryId, search, sort = 'latest-desc' } = input - const mappedSort = sortMap.get(sort) - const { results, count: found } = await fetch({ - query: 'products', - method: 'list', - variables: { category: categoryId, search, sort: mappedSort }, - }) - - const products = results.map((product: SwellProduct) => - normalizeProduct(product) - ) - - return { - products, - found, - } - }, - useHook: ({ useData }) => (input = {}) => { - return useData({ - input: [ - ['search', input.search], - ['categoryId', input.categoryId], - ['brandId', input.brandId], - ['sort', input.sort], - ], - swrOptions: { - revalidateOnFocus: false, - ...input.swrOptions, - }, - }) - }, -} diff --git a/framework/swell/provider.ts b/framework/swell/provider.ts deleted file mode 100644 index aa7be31d4..000000000 --- a/framework/swell/provider.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Provider } from '@commerce' - -import { SWELL_CHECKOUT_URL_COOKIE, STORE_DOMAIN } from './const' - -import { handler as useCart } from './cart/use-cart' -import { handler as useAddItem } from './cart/use-add-item' -import { handler as useUpdateItem } from './cart/use-update-item' -import { handler as useRemoveItem } from './cart/use-remove-item' - -import { handler as useCustomer } from './customer/use-customer' -import { handler as useSearch } from './product/use-search' - -import { handler as useLogin } from './auth/use-login' -import { handler as useLogout } from './auth/use-logout' -import { handler as useSignup } from './auth/use-signup' - -import fetcher from './fetcher' - -export const swellProvider: Provider = { - locale: 'en-us', - cartCookie: SWELL_CHECKOUT_URL_COOKIE, - // storeDomain: STORE_DOMAIN, - fetcher, - cart: { useCart, useAddItem, useUpdateItem, useRemoveItem }, - customer: { useCustomer }, - products: { useSearch }, - auth: { useLogin, useLogout, useSignup }, -} - -export type SwellProvider = typeof swellProvider diff --git a/framework/swell/schema.d.ts b/framework/swell/schema.d.ts deleted file mode 100644 index e77d3c8d9..000000000 --- a/framework/swell/schema.d.ts +++ /dev/null @@ -1,5002 +0,0 @@ -export type Maybe = T | null -export type Exact = { - [K in keyof T]: T[K] -} -export type MakeOptional = Omit & - { [SubKey in K]?: Maybe } -export type MakeMaybe = Omit & - { [SubKey in K]: Maybe } -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string - String: string - Boolean: boolean - Int: number - Float: number - /** An ISO-8601 encoded UTC date time string. Example value: `"2019-07-03T20:47:55Z"`. */ - DateTime: any - /** A signed decimal number, which supports arbitrary precision and is serialized as a string. Example value: `"29.99"`. */ - Decimal: any - /** A string containing HTML code. Example value: `"

Grey cotton knit sweater.

"`. */ - HTML: any - /** A monetary value string. Example value: `"100.57"`. */ - Money: any - /** - * An RFC 3986 and RFC 3987 compliant URI string. - * - * Example value: `"https://johns-apparel.myshopify.com"`. - * - */ - URL: any -} - -/** A version of the API. */ -export type ApiVersion = { - __typename?: 'ApiVersion' - /** The human-readable name of the version. */ - displayName: Scalars['String'] - /** The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. */ - handle: Scalars['String'] - /** Whether the version is supported by Shopify. */ - supported: Scalars['Boolean'] -} - -/** Details about the gift card used on the checkout. */ -export type AppliedGiftCard = Node & { - __typename?: 'AppliedGiftCard' - /** - * The amount that was taken from the gift card by applying it. - * @deprecated Use `amountUsedV2` instead - */ - amountUsed: Scalars['Money'] - /** The amount that was taken from the gift card by applying it. */ - amountUsedV2: MoneyV2 - /** - * The amount left on the gift card. - * @deprecated Use `balanceV2` instead - */ - balance: Scalars['Money'] - /** The amount left on the gift card. */ - balanceV2: MoneyV2 - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The last characters of the gift card. */ - lastCharacters: Scalars['String'] - /** The amount that was applied to the checkout in its currency. */ - presentmentAmountUsed: MoneyV2 -} - -/** An article in an online store blog. */ -export type Article = Node & { - __typename?: 'Article' - /** - * The article's author. - * @deprecated Use `authorV2` instead - */ - author: ArticleAuthor - /** The article's author. */ - authorV2?: Maybe - /** The blog that the article belongs to. */ - blog: Blog - /** List of comments posted on the article. */ - comments: CommentConnection - /** Stripped content of the article, single line with HTML tags removed. */ - content: Scalars['String'] - /** The content of the article, complete with HTML formatting. */ - contentHtml: Scalars['HTML'] - /** Stripped excerpt of the article, single line with HTML tags removed. */ - excerpt?: Maybe - /** The excerpt of the article, complete with HTML formatting. */ - excerptHtml?: Maybe - /** A human-friendly unique string for the Article automatically generated from its title. */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The image associated with the article. */ - image?: Maybe - /** The date and time when the article was published. */ - publishedAt: Scalars['DateTime'] - /** The article’s SEO information. */ - seo?: Maybe - /** A categorization that a article can be tagged with. */ - tags: Array - /** The article’s name. */ - title: Scalars['String'] - /** The url pointing to the article accessible from the web. */ - url: Scalars['URL'] -} - -/** An article in an online store blog. */ -export type ArticleCommentsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** An article in an online store blog. */ -export type ArticleContentArgs = { - truncateAt?: Maybe -} - -/** An article in an online store blog. */ -export type ArticleExcerptArgs = { - truncateAt?: Maybe -} - -/** An article in an online store blog. */ -export type ArticleImageArgs = { - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe -} - -/** The author of an article. */ -export type ArticleAuthor = { - __typename?: 'ArticleAuthor' - /** The author's bio. */ - bio?: Maybe - /** The author’s email. */ - email: Scalars['String'] - /** The author's first name. */ - firstName: Scalars['String'] - /** The author's last name. */ - lastName: Scalars['String'] - /** The author's full name. */ - name: Scalars['String'] -} - -/** An auto-generated type for paginating through multiple Articles. */ -export type ArticleConnection = { - __typename?: 'ArticleConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Article and a cursor during pagination. */ -export type ArticleEdge = { - __typename?: 'ArticleEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ArticleEdge. */ - node: Article -} - -/** The set of valid sort keys for the Article query. */ -export enum ArticleSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `blog_title` value. */ - BlogTitle = 'BLOG_TITLE', - /** Sort by the `author` value. */ - Author = 'AUTHOR', - /** Sort by the `updated_at` value. */ - UpdatedAt = 'UPDATED_AT', - /** Sort by the `published_at` value. */ - PublishedAt = 'PUBLISHED_AT', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** Represents a generic custom attribute. */ -export type Attribute = { - __typename?: 'Attribute' - /** Key or name of the attribute. */ - key: Scalars['String'] - /** Value of the attribute. */ - value?: Maybe -} - -/** Specifies the input fields required for an attribute. */ -export type AttributeInput = { - /** Key or name of the attribute. */ - key: Scalars['String'] - /** Value of the attribute. */ - value: Scalars['String'] -} - -/** Automatic discount applications capture the intentions of a discount that was automatically applied. */ -export type AutomaticDiscountApplication = DiscountApplication & { - __typename?: 'AutomaticDiscountApplication' - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The title of the application. */ - title: Scalars['String'] - /** The value of the discount application. */ - value: PricingValue -} - -/** A collection of available shipping rates for a checkout. */ -export type AvailableShippingRates = { - __typename?: 'AvailableShippingRates' - /** - * Whether or not the shipping rates are ready. - * The `shippingRates` field is `null` when this value is `false`. - * This field should be polled until its value becomes `true`. - */ - ready: Scalars['Boolean'] - /** The fetched shipping rates. `null` until the `ready` field is `true`. */ - shippingRates?: Maybe> -} - -/** An online store blog. */ -export type Blog = Node & { - __typename?: 'Blog' - /** Find an article by its handle. */ - articleByHandle?: Maybe
- /** List of the blog's articles. */ - articles: ArticleConnection - /** The authors who have contributed to the blog. */ - authors: Array - /** A human-friendly unique string for the Blog automatically generated from its title. */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The blog's SEO information. */ - seo?: Maybe - /** The blogs’s title. */ - title: Scalars['String'] - /** The url pointing to the blog accessible from the web. */ - url: Scalars['URL'] -} - -/** An online store blog. */ -export type BlogArticleByHandleArgs = { - handle: Scalars['String'] -} - -/** An online store blog. */ -export type BlogArticlesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** An auto-generated type for paginating through multiple Blogs. */ -export type BlogConnection = { - __typename?: 'BlogConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Blog and a cursor during pagination. */ -export type BlogEdge = { - __typename?: 'BlogEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of BlogEdge. */ - node: Blog -} - -/** The set of valid sort keys for the Blog query. */ -export enum BlogSortKeys { - /** Sort by the `handle` value. */ - Handle = 'HANDLE', - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** Card brand, such as Visa or Mastercard, which can be used for payments. */ -export enum CardBrand { - /** Visa */ - Visa = 'VISA', - /** Mastercard */ - Mastercard = 'MASTERCARD', - /** Discover */ - Discover = 'DISCOVER', - /** American Express */ - AmericanExpress = 'AMERICAN_EXPRESS', - /** Diners Club */ - DinersClub = 'DINERS_CLUB', - /** JCB */ - Jcb = 'JCB', -} - -/** A container for all the information required to checkout items and pay. */ -export type Checkout = { - name: string - currency: string - support_email: string - fields: any[] - scripts: any[] - accounts: string - email_optin: boolean - terms_policy?: string - refund_policy?: string - privacy_policy?: string - theme?: stirng - countries: any[] - currencies: any[] - payment_methods: any[] - coupons: boolean - giftcards: boolean - - // __typename?: 'Checkout' - // /** The gift cards used on the checkout. */ - // appliedGiftCards: Array - // /** - // * The available shipping rates for this Checkout. - // * Should only be used when checkout `requiresShipping` is `true` and - // * the shipping address is valid. - // */ - // availableShippingRates?: Maybe - // /** The date and time when the checkout was completed. */ - // completedAt?: Maybe - // /** The date and time when the checkout was created. */ - // createdAt: Scalars['DateTime'] - // /** The currency code for the Checkout. */ - // currencyCode: CurrencyCode - // /** A list of extra information that is added to the checkout. */ - // customAttributes: Array - // /** - // * The customer associated with the checkout. - // * @deprecated This field will always return null. If you have an authentication token for the customer, you can use the `customer` field on the query root to retrieve it. - // */ - // customer?: Maybe - // /** Discounts that have been applied on the checkout. */ - // discountApplications: DiscountApplicationConnection - // /** The email attached to this checkout. */ - // email?: Maybe - // /** Globally unique identifier. */ - // id: Scalars['ID'] - // /** A list of line item objects, each one containing information about an item in the checkout. */ - // lineItems: CheckoutLineItemConnection - // /** The sum of all the prices of all the items in the checkout. Duties, taxes, shipping and discounts excluded. */ - // lineItemsSubtotalPrice: MoneyV2 - // /** The note associated with the checkout. */ - // note?: Maybe - // /** The resulting order from a paid checkout. */ - // order?: Maybe - // /** The Order Status Page for this Checkout, null when checkout is not completed. */ - // orderStatusUrl?: Maybe - // /** - // * The amount left to be paid. This is equal to the cost of the line items, taxes and shipping minus discounts and gift cards. - // * @deprecated Use `paymentDueV2` instead - // */ - // paymentDue: Scalars['Money'] - // /** The amount left to be paid. This is equal to the cost of the line items, duties, taxes and shipping minus discounts and gift cards. */ - // paymentDueV2: MoneyV2 - // /** - // * Whether or not the Checkout is ready and can be completed. Checkouts may - // * have asynchronous operations that can take time to finish. If you want - // * to complete a checkout or ensure all the fields are populated and up to - // * date, polling is required until the value is true. - // */ - // ready: Scalars['Boolean'] - // /** States whether or not the fulfillment requires shipping. */ - // requiresShipping: Scalars['Boolean'] - // /** The shipping address to where the line items will be shipped. */ - // shippingAddress?: Maybe - // /** The discounts that have been allocated onto the shipping line by discount applications. */ - // shippingDiscountAllocations: Array - // /** Once a shipping rate is selected by the customer it is transitioned to a `shipping_line` object. */ - // shippingLine?: Maybe - // /** - // * Price of the checkout before shipping and taxes. - // * @deprecated Use `subtotalPriceV2` instead - // */ - // subtotalPrice: Scalars['Money'] - // /** Price of the checkout before duties, shipping and taxes. */ - // subtotalPriceV2: MoneyV2 - // /** Specifies if the Checkout is tax exempt. */ - // taxExempt: Scalars['Boolean'] - // /** Specifies if taxes are included in the line item and shipping line prices. */ - // taxesIncluded: Scalars['Boolean'] - // /** - // * The sum of all the prices of all the items in the checkout, taxes and discounts included. - // * @deprecated Use `totalPriceV2` instead - // */ - // totalPrice: Scalars['Money'] - // /** The sum of all the prices of all the items in the checkout, duties, taxes and discounts included. */ - // totalPriceV2: MoneyV2 - // /** - // * The sum of all the taxes applied to the line items and shipping lines in the checkout. - // * @deprecated Use `totalTaxV2` instead - // */ - // totalTax: Scalars['Money'] - // /** The sum of all the taxes applied to the line items and shipping lines in the checkout. */ - // totalTaxV2: MoneyV2 - // /** The date and time when the checkout was last updated. */ - // updatedAt: Scalars['DateTime'] - // /** The url pointing to the checkout accessible from the web. */ - // webUrl: Scalars['URL'] -} - -/** A container for all the information required to checkout items and pay. */ -export type CheckoutDiscountApplicationsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** A container for all the information required to checkout items and pay. */ -export type CheckoutLineItemsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** Specifies the fields required to update a checkout's attributes. */ -export type CheckoutAttributesUpdateInput = { - /** The text of an optional note that a shop owner can attach to the checkout. */ - note?: Maybe - /** A list of extra information that is added to the checkout. */ - customAttributes?: Maybe> - /** - * Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - * The required attributes are city, province, and country. - * Full validation of the addresses is still done at complete time. - */ - allowPartialAddresses?: Maybe -} - -/** Return type for `checkoutAttributesUpdate` mutation. */ -export type CheckoutAttributesUpdatePayload = { - __typename?: 'CheckoutAttributesUpdatePayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to update a checkout's attributes. */ -export type CheckoutAttributesUpdateV2Input = { - /** The text of an optional note that a shop owner can attach to the checkout. */ - note?: Maybe - /** A list of extra information that is added to the checkout. */ - customAttributes?: Maybe> - /** - * Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - * The required attributes are city, province, and country. - * Full validation of the addresses is still done at complete time. - */ - allowPartialAddresses?: Maybe -} - -/** Return type for `checkoutAttributesUpdateV2` mutation. */ -export type CheckoutAttributesUpdateV2Payload = { - __typename?: 'CheckoutAttributesUpdateV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteFree` mutation. */ -export type CheckoutCompleteFreePayload = { - __typename?: 'CheckoutCompleteFreePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithCreditCard` mutation. */ -export type CheckoutCompleteWithCreditCardPayload = { - __typename?: 'CheckoutCompleteWithCreditCardPayload' - /** The checkout on which the payment was applied. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithCreditCardV2` mutation. */ -export type CheckoutCompleteWithCreditCardV2Payload = { - __typename?: 'CheckoutCompleteWithCreditCardV2Payload' - /** The checkout on which the payment was applied. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithTokenizedPayment` mutation. */ -export type CheckoutCompleteWithTokenizedPaymentPayload = { - __typename?: 'CheckoutCompleteWithTokenizedPaymentPayload' - /** The checkout on which the payment was applied. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithTokenizedPaymentV2` mutation. */ -export type CheckoutCompleteWithTokenizedPaymentV2Payload = { - __typename?: 'CheckoutCompleteWithTokenizedPaymentV2Payload' - /** The checkout on which the payment was applied. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCompleteWithTokenizedPaymentV3` mutation. */ -export type CheckoutCompleteWithTokenizedPaymentV3Payload = { - __typename?: 'CheckoutCompleteWithTokenizedPaymentV3Payload' - /** The checkout on which the payment was applied. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** A representation of the attempted payment. */ - payment?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to create a checkout. */ -export type CheckoutCreateInput = { - /** The email with which the customer wants to checkout. */ - email?: Maybe - /** A list of line item objects, each one containing information about an item in the checkout. */ - lineItems?: Maybe> - /** The shipping address to where the line items will be shipped. */ - shippingAddress?: Maybe - /** The text of an optional note that a shop owner can attach to the checkout. */ - note?: Maybe - /** A list of extra information that is added to the checkout. */ - customAttributes?: Maybe> - /** - * Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - * The required attributes are city, province, and country. - * Full validation of addresses is still done at complete time. - */ - allowPartialAddresses?: Maybe - /** - * The three-letter currency code of one of the shop's enabled presentment currencies. - * Including this field creates a checkout in the specified currency. By default, new - * checkouts are created in the shop's primary currency. - */ - presentmentCurrencyCode?: Maybe -} - -/** Return type for `checkoutCreate` mutation. */ -export type CheckoutCreatePayload = { - __typename?: 'CheckoutCreatePayload' - /** The new checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCustomerAssociate` mutation. */ -export type CheckoutCustomerAssociatePayload = { - __typename?: 'CheckoutCustomerAssociatePayload' - /** The updated checkout object. */ - checkout: Checkout - /** The associated customer object. */ - customer?: Maybe - /** List of errors that occurred executing the mutation. */ - userErrors: Array -} - -/** Return type for `checkoutCustomerAssociateV2` mutation. */ -export type CheckoutCustomerAssociateV2Payload = { - __typename?: 'CheckoutCustomerAssociateV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** The associated customer object. */ - customer?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCustomerDisassociate` mutation. */ -export type CheckoutCustomerDisassociatePayload = { - __typename?: 'CheckoutCustomerDisassociatePayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutCustomerDisassociateV2` mutation. */ -export type CheckoutCustomerDisassociateV2Payload = { - __typename?: 'CheckoutCustomerDisassociateV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutDiscountCodeApply` mutation. */ -export type CheckoutDiscountCodeApplyPayload = { - __typename?: 'CheckoutDiscountCodeApplyPayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutDiscountCodeApplyV2` mutation. */ -export type CheckoutDiscountCodeApplyV2Payload = { - __typename?: 'CheckoutDiscountCodeApplyV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutDiscountCodeRemove` mutation. */ -export type CheckoutDiscountCodeRemovePayload = { - __typename?: 'CheckoutDiscountCodeRemovePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutEmailUpdate` mutation. */ -export type CheckoutEmailUpdatePayload = { - __typename?: 'CheckoutEmailUpdatePayload' - /** The checkout object with the updated email. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutEmailUpdateV2` mutation. */ -export type CheckoutEmailUpdateV2Payload = { - __typename?: 'CheckoutEmailUpdateV2Payload' - /** The checkout object with the updated email. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Possible error codes that could be returned by CheckoutUserError. */ -export enum CheckoutErrorCode { - /** Input value is blank. */ - Blank = 'BLANK', - /** Input value is invalid. */ - Invalid = 'INVALID', - /** Input value is too long. */ - TooLong = 'TOO_LONG', - /** Input value is not present. */ - Present = 'PRESENT', - /** Input value should be less than maximum allowed value. */ - LessThan = 'LESS_THAN', - /** Input value should be greater than or equal to minimum allowed value. */ - GreaterThanOrEqualTo = 'GREATER_THAN_OR_EQUAL_TO', - /** Input value should be less or equal to maximum allowed value. */ - LessThanOrEqualTo = 'LESS_THAN_OR_EQUAL_TO', - /** Checkout is already completed. */ - AlreadyCompleted = 'ALREADY_COMPLETED', - /** Checkout is locked. */ - Locked = 'LOCKED', - /** Input value is not supported. */ - NotSupported = 'NOT_SUPPORTED', - /** Input email contains an invalid domain name. */ - BadDomain = 'BAD_DOMAIN', - /** Input Zip is invalid for country provided. */ - InvalidForCountry = 'INVALID_FOR_COUNTRY', - /** Input Zip is invalid for country and province provided. */ - InvalidForCountryAndProvince = 'INVALID_FOR_COUNTRY_AND_PROVINCE', - /** Invalid state in country. */ - InvalidStateInCountry = 'INVALID_STATE_IN_COUNTRY', - /** Invalid province in country. */ - InvalidProvinceInCountry = 'INVALID_PROVINCE_IN_COUNTRY', - /** Invalid region in country. */ - InvalidRegionInCountry = 'INVALID_REGION_IN_COUNTRY', - /** Shipping rate expired. */ - ShippingRateExpired = 'SHIPPING_RATE_EXPIRED', - /** Gift card cannot be applied to a checkout that contains a gift card. */ - GiftCardUnusable = 'GIFT_CARD_UNUSABLE', - /** Gift card is disabled. */ - GiftCardDisabled = 'GIFT_CARD_DISABLED', - /** Gift card code is invalid. */ - GiftCardCodeInvalid = 'GIFT_CARD_CODE_INVALID', - /** Gift card has already been applied. */ - GiftCardAlreadyApplied = 'GIFT_CARD_ALREADY_APPLIED', - /** Gift card currency does not match checkout currency. */ - GiftCardCurrencyMismatch = 'GIFT_CARD_CURRENCY_MISMATCH', - /** Gift card is expired. */ - GiftCardExpired = 'GIFT_CARD_EXPIRED', - /** Gift card has no funds left. */ - GiftCardDepleted = 'GIFT_CARD_DEPLETED', - /** Gift card was not found. */ - GiftCardNotFound = 'GIFT_CARD_NOT_FOUND', - /** Cart does not meet discount requirements notice. */ - CartDoesNotMeetDiscountRequirementsNotice = 'CART_DOES_NOT_MEET_DISCOUNT_REQUIREMENTS_NOTICE', - /** Discount expired. */ - DiscountExpired = 'DISCOUNT_EXPIRED', - /** Discount disabled. */ - DiscountDisabled = 'DISCOUNT_DISABLED', - /** Discount limit reached. */ - DiscountLimitReached = 'DISCOUNT_LIMIT_REACHED', - /** Discount not found. */ - DiscountNotFound = 'DISCOUNT_NOT_FOUND', - /** Customer already used once per customer discount notice. */ - CustomerAlreadyUsedOncePerCustomerDiscountNotice = 'CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE', - /** Checkout is already completed. */ - Empty = 'EMPTY', - /** Not enough in stock. */ - NotEnoughInStock = 'NOT_ENOUGH_IN_STOCK', - /** Missing payment input. */ - MissingPaymentInput = 'MISSING_PAYMENT_INPUT', - /** The amount of the payment does not match the value to be paid. */ - TotalPriceMismatch = 'TOTAL_PRICE_MISMATCH', - /** Line item was not found in checkout. */ - LineItemNotFound = 'LINE_ITEM_NOT_FOUND', - /** Unable to apply discount. */ - UnableToApply = 'UNABLE_TO_APPLY', - /** Discount already applied. */ - DiscountAlreadyApplied = 'DISCOUNT_ALREADY_APPLIED', -} - -/** Return type for `checkoutGiftCardApply` mutation. */ -export type CheckoutGiftCardApplyPayload = { - __typename?: 'CheckoutGiftCardApplyPayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutGiftCardRemove` mutation. */ -export type CheckoutGiftCardRemovePayload = { - __typename?: 'CheckoutGiftCardRemovePayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutGiftCardRemoveV2` mutation. */ -export type CheckoutGiftCardRemoveV2Payload = { - __typename?: 'CheckoutGiftCardRemoveV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutGiftCardsAppend` mutation. */ -export type CheckoutGiftCardsAppendPayload = { - __typename?: 'CheckoutGiftCardsAppendPayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** A single line item in the checkout, grouped by variant and attributes. */ -export type CheckoutLineItem = Node & { - __typename?: 'CheckoutLineItem' - /** Extra information in the form of an array of Key-Value pairs about the line item. */ - customAttributes: Array - /** The discounts that have been allocated onto the checkout line item by discount applications. */ - discountAllocations: Array - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The quantity of the line item. */ - quantity: Scalars['Int'] - /** Title of the line item. Defaults to the product's title. */ - title: Scalars['String'] - /** Unit price of the line item. */ - unitPrice?: Maybe - /** Product variant of the line item. */ - variant?: Maybe -} - -/** An auto-generated type for paginating through multiple CheckoutLineItems. */ -export type CheckoutLineItemConnection = { - __typename?: 'CheckoutLineItemConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one CheckoutLineItem and a cursor during pagination. */ -export type CheckoutLineItemEdge = { - __typename?: 'CheckoutLineItemEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of CheckoutLineItemEdge. */ - node: CheckoutLineItem -} - -/** Specifies the input fields to create a line item on a checkout. */ -export type CheckoutLineItemInput = { - /** Extra information in the form of an array of Key-Value pairs about the line item. */ - customAttributes?: Maybe> - /** The quantity of the line item. */ - quantity: Scalars['Int'] - /** The identifier of the product variant for the line item. */ - variantId: Scalars['ID'] -} - -/** Specifies the input fields to update a line item on the checkout. */ -export type CheckoutLineItemUpdateInput = { - /** The identifier of the line item. */ - id?: Maybe - /** The variant identifier of the line item. */ - variantId?: Maybe - /** The quantity of the line item. */ - quantity?: Maybe - /** Extra information in the form of an array of Key-Value pairs about the line item. */ - customAttributes?: Maybe> -} - -/** Return type for `checkoutLineItemsAdd` mutation. */ -export type CheckoutLineItemsAddPayload = { - __typename?: 'CheckoutLineItemsAddPayload' - /** The updated checkout object. */ - items?: Maybe - /** List of errors that occurred executing the mutation. */ - // checkoutUserErrors: Array - // /** - // * List of errors that occurred executing the mutation. - // * @deprecated Use `checkoutUserErrors` instead - // */ - // userErrors: Array -} - -/** Return type for `checkoutLineItemsRemove` mutation. */ -export type CheckoutLineItemsRemovePayload = { - __typename?: 'CheckoutLineItemsRemovePayload' - /** The updated checkout object. */ - items?: Maybe - /** List of errors that occurred executing the mutation. */ - // checkoutUserErrors: Array - // /** - // * List of errors that occurred executing the mutation. - // * @deprecated Use `checkoutUserErrors` instead - // */ - // userErrors: Array -} - -/** Return type for `checkoutLineItemsReplace` mutation. */ -export type CheckoutLineItemsReplacePayload = { - __typename?: 'CheckoutLineItemsReplacePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - userErrors: Array -} - -/** Return type for `checkoutLineItemsUpdate` mutation. */ -export type CheckoutLineItemsUpdatePayload = { - __typename?: 'CheckoutLineItemsUpdatePayload' - /** The updated checkout object. */ - items?: Maybe - /** List of errors that occurred executing the mutation. */ - // checkoutUserErrors: Array - // /** - // * List of errors that occurred executing the mutation. - // * @deprecated Use `checkoutUserErrors` instead - // */ - // userErrors: Array -} - -/** Return type for `checkoutShippingAddressUpdate` mutation. */ -export type CheckoutShippingAddressUpdatePayload = { - __typename?: 'CheckoutShippingAddressUpdatePayload' - /** The updated checkout object. */ - checkout: Checkout - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutShippingAddressUpdateV2` mutation. */ -export type CheckoutShippingAddressUpdateV2Payload = { - __typename?: 'CheckoutShippingAddressUpdateV2Payload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `checkoutShippingLineUpdate` mutation. */ -export type CheckoutShippingLineUpdatePayload = { - __typename?: 'CheckoutShippingLineUpdatePayload' - /** The updated checkout object. */ - checkout?: Maybe - /** List of errors that occurred executing the mutation. */ - checkoutUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `checkoutUserErrors` instead - */ - userErrors: Array -} - -/** Represents an error that happens during execution of a checkout mutation. */ -export type CheckoutUserError = DisplayableError & { - __typename?: 'CheckoutUserError' - /** Error code to uniquely identify the error. */ - code?: Maybe - /** Path to the input field which caused the error. */ - field?: Maybe> - /** The error message. */ - message: Scalars['String'] -} - -/** A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. */ -export type Collection = Node & { - __typename?: 'Collection' - /** Stripped description of the collection, single line with HTML tags removed. */ - description: Scalars['String'] - /** The description of the collection, complete with HTML formatting. */ - descriptionHtml: Scalars['HTML'] - /** - * A human-friendly unique string for the collection automatically generated from its title. - * Limit of 255 characters. - */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** Image associated with the collection. */ - image?: Maybe - /** List of products in the collection. */ - products: ProductConnection - /** The collection’s name. Limit of 255 characters. */ - title: Scalars['String'] - /** The date and time when the collection was last modified. */ - updatedAt: Scalars['DateTime'] -} - -/** A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. */ -export type CollectionDescriptionArgs = { - truncateAt?: Maybe -} - -/** A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. */ -export type CollectionImageArgs = { - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe -} - -/** A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. */ -export type CollectionProductsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe -} - -/** An auto-generated type for paginating through multiple Collections. */ -export type CollectionConnection = { - __typename?: 'CollectionConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Collection and a cursor during pagination. */ -export type CollectionEdge = { - __typename?: 'CollectionEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of CollectionEdge. */ - node: Collection -} - -/** The set of valid sort keys for the Collection query. */ -export enum CollectionSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `updated_at` value. */ - UpdatedAt = 'UPDATED_AT', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** A comment on an article. */ -export type Comment = Node & { - __typename?: 'Comment' - /** The comment’s author. */ - author: CommentAuthor - /** Stripped content of the comment, single line with HTML tags removed. */ - content: Scalars['String'] - /** The content of the comment, complete with HTML formatting. */ - contentHtml: Scalars['HTML'] - /** Globally unique identifier. */ - id: Scalars['ID'] -} - -/** A comment on an article. */ -export type CommentContentArgs = { - truncateAt?: Maybe -} - -/** The author of a comment. */ -export type CommentAuthor = { - __typename?: 'CommentAuthor' - /** The author's email. */ - email: Scalars['String'] - /** The author’s name. */ - name: Scalars['String'] -} - -/** An auto-generated type for paginating through multiple Comments. */ -export type CommentConnection = { - __typename?: 'CommentConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Comment and a cursor during pagination. */ -export type CommentEdge = { - __typename?: 'CommentEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of CommentEdge. */ - node: Comment -} - -/** ISO 3166-1 alpha-2 country codes with some differences. */ -export enum CountryCode { - /** Afghanistan. */ - Af = 'AF', - /** Åland Islands. */ - Ax = 'AX', - /** Albania. */ - Al = 'AL', - /** Algeria. */ - Dz = 'DZ', - /** Andorra. */ - Ad = 'AD', - /** Angola. */ - Ao = 'AO', - /** Anguilla. */ - Ai = 'AI', - /** Antigua & Barbuda. */ - Ag = 'AG', - /** Argentina. */ - Ar = 'AR', - /** Armenia. */ - Am = 'AM', - /** Aruba. */ - Aw = 'AW', - /** Australia. */ - Au = 'AU', - /** Austria. */ - At = 'AT', - /** Azerbaijan. */ - Az = 'AZ', - /** Bahamas. */ - Bs = 'BS', - /** Bahrain. */ - Bh = 'BH', - /** Bangladesh. */ - Bd = 'BD', - /** Barbados. */ - Bb = 'BB', - /** Belarus. */ - By = 'BY', - /** Belgium. */ - Be = 'BE', - /** Belize. */ - Bz = 'BZ', - /** Benin. */ - Bj = 'BJ', - /** Bermuda. */ - Bm = 'BM', - /** Bhutan. */ - Bt = 'BT', - /** Bolivia. */ - Bo = 'BO', - /** Bosnia & Herzegovina. */ - Ba = 'BA', - /** Botswana. */ - Bw = 'BW', - /** Bouvet Island. */ - Bv = 'BV', - /** Brazil. */ - Br = 'BR', - /** British Indian Ocean Territory. */ - Io = 'IO', - /** Brunei. */ - Bn = 'BN', - /** Bulgaria. */ - Bg = 'BG', - /** Burkina Faso. */ - Bf = 'BF', - /** Burundi. */ - Bi = 'BI', - /** Cambodia. */ - Kh = 'KH', - /** Canada. */ - Ca = 'CA', - /** Cape Verde. */ - Cv = 'CV', - /** Caribbean Netherlands. */ - Bq = 'BQ', - /** Cayman Islands. */ - Ky = 'KY', - /** Central African Republic. */ - Cf = 'CF', - /** Chad. */ - Td = 'TD', - /** Chile. */ - Cl = 'CL', - /** China. */ - Cn = 'CN', - /** Christmas Island. */ - Cx = 'CX', - /** Cocos (Keeling) Islands. */ - Cc = 'CC', - /** Colombia. */ - Co = 'CO', - /** Comoros. */ - Km = 'KM', - /** Congo - Brazzaville. */ - Cg = 'CG', - /** Congo - Kinshasa. */ - Cd = 'CD', - /** Cook Islands. */ - Ck = 'CK', - /** Costa Rica. */ - Cr = 'CR', - /** Croatia. */ - Hr = 'HR', - /** Cuba. */ - Cu = 'CU', - /** Curaçao. */ - Cw = 'CW', - /** Cyprus. */ - Cy = 'CY', - /** Czechia. */ - Cz = 'CZ', - /** Côte d’Ivoire. */ - Ci = 'CI', - /** Denmark. */ - Dk = 'DK', - /** Djibouti. */ - Dj = 'DJ', - /** Dominica. */ - Dm = 'DM', - /** Dominican Republic. */ - Do = 'DO', - /** Ecuador. */ - Ec = 'EC', - /** Egypt. */ - Eg = 'EG', - /** El Salvador. */ - Sv = 'SV', - /** Equatorial Guinea. */ - Gq = 'GQ', - /** Eritrea. */ - Er = 'ER', - /** Estonia. */ - Ee = 'EE', - /** Eswatini. */ - Sz = 'SZ', - /** Ethiopia. */ - Et = 'ET', - /** Falkland Islands. */ - Fk = 'FK', - /** Faroe Islands. */ - Fo = 'FO', - /** Fiji. */ - Fj = 'FJ', - /** Finland. */ - Fi = 'FI', - /** France. */ - Fr = 'FR', - /** French Guiana. */ - Gf = 'GF', - /** French Polynesia. */ - Pf = 'PF', - /** French Southern Territories. */ - Tf = 'TF', - /** Gabon. */ - Ga = 'GA', - /** Gambia. */ - Gm = 'GM', - /** Georgia. */ - Ge = 'GE', - /** Germany. */ - De = 'DE', - /** Ghana. */ - Gh = 'GH', - /** Gibraltar. */ - Gi = 'GI', - /** Greece. */ - Gr = 'GR', - /** Greenland. */ - Gl = 'GL', - /** Grenada. */ - Gd = 'GD', - /** Guadeloupe. */ - Gp = 'GP', - /** Guatemala. */ - Gt = 'GT', - /** Guernsey. */ - Gg = 'GG', - /** Guinea. */ - Gn = 'GN', - /** Guinea-Bissau. */ - Gw = 'GW', - /** Guyana. */ - Gy = 'GY', - /** Haiti. */ - Ht = 'HT', - /** Heard & McDonald Islands. */ - Hm = 'HM', - /** Vatican City. */ - Va = 'VA', - /** Honduras. */ - Hn = 'HN', - /** Hong Kong SAR. */ - Hk = 'HK', - /** Hungary. */ - Hu = 'HU', - /** Iceland. */ - Is = 'IS', - /** India. */ - In = 'IN', - /** Indonesia. */ - Id = 'ID', - /** Iran. */ - Ir = 'IR', - /** Iraq. */ - Iq = 'IQ', - /** Ireland. */ - Ie = 'IE', - /** Isle of Man. */ - Im = 'IM', - /** Israel. */ - Il = 'IL', - /** Italy. */ - It = 'IT', - /** Jamaica. */ - Jm = 'JM', - /** Japan. */ - Jp = 'JP', - /** Jersey. */ - Je = 'JE', - /** Jordan. */ - Jo = 'JO', - /** Kazakhstan. */ - Kz = 'KZ', - /** Kenya. */ - Ke = 'KE', - /** Kiribati. */ - Ki = 'KI', - /** North Korea. */ - Kp = 'KP', - /** Kosovo. */ - Xk = 'XK', - /** Kuwait. */ - Kw = 'KW', - /** Kyrgyzstan. */ - Kg = 'KG', - /** Laos. */ - La = 'LA', - /** Latvia. */ - Lv = 'LV', - /** Lebanon. */ - Lb = 'LB', - /** Lesotho. */ - Ls = 'LS', - /** Liberia. */ - Lr = 'LR', - /** Libya. */ - Ly = 'LY', - /** Liechtenstein. */ - Li = 'LI', - /** Lithuania. */ - Lt = 'LT', - /** Luxembourg. */ - Lu = 'LU', - /** Macao SAR. */ - Mo = 'MO', - /** Madagascar. */ - Mg = 'MG', - /** Malawi. */ - Mw = 'MW', - /** Malaysia. */ - My = 'MY', - /** Maldives. */ - Mv = 'MV', - /** Mali. */ - Ml = 'ML', - /** Malta. */ - Mt = 'MT', - /** Martinique. */ - Mq = 'MQ', - /** Mauritania. */ - Mr = 'MR', - /** Mauritius. */ - Mu = 'MU', - /** Mayotte. */ - Yt = 'YT', - /** Mexico. */ - Mx = 'MX', - /** Moldova. */ - Md = 'MD', - /** Monaco. */ - Mc = 'MC', - /** Mongolia. */ - Mn = 'MN', - /** Montenegro. */ - Me = 'ME', - /** Montserrat. */ - Ms = 'MS', - /** Morocco. */ - Ma = 'MA', - /** Mozambique. */ - Mz = 'MZ', - /** Myanmar (Burma). */ - Mm = 'MM', - /** Namibia. */ - Na = 'NA', - /** Nauru. */ - Nr = 'NR', - /** Nepal. */ - Np = 'NP', - /** Netherlands. */ - Nl = 'NL', - /** Netherlands Antilles. */ - An = 'AN', - /** New Caledonia. */ - Nc = 'NC', - /** New Zealand. */ - Nz = 'NZ', - /** Nicaragua. */ - Ni = 'NI', - /** Niger. */ - Ne = 'NE', - /** Nigeria. */ - Ng = 'NG', - /** Niue. */ - Nu = 'NU', - /** Norfolk Island. */ - Nf = 'NF', - /** North Macedonia. */ - Mk = 'MK', - /** Norway. */ - No = 'NO', - /** Oman. */ - Om = 'OM', - /** Pakistan. */ - Pk = 'PK', - /** Palestinian Territories. */ - Ps = 'PS', - /** Panama. */ - Pa = 'PA', - /** Papua New Guinea. */ - Pg = 'PG', - /** Paraguay. */ - Py = 'PY', - /** Peru. */ - Pe = 'PE', - /** Philippines. */ - Ph = 'PH', - /** Pitcairn Islands. */ - Pn = 'PN', - /** Poland. */ - Pl = 'PL', - /** Portugal. */ - Pt = 'PT', - /** Qatar. */ - Qa = 'QA', - /** Cameroon. */ - Cm = 'CM', - /** Réunion. */ - Re = 'RE', - /** Romania. */ - Ro = 'RO', - /** Russia. */ - Ru = 'RU', - /** Rwanda. */ - Rw = 'RW', - /** St. Barthélemy. */ - Bl = 'BL', - /** St. Helena. */ - Sh = 'SH', - /** St. Kitts & Nevis. */ - Kn = 'KN', - /** St. Lucia. */ - Lc = 'LC', - /** St. Martin. */ - Mf = 'MF', - /** St. Pierre & Miquelon. */ - Pm = 'PM', - /** Samoa. */ - Ws = 'WS', - /** San Marino. */ - Sm = 'SM', - /** São Tomé & Príncipe. */ - St = 'ST', - /** Saudi Arabia. */ - Sa = 'SA', - /** Senegal. */ - Sn = 'SN', - /** Serbia. */ - Rs = 'RS', - /** Seychelles. */ - Sc = 'SC', - /** Sierra Leone. */ - Sl = 'SL', - /** Singapore. */ - Sg = 'SG', - /** Sint Maarten. */ - Sx = 'SX', - /** Slovakia. */ - Sk = 'SK', - /** Slovenia. */ - Si = 'SI', - /** Solomon Islands. */ - Sb = 'SB', - /** Somalia. */ - So = 'SO', - /** South Africa. */ - Za = 'ZA', - /** South Georgia & South Sandwich Islands. */ - Gs = 'GS', - /** South Korea. */ - Kr = 'KR', - /** South Sudan. */ - Ss = 'SS', - /** Spain. */ - Es = 'ES', - /** Sri Lanka. */ - Lk = 'LK', - /** St. Vincent & Grenadines. */ - Vc = 'VC', - /** Sudan. */ - Sd = 'SD', - /** Suriname. */ - Sr = 'SR', - /** Svalbard & Jan Mayen. */ - Sj = 'SJ', - /** Sweden. */ - Se = 'SE', - /** Switzerland. */ - Ch = 'CH', - /** Syria. */ - Sy = 'SY', - /** Taiwan. */ - Tw = 'TW', - /** Tajikistan. */ - Tj = 'TJ', - /** Tanzania. */ - Tz = 'TZ', - /** Thailand. */ - Th = 'TH', - /** Timor-Leste. */ - Tl = 'TL', - /** Togo. */ - Tg = 'TG', - /** Tokelau. */ - Tk = 'TK', - /** Tonga. */ - To = 'TO', - /** Trinidad & Tobago. */ - Tt = 'TT', - /** Tunisia. */ - Tn = 'TN', - /** Turkey. */ - Tr = 'TR', - /** Turkmenistan. */ - Tm = 'TM', - /** Turks & Caicos Islands. */ - Tc = 'TC', - /** Tuvalu. */ - Tv = 'TV', - /** Uganda. */ - Ug = 'UG', - /** Ukraine. */ - Ua = 'UA', - /** United Arab Emirates. */ - Ae = 'AE', - /** United Kingdom. */ - Gb = 'GB', - /** United States. */ - Us = 'US', - /** U.S. Outlying Islands. */ - Um = 'UM', - /** Uruguay. */ - Uy = 'UY', - /** Uzbekistan. */ - Uz = 'UZ', - /** Vanuatu. */ - Vu = 'VU', - /** Venezuela. */ - Ve = 'VE', - /** Vietnam. */ - Vn = 'VN', - /** British Virgin Islands. */ - Vg = 'VG', - /** Wallis & Futuna. */ - Wf = 'WF', - /** Western Sahara. */ - Eh = 'EH', - /** Yemen. */ - Ye = 'YE', - /** Zambia. */ - Zm = 'ZM', - /** Zimbabwe. */ - Zw = 'ZW', -} - -/** Credit card information used for a payment. */ -export type CreditCard = { - __typename?: 'CreditCard' - /** The brand of the credit card. */ - brand?: Maybe - /** The expiry month of the credit card. */ - expiryMonth?: Maybe - /** The expiry year of the credit card. */ - expiryYear?: Maybe - /** The credit card's BIN number. */ - firstDigits?: Maybe - /** The first name of the card holder. */ - firstName?: Maybe - /** The last 4 digits of the credit card. */ - lastDigits?: Maybe - /** The last name of the card holder. */ - lastName?: Maybe - /** The masked credit card number with only the last 4 digits displayed. */ - maskedNumber?: Maybe -} - -/** - * Specifies the fields required to complete a checkout with - * a Shopify vaulted credit card payment. - */ -export type CreditCardPaymentInput = { - /** The amount of the payment. */ - amount: Scalars['Money'] - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** The ID returned by Shopify's Card Vault. */ - vaultId: Scalars['String'] - /** Executes the payment in test mode if possible. Defaults to `false`. */ - test?: Maybe -} - -/** - * Specifies the fields required to complete a checkout with - * a Shopify vaulted credit card payment. - */ -export type CreditCardPaymentInputV2 = { - /** The amount and currency of the payment. */ - paymentAmount: MoneyInput - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** The ID returned by Shopify's Card Vault. */ - vaultId: Scalars['String'] - /** Executes the payment in test mode if possible. Defaults to `false`. */ - test?: Maybe -} - -/** The part of the image that should remain after cropping. */ -export enum CropRegion { - /** Keep the center of the image. */ - Center = 'CENTER', - /** Keep the top of the image. */ - Top = 'TOP', - /** Keep the bottom of the image. */ - Bottom = 'BOTTOM', - /** Keep the left of the image. */ - Left = 'LEFT', - /** Keep the right of the image. */ - Right = 'RIGHT', -} - -/** Currency codes. */ -export enum CurrencyCode { - /** United States Dollars (USD). */ - Usd = 'USD', - /** Euro (EUR). */ - Eur = 'EUR', - /** United Kingdom Pounds (GBP). */ - Gbp = 'GBP', - /** Canadian Dollars (CAD). */ - Cad = 'CAD', - /** Afghan Afghani (AFN). */ - Afn = 'AFN', - /** Albanian Lek (ALL). */ - All = 'ALL', - /** Algerian Dinar (DZD). */ - Dzd = 'DZD', - /** Angolan Kwanza (AOA). */ - Aoa = 'AOA', - /** Argentine Pesos (ARS). */ - Ars = 'ARS', - /** Armenian Dram (AMD). */ - Amd = 'AMD', - /** Aruban Florin (AWG). */ - Awg = 'AWG', - /** Australian Dollars (AUD). */ - Aud = 'AUD', - /** Barbadian Dollar (BBD). */ - Bbd = 'BBD', - /** Azerbaijani Manat (AZN). */ - Azn = 'AZN', - /** Bangladesh Taka (BDT). */ - Bdt = 'BDT', - /** Bahamian Dollar (BSD). */ - Bsd = 'BSD', - /** Bahraini Dinar (BHD). */ - Bhd = 'BHD', - /** Burundian Franc (BIF). */ - Bif = 'BIF', - /** Belarusian Ruble (BYN). */ - Byn = 'BYN', - /** Belarusian Ruble (BYR). */ - Byr = 'BYR', - /** Belize Dollar (BZD). */ - Bzd = 'BZD', - /** Bermudian Dollar (BMD). */ - Bmd = 'BMD', - /** Bhutanese Ngultrum (BTN). */ - Btn = 'BTN', - /** Bosnia and Herzegovina Convertible Mark (BAM). */ - Bam = 'BAM', - /** Brazilian Real (BRL). */ - Brl = 'BRL', - /** Bolivian Boliviano (BOB). */ - Bob = 'BOB', - /** Botswana Pula (BWP). */ - Bwp = 'BWP', - /** Brunei Dollar (BND). */ - Bnd = 'BND', - /** Bulgarian Lev (BGN). */ - Bgn = 'BGN', - /** Burmese Kyat (MMK). */ - Mmk = 'MMK', - /** Cambodian Riel. */ - Khr = 'KHR', - /** Cape Verdean escudo (CVE). */ - Cve = 'CVE', - /** Cayman Dollars (KYD). */ - Kyd = 'KYD', - /** Central African CFA Franc (XAF). */ - Xaf = 'XAF', - /** Chilean Peso (CLP). */ - Clp = 'CLP', - /** Chinese Yuan Renminbi (CNY). */ - Cny = 'CNY', - /** Colombian Peso (COP). */ - Cop = 'COP', - /** Comorian Franc (KMF). */ - Kmf = 'KMF', - /** Congolese franc (CDF). */ - Cdf = 'CDF', - /** Costa Rican Colones (CRC). */ - Crc = 'CRC', - /** Croatian Kuna (HRK). */ - Hrk = 'HRK', - /** Czech Koruny (CZK). */ - Czk = 'CZK', - /** Danish Kroner (DKK). */ - Dkk = 'DKK', - /** Djiboutian Franc (DJF). */ - Djf = 'DJF', - /** Dominican Peso (DOP). */ - Dop = 'DOP', - /** East Caribbean Dollar (XCD). */ - Xcd = 'XCD', - /** Egyptian Pound (EGP). */ - Egp = 'EGP', - /** Eritrean Nakfa (ERN). */ - Ern = 'ERN', - /** Ethiopian Birr (ETB). */ - Etb = 'ETB', - /** Falkland Islands Pounds (FKP). */ - Fkp = 'FKP', - /** CFP Franc (XPF). */ - Xpf = 'XPF', - /** Fijian Dollars (FJD). */ - Fjd = 'FJD', - /** Gibraltar Pounds (GIP). */ - Gip = 'GIP', - /** Gambian Dalasi (GMD). */ - Gmd = 'GMD', - /** Ghanaian Cedi (GHS). */ - Ghs = 'GHS', - /** Guatemalan Quetzal (GTQ). */ - Gtq = 'GTQ', - /** Guyanese Dollar (GYD). */ - Gyd = 'GYD', - /** Georgian Lari (GEL). */ - Gel = 'GEL', - /** Guinean Franc (GNF). */ - Gnf = 'GNF', - /** Haitian Gourde (HTG). */ - Htg = 'HTG', - /** Honduran Lempira (HNL). */ - Hnl = 'HNL', - /** Hong Kong Dollars (HKD). */ - Hkd = 'HKD', - /** Hungarian Forint (HUF). */ - Huf = 'HUF', - /** Icelandic Kronur (ISK). */ - Isk = 'ISK', - /** Indian Rupees (INR). */ - Inr = 'INR', - /** Indonesian Rupiah (IDR). */ - Idr = 'IDR', - /** Israeli New Shekel (NIS). */ - Ils = 'ILS', - /** Iranian Rial (IRR). */ - Irr = 'IRR', - /** Iraqi Dinar (IQD). */ - Iqd = 'IQD', - /** Jamaican Dollars (JMD). */ - Jmd = 'JMD', - /** Japanese Yen (JPY). */ - Jpy = 'JPY', - /** Jersey Pound. */ - Jep = 'JEP', - /** Jordanian Dinar (JOD). */ - Jod = 'JOD', - /** Kazakhstani Tenge (KZT). */ - Kzt = 'KZT', - /** Kenyan Shilling (KES). */ - Kes = 'KES', - /** Kiribati Dollar (KID). */ - Kid = 'KID', - /** Kuwaiti Dinar (KWD). */ - Kwd = 'KWD', - /** Kyrgyzstani Som (KGS). */ - Kgs = 'KGS', - /** Laotian Kip (LAK). */ - Lak = 'LAK', - /** Latvian Lati (LVL). */ - Lvl = 'LVL', - /** Lebanese Pounds (LBP). */ - Lbp = 'LBP', - /** Lesotho Loti (LSL). */ - Lsl = 'LSL', - /** Liberian Dollar (LRD). */ - Lrd = 'LRD', - /** Libyan Dinar (LYD). */ - Lyd = 'LYD', - /** Lithuanian Litai (LTL). */ - Ltl = 'LTL', - /** Malagasy Ariary (MGA). */ - Mga = 'MGA', - /** Macedonia Denar (MKD). */ - Mkd = 'MKD', - /** Macanese Pataca (MOP). */ - Mop = 'MOP', - /** Malawian Kwacha (MWK). */ - Mwk = 'MWK', - /** Maldivian Rufiyaa (MVR). */ - Mvr = 'MVR', - /** Mauritanian Ouguiya (MRU). */ - Mru = 'MRU', - /** Mexican Pesos (MXN). */ - Mxn = 'MXN', - /** Malaysian Ringgits (MYR). */ - Myr = 'MYR', - /** Mauritian Rupee (MUR). */ - Mur = 'MUR', - /** Moldovan Leu (MDL). */ - Mdl = 'MDL', - /** Moroccan Dirham. */ - Mad = 'MAD', - /** Mongolian Tugrik. */ - Mnt = 'MNT', - /** Mozambican Metical. */ - Mzn = 'MZN', - /** Namibian Dollar. */ - Nad = 'NAD', - /** Nepalese Rupee (NPR). */ - Npr = 'NPR', - /** Netherlands Antillean Guilder. */ - Ang = 'ANG', - /** New Zealand Dollars (NZD). */ - Nzd = 'NZD', - /** Nicaraguan Córdoba (NIO). */ - Nio = 'NIO', - /** Nigerian Naira (NGN). */ - Ngn = 'NGN', - /** Norwegian Kroner (NOK). */ - Nok = 'NOK', - /** Omani Rial (OMR). */ - Omr = 'OMR', - /** Panamian Balboa (PAB). */ - Pab = 'PAB', - /** Pakistani Rupee (PKR). */ - Pkr = 'PKR', - /** Papua New Guinean Kina (PGK). */ - Pgk = 'PGK', - /** Paraguayan Guarani (PYG). */ - Pyg = 'PYG', - /** Peruvian Nuevo Sol (PEN). */ - Pen = 'PEN', - /** Philippine Peso (PHP). */ - Php = 'PHP', - /** Polish Zlotych (PLN). */ - Pln = 'PLN', - /** Qatari Rial (QAR). */ - Qar = 'QAR', - /** Romanian Lei (RON). */ - Ron = 'RON', - /** Russian Rubles (RUB). */ - Rub = 'RUB', - /** Rwandan Franc (RWF). */ - Rwf = 'RWF', - /** Samoan Tala (WST). */ - Wst = 'WST', - /** Saint Helena Pounds (SHP). */ - Shp = 'SHP', - /** Saudi Riyal (SAR). */ - Sar = 'SAR', - /** Sao Tome And Principe Dobra (STD). */ - Std = 'STD', - /** Serbian dinar (RSD). */ - Rsd = 'RSD', - /** Seychellois Rupee (SCR). */ - Scr = 'SCR', - /** Sierra Leonean Leone (SLL). */ - Sll = 'SLL', - /** Singapore Dollars (SGD). */ - Sgd = 'SGD', - /** Sudanese Pound (SDG). */ - Sdg = 'SDG', - /** Somali Shilling (SOS). */ - Sos = 'SOS', - /** Syrian Pound (SYP). */ - Syp = 'SYP', - /** South African Rand (ZAR). */ - Zar = 'ZAR', - /** South Korean Won (KRW). */ - Krw = 'KRW', - /** South Sudanese Pound (SSP). */ - Ssp = 'SSP', - /** Solomon Islands Dollar (SBD). */ - Sbd = 'SBD', - /** Sri Lankan Rupees (LKR). */ - Lkr = 'LKR', - /** Surinamese Dollar (SRD). */ - Srd = 'SRD', - /** Swazi Lilangeni (SZL). */ - Szl = 'SZL', - /** Swedish Kronor (SEK). */ - Sek = 'SEK', - /** Swiss Francs (CHF). */ - Chf = 'CHF', - /** Taiwan Dollars (TWD). */ - Twd = 'TWD', - /** Thai baht (THB). */ - Thb = 'THB', - /** Tajikistani Somoni (TJS). */ - Tjs = 'TJS', - /** Tanzanian Shilling (TZS). */ - Tzs = 'TZS', - /** Tongan Pa'anga (TOP). */ - Top = 'TOP', - /** Trinidad and Tobago Dollars (TTD). */ - Ttd = 'TTD', - /** Tunisian Dinar (TND). */ - Tnd = 'TND', - /** Turkish Lira (TRY). */ - Try = 'TRY', - /** Turkmenistani Manat (TMT). */ - Tmt = 'TMT', - /** Ugandan Shilling (UGX). */ - Ugx = 'UGX', - /** Ukrainian Hryvnia (UAH). */ - Uah = 'UAH', - /** United Arab Emirates Dirham (AED). */ - Aed = 'AED', - /** Uruguayan Pesos (UYU). */ - Uyu = 'UYU', - /** Uzbekistan som (UZS). */ - Uzs = 'UZS', - /** Vanuatu Vatu (VUV). */ - Vuv = 'VUV', - /** Venezuelan Bolivares (VEF). */ - Vef = 'VEF', - /** Venezuelan Bolivares (VES). */ - Ves = 'VES', - /** Vietnamese đồng (VND). */ - Vnd = 'VND', - /** West African CFA franc (XOF). */ - Xof = 'XOF', - /** Yemeni Rial (YER). */ - Yer = 'YER', - /** Zambian Kwacha (ZMW). */ - Zmw = 'ZMW', -} - -/** A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. */ -export type Customer = { - __typename?: 'Customer' - /** Indicates whether the customer has consented to be sent marketing material via email. */ - acceptsMarketing: Scalars['Boolean'] - /** A list of addresses for the customer. */ - addresses: MailingAddressConnection - /** The date and time when the customer was created. */ - createdAt: Scalars['DateTime'] - /** The customer’s default address. */ - defaultAddress?: Maybe - /** The customer’s name, email or phone number. */ - displayName: Scalars['String'] - /** The customer’s email address. */ - email?: Maybe - /** The customer’s first name. */ - firstName?: Maybe - /** A unique identifier for the customer. */ - id: Scalars['ID'] - /** The customer's most recently updated, incomplete checkout. */ - lastIncompleteCheckout?: Maybe - /** The customer’s last name. */ - lastName?: Maybe - /** The orders associated with the customer. */ - orders: OrderConnection - /** The customer’s phone number. */ - phone?: Maybe - /** - * A comma separated list of tags that have been added to the customer. - * Additional access scope required: unauthenticated_read_customer_tags. - */ - tags: Array - /** The date and time when the customer information was updated. */ - updatedAt: Scalars['DateTime'] -} - -/** A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. */ -export type CustomerAddressesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. */ -export type CustomerOrdersArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** A CustomerAccessToken represents the unique token required to make modifications to the customer object. */ -export type CustomerAccessToken = { - __typename?: 'CustomerAccessToken' - /** The customer’s access token. */ - accessToken: Scalars['String'] - /** The date and time when the customer access token expires. */ - expiresAt: Scalars['DateTime'] -} - -/** Specifies the input fields required to create a customer access token. */ -export type CustomerAccessTokenCreateInput = { - /** The email associated to the customer. */ - email: Scalars['String'] - /** The login password to be used by the customer. */ - password: Scalars['String'] -} - -/** Return type for `customerAccessTokenCreate` mutation. */ -export type CustomerAccessTokenCreatePayload = { - __typename?: 'CustomerAccessTokenCreatePayload' - /** The newly created customer access token object. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerAccessTokenCreateWithMultipass` mutation. */ -export type CustomerAccessTokenCreateWithMultipassPayload = { - __typename?: 'CustomerAccessTokenCreateWithMultipassPayload' - /** An access token object associated with the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array -} - -/** Return type for `customerAccessTokenDelete` mutation. */ -export type CustomerAccessTokenDeletePayload = { - __typename?: 'CustomerAccessTokenDeletePayload' - /** The destroyed access token. */ - deletedAccessToken?: Maybe - /** ID of the destroyed customer access token. */ - deletedCustomerAccessTokenId?: Maybe - /** List of errors that occurred executing the mutation. */ - userErrors: Array -} - -/** Return type for `customerAccessTokenRenew` mutation. */ -export type CustomerAccessTokenRenewPayload = { - __typename?: 'CustomerAccessTokenRenewPayload' - /** The renewed customer access token object. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - userErrors: Array -} - -/** Return type for `customerActivateByUrl` mutation. */ -export type CustomerActivateByUrlPayload = { - __typename?: 'CustomerActivateByUrlPayload' - /** The customer that was activated. */ - customer?: Maybe - /** A new customer access token for the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array -} - -/** Specifies the input fields required to activate a customer. */ -export type CustomerActivateInput = { - /** The activation token required to activate the customer. */ - activationToken: Scalars['String'] - /** New password that will be set during activation. */ - password: Scalars['String'] -} - -/** Return type for `customerActivate` mutation. */ -export type CustomerActivatePayload = { - __typename?: 'CustomerActivatePayload' - /** The customer object. */ - customer?: Maybe - /** A newly created customer access token object for the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerAddressCreate` mutation. */ -export type CustomerAddressCreatePayload = { - __typename?: 'CustomerAddressCreatePayload' - /** The new customer address object. */ - customerAddress?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerAddressDelete` mutation. */ -export type CustomerAddressDeletePayload = { - __typename?: 'CustomerAddressDeletePayload' - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** ID of the deleted customer address. */ - deletedCustomerAddressId?: Maybe - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerAddressUpdate` mutation. */ -export type CustomerAddressUpdatePayload = { - __typename?: 'CustomerAddressUpdatePayload' - /** The customer’s updated mailing address. */ - customerAddress?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to create a new customer. */ -export type CustomerCreateInput = { - /** The customer’s first name. */ - firstName?: Maybe - /** The customer’s last name. */ - lastName?: Maybe - /** The customer’s email. */ - email: Scalars['String'] - /** - * A unique phone number for the customer. - * - * Formatted using E.164 standard. For example, _+16135551111_. - */ - phone?: Maybe - /** The login password used by the customer. */ - password: Scalars['String'] - /** Indicates whether the customer has consented to be sent marketing material via email. */ - acceptsMarketing?: Maybe -} - -/** Return type for `customerCreate` mutation. */ -export type CustomerCreatePayload = { - __typename?: 'CustomerCreatePayload' - /** The created customer object. */ - customer?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerDefaultAddressUpdate` mutation. */ -export type CustomerDefaultAddressUpdatePayload = { - __typename?: 'CustomerDefaultAddressUpdatePayload' - /** The updated customer object. */ - customer?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Possible error codes that could be returned by CustomerUserError. */ -export enum CustomerErrorCode { - /** Input value is blank. */ - Blank = 'BLANK', - /** Input value is invalid. */ - Invalid = 'INVALID', - /** Input value is already taken. */ - Taken = 'TAKEN', - /** Input value is too long. */ - TooLong = 'TOO_LONG', - /** Input value is too short. */ - TooShort = 'TOO_SHORT', - /** Unidentified customer. */ - UnidentifiedCustomer = 'UNIDENTIFIED_CUSTOMER', - /** Customer is disabled. */ - CustomerDisabled = 'CUSTOMER_DISABLED', - /** Input password starts or ends with whitespace. */ - PasswordStartsOrEndsWithWhitespace = 'PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE', - /** Input contains HTML tags. */ - ContainsHtmlTags = 'CONTAINS_HTML_TAGS', - /** Input contains URL. */ - ContainsUrl = 'CONTAINS_URL', - /** Invalid activation token. */ - TokenInvalid = 'TOKEN_INVALID', - /** Customer already enabled. */ - AlreadyEnabled = 'ALREADY_ENABLED', - /** Address does not exist. */ - NotFound = 'NOT_FOUND', - /** Input email contains an invalid domain name. */ - BadDomain = 'BAD_DOMAIN', - /** Multipass token is not valid. */ - InvalidMultipassRequest = 'INVALID_MULTIPASS_REQUEST', -} - -/** Return type for `customerRecover` mutation. */ -export type CustomerRecoverPayload = { - __typename?: 'CustomerRecoverPayload' - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Return type for `customerResetByUrl` mutation. */ -export type CustomerResetByUrlPayload = { - __typename?: 'CustomerResetByUrlPayload' - /** The customer object which was reset. */ - customer?: Maybe - /** A newly created customer access token object for the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to reset a customer’s password. */ -export type CustomerResetInput = { - /** The reset token required to reset the customer’s password. */ - resetToken: Scalars['String'] - /** New password that will be set as part of the reset password process. */ - password: Scalars['String'] -} - -/** Return type for `customerReset` mutation. */ -export type CustomerResetPayload = { - __typename?: 'CustomerResetPayload' - /** The customer object which was reset. */ - customer?: Maybe - /** A newly created customer access token object for the customer. */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Specifies the fields required to update the Customer information. */ -export type CustomerUpdateInput = { - /** The customer’s first name. */ - firstName?: Maybe - /** The customer’s last name. */ - lastName?: Maybe - /** The customer’s email. */ - email?: Maybe - /** - * A unique phone number for the customer. - * - * Formatted using E.164 standard. For example, _+16135551111_. To remove the phone number, specify `null`. - */ - phone?: Maybe - /** The login password used by the customer. */ - password?: Maybe - /** Indicates whether the customer has consented to be sent marketing material via email. */ - acceptsMarketing?: Maybe -} - -/** Return type for `customerUpdate` mutation. */ -export type CustomerUpdatePayload = { - __typename?: 'CustomerUpdatePayload' - /** The updated customer object. */ - customer?: Maybe - /** - * The newly created customer access token. If the customer's password is updated, all previous access tokens - * (including the one used to perform this mutation) become invalid, and a new token is generated. - */ - customerAccessToken?: Maybe - /** List of errors that occurred executing the mutation. */ - customerUserErrors: Array - /** - * List of errors that occurred executing the mutation. - * @deprecated Use `customerUserErrors` instead - */ - userErrors: Array -} - -/** Represents an error that happens during execution of a customer mutation. */ -export type CustomerUserError = DisplayableError & { - __typename?: 'CustomerUserError' - /** Error code to uniquely identify the error. */ - code?: Maybe - /** Path to the input field which caused the error. */ - field?: Maybe> - /** The error message. */ - message: Scalars['String'] -} - -/** Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. */ -export enum DigitalWallet { - /** Apple Pay. */ - ApplePay = 'APPLE_PAY', - /** Android Pay. */ - AndroidPay = 'ANDROID_PAY', - /** Google Pay. */ - GooglePay = 'GOOGLE_PAY', - /** Shopify Pay. */ - ShopifyPay = 'SHOPIFY_PAY', -} - -/** An amount discounting the line that has been allocated by a discount. */ -export type DiscountAllocation = { - __typename?: 'DiscountAllocation' - /** Amount of discount allocated. */ - allocatedAmount: MoneyV2 - /** The discount this allocated amount originated from. */ - discountApplication: DiscountApplication -} - -/** - * Discount applications capture the intentions of a discount source at - * the time of application. - */ -export type DiscountApplication = { - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The value of the discount application. */ - value: PricingValue -} - -/** The method by which the discount's value is allocated onto its entitled lines. */ -export enum DiscountApplicationAllocationMethod { - /** The value is spread across all entitled lines. */ - Across = 'ACROSS', - /** The value is applied onto every entitled line. */ - Each = 'EACH', - /** The value is specifically applied onto a particular line. */ - One = 'ONE', -} - -/** An auto-generated type for paginating through multiple DiscountApplications. */ -export type DiscountApplicationConnection = { - __typename?: 'DiscountApplicationConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one DiscountApplication and a cursor during pagination. */ -export type DiscountApplicationEdge = { - __typename?: 'DiscountApplicationEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of DiscountApplicationEdge. */ - node: DiscountApplication -} - -/** - * Which lines on the order that the discount is allocated over, of the type - * defined by the Discount Application's target_type. - */ -export enum DiscountApplicationTargetSelection { - /** The discount is allocated onto all the lines. */ - All = 'ALL', - /** The discount is allocated onto only the lines it is entitled for. */ - Entitled = 'ENTITLED', - /** The discount is allocated onto explicitly chosen lines. */ - Explicit = 'EXPLICIT', -} - -/** The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. */ -export enum DiscountApplicationTargetType { - /** The discount applies onto line items. */ - LineItem = 'LINE_ITEM', - /** The discount applies onto shipping lines. */ - ShippingLine = 'SHIPPING_LINE', -} - -/** - * Discount code applications capture the intentions of a discount code at - * the time that it is applied. - */ -export type DiscountCodeApplication = DiscountApplication & { - __typename?: 'DiscountCodeApplication' - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** Specifies whether the discount code was applied successfully. */ - applicable: Scalars['Boolean'] - /** The string identifying the discount code that was used at the time of application. */ - code: Scalars['String'] - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The value of the discount application. */ - value: PricingValue -} - -/** Represents an error in the input of a mutation. */ -export type DisplayableError = { - /** Path to the input field which caused the error. */ - field?: Maybe> - /** The error message. */ - message: Scalars['String'] -} - -/** Represents a web address. */ -export type Domain = { - __typename?: 'Domain' - /** The host name of the domain (eg: `example.com`). */ - host: Scalars['String'] - /** Whether SSL is enabled or not. */ - sslEnabled: Scalars['Boolean'] - /** The URL of the domain (eg: `https://example.com`). */ - url: Scalars['URL'] -} - -/** Represents a video hosted outside of Shopify. */ -export type ExternalVideo = Node & - Media & { - __typename?: 'ExternalVideo' - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** The URL. */ - embeddedUrl: Scalars['URL'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe - } - -/** Represents a single fulfillment in an order. */ -export type Fulfillment = { - __typename?: 'Fulfillment' - /** List of the fulfillment's line items. */ - fulfillmentLineItems: FulfillmentLineItemConnection - /** The name of the tracking company. */ - trackingCompany?: Maybe - /** - * Tracking information associated with the fulfillment, - * such as the tracking number and tracking URL. - */ - trackingInfo: Array -} - -/** Represents a single fulfillment in an order. */ -export type FulfillmentFulfillmentLineItemsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** Represents a single fulfillment in an order. */ -export type FulfillmentTrackingInfoArgs = { - first?: Maybe -} - -/** Represents a single line item in a fulfillment. There is at most one fulfillment line item for each order line item. */ -export type FulfillmentLineItem = { - __typename?: 'FulfillmentLineItem' - /** The associated order's line item. */ - lineItem: OrderLineItem - /** The amount fulfilled in this fulfillment. */ - quantity: Scalars['Int'] -} - -/** An auto-generated type for paginating through multiple FulfillmentLineItems. */ -export type FulfillmentLineItemConnection = { - __typename?: 'FulfillmentLineItemConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. */ -export type FulfillmentLineItemEdge = { - __typename?: 'FulfillmentLineItemEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of FulfillmentLineItemEdge. */ - node: FulfillmentLineItem -} - -/** Tracking information associated with the fulfillment. */ -export type FulfillmentTrackingInfo = { - __typename?: 'FulfillmentTrackingInfo' - /** The tracking number of the fulfillment. */ - number?: Maybe - /** The URL to track the fulfillment. */ - url?: Maybe -} - -/** Represents information about the metafields associated to the specified resource. */ -export type HasMetafields = { - /** The metafield associated with the resource. */ - metafield?: Maybe - /** A paginated list of metafields associated with the resource. */ - metafields: MetafieldConnection -} - -/** Represents information about the metafields associated to the specified resource. */ -export type HasMetafieldsMetafieldArgs = { - namespace: Scalars['String'] - key: Scalars['String'] -} - -/** Represents information about the metafields associated to the specified resource. */ -export type HasMetafieldsMetafieldsArgs = { - namespace?: Maybe - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** Represents an image resource. */ -export type Image = { - __typename?: 'Image' - /** A word or phrase to share the nature or contents of an image. */ - altText?: Maybe - /** The original height of the image in pixels. Returns `null` if the image is not hosted by Shopify. */ - height?: Maybe - /** A unique identifier for the image. */ - id?: Maybe - /** - * The location of the original image as a URL. - * - * If there are any existing transformations in the original source URL, they will remain and not be stripped. - */ - originalSrc: Scalars['URL'] - /** - * The location of the image as a URL. - * @deprecated Previously an image had a single `src` field. This could either return the original image - * location or a URL that contained transformations such as sizing or scale. - * - * These transformations were specified by arguments on the parent field. - * - * Now an image has two distinct URL fields: `originalSrc` and `transformedSrc`. - * - * * `originalSrc` - the original unmodified image URL - * * `transformedSrc` - the image URL with the specified transformations included - * - * To migrate to the new fields, image transformations should be moved from the parent field to `transformedSrc`. - * - * Before: - * ```graphql - * { - * shop { - * productImages(maxWidth: 200, scale: 2) { - * edges { - * node { - * src - * } - * } - * } - * } - * } - * ``` - * - * After: - * ```graphql - * { - * shop { - * productImages { - * edges { - * node { - * transformedSrc(maxWidth: 200, scale: 2) - * } - * } - * } - * } - * } - * ``` - * - */ - src: Scalars['URL'] - /** - * The location of the transformed image as a URL. - * - * All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. - * Otherwise any transformations which an image type does not support will be ignored. - */ - transformedSrc: Scalars['URL'] - /** The original width of the image in pixels. Returns `null` if the image is not hosted by Shopify. */ - width?: Maybe -} - -/** Represents an image resource. */ -export type ImageTransformedSrcArgs = { - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe - preferredContentType?: Maybe -} - -/** An auto-generated type for paginating through multiple Images. */ -export type ImageConnection = { - __typename?: 'ImageConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** List of supported image content types. */ -export enum ImageContentType { - /** A PNG image. */ - Png = 'PNG', - /** A JPG image. */ - Jpg = 'JPG', - /** A WEBP image. */ - Webp = 'WEBP', -} - -/** An auto-generated type which holds one Image and a cursor during pagination. */ -export type ImageEdge = { - __typename?: 'ImageEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ImageEdge. */ - node: Image -} - -/** Represents a mailing address for customers and shipping. */ -export type MailingAddress = Node & { - __typename?: 'MailingAddress' - /** The first line of the address. Typically the street address or PO Box number. */ - address1?: Maybe - /** The second line of the address. Typically the number of the apartment, suite, or unit. */ - address2?: Maybe - /** The name of the city, district, village, or town. */ - city?: Maybe - /** The name of the customer's company or organization. */ - company?: Maybe - /** The name of the country. */ - country?: Maybe - /** - * The two-letter code for the country of the address. - * - * For example, US. - * @deprecated Use `countryCodeV2` instead - */ - countryCode?: Maybe - /** - * The two-letter code for the country of the address. - * - * For example, US. - */ - countryCodeV2?: Maybe - /** The first name of the customer. */ - firstName?: Maybe - /** A formatted version of the address, customized by the provided arguments. */ - formatted: Array - /** A comma-separated list of the values for city, province, and country. */ - formattedArea?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The last name of the customer. */ - lastName?: Maybe - /** The latitude coordinate of the customer address. */ - latitude?: Maybe - /** The longitude coordinate of the customer address. */ - longitude?: Maybe - /** The full name of the customer, based on firstName and lastName. */ - name?: Maybe - /** - * A unique phone number for the customer. - * - * Formatted using E.164 standard. For example, _+16135551111_. - */ - phone?: Maybe - /** The region of the address, such as the province, state, or district. */ - province?: Maybe - /** - * The two-letter code for the region. - * - * For example, ON. - */ - provinceCode?: Maybe - /** The zip or postal code of the address. */ - zip?: Maybe -} - -/** Represents a mailing address for customers and shipping. */ -export type MailingAddressFormattedArgs = { - withName?: Maybe - withCompany?: Maybe -} - -/** An auto-generated type for paginating through multiple MailingAddresses. */ -export type MailingAddressConnection = { - __typename?: 'MailingAddressConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one MailingAddress and a cursor during pagination. */ -export type MailingAddressEdge = { - __typename?: 'MailingAddressEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of MailingAddressEdge. */ - node: MailingAddress -} - -/** Specifies the fields accepted to create or update a mailing address. */ -export type MailingAddressInput = { - /** The first line of the address. Typically the street address or PO Box number. */ - address1?: Maybe - /** The second line of the address. Typically the number of the apartment, suite, or unit. */ - address2?: Maybe - /** The name of the city, district, village, or town. */ - city?: Maybe - /** The name of the customer's company or organization. */ - company?: Maybe - /** The name of the country. */ - country?: Maybe - /** The first name of the customer. */ - firstName?: Maybe - /** The last name of the customer. */ - lastName?: Maybe - /** - * A unique phone number for the customer. - * - * Formatted using E.164 standard. For example, _+16135551111_. - */ - phone?: Maybe - /** The region of the address, such as the province, state, or district. */ - province?: Maybe - /** The zip or postal code of the address. */ - zip?: Maybe -} - -/** Manual discount applications capture the intentions of a discount that was manually created. */ -export type ManualDiscountApplication = DiscountApplication & { - __typename?: 'ManualDiscountApplication' - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** The description of the application. */ - description?: Maybe - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The title of the application. */ - title: Scalars['String'] - /** The value of the discount application. */ - value: PricingValue -} - -/** Represents a media interface. */ -export type Media = { - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe -} - -/** An auto-generated type for paginating through multiple Media. */ -export type MediaConnection = { - __typename?: 'MediaConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** The possible content types for a media object. */ -export enum MediaContentType { - /** An externally hosted video. */ - ExternalVideo = 'EXTERNAL_VIDEO', - /** A Shopify hosted image. */ - Image = 'IMAGE', - /** A 3d model. */ - Model_3D = 'MODEL_3D', - /** A Shopify hosted video. */ - Video = 'VIDEO', -} - -/** An auto-generated type which holds one Media and a cursor during pagination. */ -export type MediaEdge = { - __typename?: 'MediaEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of MediaEdge. */ - node: Media -} - -/** Represents a Shopify hosted image. */ -export type MediaImage = Node & - Media & { - __typename?: 'MediaImage' - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The image for the media. */ - image?: Maybe - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe - } - -/** - * Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are - * comprised of keys, values, and value types. - */ -export type Metafield = Node & { - __typename?: 'Metafield' - /** The date and time when the storefront metafield was created. */ - createdAt: Scalars['DateTime'] - /** The description of a metafield. */ - description?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The key name for a metafield. */ - key: Scalars['String'] - /** The namespace for a metafield. */ - namespace: Scalars['String'] - /** The parent object that the metafield belongs to. */ - parentResource: MetafieldParentResource - /** The date and time when the storefront metafield was updated. */ - updatedAt: Scalars['DateTime'] - /** The value of a metafield. */ - value: Scalars['String'] - /** Represents the metafield value type. */ - valueType: MetafieldValueType -} - -/** An auto-generated type for paginating through multiple Metafields. */ -export type MetafieldConnection = { - __typename?: 'MetafieldConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Metafield and a cursor during pagination. */ -export type MetafieldEdge = { - __typename?: 'MetafieldEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of MetafieldEdge. */ - node: Metafield -} - -/** A resource that the metafield belongs to. */ -export type MetafieldParentResource = Product | ProductVariant - -/** Metafield value types. */ -export enum MetafieldValueType { - /** A string metafield. */ - String = 'STRING', - /** An integer metafield. */ - Integer = 'INTEGER', - /** A json string metafield. */ - JsonString = 'JSON_STRING', -} - -/** Represents a Shopify hosted 3D model. */ -export type Model3d = Node & - Media & { - __typename?: 'Model3d' - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe - /** The sources for a 3d model. */ - sources: Array - } - -/** Represents a source for a Shopify hosted 3d model. */ -export type Model3dSource = { - __typename?: 'Model3dSource' - /** The filesize of the 3d model. */ - filesize: Scalars['Int'] - /** The format of the 3d model. */ - format: Scalars['String'] - /** The MIME type of the 3d model. */ - mimeType: Scalars['String'] - /** The URL of the 3d model. */ - url: Scalars['String'] -} - -/** Specifies the fields for a monetary value with currency. */ -export type MoneyInput = { - /** Decimal money amount. */ - amount: Scalars['Decimal'] - /** Currency of the money. */ - currencyCode: CurrencyCode -} - -/** - * A monetary value with currency. - * - * To format currencies, combine this type's amount and currencyCode fields with your client's locale. - * - * For example, in JavaScript you could use Intl.NumberFormat: - * - * ```js - * new Intl.NumberFormat(locale, { - * style: 'currency', - * currency: currencyCode - * }).format(amount); - * ``` - * - * Other formatting libraries include: - * - * * iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter) - * * Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html) - * * PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php) - * - * For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations - * (such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)). - */ -export type MoneyV2 = { - __typename?: 'MoneyV2' - /** Decimal money amount. */ - amount: Scalars['Decimal'] - /** Currency of the money. */ - currencyCode: CurrencyCode -} - -/** An auto-generated type for paginating through multiple MoneyV2s. */ -export type MoneyV2Connection = { - __typename?: 'MoneyV2Connection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one MoneyV2 and a cursor during pagination. */ -export type MoneyV2Edge = { - __typename?: 'MoneyV2Edge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of MoneyV2Edge. */ - node: MoneyV2 -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type Mutation = { - __typename?: 'Mutation' - /** - * Updates the attributes of a checkout. - * @deprecated Use `checkoutAttributesUpdateV2` instead - */ - checkoutAttributesUpdate?: Maybe - /** Updates the attributes of a checkout. */ - checkoutAttributesUpdateV2?: Maybe - /** Completes a checkout without providing payment information. You can use this mutation for free items or items whose purchase price is covered by a gift card. */ - checkoutCompleteFree?: Maybe - /** - * Completes a checkout using a credit card token from Shopify's Vault. - * @deprecated Use `checkoutCompleteWithCreditCardV2` instead - */ - checkoutCompleteWithCreditCard?: Maybe - /** Completes a checkout using a credit card token from Shopify's card vault. Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, you need to [_request payment processing_](https://help.shopify.com/api/guides/sales-channel-sdk/getting-started#request-payment-processing). */ - checkoutCompleteWithCreditCardV2?: Maybe - /** - * Completes a checkout with a tokenized payment. - * @deprecated Use `checkoutCompleteWithTokenizedPaymentV2` instead - */ - checkoutCompleteWithTokenizedPayment?: Maybe - /** - * Completes a checkout with a tokenized payment. - * @deprecated Use `checkoutCompleteWithTokenizedPaymentV3` instead - */ - checkoutCompleteWithTokenizedPaymentV2?: Maybe - /** Completes a checkout with a tokenized payment. */ - checkoutCompleteWithTokenizedPaymentV3?: Maybe - /** Creates a new checkout. */ - checkoutCreate?: Maybe - /** - * Associates a customer to the checkout. - * @deprecated Use `checkoutCustomerAssociateV2` instead - */ - checkoutCustomerAssociate?: Maybe - /** Associates a customer to the checkout. */ - checkoutCustomerAssociateV2?: Maybe - /** - * Disassociates the current checkout customer from the checkout. - * @deprecated Use `checkoutCustomerDisassociateV2` instead - */ - checkoutCustomerDisassociate?: Maybe - /** Disassociates the current checkout customer from the checkout. */ - checkoutCustomerDisassociateV2?: Maybe - /** - * Applies a discount to an existing checkout using a discount code. - * @deprecated Use `checkoutDiscountCodeApplyV2` instead - */ - checkoutDiscountCodeApply?: Maybe - /** Applies a discount to an existing checkout using a discount code. */ - checkoutDiscountCodeApplyV2?: Maybe - /** Removes the applied discount from an existing checkout. */ - checkoutDiscountCodeRemove?: Maybe - /** - * Updates the email on an existing checkout. - * @deprecated Use `checkoutEmailUpdateV2` instead - */ - checkoutEmailUpdate?: Maybe - /** Updates the email on an existing checkout. */ - checkoutEmailUpdateV2?: Maybe - /** - * Applies a gift card to an existing checkout using a gift card code. This will replace all currently applied gift cards. - * @deprecated Use `checkoutGiftCardsAppend` instead - */ - checkoutGiftCardApply?: Maybe - /** - * Removes an applied gift card from the checkout. - * @deprecated Use `checkoutGiftCardRemoveV2` instead - */ - checkoutGiftCardRemove?: Maybe - /** Removes an applied gift card from the checkout. */ - checkoutGiftCardRemoveV2?: Maybe - /** Appends gift cards to an existing checkout. */ - checkoutGiftCardsAppend?: Maybe - /** Adds a list of line items to a checkout. */ - checkoutLineItemsAdd?: Maybe - /** Removes line items from an existing checkout. */ - checkoutLineItemsRemove?: Maybe - /** Sets a list of line items to a checkout. */ - checkoutLineItemsReplace?: Maybe - /** Updates line items on a checkout. */ - checkoutLineItemsUpdate?: Maybe - /** - * Updates the shipping address of an existing checkout. - * @deprecated Use `checkoutShippingAddressUpdateV2` instead - */ - checkoutShippingAddressUpdate?: Maybe - /** Updates the shipping address of an existing checkout. */ - checkoutShippingAddressUpdateV2?: Maybe - /** Updates the shipping lines on an existing checkout. */ - checkoutShippingLineUpdate?: Maybe - /** - * Creates a customer access token. - * The customer access token is required to modify the customer object in any way. - */ - customerAccessTokenCreate?: Maybe - /** - * Creates a customer access token using a multipass token instead of email and password. - * A customer record is created if customer does not exist. If a customer record already - * exists but the record is disabled, then it's enabled. - */ - customerAccessTokenCreateWithMultipass?: Maybe - /** Permanently destroys a customer access token. */ - customerAccessTokenDelete?: Maybe - /** - * Renews a customer access token. - * - * Access token renewal must happen *before* a token expires. - * If a token has already expired, a new one should be created instead via `customerAccessTokenCreate`. - */ - customerAccessTokenRenew?: Maybe - /** Activates a customer. */ - customerActivate?: Maybe - /** Activates a customer with the activation url received from `customerCreate`. */ - customerActivateByUrl?: Maybe - /** Creates a new address for a customer. */ - customerAddressCreate?: Maybe - /** Permanently deletes the address of an existing customer. */ - customerAddressDelete?: Maybe - /** Updates the address of an existing customer. */ - customerAddressUpdate?: Maybe - /** Creates a new customer. */ - customerCreate?: Maybe - /** Updates the default address of an existing customer. */ - customerDefaultAddressUpdate?: Maybe - /** Sends a reset password email to the customer, as the first step in the reset password process. */ - customerRecover?: Maybe - /** Resets a customer’s password with a token received from `CustomerRecover`. */ - customerReset?: Maybe - /** Resets a customer’s password with the reset password url received from `CustomerRecover`. */ - customerResetByUrl?: Maybe - /** Updates an existing customer. */ - customerUpdate?: Maybe -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutAttributesUpdateArgs = { - checkoutId: Scalars['ID'] - input: CheckoutAttributesUpdateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutAttributesUpdateV2Args = { - checkoutId: Scalars['ID'] - input: CheckoutAttributesUpdateV2Input -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteFreeArgs = { - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithCreditCardArgs = { - checkoutId: Scalars['ID'] - payment: CreditCardPaymentInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithCreditCardV2Args = { - checkoutId: Scalars['ID'] - payment: CreditCardPaymentInputV2 -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithTokenizedPaymentArgs = { - checkoutId: Scalars['ID'] - payment: TokenizedPaymentInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithTokenizedPaymentV2Args = { - checkoutId: Scalars['ID'] - payment: TokenizedPaymentInputV2 -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCompleteWithTokenizedPaymentV3Args = { - checkoutId: Scalars['ID'] - payment: TokenizedPaymentInputV3 -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCreateArgs = { - input: CheckoutCreateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCustomerAssociateArgs = { - checkoutId: Scalars['ID'] - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCustomerAssociateV2Args = { - checkoutId: Scalars['ID'] - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCustomerDisassociateArgs = { - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutCustomerDisassociateV2Args = { - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutDiscountCodeApplyArgs = { - discountCode: Scalars['String'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutDiscountCodeApplyV2Args = { - discountCode: Scalars['String'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutDiscountCodeRemoveArgs = { - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutEmailUpdateArgs = { - checkoutId: Scalars['ID'] - email: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutEmailUpdateV2Args = { - checkoutId: Scalars['ID'] - email: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutGiftCardApplyArgs = { - giftCardCode: Scalars['String'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutGiftCardRemoveArgs = { - appliedGiftCardId: Scalars['ID'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutGiftCardRemoveV2Args = { - appliedGiftCardId: Scalars['ID'] - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutGiftCardsAppendArgs = { - giftCardCodes: Array - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutLineItemsAddArgs = { - lineItems: Array - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutLineItemsRemoveArgs = { - checkoutId: Scalars['ID'] - lineItemIds: Array -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutLineItemsReplaceArgs = { - lineItems: Array - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutLineItemsUpdateArgs = { - checkoutId: Scalars['ID'] - lineItems: Array -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutShippingAddressUpdateArgs = { - shippingAddress: MailingAddressInput - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutShippingAddressUpdateV2Args = { - shippingAddress: MailingAddressInput - checkoutId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCheckoutShippingLineUpdateArgs = { - checkoutId: Scalars['ID'] - shippingRateHandle: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAccessTokenCreateArgs = { - input: CustomerAccessTokenCreateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAccessTokenCreateWithMultipassArgs = { - multipassToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAccessTokenDeleteArgs = { - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAccessTokenRenewArgs = { - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerActivateArgs = { - id: Scalars['ID'] - input: CustomerActivateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerActivateByUrlArgs = { - activationUrl: Scalars['URL'] - password: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAddressCreateArgs = { - customerAccessToken: Scalars['String'] - address: MailingAddressInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAddressDeleteArgs = { - id: Scalars['ID'] - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerAddressUpdateArgs = { - customerAccessToken: Scalars['String'] - id: Scalars['ID'] - address: MailingAddressInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerCreateArgs = { - input: CustomerCreateInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerDefaultAddressUpdateArgs = { - customerAccessToken: Scalars['String'] - addressId: Scalars['ID'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerRecoverArgs = { - email: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerResetArgs = { - id: Scalars['ID'] - input: CustomerResetInput -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerResetByUrlArgs = { - resetUrl: Scalars['URL'] - password: Scalars['String'] -} - -/** The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. */ -export type MutationCustomerUpdateArgs = { - customerAccessToken: Scalars['String'] - customer: CustomerUpdateInput -} - -/** An object with an ID to support global identification. */ -export type Node = { - /** Globally unique identifier. */ - id: Scalars['ID'] -} - -/** An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. */ -export type Order = Node & { - __typename?: 'Order' - /** The reason for the order's cancellation. Returns `null` if the order wasn't canceled. */ - cancelReason?: Maybe - /** The date and time when the order was canceled. Returns null if the order wasn't canceled. */ - canceledAt?: Maybe - /** The code of the currency used for the payment. */ - currencyCode: CurrencyCode - /** The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes are not included unless the order is a taxes-included order. */ - currentSubtotalPrice: MoneyV2 - /** The total amount of the order, including duties, taxes and discounts, minus amounts for line items that have been removed. */ - currentTotalPrice: MoneyV2 - /** The total of all taxes applied to the order, excluding taxes for returned line items. */ - currentTotalTax: MoneyV2 - /** The locale code in which this specific order happened. */ - customerLocale?: Maybe - /** The unique URL that the customer can use to access the order. */ - customerUrl?: Maybe - /** Discounts that have been applied on the order. */ - discountApplications: DiscountApplicationConnection - /** Whether the order has had any edits applied or not. */ - edited: Scalars['Boolean'] - /** The customer's email address. */ - email?: Maybe - /** The financial status of the order. */ - financialStatus?: Maybe - /** The fulfillment status for the order. */ - fulfillmentStatus: OrderFulfillmentStatus - /** Globally unique identifier. */ - id: Scalars['ID'] - /** List of the order’s line items. */ - lineItems: OrderLineItemConnection - /** - * Unique identifier for the order that appears on the order. - * For example, _#1000_ or _Store1001. - */ - name: Scalars['String'] - /** A unique numeric identifier for the order for use by shop owner and customer. */ - orderNumber: Scalars['Int'] - /** The total price of the order before any applied edits. */ - originalTotalPrice: MoneyV2 - /** The customer's phone number for receiving SMS notifications. */ - phone?: Maybe - /** - * The date and time when the order was imported. - * This value can be set to dates in the past when importing from other systems. - * If no value is provided, it will be auto-generated based on current date and time. - */ - processedAt: Scalars['DateTime'] - /** The address to where the order will be shipped. */ - shippingAddress?: Maybe - /** The discounts that have been allocated onto the shipping line by discount applications. */ - shippingDiscountAllocations: Array - /** The unique URL for the order's status page. */ - statusUrl: Scalars['URL'] - /** - * Price of the order before shipping and taxes. - * @deprecated Use `subtotalPriceV2` instead - */ - subtotalPrice?: Maybe - /** Price of the order before duties, shipping and taxes. */ - subtotalPriceV2?: Maybe - /** List of the order’s successful fulfillments. */ - successfulFulfillments?: Maybe> - /** - * The sum of all the prices of all the items in the order, taxes and discounts included (must be positive). - * @deprecated Use `totalPriceV2` instead - */ - totalPrice: Scalars['Money'] - /** The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). */ - totalPriceV2: MoneyV2 - /** - * The total amount that has been refunded. - * @deprecated Use `totalRefundedV2` instead - */ - totalRefunded: Scalars['Money'] - /** The total amount that has been refunded. */ - totalRefundedV2: MoneyV2 - /** - * The total cost of shipping. - * @deprecated Use `totalShippingPriceV2` instead - */ - totalShippingPrice: Scalars['Money'] - /** The total cost of shipping. */ - totalShippingPriceV2: MoneyV2 - /** - * The total cost of taxes. - * @deprecated Use `totalTaxV2` instead - */ - totalTax?: Maybe - /** The total cost of taxes. */ - totalTaxV2?: Maybe -} - -/** An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. */ -export type OrderDiscountApplicationsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. */ -export type OrderLineItemsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. */ -export type OrderSuccessfulFulfillmentsArgs = { - first?: Maybe -} - -/** Represents the reason for the order's cancellation. */ -export enum OrderCancelReason { - /** The customer wanted to cancel the order. */ - Customer = 'CUSTOMER', - /** The order was fraudulent. */ - Fraud = 'FRAUD', - /** There was insufficient inventory. */ - Inventory = 'INVENTORY', - /** Payment was declined. */ - Declined = 'DECLINED', - /** The order was canceled for an unlisted reason. */ - Other = 'OTHER', -} - -/** An auto-generated type for paginating through multiple Orders. */ -export type OrderConnection = { - __typename?: 'OrderConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Order and a cursor during pagination. */ -export type OrderEdge = { - __typename?: 'OrderEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of OrderEdge. */ - node: Order -} - -/** Represents the order's current financial status. */ -export enum OrderFinancialStatus { - /** Displayed as **Pending**. */ - Pending = 'PENDING', - /** Displayed as **Authorized**. */ - Authorized = 'AUTHORIZED', - /** Displayed as **Partially paid**. */ - PartiallyPaid = 'PARTIALLY_PAID', - /** Displayed as **Partially refunded**. */ - PartiallyRefunded = 'PARTIALLY_REFUNDED', - /** Displayed as **Voided**. */ - Voided = 'VOIDED', - /** Displayed as **Paid**. */ - Paid = 'PAID', - /** Displayed as **Refunded**. */ - Refunded = 'REFUNDED', -} - -/** Represents the order's current fulfillment status. */ -export enum OrderFulfillmentStatus { - /** Displayed as **Unfulfilled**. */ - Unfulfilled = 'UNFULFILLED', - /** Displayed as **Partially fulfilled**. */ - PartiallyFulfilled = 'PARTIALLY_FULFILLED', - /** Displayed as **Fulfilled**. */ - Fulfilled = 'FULFILLED', - /** Displayed as **Restocked**. */ - Restocked = 'RESTOCKED', - /** Displayed as **Pending fulfillment**. */ - PendingFulfillment = 'PENDING_FULFILLMENT', - /** Displayed as **Open**. */ - Open = 'OPEN', - /** Displayed as **In progress**. */ - InProgress = 'IN_PROGRESS', - /** Displayed as **Scheduled**. */ - Scheduled = 'SCHEDULED', -} - -/** Represents a single line in an order. There is one line item for each distinct product variant. */ -export type OrderLineItem = { - __typename?: 'OrderLineItem' - /** The number of entries associated to the line item minus the items that have been removed. */ - currentQuantity: Scalars['Int'] - /** List of custom attributes associated to the line item. */ - customAttributes: Array - /** The discounts that have been allocated onto the order line item by discount applications. */ - discountAllocations: Array - /** The total price of the line item, including discounts, and displayed in the presentment currency. */ - discountedTotalPrice: MoneyV2 - /** The total price of the line item, not including any discounts. The total price is calculated using the original unit price multiplied by the quantity, and it is displayed in the presentment currency. */ - originalTotalPrice: MoneyV2 - /** The number of products variants associated to the line item. */ - quantity: Scalars['Int'] - /** The title of the product combined with title of the variant. */ - title: Scalars['String'] - /** The product variant object associated to the line item. */ - variant?: Maybe -} - -/** An auto-generated type for paginating through multiple OrderLineItems. */ -export type OrderLineItemConnection = { - __typename?: 'OrderLineItemConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one OrderLineItem and a cursor during pagination. */ -export type OrderLineItemEdge = { - __typename?: 'OrderLineItemEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of OrderLineItemEdge. */ - node: OrderLineItem -} - -/** The set of valid sort keys for the Order query. */ -export enum OrderSortKeys { - /** Sort by the `processed_at` value. */ - ProcessedAt = 'PROCESSED_AT', - /** Sort by the `total_price` value. */ - TotalPrice = 'TOTAL_PRICE', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** Shopify merchants can create pages to hold static HTML content. Each Page object represents a custom page on the online store. */ -export type Page = Node & { - __typename?: 'Page' - /** The description of the page, complete with HTML formatting. */ - body: Scalars['HTML'] - /** Summary of the page body. */ - bodySummary: Scalars['String'] - /** The timestamp of the page creation. */ - createdAt: Scalars['DateTime'] - /** A human-friendly unique string for the page automatically generated from its title. */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The page's SEO information. */ - seo?: Maybe - /** The title of the page. */ - title: Scalars['String'] - /** The timestamp of the latest page update. */ - updatedAt: Scalars['DateTime'] - /** The url pointing to the page accessible from the web. */ - url: Scalars['URL'] -} - -/** An auto-generated type for paginating through multiple Pages. */ -export type PageConnection = { - __typename?: 'PageConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Page and a cursor during pagination. */ -export type PageEdge = { - __typename?: 'PageEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of PageEdge. */ - node: Page -} - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo' - /** Indicates if there are more pages to fetch. */ - hasNextPage: Scalars['Boolean'] - /** Indicates if there are any pages prior to the current page. */ - hasPreviousPage: Scalars['Boolean'] -} - -/** The set of valid sort keys for the Page query. */ -export enum PageSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `updated_at` value. */ - UpdatedAt = 'UPDATED_AT', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** A payment applied to a checkout. */ -export type Payment = Node & { - __typename?: 'Payment' - /** - * The amount of the payment. - * @deprecated Use `amountV2` instead - */ - amount: Scalars['Money'] - /** The amount of the payment. */ - amountV2: MoneyV2 - /** The billing address for the payment. */ - billingAddress?: Maybe - /** The checkout to which the payment belongs. */ - checkout: Checkout - /** The credit card used for the payment in the case of direct payments. */ - creditCard?: Maybe - /** A message describing a processing error during asynchronous processing. */ - errorMessage?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** A client-side generated token to identify a payment and perform idempotent operations. */ - idempotencyKey?: Maybe - /** The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. */ - nextActionUrl?: Maybe - /** Whether or not the payment is still processing asynchronously. */ - ready: Scalars['Boolean'] - /** A flag to indicate if the payment is to be done in test mode for gateways that support it. */ - test: Scalars['Boolean'] - /** The actual transaction recorded by Shopify after having processed the payment with the gateway. */ - transaction?: Maybe -} - -/** Settings related to payments. */ -export type PaymentSettings = { - __typename?: 'PaymentSettings' - /** List of the card brands which the shop accepts. */ - acceptedCardBrands: Array - /** The url pointing to the endpoint to vault credit cards. */ - cardVaultUrl: Scalars['URL'] - /** The country where the shop is located. */ - countryCode: CountryCode - /** The three-letter code for the shop's primary currency. */ - currencyCode: CurrencyCode - /** A list of enabled currencies (ISO 4217 format) that the shop accepts. Merchants can enable currencies from their Shopify Payments settings in the Shopify admin. */ - enabledPresentmentCurrencies: Array - /** The shop’s Shopify Payments account id. */ - shopifyPaymentsAccountId?: Maybe - /** List of the digital wallets which the shop supports. */ - supportedDigitalWallets: Array -} - -/** The valid values for the types of payment token. */ -export enum PaymentTokenType { - /** Apple Pay token type. */ - ApplePay = 'APPLE_PAY', - /** Vault payment token type. */ - Vault = 'VAULT', - /** Shopify Pay token type. */ - ShopifyPay = 'SHOPIFY_PAY', - /** Google Pay token type. */ - GooglePay = 'GOOGLE_PAY', -} - -/** The value of the percentage pricing object. */ -export type PricingPercentageValue = { - __typename?: 'PricingPercentageValue' - /** The percentage value of the object. */ - percentage: Scalars['Float'] -} - -/** The price value (fixed or percentage) for a discount application. */ -export type PricingValue = MoneyV2 | PricingPercentageValue - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type Product = Node & - HasMetafields & { - __typename?: 'Product' - /** Indicates if at least one product variant is available for sale. */ - availableForSale: Scalars['Boolean'] - /** List of collections a product belongs to. */ - collections: CollectionConnection - /** The compare at price of the product across all variants. */ - compareAtPriceRange: ProductPriceRange - /** The date and time when the product was created. */ - createdAt: Scalars['DateTime'] - /** Stripped description of the product, single line with HTML tags removed. */ - description: Scalars['String'] - /** The description of the product, complete with HTML formatting. */ - descriptionHtml: Scalars['HTML'] - /** - * A human-friendly unique string for the Product automatically generated from its title. - * They are used by the Liquid templating language to refer to objects. - */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** List of images associated with the product. */ - images: ImageConnection - /** The media associated with the product. */ - media: MediaConnection - /** The metafield associated with the resource. */ - metafield?: Maybe - /** A paginated list of metafields associated with the resource. */ - metafields: MetafieldConnection - /** - * The online store URL for the product. - * A value of `null` indicates that the product is not published to the Online Store sales channel. - */ - onlineStoreUrl?: Maybe - /** List of product options. */ - options: Array - /** List of price ranges in the presentment currencies for this shop. */ - presentmentPriceRanges: ProductPriceRangeConnection - /** The price range. */ - priceRange: ProductPriceRange - /** A categorization that a product can be tagged with, commonly used for filtering and searching. */ - productType: Scalars['String'] - /** The date and time when the product was published to the channel. */ - publishedAt: Scalars['DateTime'] - /** The product's SEO information. */ - seo: Seo - /** - * A comma separated list of tags that have been added to the product. - * Additional access scope required for private apps: unauthenticated_read_product_tags. - */ - tags: Array - /** The product’s title. */ - title: Scalars['String'] - /** The total quantity of inventory in stock for this Product. */ - totalInventory?: Maybe - /** - * The date and time when the product was last modified. - * A product's `updatedAt` value can change for different reasons. For example, if an order - * is placed for a product that has inventory tracking set up, then the inventory adjustment - * is counted as an update. - */ - updatedAt: Scalars['DateTime'] - /** - * Find a product’s variant based on its selected options. - * This is useful for converting a user’s selection of product options into a single matching variant. - * If there is not a variant for the selected options, `null` will be returned. - */ - variantBySelectedOptions?: Maybe - /** List of the product’s variants. */ - variants: ProductVariantConnection - /** The product’s vendor name. */ - vendor: Scalars['String'] - } - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductCollectionsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductDescriptionArgs = { - truncateAt?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductImagesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductMediaArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductMetafieldArgs = { - namespace: Scalars['String'] - key: Scalars['String'] -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductMetafieldsArgs = { - namespace?: Maybe - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductOptionsArgs = { - first?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductPresentmentPriceRangesArgs = { - presentmentCurrencies?: Maybe> - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductVariantBySelectedOptionsArgs = { - selectedOptions: Array -} - -/** - * A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. - * For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). - */ -export type ProductVariantsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe -} - -/** The set of valid sort keys for the ProductCollection query. */ -export enum ProductCollectionSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `price` value. */ - Price = 'PRICE', - /** Sort by the `best-selling` value. */ - BestSelling = 'BEST_SELLING', - /** Sort by the `created` value. */ - Created = 'CREATED', - /** Sort by the `id` value. */ - Id = 'ID', - /** Sort by the `manual` value. */ - Manual = 'MANUAL', - /** Sort by the `collection-default` value. */ - CollectionDefault = 'COLLECTION_DEFAULT', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** An auto-generated type for paginating through multiple Products. */ -export type ProductConnection = { - __typename?: 'ProductConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one Product and a cursor during pagination. */ -export type ProductEdge = { - __typename?: 'ProductEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ProductEdge. */ - node: Product -} - -/** The set of valid sort keys for the ProductImage query. */ -export enum ProductImageSortKeys { - /** Sort by the `created_at` value. */ - CreatedAt = 'CREATED_AT', - /** Sort by the `position` value. */ - Position = 'POSITION', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** The set of valid sort keys for the ProductMedia query. */ -export enum ProductMediaSortKeys { - /** Sort by the `position` value. */ - Position = 'POSITION', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** - * Product property names like "Size", "Color", and "Material" that the customers can select. - * Variants are selected based on permutations of these options. - * 255 characters limit each. - */ -export type ProductOption = Node & { - __typename?: 'ProductOption' - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The product option’s name. */ - name: Scalars['String'] - /** The corresponding value to the product option name. */ - values: Array -} - -/** The price range of the product. */ -export type ProductPriceRange = { - __typename?: 'ProductPriceRange' - /** The highest variant's price. */ - maxVariantPrice: MoneyV2 - /** The lowest variant's price. */ - minVariantPrice: MoneyV2 -} - -/** An auto-generated type for paginating through multiple ProductPriceRanges. */ -export type ProductPriceRangeConnection = { - __typename?: 'ProductPriceRangeConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one ProductPriceRange and a cursor during pagination. */ -export type ProductPriceRangeEdge = { - __typename?: 'ProductPriceRangeEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ProductPriceRangeEdge. */ - node: ProductPriceRange -} - -/** The set of valid sort keys for the Product query. */ -export enum ProductSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `product_type` value. */ - ProductType = 'PRODUCT_TYPE', - /** Sort by the `vendor` value. */ - Vendor = 'VENDOR', - /** Sort by the `updated_at` value. */ - UpdatedAt = 'UPDATED_AT', - /** Sort by the `created_at` value. */ - CreatedAt = 'CREATED_AT', - /** Sort by the `best_selling` value. */ - BestSelling = 'BEST_SELLING', - /** Sort by the `price` value. */ - Price = 'PRICE', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariant = Node & - HasMetafields & { - __typename?: 'ProductVariant' - /** - * Indicates if the product variant is in stock. - * @deprecated Use `availableForSale` instead - */ - available?: Maybe - /** Indicates if the product variant is available for sale. */ - availableForSale: Scalars['Boolean'] - /** - * The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPrice` is higher than `price`. - * @deprecated Use `compareAtPriceV2` instead - */ - compareAtPrice?: Maybe - /** The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPriceV2` is higher than `priceV2`. */ - compareAtPriceV2?: Maybe - /** Whether a product is out of stock but still available for purchase (used for backorders). */ - currentlyNotInStock: Scalars['Boolean'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** Image associated with the product variant. This field falls back to the product image if no image is available. */ - image?: Maybe - /** The metafield associated with the resource. */ - metafield?: Maybe - /** A paginated list of metafields associated with the resource. */ - metafields: MetafieldConnection - /** List of prices and compare-at prices in the presentment currencies for this shop. */ - presentmentPrices: ProductVariantPricePairConnection - /** List of unit prices in the presentment currencies for this shop. */ - presentmentUnitPrices: MoneyV2Connection - /** - * The product variant’s price. - * @deprecated Use `priceV2` instead - */ - price: Scalars['Money'] - /** The product variant’s price. */ - priceV2: MoneyV2 - /** The product object that the product variant belongs to. */ - product: Product - /** The total sellable quantity of the variant for online sales channels. */ - quantityAvailable?: Maybe - /** Whether a customer needs to provide a shipping address when placing an order for the product variant. */ - requiresShipping: Scalars['Boolean'] - /** List of product options applied to the variant. */ - selectedOptions: Array - /** The SKU (stock keeping unit) associated with the variant. */ - sku?: Maybe - /** The product variant’s title. */ - title: Scalars['String'] - /** The unit price value for the variant based on the variant's measurement. */ - unitPrice?: Maybe - /** The unit price measurement for the variant. */ - unitPriceMeasurement?: Maybe - /** The weight of the product variant in the unit system specified with `weight_unit`. */ - weight?: Maybe - /** Unit of measurement for weight. */ - weightUnit: WeightUnit - } - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantImageArgs = { - maxWidth?: Maybe - maxHeight?: Maybe - crop?: Maybe - scale?: Maybe -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantMetafieldArgs = { - namespace: Scalars['String'] - key: Scalars['String'] -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantMetafieldsArgs = { - namespace?: Maybe - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantPresentmentPricesArgs = { - presentmentCurrencies?: Maybe> - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** A product variant represents a different version of a product, such as differing sizes or differing colors. */ -export type ProductVariantPresentmentUnitPricesArgs = { - presentmentCurrencies?: Maybe> - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe -} - -/** An auto-generated type for paginating through multiple ProductVariants. */ -export type ProductVariantConnection = { - __typename?: 'ProductVariantConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one ProductVariant and a cursor during pagination. */ -export type ProductVariantEdge = { - __typename?: 'ProductVariantEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ProductVariantEdge. */ - node: ProductVariant -} - -/** The compare-at price and price of a variant sharing a currency. */ -export type ProductVariantPricePair = { - __typename?: 'ProductVariantPricePair' - /** The compare-at price of the variant with associated currency. */ - compareAtPrice?: Maybe - /** The price of the variant with associated currency. */ - price: MoneyV2 -} - -/** An auto-generated type for paginating through multiple ProductVariantPricePairs. */ -export type ProductVariantPricePairConnection = { - __typename?: 'ProductVariantPricePairConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. */ -export type ProductVariantPricePairEdge = { - __typename?: 'ProductVariantPricePairEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of ProductVariantPricePairEdge. */ - node: ProductVariantPricePair -} - -/** The set of valid sort keys for the ProductVariant query. */ -export enum ProductVariantSortKeys { - /** Sort by the `title` value. */ - Title = 'TITLE', - /** Sort by the `sku` value. */ - Sku = 'SKU', - /** Sort by the `position` value. */ - Position = 'POSITION', - /** Sort by the `id` value. */ - Id = 'ID', - /** - * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - * results by relevance to the search term(s). When no search query is specified, this sort key is not - * deterministic and should not be used. - */ - Relevance = 'RELEVANCE', -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRoot = { - __typename?: 'QueryRoot' - /** List of the shop's articles. */ - articles: ArticleConnection - /** Find a blog by its handle. */ - blogByHandle?: Maybe - /** List of the shop's blogs. */ - blogs: BlogConnection - /** Find a collection by its handle. */ - collectionByHandle?: Maybe - /** List of the shop’s collections. */ - collections: CollectionConnection - /** Find a customer by its access token. */ - customer?: Maybe - node?: Maybe - nodes: Array> - /** Find a page by its handle. */ - pageByHandle?: Maybe - /** List of the shop's pages. */ - pages: PageConnection - /** Find a product by its handle. */ - productByHandle?: Maybe - /** - * Find recommended products related to a given `product_id`. - * To learn more about how recommendations are generated, see - * [*Showing product recommendations on product pages*](https://help.shopify.com/themes/development/recommended-products). - */ - productRecommendations?: Maybe> - /** - * Tags added to products. - * Additional access scope required: unauthenticated_read_product_tags. - */ - productTags: StringConnection - /** List of product types for the shop's products that are published to your app. */ - productTypes: StringConnection - /** List of the shop’s products. */ - products: ProductConnection - /** The list of public Storefront API versions, including supported, release candidate and unstable versions. */ - publicApiVersions: Array - /** The shop associated with the storefront access token. */ - shop: Shop -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootArticlesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootBlogByHandleArgs = { - handle: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootBlogsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootCollectionByHandleArgs = { - handle: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootCollectionsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootCustomerArgs = { - customerAccessToken: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootNodeArgs = { - id: Scalars['ID'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootNodesArgs = { - ids: Array -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootPageByHandleArgs = { - handle: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootPagesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductByHandleArgs = { - handle: Scalars['String'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductRecommendationsArgs = { - productId: Scalars['ID'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductTagsArgs = { - first: Scalars['Int'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductTypesArgs = { - first: Scalars['Int'] -} - -/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */ -export type QueryRootProductsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** SEO information. */ -export type Seo = { - __typename?: 'SEO' - /** The meta description. */ - description?: Maybe - /** The SEO title. */ - title?: Maybe -} - -/** - * Script discount applications capture the intentions of a discount that - * was created by a Shopify Script. - */ -export type ScriptDiscountApplication = DiscountApplication & { - __typename?: 'ScriptDiscountApplication' - /** The method by which the discount's value is allocated to its entitled items. */ - allocationMethod: DiscountApplicationAllocationMethod - /** - * The description of the application as defined by the Script. - * @deprecated Use `title` instead - */ - description: Scalars['String'] - /** Which lines of targetType that the discount is allocated over. */ - targetSelection: DiscountApplicationTargetSelection - /** The type of line that the discount is applicable towards. */ - targetType: DiscountApplicationTargetType - /** The title of the application as defined by the Script. */ - title: Scalars['String'] - /** The value of the discount application. */ - value: PricingValue -} - -/** - * Properties used by customers to select a product variant. - * Products can have multiple options, like different sizes or colors. - */ -export type SelectedOption = { - __typename?: 'SelectedOption' - /** The product option’s name. */ - name: Scalars['String'] - /** The product option’s value. */ - value: Scalars['String'] -} - -/** Specifies the input fields required for a selected option. */ -export type SelectedOptionInput = { - /** The product option’s name. */ - name: Scalars['String'] - /** The product option’s value. */ - value: Scalars['String'] -} - -/** A shipping rate to be applied to a checkout. */ -export type ShippingRate = { - __typename?: 'ShippingRate' - /** Human-readable unique identifier for this shipping rate. */ - handle: Scalars['String'] - /** - * Price of this shipping rate. - * @deprecated Use `priceV2` instead - */ - price: Scalars['Money'] - /** Price of this shipping rate. */ - priceV2: MoneyV2 - /** Title of this shipping rate. */ - title: Scalars['String'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type Shop = { - __typename?: 'Shop' - /** - * List of the shop' articles. - * @deprecated Use `QueryRoot.articles` instead. - */ - articles: ArticleConnection - /** - * List of the shop' blogs. - * @deprecated Use `QueryRoot.blogs` instead. - */ - blogs: BlogConnection - /** - * Find a collection by its handle. - * @deprecated Use `QueryRoot.collectionByHandle` instead. - */ - collectionByHandle?: Maybe - /** - * List of the shop’s collections. - * @deprecated Use `QueryRoot.collections` instead. - */ - collections: CollectionConnection - /** - * The three-letter code for the currency that the shop accepts. - * @deprecated Use `paymentSettings` instead - */ - currencyCode: CurrencyCode - /** A description of the shop. */ - description?: Maybe - /** A string representing the way currency is formatted when the currency isn’t specified. */ - moneyFormat: Scalars['String'] - /** The shop’s name. */ - name: Scalars['String'] - /** Settings related to payments. */ - paymentSettings: PaymentSettings - /** The shop’s primary domain. */ - primaryDomain: Domain - /** The shop’s privacy policy. */ - privacyPolicy?: Maybe - /** - * Find a product by its handle. - * @deprecated Use `QueryRoot.productByHandle` instead. - */ - productByHandle?: Maybe - /** - * A list of tags that have been added to products. - * Additional access scope required: unauthenticated_read_product_tags. - * @deprecated Use `QueryRoot.productTags` instead. - */ - productTags: StringConnection - /** - * List of the shop’s product types. - * @deprecated Use `QueryRoot.productTypes` instead. - */ - productTypes: StringConnection - /** - * List of the shop’s products. - * @deprecated Use `QueryRoot.products` instead. - */ - products: ProductConnection - /** The shop’s refund policy. */ - refundPolicy?: Maybe - /** The shop’s shipping policy. */ - shippingPolicy?: Maybe - /** Countries that the shop ships to. */ - shipsToCountries: Array - /** - * The shop’s Shopify Payments account id. - * @deprecated Use `paymentSettings` instead - */ - shopifyPaymentsAccountId?: Maybe - /** The shop’s terms of service. */ - termsOfService?: Maybe -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopArticlesArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopBlogsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopCollectionByHandleArgs = { - handle: Scalars['String'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopCollectionsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopProductByHandleArgs = { - handle: Scalars['String'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopProductTagsArgs = { - first: Scalars['Int'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopProductTypesArgs = { - first: Scalars['Int'] -} - -/** Shop represents a collection of the general settings and information about the shop. */ -export type ShopProductsArgs = { - first?: Maybe - after?: Maybe - last?: Maybe - before?: Maybe - reverse?: Maybe - sortKey?: Maybe - query?: Maybe -} - -/** Policy that a merchant has configured for their store, such as their refund or privacy policy. */ -export type ShopPolicy = Node & { - __typename?: 'ShopPolicy' - /** Policy text, maximum size of 64kb. */ - body: Scalars['String'] - /** Policy’s handle. */ - handle: Scalars['String'] - /** Globally unique identifier. */ - id: Scalars['ID'] - /** Policy’s title. */ - title: Scalars['String'] - /** Public URL to the policy. */ - url: Scalars['URL'] -} - -/** An auto-generated type for paginating through multiple Strings. */ -export type StringConnection = { - __typename?: 'StringConnection' - /** A list of edges. */ - edges: Array - /** Information to aid in pagination. */ - pageInfo: PageInfo -} - -/** An auto-generated type which holds one String and a cursor during pagination. */ -export type StringEdge = { - __typename?: 'StringEdge' - /** A cursor for use in pagination. */ - cursor: Scalars['String'] - /** The item at the end of StringEdge. */ - node: Scalars['String'] -} - -/** - * Specifies the fields required to complete a checkout with - * a tokenized payment. - */ -export type TokenizedPaymentInput = { - /** The amount of the payment. */ - amount: Scalars['Money'] - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** The type of payment token. */ - type: Scalars['String'] - /** A simple string or JSON containing the required payment data for the tokenized payment. */ - paymentData: Scalars['String'] - /** Executes the payment in test mode if possible. Defaults to `false`. */ - test?: Maybe - /** Public Hash Key used for AndroidPay payments only. */ - identifier?: Maybe -} - -/** - * Specifies the fields required to complete a checkout with - * a tokenized payment. - */ -export type TokenizedPaymentInputV2 = { - /** The amount and currency of the payment. */ - paymentAmount: MoneyInput - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** A simple string or JSON containing the required payment data for the tokenized payment. */ - paymentData: Scalars['String'] - /** Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. */ - test?: Maybe - /** Public Hash Key used for AndroidPay payments only. */ - identifier?: Maybe - /** The type of payment token. */ - type: Scalars['String'] -} - -/** - * Specifies the fields required to complete a checkout with - * a tokenized payment. - */ -export type TokenizedPaymentInputV3 = { - /** The amount and currency of the payment. */ - paymentAmount: MoneyInput - /** A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. */ - idempotencyKey: Scalars['String'] - /** The billing address for the payment. */ - billingAddress: MailingAddressInput - /** A simple string or JSON containing the required payment data for the tokenized payment. */ - paymentData: Scalars['String'] - /** Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. */ - test?: Maybe - /** Public Hash Key used for AndroidPay payments only. */ - identifier?: Maybe - /** The type of payment token. */ - type: PaymentTokenType -} - -/** An object representing exchange of money for a product or service. */ -export type Transaction = { - __typename?: 'Transaction' - /** - * The amount of money that the transaction was for. - * @deprecated Use `amountV2` instead - */ - amount: Scalars['Money'] - /** The amount of money that the transaction was for. */ - amountV2: MoneyV2 - /** The kind of the transaction. */ - kind: TransactionKind - /** - * The status of the transaction. - * @deprecated Use `statusV2` instead - */ - status: TransactionStatus - /** The status of the transaction. */ - statusV2?: Maybe - /** Whether the transaction was done in test mode or not. */ - test: Scalars['Boolean'] -} - -export enum TransactionKind { - Sale = 'SALE', - Capture = 'CAPTURE', - Authorization = 'AUTHORIZATION', - EmvAuthorization = 'EMV_AUTHORIZATION', - Change = 'CHANGE', -} - -export enum TransactionStatus { - Pending = 'PENDING', - Success = 'SUCCESS', - Failure = 'FAILURE', - Error = 'ERROR', -} - -/** The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). */ -export type UnitPriceMeasurement = { - __typename?: 'UnitPriceMeasurement' - /** The type of unit of measurement for the unit price measurement. */ - measuredType?: Maybe - /** The quantity unit for the unit price measurement. */ - quantityUnit?: Maybe - /** The quantity value for the unit price measurement. */ - quantityValue: Scalars['Float'] - /** The reference unit for the unit price measurement. */ - referenceUnit?: Maybe - /** The reference value for the unit price measurement. */ - referenceValue: Scalars['Int'] -} - -/** The accepted types of unit of measurement. */ -export enum UnitPriceMeasurementMeasuredType { - /** Unit of measurements representing volumes. */ - Volume = 'VOLUME', - /** Unit of measurements representing weights. */ - Weight = 'WEIGHT', - /** Unit of measurements representing lengths. */ - Length = 'LENGTH', - /** Unit of measurements representing areas. */ - Area = 'AREA', -} - -/** The valid units of measurement for a unit price measurement. */ -export enum UnitPriceMeasurementMeasuredUnit { - /** 1000 milliliters equals 1 liter. */ - Ml = 'ML', - /** 100 centiliters equals 1 liter. */ - Cl = 'CL', - /** Metric system unit of volume. */ - L = 'L', - /** 1 cubic meter equals 1000 liters. */ - M3 = 'M3', - /** 1000 milligrams equals 1 gram. */ - Mg = 'MG', - /** Metric system unit of weight. */ - G = 'G', - /** 1 kilogram equals 1000 grams. */ - Kg = 'KG', - /** 1000 millimeters equals 1 meter. */ - Mm = 'MM', - /** 100 centimeters equals 1 meter. */ - Cm = 'CM', - /** Metric system unit of length. */ - M = 'M', - /** Metric system unit of area. */ - M2 = 'M2', -} - -/** Represents an error in the input of a mutation. */ -export type UserError = DisplayableError & { - __typename?: 'UserError' - /** Path to the input field which caused the error. */ - field?: Maybe> - /** The error message. */ - message: Scalars['String'] -} - -/** Represents a Shopify hosted video. */ -export type Video = Node & - Media & { - __typename?: 'Video' - /** A word or phrase to share the nature or contents of a media. */ - alt?: Maybe - /** Globally unique identifier. */ - id: Scalars['ID'] - /** The media content type. */ - mediaContentType: MediaContentType - /** The preview image for the media. */ - previewImage?: Maybe - /** The sources for a video. */ - sources: Array - } - -/** Represents a source for a Shopify hosted video. */ -export type VideoSource = { - __typename?: 'VideoSource' - /** The format of the video source. */ - format: Scalars['String'] - /** The height of the video. */ - height: Scalars['Int'] - /** The video MIME type. */ - mimeType: Scalars['String'] - /** The URL of the video. */ - url: Scalars['String'] - /** The width of the video. */ - width: Scalars['Int'] -} - -/** Units of measurement for weight. */ -export enum WeightUnit { - /** 1 kilogram equals 1000 grams. */ - Kilograms = 'KILOGRAMS', - /** Metric system unit of mass. */ - Grams = 'GRAMS', - /** 1 pound equals 16 ounces. */ - Pounds = 'POUNDS', - /** Imperial system unit of mass. */ - Ounces = 'OUNCES', -} - -export type Unnamed_1_QueryVariables = Exact<{ - first: Scalars['Int'] -}> - -export type Unnamed_1_Query = { __typename?: 'QueryRoot' } & { - pages: { __typename?: 'PageConnection' } & { - edges: Array< - { __typename?: 'PageEdge' } & { - node: { __typename?: 'Page' } & Pick< - Page, - 'id' | 'title' | 'handle' | 'body' | 'bodySummary' | 'url' - > - } - > - } -} diff --git a/framework/swell/schema.graphql b/framework/swell/schema.graphql deleted file mode 100644 index 822e6007e..000000000 --- a/framework/swell/schema.graphql +++ /dev/null @@ -1,9631 +0,0 @@ -schema { - query: QueryRoot - mutation: Mutation -} - -""" -Marks an element of a GraphQL schema as having restricted access. -""" -directive @accessRestricted( - """ - Explains the reason around this restriction - """ - reason: String = null -) on FIELD_DEFINITION | OBJECT - -""" -A version of the API. -""" -type ApiVersion { - """ - The human-readable name of the version. - """ - displayName: String! - - """ - The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. - """ - handle: String! - - """ - Whether the version is supported by Shopify. - """ - supported: Boolean! -} - -""" -Details about the gift card used on the checkout. -""" -type AppliedGiftCard implements Node { - """ - The amount that was taken from the gift card by applying it. - """ - amountUsed: Money! @deprecated(reason: "Use `amountUsedV2` instead") - - """ - The amount that was taken from the gift card by applying it. - """ - amountUsedV2: MoneyV2! - - """ - The amount left on the gift card. - """ - balance: Money! @deprecated(reason: "Use `balanceV2` instead") - - """ - The amount left on the gift card. - """ - balanceV2: MoneyV2! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The last characters of the gift card. - """ - lastCharacters: String! - - """ - The amount that was applied to the checkout in its currency. - """ - presentmentAmountUsed: MoneyV2! -} - -""" -An article in an online store blog. -""" -type Article implements Node { - """ - The article's author. - """ - author: ArticleAuthor! @deprecated(reason: "Use `authorV2` instead") - - """ - The article's author. - """ - authorV2: ArticleAuthor - - """ - The blog that the article belongs to. - """ - blog: Blog! - - """ - List of comments posted on the article. - """ - comments( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CommentConnection! - - """ - Stripped content of the article, single line with HTML tags removed. - """ - content( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String! - - """ - The content of the article, complete with HTML formatting. - """ - contentHtml: HTML! - - """ - Stripped excerpt of the article, single line with HTML tags removed. - """ - excerpt( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String - - """ - The excerpt of the article, complete with HTML formatting. - """ - excerptHtml: HTML - - """ - A human-friendly unique string for the Article automatically generated from its title. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The image associated with the article. - """ - image( - """ - Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. - """ - scale: Int = 1 - ): Image - - """ - The date and time when the article was published. - """ - publishedAt: DateTime! - - """ - The article’s SEO information. - """ - seo: SEO - - """ - A categorization that a article can be tagged with. - """ - tags: [String!]! - - """ - The article’s name. - """ - title: String! - - """ - The url pointing to the article accessible from the web. - """ - url: URL! -} - -""" -The author of an article. -""" -type ArticleAuthor { - """ - The author's bio. - """ - bio: String - - """ - The author’s email. - """ - email: String! - - """ - The author's first name. - """ - firstName: String! - - """ - The author's last name. - """ - lastName: String! - - """ - The author's full name. - """ - name: String! -} - -""" -An auto-generated type for paginating through multiple Articles. -""" -type ArticleConnection { - """ - A list of edges. - """ - edges: [ArticleEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Article and a cursor during pagination. -""" -type ArticleEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ArticleEdge. - """ - node: Article! -} - -""" -The set of valid sort keys for the Article query. -""" -enum ArticleSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `blog_title` value. - """ - BLOG_TITLE - - """ - Sort by the `author` value. - """ - AUTHOR - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT - - """ - Sort by the `published_at` value. - """ - PUBLISHED_AT - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -Represents a generic custom attribute. -""" -type Attribute { - """ - Key or name of the attribute. - """ - key: String! - - """ - Value of the attribute. - """ - value: String -} - -""" -Specifies the input fields required for an attribute. -""" -input AttributeInput { - """ - Key or name of the attribute. - """ - key: String! - - """ - Value of the attribute. - """ - value: String! -} - -""" -Automatic discount applications capture the intentions of a discount that was automatically applied. -""" -type AutomaticDiscountApplication implements DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The title of the application. - """ - title: String! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -A collection of available shipping rates for a checkout. -""" -type AvailableShippingRates { - """ - Whether or not the shipping rates are ready. - The `shippingRates` field is `null` when this value is `false`. - This field should be polled until its value becomes `true`. - """ - ready: Boolean! - - """ - The fetched shipping rates. `null` until the `ready` field is `true`. - """ - shippingRates: [ShippingRate!] -} - -""" -An online store blog. -""" -type Blog implements Node { - """ - Find an article by its handle. - """ - articleByHandle( - """ - The handle of the article. - """ - handle: String! - ): Article - - """ - List of the blog's articles. - """ - articles( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ArticleSortKeys = ID - - """ - Supported filter parameters: - - `author` - - `blog_title` - - `created_at` - - `tag` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ArticleConnection! - - """ - The authors who have contributed to the blog. - """ - authors: [ArticleAuthor!]! - - """ - A human-friendly unique string for the Blog automatically generated from its title. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The blog's SEO information. - """ - seo: SEO - - """ - The blogs’s title. - """ - title: String! - - """ - The url pointing to the blog accessible from the web. - """ - url: URL! -} - -""" -An auto-generated type for paginating through multiple Blogs. -""" -type BlogConnection { - """ - A list of edges. - """ - edges: [BlogEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Blog and a cursor during pagination. -""" -type BlogEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of BlogEdge. - """ - node: Blog! -} - -""" -The set of valid sort keys for the Blog query. -""" -enum BlogSortKeys { - """ - Sort by the `handle` value. - """ - HANDLE - - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -Card brand, such as Visa or Mastercard, which can be used for payments. -""" -enum CardBrand { - """ - Visa - """ - VISA - - """ - Mastercard - """ - MASTERCARD - - """ - Discover - """ - DISCOVER - - """ - American Express - """ - AMERICAN_EXPRESS - - """ - Diners Club - """ - DINERS_CLUB - - """ - JCB - """ - JCB -} - -""" -A container for all the information required to checkout items and pay. -""" -type Checkout implements Node { - """ - The gift cards used on the checkout. - """ - appliedGiftCards: [AppliedGiftCard!]! - - """ - The available shipping rates for this Checkout. - Should only be used when checkout `requiresShipping` is `true` and - the shipping address is valid. - """ - availableShippingRates: AvailableShippingRates - - """ - The date and time when the checkout was completed. - """ - completedAt: DateTime - - """ - The date and time when the checkout was created. - """ - createdAt: DateTime! - - """ - The currency code for the Checkout. - """ - currencyCode: CurrencyCode! - - """ - A list of extra information that is added to the checkout. - """ - customAttributes: [Attribute!]! - - """ - The customer associated with the checkout. - """ - customer: Customer - @deprecated( - reason: "This field will always return null. If you have an authentication token for the customer, you can use the `customer` field on the query root to retrieve it." - ) - - """ - Discounts that have been applied on the checkout. - """ - discountApplications( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DiscountApplicationConnection! - - """ - The email attached to this checkout. - """ - email: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - A list of line item objects, each one containing information about an item in the checkout. - """ - lineItems( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CheckoutLineItemConnection! - - """ - The sum of all the prices of all the items in the checkout. Duties, taxes, shipping and discounts excluded. - """ - lineItemsSubtotalPrice: MoneyV2! - - """ - The note associated with the checkout. - """ - note: String - - """ - The resulting order from a paid checkout. - """ - order: Order - - """ - The Order Status Page for this Checkout, null when checkout is not completed. - """ - orderStatusUrl: URL - - """ - The amount left to be paid. This is equal to the cost of the line items, taxes and shipping minus discounts and gift cards. - """ - paymentDue: Money! @deprecated(reason: "Use `paymentDueV2` instead") - - """ - The amount left to be paid. This is equal to the cost of the line items, duties, taxes and shipping minus discounts and gift cards. - """ - paymentDueV2: MoneyV2! - - """ - Whether or not the Checkout is ready and can be completed. Checkouts may - have asynchronous operations that can take time to finish. If you want - to complete a checkout or ensure all the fields are populated and up to - date, polling is required until the value is true. - """ - ready: Boolean! - - """ - States whether or not the fulfillment requires shipping. - """ - requiresShipping: Boolean! - - """ - The shipping address to where the line items will be shipped. - """ - shippingAddress: MailingAddress - - """ - The discounts that have been allocated onto the shipping line by discount applications. - """ - shippingDiscountAllocations: [DiscountAllocation!]! - - """ - Once a shipping rate is selected by the customer it is transitioned to a `shipping_line` object. - """ - shippingLine: ShippingRate - - """ - Price of the checkout before shipping and taxes. - """ - subtotalPrice: Money! @deprecated(reason: "Use `subtotalPriceV2` instead") - - """ - Price of the checkout before duties, shipping and taxes. - """ - subtotalPriceV2: MoneyV2! - - """ - Specifies if the Checkout is tax exempt. - """ - taxExempt: Boolean! - - """ - Specifies if taxes are included in the line item and shipping line prices. - """ - taxesIncluded: Boolean! - - """ - The sum of all the prices of all the items in the checkout, taxes and discounts included. - """ - totalPrice: Money! @deprecated(reason: "Use `totalPriceV2` instead") - - """ - The sum of all the prices of all the items in the checkout, duties, taxes and discounts included. - """ - totalPriceV2: MoneyV2! - - """ - The sum of all the taxes applied to the line items and shipping lines in the checkout. - """ - totalTax: Money! @deprecated(reason: "Use `totalTaxV2` instead") - - """ - The sum of all the taxes applied to the line items and shipping lines in the checkout. - """ - totalTaxV2: MoneyV2! - - """ - The date and time when the checkout was last updated. - """ - updatedAt: DateTime! - - """ - The url pointing to the checkout accessible from the web. - """ - webUrl: URL! -} - -""" -Specifies the fields required to update a checkout's attributes. -""" -input CheckoutAttributesUpdateInput { - """ - The text of an optional note that a shop owner can attach to the checkout. - """ - note: String - - """ - A list of extra information that is added to the checkout. - """ - customAttributes: [AttributeInput!] - - """ - Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - The required attributes are city, province, and country. - Full validation of the addresses is still done at complete time. - """ - allowPartialAddresses: Boolean -} - -""" -Return type for `checkoutAttributesUpdate` mutation. -""" -type CheckoutAttributesUpdatePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Specifies the fields required to update a checkout's attributes. -""" -input CheckoutAttributesUpdateV2Input { - """ - The text of an optional note that a shop owner can attach to the checkout. - """ - note: String - - """ - A list of extra information that is added to the checkout. - """ - customAttributes: [AttributeInput!] - - """ - Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - The required attributes are city, province, and country. - Full validation of the addresses is still done at complete time. - """ - allowPartialAddresses: Boolean -} - -""" -Return type for `checkoutAttributesUpdateV2` mutation. -""" -type CheckoutAttributesUpdateV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteFree` mutation. -""" -type CheckoutCompleteFreePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithCreditCard` mutation. -""" -type CheckoutCompleteWithCreditCardPayload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithCreditCardV2` mutation. -""" -type CheckoutCompleteWithCreditCardV2Payload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithTokenizedPayment` mutation. -""" -type CheckoutCompleteWithTokenizedPaymentPayload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithTokenizedPaymentV2` mutation. -""" -type CheckoutCompleteWithTokenizedPaymentV2Payload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCompleteWithTokenizedPaymentV3` mutation. -""" -type CheckoutCompleteWithTokenizedPaymentV3Payload { - """ - The checkout on which the payment was applied. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - A representation of the attempted payment. - """ - payment: Payment - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Specifies the fields required to create a checkout. -""" -input CheckoutCreateInput { - """ - The email with which the customer wants to checkout. - """ - email: String - - """ - A list of line item objects, each one containing information about an item in the checkout. - """ - lineItems: [CheckoutLineItemInput!] - - """ - The shipping address to where the line items will be shipped. - """ - shippingAddress: MailingAddressInput - - """ - The text of an optional note that a shop owner can attach to the checkout. - """ - note: String - - """ - A list of extra information that is added to the checkout. - """ - customAttributes: [AttributeInput!] - - """ - Allows setting partial addresses on a Checkout, skipping the full validation of attributes. - The required attributes are city, province, and country. - Full validation of addresses is still done at complete time. - """ - allowPartialAddresses: Boolean - - """ - The three-letter currency code of one of the shop's enabled presentment currencies. - Including this field creates a checkout in the specified currency. By default, new - checkouts are created in the shop's primary currency. - """ - presentmentCurrencyCode: CurrencyCode -} - -""" -Return type for `checkoutCreate` mutation. -""" -type CheckoutCreatePayload { - """ - The new checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCustomerAssociate` mutation. -""" -type CheckoutCustomerAssociatePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - The associated customer object. - """ - customer: Customer - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `checkoutCustomerAssociateV2` mutation. -""" -type CheckoutCustomerAssociateV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - The associated customer object. - """ - customer: Customer - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCustomerDisassociate` mutation. -""" -type CheckoutCustomerDisassociatePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutCustomerDisassociateV2` mutation. -""" -type CheckoutCustomerDisassociateV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutDiscountCodeApply` mutation. -""" -type CheckoutDiscountCodeApplyPayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutDiscountCodeApplyV2` mutation. -""" -type CheckoutDiscountCodeApplyV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutDiscountCodeRemove` mutation. -""" -type CheckoutDiscountCodeRemovePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutEmailUpdate` mutation. -""" -type CheckoutEmailUpdatePayload { - """ - The checkout object with the updated email. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutEmailUpdateV2` mutation. -""" -type CheckoutEmailUpdateV2Payload { - """ - The checkout object with the updated email. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Possible error codes that could be returned by CheckoutUserError. -""" -enum CheckoutErrorCode { - """ - Input value is blank. - """ - BLANK - - """ - Input value is invalid. - """ - INVALID - - """ - Input value is too long. - """ - TOO_LONG - - """ - Input value is not present. - """ - PRESENT - - """ - Input value should be less than maximum allowed value. - """ - LESS_THAN - - """ - Input value should be greater than or equal to minimum allowed value. - """ - GREATER_THAN_OR_EQUAL_TO - - """ - Input value should be less or equal to maximum allowed value. - """ - LESS_THAN_OR_EQUAL_TO - - """ - Checkout is already completed. - """ - ALREADY_COMPLETED - - """ - Checkout is locked. - """ - LOCKED - - """ - Input value is not supported. - """ - NOT_SUPPORTED - - """ - Input email contains an invalid domain name. - """ - BAD_DOMAIN - - """ - Input Zip is invalid for country provided. - """ - INVALID_FOR_COUNTRY - - """ - Input Zip is invalid for country and province provided. - """ - INVALID_FOR_COUNTRY_AND_PROVINCE - - """ - Invalid state in country. - """ - INVALID_STATE_IN_COUNTRY - - """ - Invalid province in country. - """ - INVALID_PROVINCE_IN_COUNTRY - - """ - Invalid region in country. - """ - INVALID_REGION_IN_COUNTRY - - """ - Shipping rate expired. - """ - SHIPPING_RATE_EXPIRED - - """ - Gift card cannot be applied to a checkout that contains a gift card. - """ - GIFT_CARD_UNUSABLE - - """ - Gift card is disabled. - """ - GIFT_CARD_DISABLED - - """ - Gift card code is invalid. - """ - GIFT_CARD_CODE_INVALID - - """ - Gift card has already been applied. - """ - GIFT_CARD_ALREADY_APPLIED - - """ - Gift card currency does not match checkout currency. - """ - GIFT_CARD_CURRENCY_MISMATCH - - """ - Gift card is expired. - """ - GIFT_CARD_EXPIRED - - """ - Gift card has no funds left. - """ - GIFT_CARD_DEPLETED - - """ - Gift card was not found. - """ - GIFT_CARD_NOT_FOUND - - """ - Cart does not meet discount requirements notice. - """ - CART_DOES_NOT_MEET_DISCOUNT_REQUIREMENTS_NOTICE - - """ - Discount expired. - """ - DISCOUNT_EXPIRED - - """ - Discount disabled. - """ - DISCOUNT_DISABLED - - """ - Discount limit reached. - """ - DISCOUNT_LIMIT_REACHED - - """ - Discount not found. - """ - DISCOUNT_NOT_FOUND - - """ - Customer already used once per customer discount notice. - """ - CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE - - """ - Checkout is already completed. - """ - EMPTY - - """ - Not enough in stock. - """ - NOT_ENOUGH_IN_STOCK - - """ - Missing payment input. - """ - MISSING_PAYMENT_INPUT - - """ - The amount of the payment does not match the value to be paid. - """ - TOTAL_PRICE_MISMATCH - - """ - Line item was not found in checkout. - """ - LINE_ITEM_NOT_FOUND - - """ - Unable to apply discount. - """ - UNABLE_TO_APPLY - - """ - Discount already applied. - """ - DISCOUNT_ALREADY_APPLIED -} - -""" -Return type for `checkoutGiftCardApply` mutation. -""" -type CheckoutGiftCardApplyPayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutGiftCardRemove` mutation. -""" -type CheckoutGiftCardRemovePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutGiftCardRemoveV2` mutation. -""" -type CheckoutGiftCardRemoveV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutGiftCardsAppend` mutation. -""" -type CheckoutGiftCardsAppendPayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -A single line item in the checkout, grouped by variant and attributes. -""" -type CheckoutLineItem implements Node { - """ - Extra information in the form of an array of Key-Value pairs about the line item. - """ - customAttributes: [Attribute!]! - - """ - The discounts that have been allocated onto the checkout line item by discount applications. - """ - discountAllocations: [DiscountAllocation!]! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The quantity of the line item. - """ - quantity: Int! - - """ - Title of the line item. Defaults to the product's title. - """ - title: String! - - """ - Unit price of the line item. - """ - unitPrice: MoneyV2 - - """ - Product variant of the line item. - """ - variant: ProductVariant -} - -""" -An auto-generated type for paginating through multiple CheckoutLineItems. -""" -type CheckoutLineItemConnection { - """ - A list of edges. - """ - edges: [CheckoutLineItemEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one CheckoutLineItem and a cursor during pagination. -""" -type CheckoutLineItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of CheckoutLineItemEdge. - """ - node: CheckoutLineItem! -} - -""" -Specifies the input fields to create a line item on a checkout. -""" -input CheckoutLineItemInput { - """ - Extra information in the form of an array of Key-Value pairs about the line item. - """ - customAttributes: [AttributeInput!] - - """ - The quantity of the line item. - """ - quantity: Int! - - """ - The identifier of the product variant for the line item. - """ - variantId: ID! -} - -""" -Specifies the input fields to update a line item on the checkout. -""" -input CheckoutLineItemUpdateInput { - """ - The identifier of the line item. - """ - id: ID - - """ - The variant identifier of the line item. - """ - variantId: ID - - """ - The quantity of the line item. - """ - quantity: Int - - """ - Extra information in the form of an array of Key-Value pairs about the line item. - """ - customAttributes: [AttributeInput!] -} - -""" -Return type for `checkoutLineItemsAdd` mutation. -""" -type CheckoutLineItemsAddPayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutLineItemsRemove` mutation. -""" -type CheckoutLineItemsRemovePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutLineItemsReplace` mutation. -""" -type CheckoutLineItemsReplacePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [CheckoutUserError!]! -} - -""" -Return type for `checkoutLineItemsUpdate` mutation. -""" -type CheckoutLineItemsUpdatePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutShippingAddressUpdate` mutation. -""" -type CheckoutShippingAddressUpdatePayload { - """ - The updated checkout object. - """ - checkout: Checkout! - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutShippingAddressUpdateV2` mutation. -""" -type CheckoutShippingAddressUpdateV2Payload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Return type for `checkoutShippingLineUpdate` mutation. -""" -type CheckoutShippingLineUpdatePayload { - """ - The updated checkout object. - """ - checkout: Checkout - - """ - List of errors that occurred executing the mutation. - """ - checkoutUserErrors: [CheckoutUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `checkoutUserErrors` instead") -} - -""" -Represents an error that happens during execution of a checkout mutation. -""" -type CheckoutUserError implements DisplayableError { - """ - Error code to uniquely identify the error. - """ - code: CheckoutErrorCode - - """ - Path to the input field which caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. -""" -type Collection implements Node { - """ - Stripped description of the collection, single line with HTML tags removed. - """ - description( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String! - - """ - The description of the collection, complete with HTML formatting. - """ - descriptionHtml: HTML! - - """ - A human-friendly unique string for the collection automatically generated from its title. - Limit of 255 characters. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - Image associated with the collection. - """ - image( - """ - Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. - """ - scale: Int = 1 - ): Image - - """ - List of products in the collection. - """ - products( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductCollectionSortKeys = COLLECTION_DEFAULT - ): ProductConnection! - - """ - The collection’s name. Limit of 255 characters. - """ - title: String! - - """ - The date and time when the collection was last modified. - """ - updatedAt: DateTime! -} - -""" -An auto-generated type for paginating through multiple Collections. -""" -type CollectionConnection { - """ - A list of edges. - """ - edges: [CollectionEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Collection and a cursor during pagination. -""" -type CollectionEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of CollectionEdge. - """ - node: Collection! -} - -""" -The set of valid sort keys for the Collection query. -""" -enum CollectionSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -A comment on an article. -""" -type Comment implements Node { - """ - The comment’s author. - """ - author: CommentAuthor! - - """ - Stripped content of the comment, single line with HTML tags removed. - """ - content( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String! - - """ - The content of the comment, complete with HTML formatting. - """ - contentHtml: HTML! - - """ - Globally unique identifier. - """ - id: ID! -} - -""" -The author of a comment. -""" -type CommentAuthor { - """ - The author's email. - """ - email: String! - - """ - The author’s name. - """ - name: String! -} - -""" -An auto-generated type for paginating through multiple Comments. -""" -type CommentConnection { - """ - A list of edges. - """ - edges: [CommentEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Comment and a cursor during pagination. -""" -type CommentEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of CommentEdge. - """ - node: Comment! -} - -""" -ISO 3166-1 alpha-2 country codes with some differences. -""" -enum CountryCode { - """ - Afghanistan. - """ - AF - - """ - Åland Islands. - """ - AX - - """ - Albania. - """ - AL - - """ - Algeria. - """ - DZ - - """ - Andorra. - """ - AD - - """ - Angola. - """ - AO - - """ - Anguilla. - """ - AI - - """ - Antigua & Barbuda. - """ - AG - - """ - Argentina. - """ - AR - - """ - Armenia. - """ - AM - - """ - Aruba. - """ - AW - - """ - Australia. - """ - AU - - """ - Austria. - """ - AT - - """ - Azerbaijan. - """ - AZ - - """ - Bahamas. - """ - BS - - """ - Bahrain. - """ - BH - - """ - Bangladesh. - """ - BD - - """ - Barbados. - """ - BB - - """ - Belarus. - """ - BY - - """ - Belgium. - """ - BE - - """ - Belize. - """ - BZ - - """ - Benin. - """ - BJ - - """ - Bermuda. - """ - BM - - """ - Bhutan. - """ - BT - - """ - Bolivia. - """ - BO - - """ - Bosnia & Herzegovina. - """ - BA - - """ - Botswana. - """ - BW - - """ - Bouvet Island. - """ - BV - - """ - Brazil. - """ - BR - - """ - British Indian Ocean Territory. - """ - IO - - """ - Brunei. - """ - BN - - """ - Bulgaria. - """ - BG - - """ - Burkina Faso. - """ - BF - - """ - Burundi. - """ - BI - - """ - Cambodia. - """ - KH - - """ - Canada. - """ - CA - - """ - Cape Verde. - """ - CV - - """ - Caribbean Netherlands. - """ - BQ - - """ - Cayman Islands. - """ - KY - - """ - Central African Republic. - """ - CF - - """ - Chad. - """ - TD - - """ - Chile. - """ - CL - - """ - China. - """ - CN - - """ - Christmas Island. - """ - CX - - """ - Cocos (Keeling) Islands. - """ - CC - - """ - Colombia. - """ - CO - - """ - Comoros. - """ - KM - - """ - Congo - Brazzaville. - """ - CG - - """ - Congo - Kinshasa. - """ - CD - - """ - Cook Islands. - """ - CK - - """ - Costa Rica. - """ - CR - - """ - Croatia. - """ - HR - - """ - Cuba. - """ - CU - - """ - Curaçao. - """ - CW - - """ - Cyprus. - """ - CY - - """ - Czechia. - """ - CZ - - """ - Côte d’Ivoire. - """ - CI - - """ - Denmark. - """ - DK - - """ - Djibouti. - """ - DJ - - """ - Dominica. - """ - DM - - """ - Dominican Republic. - """ - DO - - """ - Ecuador. - """ - EC - - """ - Egypt. - """ - EG - - """ - El Salvador. - """ - SV - - """ - Equatorial Guinea. - """ - GQ - - """ - Eritrea. - """ - ER - - """ - Estonia. - """ - EE - - """ - Eswatini. - """ - SZ - - """ - Ethiopia. - """ - ET - - """ - Falkland Islands. - """ - FK - - """ - Faroe Islands. - """ - FO - - """ - Fiji. - """ - FJ - - """ - Finland. - """ - FI - - """ - France. - """ - FR - - """ - French Guiana. - """ - GF - - """ - French Polynesia. - """ - PF - - """ - French Southern Territories. - """ - TF - - """ - Gabon. - """ - GA - - """ - Gambia. - """ - GM - - """ - Georgia. - """ - GE - - """ - Germany. - """ - DE - - """ - Ghana. - """ - GH - - """ - Gibraltar. - """ - GI - - """ - Greece. - """ - GR - - """ - Greenland. - """ - GL - - """ - Grenada. - """ - GD - - """ - Guadeloupe. - """ - GP - - """ - Guatemala. - """ - GT - - """ - Guernsey. - """ - GG - - """ - Guinea. - """ - GN - - """ - Guinea-Bissau. - """ - GW - - """ - Guyana. - """ - GY - - """ - Haiti. - """ - HT - - """ - Heard & McDonald Islands. - """ - HM - - """ - Vatican City. - """ - VA - - """ - Honduras. - """ - HN - - """ - Hong Kong SAR. - """ - HK - - """ - Hungary. - """ - HU - - """ - Iceland. - """ - IS - - """ - India. - """ - IN - - """ - Indonesia. - """ - ID - - """ - Iran. - """ - IR - - """ - Iraq. - """ - IQ - - """ - Ireland. - """ - IE - - """ - Isle of Man. - """ - IM - - """ - Israel. - """ - IL - - """ - Italy. - """ - IT - - """ - Jamaica. - """ - JM - - """ - Japan. - """ - JP - - """ - Jersey. - """ - JE - - """ - Jordan. - """ - JO - - """ - Kazakhstan. - """ - KZ - - """ - Kenya. - """ - KE - - """ - Kiribati. - """ - KI - - """ - North Korea. - """ - KP - - """ - Kosovo. - """ - XK - - """ - Kuwait. - """ - KW - - """ - Kyrgyzstan. - """ - KG - - """ - Laos. - """ - LA - - """ - Latvia. - """ - LV - - """ - Lebanon. - """ - LB - - """ - Lesotho. - """ - LS - - """ - Liberia. - """ - LR - - """ - Libya. - """ - LY - - """ - Liechtenstein. - """ - LI - - """ - Lithuania. - """ - LT - - """ - Luxembourg. - """ - LU - - """ - Macao SAR. - """ - MO - - """ - Madagascar. - """ - MG - - """ - Malawi. - """ - MW - - """ - Malaysia. - """ - MY - - """ - Maldives. - """ - MV - - """ - Mali. - """ - ML - - """ - Malta. - """ - MT - - """ - Martinique. - """ - MQ - - """ - Mauritania. - """ - MR - - """ - Mauritius. - """ - MU - - """ - Mayotte. - """ - YT - - """ - Mexico. - """ - MX - - """ - Moldova. - """ - MD - - """ - Monaco. - """ - MC - - """ - Mongolia. - """ - MN - - """ - Montenegro. - """ - ME - - """ - Montserrat. - """ - MS - - """ - Morocco. - """ - MA - - """ - Mozambique. - """ - MZ - - """ - Myanmar (Burma). - """ - MM - - """ - Namibia. - """ - NA - - """ - Nauru. - """ - NR - - """ - Nepal. - """ - NP - - """ - Netherlands. - """ - NL - - """ - Netherlands Antilles. - """ - AN - - """ - New Caledonia. - """ - NC - - """ - New Zealand. - """ - NZ - - """ - Nicaragua. - """ - NI - - """ - Niger. - """ - NE - - """ - Nigeria. - """ - NG - - """ - Niue. - """ - NU - - """ - Norfolk Island. - """ - NF - - """ - North Macedonia. - """ - MK - - """ - Norway. - """ - NO - - """ - Oman. - """ - OM - - """ - Pakistan. - """ - PK - - """ - Palestinian Territories. - """ - PS - - """ - Panama. - """ - PA - - """ - Papua New Guinea. - """ - PG - - """ - Paraguay. - """ - PY - - """ - Peru. - """ - PE - - """ - Philippines. - """ - PH - - """ - Pitcairn Islands. - """ - PN - - """ - Poland. - """ - PL - - """ - Portugal. - """ - PT - - """ - Qatar. - """ - QA - - """ - Cameroon. - """ - CM - - """ - Réunion. - """ - RE - - """ - Romania. - """ - RO - - """ - Russia. - """ - RU - - """ - Rwanda. - """ - RW - - """ - St. Barthélemy. - """ - BL - - """ - St. Helena. - """ - SH - - """ - St. Kitts & Nevis. - """ - KN - - """ - St. Lucia. - """ - LC - - """ - St. Martin. - """ - MF - - """ - St. Pierre & Miquelon. - """ - PM - - """ - Samoa. - """ - WS - - """ - San Marino. - """ - SM - - """ - São Tomé & Príncipe. - """ - ST - - """ - Saudi Arabia. - """ - SA - - """ - Senegal. - """ - SN - - """ - Serbia. - """ - RS - - """ - Seychelles. - """ - SC - - """ - Sierra Leone. - """ - SL - - """ - Singapore. - """ - SG - - """ - Sint Maarten. - """ - SX - - """ - Slovakia. - """ - SK - - """ - Slovenia. - """ - SI - - """ - Solomon Islands. - """ - SB - - """ - Somalia. - """ - SO - - """ - South Africa. - """ - ZA - - """ - South Georgia & South Sandwich Islands. - """ - GS - - """ - South Korea. - """ - KR - - """ - South Sudan. - """ - SS - - """ - Spain. - """ - ES - - """ - Sri Lanka. - """ - LK - - """ - St. Vincent & Grenadines. - """ - VC - - """ - Sudan. - """ - SD - - """ - Suriname. - """ - SR - - """ - Svalbard & Jan Mayen. - """ - SJ - - """ - Sweden. - """ - SE - - """ - Switzerland. - """ - CH - - """ - Syria. - """ - SY - - """ - Taiwan. - """ - TW - - """ - Tajikistan. - """ - TJ - - """ - Tanzania. - """ - TZ - - """ - Thailand. - """ - TH - - """ - Timor-Leste. - """ - TL - - """ - Togo. - """ - TG - - """ - Tokelau. - """ - TK - - """ - Tonga. - """ - TO - - """ - Trinidad & Tobago. - """ - TT - - """ - Tunisia. - """ - TN - - """ - Turkey. - """ - TR - - """ - Turkmenistan. - """ - TM - - """ - Turks & Caicos Islands. - """ - TC - - """ - Tuvalu. - """ - TV - - """ - Uganda. - """ - UG - - """ - Ukraine. - """ - UA - - """ - United Arab Emirates. - """ - AE - - """ - United Kingdom. - """ - GB - - """ - United States. - """ - US - - """ - U.S. Outlying Islands. - """ - UM - - """ - Uruguay. - """ - UY - - """ - Uzbekistan. - """ - UZ - - """ - Vanuatu. - """ - VU - - """ - Venezuela. - """ - VE - - """ - Vietnam. - """ - VN - - """ - British Virgin Islands. - """ - VG - - """ - Wallis & Futuna. - """ - WF - - """ - Western Sahara. - """ - EH - - """ - Yemen. - """ - YE - - """ - Zambia. - """ - ZM - - """ - Zimbabwe. - """ - ZW -} - -""" -Credit card information used for a payment. -""" -type CreditCard { - """ - The brand of the credit card. - """ - brand: String - - """ - The expiry month of the credit card. - """ - expiryMonth: Int - - """ - The expiry year of the credit card. - """ - expiryYear: Int - - """ - The credit card's BIN number. - """ - firstDigits: String - - """ - The first name of the card holder. - """ - firstName: String - - """ - The last 4 digits of the credit card. - """ - lastDigits: String - - """ - The last name of the card holder. - """ - lastName: String - - """ - The masked credit card number with only the last 4 digits displayed. - """ - maskedNumber: String -} - -""" -Specifies the fields required to complete a checkout with -a Shopify vaulted credit card payment. -""" -input CreditCardPaymentInput { - """ - The amount of the payment. - """ - amount: Money! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - The ID returned by Shopify's Card Vault. - """ - vaultId: String! - - """ - Executes the payment in test mode if possible. Defaults to `false`. - """ - test: Boolean -} - -""" -Specifies the fields required to complete a checkout with -a Shopify vaulted credit card payment. -""" -input CreditCardPaymentInputV2 { - """ - The amount and currency of the payment. - """ - paymentAmount: MoneyInput! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - The ID returned by Shopify's Card Vault. - """ - vaultId: String! - - """ - Executes the payment in test mode if possible. Defaults to `false`. - """ - test: Boolean -} - -""" -The part of the image that should remain after cropping. -""" -enum CropRegion { - """ - Keep the center of the image. - """ - CENTER - - """ - Keep the top of the image. - """ - TOP - - """ - Keep the bottom of the image. - """ - BOTTOM - - """ - Keep the left of the image. - """ - LEFT - - """ - Keep the right of the image. - """ - RIGHT -} - -""" -Currency codes. -""" -enum CurrencyCode { - """ - United States Dollars (USD). - """ - USD - - """ - Euro (EUR). - """ - EUR - - """ - United Kingdom Pounds (GBP). - """ - GBP - - """ - Canadian Dollars (CAD). - """ - CAD - - """ - Afghan Afghani (AFN). - """ - AFN - - """ - Albanian Lek (ALL). - """ - ALL - - """ - Algerian Dinar (DZD). - """ - DZD - - """ - Angolan Kwanza (AOA). - """ - AOA - - """ - Argentine Pesos (ARS). - """ - ARS - - """ - Armenian Dram (AMD). - """ - AMD - - """ - Aruban Florin (AWG). - """ - AWG - - """ - Australian Dollars (AUD). - """ - AUD - - """ - Barbadian Dollar (BBD). - """ - BBD - - """ - Azerbaijani Manat (AZN). - """ - AZN - - """ - Bangladesh Taka (BDT). - """ - BDT - - """ - Bahamian Dollar (BSD). - """ - BSD - - """ - Bahraini Dinar (BHD). - """ - BHD - - """ - Burundian Franc (BIF). - """ - BIF - - """ - Belarusian Ruble (BYN). - """ - BYN - - """ - Belarusian Ruble (BYR). - """ - BYR - - """ - Belize Dollar (BZD). - """ - BZD - - """ - Bermudian Dollar (BMD). - """ - BMD - - """ - Bhutanese Ngultrum (BTN). - """ - BTN - - """ - Bosnia and Herzegovina Convertible Mark (BAM). - """ - BAM - - """ - Brazilian Real (BRL). - """ - BRL - - """ - Bolivian Boliviano (BOB). - """ - BOB - - """ - Botswana Pula (BWP). - """ - BWP - - """ - Brunei Dollar (BND). - """ - BND - - """ - Bulgarian Lev (BGN). - """ - BGN - - """ - Burmese Kyat (MMK). - """ - MMK - - """ - Cambodian Riel. - """ - KHR - - """ - Cape Verdean escudo (CVE). - """ - CVE - - """ - Cayman Dollars (KYD). - """ - KYD - - """ - Central African CFA Franc (XAF). - """ - XAF - - """ - Chilean Peso (CLP). - """ - CLP - - """ - Chinese Yuan Renminbi (CNY). - """ - CNY - - """ - Colombian Peso (COP). - """ - COP - - """ - Comorian Franc (KMF). - """ - KMF - - """ - Congolese franc (CDF). - """ - CDF - - """ - Costa Rican Colones (CRC). - """ - CRC - - """ - Croatian Kuna (HRK). - """ - HRK - - """ - Czech Koruny (CZK). - """ - CZK - - """ - Danish Kroner (DKK). - """ - DKK - - """ - Djiboutian Franc (DJF). - """ - DJF - - """ - Dominican Peso (DOP). - """ - DOP - - """ - East Caribbean Dollar (XCD). - """ - XCD - - """ - Egyptian Pound (EGP). - """ - EGP - - """ - Eritrean Nakfa (ERN). - """ - ERN - - """ - Ethiopian Birr (ETB). - """ - ETB - - """ - Falkland Islands Pounds (FKP). - """ - FKP - - """ - CFP Franc (XPF). - """ - XPF - - """ - Fijian Dollars (FJD). - """ - FJD - - """ - Gibraltar Pounds (GIP). - """ - GIP - - """ - Gambian Dalasi (GMD). - """ - GMD - - """ - Ghanaian Cedi (GHS). - """ - GHS - - """ - Guatemalan Quetzal (GTQ). - """ - GTQ - - """ - Guyanese Dollar (GYD). - """ - GYD - - """ - Georgian Lari (GEL). - """ - GEL - - """ - Guinean Franc (GNF). - """ - GNF - - """ - Haitian Gourde (HTG). - """ - HTG - - """ - Honduran Lempira (HNL). - """ - HNL - - """ - Hong Kong Dollars (HKD). - """ - HKD - - """ - Hungarian Forint (HUF). - """ - HUF - - """ - Icelandic Kronur (ISK). - """ - ISK - - """ - Indian Rupees (INR). - """ - INR - - """ - Indonesian Rupiah (IDR). - """ - IDR - - """ - Israeli New Shekel (NIS). - """ - ILS - - """ - Iranian Rial (IRR). - """ - IRR - - """ - Iraqi Dinar (IQD). - """ - IQD - - """ - Jamaican Dollars (JMD). - """ - JMD - - """ - Japanese Yen (JPY). - """ - JPY - - """ - Jersey Pound. - """ - JEP - - """ - Jordanian Dinar (JOD). - """ - JOD - - """ - Kazakhstani Tenge (KZT). - """ - KZT - - """ - Kenyan Shilling (KES). - """ - KES - - """ - Kiribati Dollar (KID). - """ - KID - - """ - Kuwaiti Dinar (KWD). - """ - KWD - - """ - Kyrgyzstani Som (KGS). - """ - KGS - - """ - Laotian Kip (LAK). - """ - LAK - - """ - Latvian Lati (LVL). - """ - LVL - - """ - Lebanese Pounds (LBP). - """ - LBP - - """ - Lesotho Loti (LSL). - """ - LSL - - """ - Liberian Dollar (LRD). - """ - LRD - - """ - Libyan Dinar (LYD). - """ - LYD - - """ - Lithuanian Litai (LTL). - """ - LTL - - """ - Malagasy Ariary (MGA). - """ - MGA - - """ - Macedonia Denar (MKD). - """ - MKD - - """ - Macanese Pataca (MOP). - """ - MOP - - """ - Malawian Kwacha (MWK). - """ - MWK - - """ - Maldivian Rufiyaa (MVR). - """ - MVR - - """ - Mauritanian Ouguiya (MRU). - """ - MRU - - """ - Mexican Pesos (MXN). - """ - MXN - - """ - Malaysian Ringgits (MYR). - """ - MYR - - """ - Mauritian Rupee (MUR). - """ - MUR - - """ - Moldovan Leu (MDL). - """ - MDL - - """ - Moroccan Dirham. - """ - MAD - - """ - Mongolian Tugrik. - """ - MNT - - """ - Mozambican Metical. - """ - MZN - - """ - Namibian Dollar. - """ - NAD - - """ - Nepalese Rupee (NPR). - """ - NPR - - """ - Netherlands Antillean Guilder. - """ - ANG - - """ - New Zealand Dollars (NZD). - """ - NZD - - """ - Nicaraguan Córdoba (NIO). - """ - NIO - - """ - Nigerian Naira (NGN). - """ - NGN - - """ - Norwegian Kroner (NOK). - """ - NOK - - """ - Omani Rial (OMR). - """ - OMR - - """ - Panamian Balboa (PAB). - """ - PAB - - """ - Pakistani Rupee (PKR). - """ - PKR - - """ - Papua New Guinean Kina (PGK). - """ - PGK - - """ - Paraguayan Guarani (PYG). - """ - PYG - - """ - Peruvian Nuevo Sol (PEN). - """ - PEN - - """ - Philippine Peso (PHP). - """ - PHP - - """ - Polish Zlotych (PLN). - """ - PLN - - """ - Qatari Rial (QAR). - """ - QAR - - """ - Romanian Lei (RON). - """ - RON - - """ - Russian Rubles (RUB). - """ - RUB - - """ - Rwandan Franc (RWF). - """ - RWF - - """ - Samoan Tala (WST). - """ - WST - - """ - Saint Helena Pounds (SHP). - """ - SHP - - """ - Saudi Riyal (SAR). - """ - SAR - - """ - Sao Tome And Principe Dobra (STD). - """ - STD - - """ - Serbian dinar (RSD). - """ - RSD - - """ - Seychellois Rupee (SCR). - """ - SCR - - """ - Sierra Leonean Leone (SLL). - """ - SLL - - """ - Singapore Dollars (SGD). - """ - SGD - - """ - Sudanese Pound (SDG). - """ - SDG - - """ - Somali Shilling (SOS). - """ - SOS - - """ - Syrian Pound (SYP). - """ - SYP - - """ - South African Rand (ZAR). - """ - ZAR - - """ - South Korean Won (KRW). - """ - KRW - - """ - South Sudanese Pound (SSP). - """ - SSP - - """ - Solomon Islands Dollar (SBD). - """ - SBD - - """ - Sri Lankan Rupees (LKR). - """ - LKR - - """ - Surinamese Dollar (SRD). - """ - SRD - - """ - Swazi Lilangeni (SZL). - """ - SZL - - """ - Swedish Kronor (SEK). - """ - SEK - - """ - Swiss Francs (CHF). - """ - CHF - - """ - Taiwan Dollars (TWD). - """ - TWD - - """ - Thai baht (THB). - """ - THB - - """ - Tajikistani Somoni (TJS). - """ - TJS - - """ - Tanzanian Shilling (TZS). - """ - TZS - - """ - Tongan Pa'anga (TOP). - """ - TOP - - """ - Trinidad and Tobago Dollars (TTD). - """ - TTD - - """ - Tunisian Dinar (TND). - """ - TND - - """ - Turkish Lira (TRY). - """ - TRY - - """ - Turkmenistani Manat (TMT). - """ - TMT - - """ - Ugandan Shilling (UGX). - """ - UGX - - """ - Ukrainian Hryvnia (UAH). - """ - UAH - - """ - United Arab Emirates Dirham (AED). - """ - AED - - """ - Uruguayan Pesos (UYU). - """ - UYU - - """ - Uzbekistan som (UZS). - """ - UZS - - """ - Vanuatu Vatu (VUV). - """ - VUV - - """ - Venezuelan Bolivares (VEF). - """ - VEF - - """ - Venezuelan Bolivares (VES). - """ - VES - - """ - Vietnamese đồng (VND). - """ - VND - - """ - West African CFA franc (XOF). - """ - XOF - - """ - Yemeni Rial (YER). - """ - YER - - """ - Zambian Kwacha (ZMW). - """ - ZMW -} - -""" -A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. -""" -type Customer { - """ - Indicates whether the customer has consented to be sent marketing material via email. - """ - acceptsMarketing: Boolean! - - """ - A list of addresses for the customer. - """ - addresses( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MailingAddressConnection! - - """ - The date and time when the customer was created. - """ - createdAt: DateTime! - - """ - The customer’s default address. - """ - defaultAddress: MailingAddress - - """ - The customer’s name, email or phone number. - """ - displayName: String! - - """ - The customer’s email address. - """ - email: String - - """ - The customer’s first name. - """ - firstName: String - - """ - A unique identifier for the customer. - """ - id: ID! - - """ - The customer's most recently updated, incomplete checkout. - """ - lastIncompleteCheckout: Checkout - - """ - The customer’s last name. - """ - lastName: String - - """ - The orders associated with the customer. - """ - orders( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: OrderSortKeys = ID - - """ - Supported filter parameters: - - `processed_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): OrderConnection! - - """ - The customer’s phone number. - """ - phone: String - - """ - A comma separated list of tags that have been added to the customer. - Additional access scope required: unauthenticated_read_customer_tags. - """ - tags: [String!]! - - """ - The date and time when the customer information was updated. - """ - updatedAt: DateTime! -} - -""" -A CustomerAccessToken represents the unique token required to make modifications to the customer object. -""" -type CustomerAccessToken { - """ - The customer’s access token. - """ - accessToken: String! - - """ - The date and time when the customer access token expires. - """ - expiresAt: DateTime! -} - -""" -Specifies the input fields required to create a customer access token. -""" -input CustomerAccessTokenCreateInput { - """ - The email associated to the customer. - """ - email: String! - - """ - The login password to be used by the customer. - """ - password: String! -} - -""" -Return type for `customerAccessTokenCreate` mutation. -""" -type CustomerAccessTokenCreatePayload { - """ - The newly created customer access token object. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerAccessTokenCreateWithMultipass` mutation. -""" -type CustomerAccessTokenCreateWithMultipassPayload { - """ - An access token object associated with the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! -} - -""" -Return type for `customerAccessTokenDelete` mutation. -""" -type CustomerAccessTokenDeletePayload { - """ - The destroyed access token. - """ - deletedAccessToken: String - - """ - ID of the destroyed customer access token. - """ - deletedCustomerAccessTokenId: String - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `customerAccessTokenRenew` mutation. -""" -type CustomerAccessTokenRenewPayload { - """ - The renewed customer access token object. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! -} - -""" -Return type for `customerActivateByUrl` mutation. -""" -type CustomerActivateByUrlPayload { - """ - The customer that was activated. - """ - customer: Customer - - """ - A new customer access token for the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! -} - -""" -Specifies the input fields required to activate a customer. -""" -input CustomerActivateInput { - """ - The activation token required to activate the customer. - """ - activationToken: String! - - """ - New password that will be set during activation. - """ - password: String! -} - -""" -Return type for `customerActivate` mutation. -""" -type CustomerActivatePayload { - """ - The customer object. - """ - customer: Customer - - """ - A newly created customer access token object for the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerAddressCreate` mutation. -""" -type CustomerAddressCreatePayload { - """ - The new customer address object. - """ - customerAddress: MailingAddress - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerAddressDelete` mutation. -""" -type CustomerAddressDeletePayload { - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - ID of the deleted customer address. - """ - deletedCustomerAddressId: String - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerAddressUpdate` mutation. -""" -type CustomerAddressUpdatePayload { - """ - The customer’s updated mailing address. - """ - customerAddress: MailingAddress - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Specifies the fields required to create a new customer. -""" -input CustomerCreateInput { - """ - The customer’s first name. - """ - firstName: String - - """ - The customer’s last name. - """ - lastName: String - - """ - The customer’s email. - """ - email: String! - - """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. - """ - phone: String - - """ - The login password used by the customer. - """ - password: String! - - """ - Indicates whether the customer has consented to be sent marketing material via email. - """ - acceptsMarketing: Boolean -} - -""" -Return type for `customerCreate` mutation. -""" -type CustomerCreatePayload { - """ - The created customer object. - """ - customer: Customer - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerDefaultAddressUpdate` mutation. -""" -type CustomerDefaultAddressUpdatePayload { - """ - The updated customer object. - """ - customer: Customer - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Possible error codes that could be returned by CustomerUserError. -""" -enum CustomerErrorCode { - """ - Input value is blank. - """ - BLANK - - """ - Input value is invalid. - """ - INVALID - - """ - Input value is already taken. - """ - TAKEN - - """ - Input value is too long. - """ - TOO_LONG - - """ - Input value is too short. - """ - TOO_SHORT - - """ - Unidentified customer. - """ - UNIDENTIFIED_CUSTOMER - - """ - Customer is disabled. - """ - CUSTOMER_DISABLED - - """ - Input password starts or ends with whitespace. - """ - PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE - - """ - Input contains HTML tags. - """ - CONTAINS_HTML_TAGS - - """ - Input contains URL. - """ - CONTAINS_URL - - """ - Invalid activation token. - """ - TOKEN_INVALID - - """ - Customer already enabled. - """ - ALREADY_ENABLED - - """ - Address does not exist. - """ - NOT_FOUND - - """ - Input email contains an invalid domain name. - """ - BAD_DOMAIN - - """ - Multipass token is not valid. - """ - INVALID_MULTIPASS_REQUEST -} - -""" -Return type for `customerRecover` mutation. -""" -type CustomerRecoverPayload { - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Return type for `customerResetByUrl` mutation. -""" -type CustomerResetByUrlPayload { - """ - The customer object which was reset. - """ - customer: Customer - - """ - A newly created customer access token object for the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Specifies the fields required to reset a customer’s password. -""" -input CustomerResetInput { - """ - The reset token required to reset the customer’s password. - """ - resetToken: String! - - """ - New password that will be set as part of the reset password process. - """ - password: String! -} - -""" -Return type for `customerReset` mutation. -""" -type CustomerResetPayload { - """ - The customer object which was reset. - """ - customer: Customer - - """ - A newly created customer access token object for the customer. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Specifies the fields required to update the Customer information. -""" -input CustomerUpdateInput { - """ - The customer’s first name. - """ - firstName: String - - """ - The customer’s last name. - """ - lastName: String - - """ - The customer’s email. - """ - email: String - - """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. To remove the phone number, specify `null`. - """ - phone: String - - """ - The login password used by the customer. - """ - password: String - - """ - Indicates whether the customer has consented to be sent marketing material via email. - """ - acceptsMarketing: Boolean -} - -""" -Return type for `customerUpdate` mutation. -""" -type CustomerUpdatePayload { - """ - The updated customer object. - """ - customer: Customer - - """ - The newly created customer access token. If the customer's password is updated, all previous access tokens - (including the one used to perform this mutation) become invalid, and a new token is generated. - """ - customerAccessToken: CustomerAccessToken - - """ - List of errors that occurred executing the mutation. - """ - customerUserErrors: [CustomerUserError!]! - - """ - List of errors that occurred executing the mutation. - """ - userErrors: [UserError!]! - @deprecated(reason: "Use `customerUserErrors` instead") -} - -""" -Represents an error that happens during execution of a customer mutation. -""" -type CustomerUserError implements DisplayableError { - """ - Error code to uniquely identify the error. - """ - code: CustomerErrorCode - - """ - Path to the input field which caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -An ISO-8601 encoded UTC date time string. Example value: `"2019-07-03T20:47:55Z"`. -""" -scalar DateTime - -""" -A signed decimal number, which supports arbitrary precision and is serialized as a string. Example value: `"29.99"`. -""" -scalar Decimal - -""" -Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. -""" -enum DigitalWallet { - """ - Apple Pay. - """ - APPLE_PAY - - """ - Android Pay. - """ - ANDROID_PAY - - """ - Google Pay. - """ - GOOGLE_PAY - - """ - Shopify Pay. - """ - SHOPIFY_PAY -} - -""" -An amount discounting the line that has been allocated by a discount. -""" -type DiscountAllocation { - """ - Amount of discount allocated. - """ - allocatedAmount: MoneyV2! - - """ - The discount this allocated amount originated from. - """ - discountApplication: DiscountApplication! -} - -""" -Discount applications capture the intentions of a discount source at -the time of application. -""" -interface DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -The method by which the discount's value is allocated onto its entitled lines. -""" -enum DiscountApplicationAllocationMethod { - """ - The value is spread across all entitled lines. - """ - ACROSS - - """ - The value is applied onto every entitled line. - """ - EACH - - """ - The value is specifically applied onto a particular line. - """ - ONE -} - -""" -An auto-generated type for paginating through multiple DiscountApplications. -""" -type DiscountApplicationConnection { - """ - A list of edges. - """ - edges: [DiscountApplicationEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one DiscountApplication and a cursor during pagination. -""" -type DiscountApplicationEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of DiscountApplicationEdge. - """ - node: DiscountApplication! -} - -""" -Which lines on the order that the discount is allocated over, of the type -defined by the Discount Application's target_type. -""" -enum DiscountApplicationTargetSelection { - """ - The discount is allocated onto all the lines. - """ - ALL - - """ - The discount is allocated onto only the lines it is entitled for. - """ - ENTITLED - - """ - The discount is allocated onto explicitly chosen lines. - """ - EXPLICIT -} - -""" -The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. -""" -enum DiscountApplicationTargetType { - """ - The discount applies onto line items. - """ - LINE_ITEM - - """ - The discount applies onto shipping lines. - """ - SHIPPING_LINE -} - -""" -Discount code applications capture the intentions of a discount code at -the time that it is applied. -""" -type DiscountCodeApplication implements DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - Specifies whether the discount code was applied successfully. - """ - applicable: Boolean! - - """ - The string identifying the discount code that was used at the time of application. - """ - code: String! - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -Represents an error in the input of a mutation. -""" -interface DisplayableError { - """ - Path to the input field which caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -Represents a web address. -""" -type Domain { - """ - The host name of the domain (eg: `example.com`). - """ - host: String! - - """ - Whether SSL is enabled or not. - """ - sslEnabled: Boolean! - - """ - The URL of the domain (eg: `https://example.com`). - """ - url: URL! -} - -""" -Represents a video hosted outside of Shopify. -""" -type ExternalVideo implements Node & Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - The URL. - """ - embeddedUrl: URL! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image -} - -""" -Represents a single fulfillment in an order. -""" -type Fulfillment { - """ - List of the fulfillment's line items. - """ - fulfillmentLineItems( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): FulfillmentLineItemConnection! - - """ - The name of the tracking company. - """ - trackingCompany: String - - """ - Tracking information associated with the fulfillment, - such as the tracking number and tracking URL. - """ - trackingInfo( - """ - Truncate the array result to this size. - """ - first: Int - ): [FulfillmentTrackingInfo!]! -} - -""" -Represents a single line item in a fulfillment. There is at most one fulfillment line item for each order line item. -""" -type FulfillmentLineItem { - """ - The associated order's line item. - """ - lineItem: OrderLineItem! - - """ - The amount fulfilled in this fulfillment. - """ - quantity: Int! -} - -""" -An auto-generated type for paginating through multiple FulfillmentLineItems. -""" -type FulfillmentLineItemConnection { - """ - A list of edges. - """ - edges: [FulfillmentLineItemEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. -""" -type FulfillmentLineItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of FulfillmentLineItemEdge. - """ - node: FulfillmentLineItem! -} - -""" -Tracking information associated with the fulfillment. -""" -type FulfillmentTrackingInfo { - """ - The tracking number of the fulfillment. - """ - number: String - - """ - The URL to track the fulfillment. - """ - url: URL -} - -""" -A string containing HTML code. Example value: `"

Grey cotton knit sweater.

"`. -""" -scalar HTML - -""" -Represents information about the metafields associated to the specified resource. -""" -interface HasMetafields { - """ - The metafield associated with the resource. - """ - metafield( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String! - - """ - Identifier for the metafield (maximum of 30 characters). - """ - key: String! - ): Metafield - - """ - A paginated list of metafields associated with the resource. - """ - metafields( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! -} - -""" -Represents an image resource. -""" -type Image { - """ - A word or phrase to share the nature or contents of an image. - """ - altText: String - - """ - The original height of the image in pixels. Returns `null` if the image is not hosted by Shopify. - """ - height: Int - - """ - A unique identifier for the image. - """ - id: ID - - """ - The location of the original image as a URL. - - If there are any existing transformations in the original source URL, they will remain and not be stripped. - """ - originalSrc: URL! - - """ - The location of the image as a URL. - """ - src: URL! - @deprecated( - reason: "Previously an image had a single `src` field. This could either return the original image\nlocation or a URL that contained transformations such as sizing or scale.\n\nThese transformations were specified by arguments on the parent field.\n\nNow an image has two distinct URL fields: `originalSrc` and `transformedSrc`.\n\n* `originalSrc` - the original unmodified image URL\n* `transformedSrc` - the image URL with the specified transformations included\n\nTo migrate to the new fields, image transformations should be moved from the parent field to `transformedSrc`.\n\nBefore:\n```graphql\n{\n shop {\n productImages(maxWidth: 200, scale: 2) {\n edges {\n node {\n src\n }\n }\n }\n }\n}\n```\n\nAfter:\n```graphql\n{\n shop {\n productImages {\n edges {\n node {\n transformedSrc(maxWidth: 200, scale: 2)\n }\n }\n }\n }\n}\n```\n" - ) - - """ - The location of the transformed image as a URL. - - All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. - Otherwise any transformations which an image type does not support will be ignored. - """ - transformedSrc( - """ - Image width in pixels between 1 and 5760. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 5760. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. - """ - scale: Int = 1 - - """ - Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported). - """ - preferredContentType: ImageContentType - ): URL! - - """ - The original width of the image in pixels. Returns `null` if the image is not hosted by Shopify. - """ - width: Int -} - -""" -An auto-generated type for paginating through multiple Images. -""" -type ImageConnection { - """ - A list of edges. - """ - edges: [ImageEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -List of supported image content types. -""" -enum ImageContentType { - """ - A PNG image. - """ - PNG - - """ - A JPG image. - """ - JPG - - """ - A WEBP image. - """ - WEBP -} - -""" -An auto-generated type which holds one Image and a cursor during pagination. -""" -type ImageEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ImageEdge. - """ - node: Image! -} - -""" -Represents a mailing address for customers and shipping. -""" -type MailingAddress implements Node { - """ - The first line of the address. Typically the street address or PO Box number. - """ - address1: String - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - address2: String - - """ - The name of the city, district, village, or town. - """ - city: String - - """ - The name of the customer's company or organization. - """ - company: String - - """ - The name of the country. - """ - country: String - - """ - The two-letter code for the country of the address. - - For example, US. - """ - countryCode: String @deprecated(reason: "Use `countryCodeV2` instead") - - """ - The two-letter code for the country of the address. - - For example, US. - """ - countryCodeV2: CountryCode - - """ - The first name of the customer. - """ - firstName: String - - """ - A formatted version of the address, customized by the provided arguments. - """ - formatted( - """ - Whether to include the customer's name in the formatted address. - """ - withName: Boolean = false - - """ - Whether to include the customer's company in the formatted address. - """ - withCompany: Boolean = true - ): [String!]! - - """ - A comma-separated list of the values for city, province, and country. - """ - formattedArea: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The last name of the customer. - """ - lastName: String - - """ - The latitude coordinate of the customer address. - """ - latitude: Float - - """ - The longitude coordinate of the customer address. - """ - longitude: Float - - """ - The full name of the customer, based on firstName and lastName. - """ - name: String - - """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. - """ - phone: String - - """ - The region of the address, such as the province, state, or district. - """ - province: String - - """ - The two-letter code for the region. - - For example, ON. - """ - provinceCode: String - - """ - The zip or postal code of the address. - """ - zip: String -} - -""" -An auto-generated type for paginating through multiple MailingAddresses. -""" -type MailingAddressConnection { - """ - A list of edges. - """ - edges: [MailingAddressEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one MailingAddress and a cursor during pagination. -""" -type MailingAddressEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of MailingAddressEdge. - """ - node: MailingAddress! -} - -""" -Specifies the fields accepted to create or update a mailing address. -""" -input MailingAddressInput { - """ - The first line of the address. Typically the street address or PO Box number. - """ - address1: String - - """ - The second line of the address. Typically the number of the apartment, suite, or unit. - """ - address2: String - - """ - The name of the city, district, village, or town. - """ - city: String - - """ - The name of the customer's company or organization. - """ - company: String - - """ - The name of the country. - """ - country: String - - """ - The first name of the customer. - """ - firstName: String - - """ - The last name of the customer. - """ - lastName: String - - """ - A unique phone number for the customer. - - Formatted using E.164 standard. For example, _+16135551111_. - """ - phone: String - - """ - The region of the address, such as the province, state, or district. - """ - province: String - - """ - The zip or postal code of the address. - """ - zip: String -} - -""" -Manual discount applications capture the intentions of a discount that was manually created. -""" -type ManualDiscountApplication implements DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - The description of the application. - """ - description: String - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The title of the application. - """ - title: String! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -Represents a media interface. -""" -interface Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image -} - -""" -An auto-generated type for paginating through multiple Media. -""" -type MediaConnection { - """ - A list of edges. - """ - edges: [MediaEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -The possible content types for a media object. -""" -enum MediaContentType { - """ - An externally hosted video. - """ - EXTERNAL_VIDEO - - """ - A Shopify hosted image. - """ - IMAGE - - """ - A 3d model. - """ - MODEL_3D - - """ - A Shopify hosted video. - """ - VIDEO -} - -""" -An auto-generated type which holds one Media and a cursor during pagination. -""" -type MediaEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of MediaEdge. - """ - node: Media! -} - -""" -Represents a Shopify hosted image. -""" -type MediaImage implements Node & Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The image for the media. - """ - image: Image - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image -} - -""" -Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are -comprised of keys, values, and value types. -""" -type Metafield implements Node { - """ - The date and time when the storefront metafield was created. - """ - createdAt: DateTime! - - """ - The description of a metafield. - """ - description: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The key name for a metafield. - """ - key: String! - - """ - The namespace for a metafield. - """ - namespace: String! - - """ - The parent object that the metafield belongs to. - """ - parentResource: MetafieldParentResource! - - """ - The date and time when the storefront metafield was updated. - """ - updatedAt: DateTime! - - """ - The value of a metafield. - """ - value: String! - - """ - Represents the metafield value type. - """ - valueType: MetafieldValueType! -} - -""" -An auto-generated type for paginating through multiple Metafields. -""" -type MetafieldConnection { - """ - A list of edges. - """ - edges: [MetafieldEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Metafield and a cursor during pagination. -""" -type MetafieldEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of MetafieldEdge. - """ - node: Metafield! -} - -""" -A resource that the metafield belongs to. -""" -union MetafieldParentResource = Product | ProductVariant - -""" -Metafield value types. -""" -enum MetafieldValueType { - """ - A string metafield. - """ - STRING - - """ - An integer metafield. - """ - INTEGER - - """ - A json string metafield. - """ - JSON_STRING -} - -""" -Represents a Shopify hosted 3D model. -""" -type Model3d implements Node & Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image - - """ - The sources for a 3d model. - """ - sources: [Model3dSource!]! -} - -""" -Represents a source for a Shopify hosted 3d model. -""" -type Model3dSource { - """ - The filesize of the 3d model. - """ - filesize: Int! - - """ - The format of the 3d model. - """ - format: String! - - """ - The MIME type of the 3d model. - """ - mimeType: String! - - """ - The URL of the 3d model. - """ - url: String! -} - -""" -A monetary value string. Example value: `"100.57"`. -""" -scalar Money - -""" -Specifies the fields for a monetary value with currency. -""" -input MoneyInput { - """ - Decimal money amount. - """ - amount: Decimal! - - """ - Currency of the money. - """ - currencyCode: CurrencyCode! -} - -""" -A monetary value with currency. - -To format currencies, combine this type's amount and currencyCode fields with your client's locale. - -For example, in JavaScript you could use Intl.NumberFormat: - -```js -new Intl.NumberFormat(locale, { - style: 'currency', - currency: currencyCode -}).format(amount); -``` - -Other formatting libraries include: - -* iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter) -* Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html) -* PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php) - -For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations -(such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)). -""" -type MoneyV2 { - """ - Decimal money amount. - """ - amount: Decimal! - - """ - Currency of the money. - """ - currencyCode: CurrencyCode! -} - -""" -An auto-generated type for paginating through multiple MoneyV2s. -""" -type MoneyV2Connection { - """ - A list of edges. - """ - edges: [MoneyV2Edge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one MoneyV2 and a cursor during pagination. -""" -type MoneyV2Edge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of MoneyV2Edge. - """ - node: MoneyV2! -} - -""" -The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. -""" -type Mutation { - """ - Updates the attributes of a checkout. - """ - checkoutAttributesUpdate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The fields used to update a checkout's attributes. - """ - input: CheckoutAttributesUpdateInput! - ): CheckoutAttributesUpdatePayload - @deprecated(reason: "Use `checkoutAttributesUpdateV2` instead") - - """ - Updates the attributes of a checkout. - """ - checkoutAttributesUpdateV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The checkout attributes to update. - """ - input: CheckoutAttributesUpdateV2Input! - ): CheckoutAttributesUpdateV2Payload - - """ - Completes a checkout without providing payment information. You can use this mutation for free items or items whose purchase price is covered by a gift card. - """ - checkoutCompleteFree( - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutCompleteFreePayload - - """ - Completes a checkout using a credit card token from Shopify's Vault. - """ - checkoutCompleteWithCreditCard( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The credit card info to apply as a payment. - """ - payment: CreditCardPaymentInput! - ): CheckoutCompleteWithCreditCardPayload - @deprecated(reason: "Use `checkoutCompleteWithCreditCardV2` instead") - - """ - Completes a checkout using a credit card token from Shopify's card vault. Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, you need to [_request payment processing_](https://help.shopify.com/api/guides/sales-channel-sdk/getting-started#request-payment-processing). - """ - checkoutCompleteWithCreditCardV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The credit card info to apply as a payment. - """ - payment: CreditCardPaymentInputV2! - ): CheckoutCompleteWithCreditCardV2Payload - - """ - Completes a checkout with a tokenized payment. - """ - checkoutCompleteWithTokenizedPayment( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The info to apply as a tokenized payment. - """ - payment: TokenizedPaymentInput! - ): CheckoutCompleteWithTokenizedPaymentPayload - @deprecated(reason: "Use `checkoutCompleteWithTokenizedPaymentV2` instead") - - """ - Completes a checkout with a tokenized payment. - """ - checkoutCompleteWithTokenizedPaymentV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The info to apply as a tokenized payment. - """ - payment: TokenizedPaymentInputV2! - ): CheckoutCompleteWithTokenizedPaymentV2Payload - @deprecated(reason: "Use `checkoutCompleteWithTokenizedPaymentV3` instead") - - """ - Completes a checkout with a tokenized payment. - """ - checkoutCompleteWithTokenizedPaymentV3( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The info to apply as a tokenized payment. - """ - payment: TokenizedPaymentInputV3! - ): CheckoutCompleteWithTokenizedPaymentV3Payload - - """ - Creates a new checkout. - """ - checkoutCreate( - """ - The fields used to create a checkout. - """ - input: CheckoutCreateInput! - ): CheckoutCreatePayload - - """ - Associates a customer to the checkout. - """ - checkoutCustomerAssociate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The customer access token of the customer to associate. - """ - customerAccessToken: String! - ): CheckoutCustomerAssociatePayload - @deprecated(reason: "Use `checkoutCustomerAssociateV2` instead") - - """ - Associates a customer to the checkout. - """ - checkoutCustomerAssociateV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The customer access token of the customer to associate. - """ - customerAccessToken: String! - ): CheckoutCustomerAssociateV2Payload - - """ - Disassociates the current checkout customer from the checkout. - """ - checkoutCustomerDisassociate( - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutCustomerDisassociatePayload - @deprecated(reason: "Use `checkoutCustomerDisassociateV2` instead") - - """ - Disassociates the current checkout customer from the checkout. - """ - checkoutCustomerDisassociateV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutCustomerDisassociateV2Payload - - """ - Applies a discount to an existing checkout using a discount code. - """ - checkoutDiscountCodeApply( - """ - The discount code to apply to the checkout. - """ - discountCode: String! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutDiscountCodeApplyPayload - @deprecated(reason: "Use `checkoutDiscountCodeApplyV2` instead") - - """ - Applies a discount to an existing checkout using a discount code. - """ - checkoutDiscountCodeApplyV2( - """ - The discount code to apply to the checkout. - """ - discountCode: String! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutDiscountCodeApplyV2Payload - - """ - Removes the applied discount from an existing checkout. - """ - checkoutDiscountCodeRemove( - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutDiscountCodeRemovePayload - - """ - Updates the email on an existing checkout. - """ - checkoutEmailUpdate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The email to update the checkout with. - """ - email: String! - ): CheckoutEmailUpdatePayload - @deprecated(reason: "Use `checkoutEmailUpdateV2` instead") - - """ - Updates the email on an existing checkout. - """ - checkoutEmailUpdateV2( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - The email to update the checkout with. - """ - email: String! - ): CheckoutEmailUpdateV2Payload - - """ - Applies a gift card to an existing checkout using a gift card code. This will replace all currently applied gift cards. - """ - checkoutGiftCardApply( - """ - The code of the gift card to apply on the checkout. - """ - giftCardCode: String! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutGiftCardApplyPayload - @deprecated(reason: "Use `checkoutGiftCardsAppend` instead") - - """ - Removes an applied gift card from the checkout. - """ - checkoutGiftCardRemove( - """ - The ID of the Applied Gift Card to remove from the Checkout. - """ - appliedGiftCardId: ID! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutGiftCardRemovePayload - @deprecated(reason: "Use `checkoutGiftCardRemoveV2` instead") - - """ - Removes an applied gift card from the checkout. - """ - checkoutGiftCardRemoveV2( - """ - The ID of the Applied Gift Card to remove from the Checkout. - """ - appliedGiftCardId: ID! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutGiftCardRemoveV2Payload - - """ - Appends gift cards to an existing checkout. - """ - checkoutGiftCardsAppend( - """ - A list of gift card codes to append to the checkout. - """ - giftCardCodes: [String!]! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutGiftCardsAppendPayload - - """ - Adds a list of line items to a checkout. - """ - checkoutLineItemsAdd( - """ - A list of line item objects to add to the checkout. - """ - lineItems: [CheckoutLineItemInput!]! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutLineItemsAddPayload - - """ - Removes line items from an existing checkout. - """ - checkoutLineItemsRemove( - """ - The checkout on which to remove line items. - """ - checkoutId: ID! - - """ - Line item ids to remove. - """ - lineItemIds: [ID!]! - ): CheckoutLineItemsRemovePayload - - """ - Sets a list of line items to a checkout. - """ - checkoutLineItemsReplace( - """ - A list of line item objects to set on the checkout. - """ - lineItems: [CheckoutLineItemInput!]! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutLineItemsReplacePayload - - """ - Updates line items on a checkout. - """ - checkoutLineItemsUpdate( - """ - The checkout on which to update line items. - """ - checkoutId: ID! - - """ - Line items to update. - """ - lineItems: [CheckoutLineItemUpdateInput!]! - ): CheckoutLineItemsUpdatePayload - - """ - Updates the shipping address of an existing checkout. - """ - checkoutShippingAddressUpdate( - """ - The shipping address to where the line items will be shipped. - """ - shippingAddress: MailingAddressInput! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutShippingAddressUpdatePayload - @deprecated(reason: "Use `checkoutShippingAddressUpdateV2` instead") - - """ - Updates the shipping address of an existing checkout. - """ - checkoutShippingAddressUpdateV2( - """ - The shipping address to where the line items will be shipped. - """ - shippingAddress: MailingAddressInput! - - """ - The ID of the checkout. - """ - checkoutId: ID! - ): CheckoutShippingAddressUpdateV2Payload - - """ - Updates the shipping lines on an existing checkout. - """ - checkoutShippingLineUpdate( - """ - The ID of the checkout. - """ - checkoutId: ID! - - """ - A unique identifier to a Checkout’s shipping provider, price, and title combination, enabling the customer to select the availableShippingRates. - """ - shippingRateHandle: String! - ): CheckoutShippingLineUpdatePayload - - """ - Creates a customer access token. - The customer access token is required to modify the customer object in any way. - """ - customerAccessTokenCreate( - """ - The fields used to create a customer access token. - """ - input: CustomerAccessTokenCreateInput! - ): CustomerAccessTokenCreatePayload - - """ - Creates a customer access token using a multipass token instead of email and password. - A customer record is created if customer does not exist. If a customer record already - exists but the record is disabled, then it's enabled. - """ - customerAccessTokenCreateWithMultipass( - """ - A valid multipass token to be authenticated. - """ - multipassToken: String! - ): CustomerAccessTokenCreateWithMultipassPayload - - """ - Permanently destroys a customer access token. - """ - customerAccessTokenDelete( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - ): CustomerAccessTokenDeletePayload - - """ - Renews a customer access token. - - Access token renewal must happen *before* a token expires. - If a token has already expired, a new one should be created instead via `customerAccessTokenCreate`. - """ - customerAccessTokenRenew( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - ): CustomerAccessTokenRenewPayload - - """ - Activates a customer. - """ - customerActivate( - """ - Specifies the customer to activate. - """ - id: ID! - - """ - The fields used to activate a customer. - """ - input: CustomerActivateInput! - ): CustomerActivatePayload - - """ - Activates a customer with the activation url received from `customerCreate`. - """ - customerActivateByUrl( - """ - The customer activation URL. - """ - activationUrl: URL! - - """ - A new password set during activation. - """ - password: String! - ): CustomerActivateByUrlPayload - - """ - Creates a new address for a customer. - """ - customerAddressCreate( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - - """ - The customer mailing address to create. - """ - address: MailingAddressInput! - ): CustomerAddressCreatePayload - - """ - Permanently deletes the address of an existing customer. - """ - customerAddressDelete( - """ - Specifies the address to delete. - """ - id: ID! - - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - ): CustomerAddressDeletePayload - - """ - Updates the address of an existing customer. - """ - customerAddressUpdate( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - - """ - Specifies the customer address to update. - """ - id: ID! - - """ - The customer’s mailing address. - """ - address: MailingAddressInput! - ): CustomerAddressUpdatePayload - - """ - Creates a new customer. - """ - customerCreate( - """ - The fields used to create a new customer. - """ - input: CustomerCreateInput! - ): CustomerCreatePayload - - """ - Updates the default address of an existing customer. - """ - customerDefaultAddressUpdate( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - - """ - ID of the address to set as the new default for the customer. - """ - addressId: ID! - ): CustomerDefaultAddressUpdatePayload - - """ - Sends a reset password email to the customer, as the first step in the reset password process. - """ - customerRecover( - """ - The email address of the customer to recover. - """ - email: String! - ): CustomerRecoverPayload - - """ - Resets a customer’s password with a token received from `CustomerRecover`. - """ - customerReset( - """ - Specifies the customer to reset. - """ - id: ID! - - """ - The fields used to reset a customer’s password. - """ - input: CustomerResetInput! - ): CustomerResetPayload - - """ - Resets a customer’s password with the reset password url received from `CustomerRecover`. - """ - customerResetByUrl( - """ - The customer's reset password url. - """ - resetUrl: URL! - - """ - New password that will be set as part of the reset password process. - """ - password: String! - ): CustomerResetByUrlPayload - - """ - Updates an existing customer. - """ - customerUpdate( - """ - The access token used to identify the customer. - """ - customerAccessToken: String! - - """ - The customer object input. - """ - customer: CustomerUpdateInput! - ): CustomerUpdatePayload -} - -""" -An object with an ID to support global identification. -""" -interface Node { - """ - Globally unique identifier. - """ - id: ID! -} - -""" -An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. -""" -type Order implements Node { - """ - The reason for the order's cancellation. Returns `null` if the order wasn't canceled. - """ - cancelReason: OrderCancelReason - - """ - The date and time when the order was canceled. Returns null if the order wasn't canceled. - """ - canceledAt: DateTime - - """ - The code of the currency used for the payment. - """ - currencyCode: CurrencyCode! - - """ - The subtotal of line items and their discounts, excluding line items that have been removed. Does not contain order-level discounts, duties, shipping costs, or shipping discounts. Taxes are not included unless the order is a taxes-included order. - """ - currentSubtotalPrice: MoneyV2! - - """ - The total amount of the order, including duties, taxes and discounts, minus amounts for line items that have been removed. - """ - currentTotalPrice: MoneyV2! - - """ - The total of all taxes applied to the order, excluding taxes for returned line items. - """ - currentTotalTax: MoneyV2! - - """ - The locale code in which this specific order happened. - """ - customerLocale: String - - """ - The unique URL that the customer can use to access the order. - """ - customerUrl: URL - - """ - Discounts that have been applied on the order. - """ - discountApplications( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): DiscountApplicationConnection! - - """ - Whether the order has had any edits applied or not. - """ - edited: Boolean! - - """ - The customer's email address. - """ - email: String - - """ - The financial status of the order. - """ - financialStatus: OrderFinancialStatus - - """ - The fulfillment status for the order. - """ - fulfillmentStatus: OrderFulfillmentStatus! - - """ - Globally unique identifier. - """ - id: ID! - - """ - List of the order’s line items. - """ - lineItems( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): OrderLineItemConnection! - - """ - Unique identifier for the order that appears on the order. - For example, _#1000_ or _Store1001. - """ - name: String! - - """ - A unique numeric identifier for the order for use by shop owner and customer. - """ - orderNumber: Int! - - """ - The total price of the order before any applied edits. - """ - originalTotalPrice: MoneyV2! - - """ - The customer's phone number for receiving SMS notifications. - """ - phone: String - - """ - The date and time when the order was imported. - This value can be set to dates in the past when importing from other systems. - If no value is provided, it will be auto-generated based on current date and time. - """ - processedAt: DateTime! - - """ - The address to where the order will be shipped. - """ - shippingAddress: MailingAddress - - """ - The discounts that have been allocated onto the shipping line by discount applications. - """ - shippingDiscountAllocations: [DiscountAllocation!]! - - """ - The unique URL for the order's status page. - """ - statusUrl: URL! - - """ - Price of the order before shipping and taxes. - """ - subtotalPrice: Money @deprecated(reason: "Use `subtotalPriceV2` instead") - - """ - Price of the order before duties, shipping and taxes. - """ - subtotalPriceV2: MoneyV2 - - """ - List of the order’s successful fulfillments. - """ - successfulFulfillments( - """ - Truncate the array result to this size. - """ - first: Int - ): [Fulfillment!] - - """ - The sum of all the prices of all the items in the order, taxes and discounts included (must be positive). - """ - totalPrice: Money! @deprecated(reason: "Use `totalPriceV2` instead") - - """ - The sum of all the prices of all the items in the order, duties, taxes and discounts included (must be positive). - """ - totalPriceV2: MoneyV2! - - """ - The total amount that has been refunded. - """ - totalRefunded: Money! @deprecated(reason: "Use `totalRefundedV2` instead") - - """ - The total amount that has been refunded. - """ - totalRefundedV2: MoneyV2! - - """ - The total cost of shipping. - """ - totalShippingPrice: Money! - @deprecated(reason: "Use `totalShippingPriceV2` instead") - - """ - The total cost of shipping. - """ - totalShippingPriceV2: MoneyV2! - - """ - The total cost of taxes. - """ - totalTax: Money @deprecated(reason: "Use `totalTaxV2` instead") - - """ - The total cost of taxes. - """ - totalTaxV2: MoneyV2 -} - -""" -Represents the reason for the order's cancellation. -""" -enum OrderCancelReason { - """ - The customer wanted to cancel the order. - """ - CUSTOMER - - """ - The order was fraudulent. - """ - FRAUD - - """ - There was insufficient inventory. - """ - INVENTORY - - """ - Payment was declined. - """ - DECLINED - - """ - The order was canceled for an unlisted reason. - """ - OTHER -} - -""" -An auto-generated type for paginating through multiple Orders. -""" -type OrderConnection { - """ - A list of edges. - """ - edges: [OrderEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Order and a cursor during pagination. -""" -type OrderEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of OrderEdge. - """ - node: Order! -} - -""" -Represents the order's current financial status. -""" -enum OrderFinancialStatus { - """ - Displayed as **Pending**. - """ - PENDING - - """ - Displayed as **Authorized**. - """ - AUTHORIZED - - """ - Displayed as **Partially paid**. - """ - PARTIALLY_PAID - - """ - Displayed as **Partially refunded**. - """ - PARTIALLY_REFUNDED - - """ - Displayed as **Voided**. - """ - VOIDED - - """ - Displayed as **Paid**. - """ - PAID - - """ - Displayed as **Refunded**. - """ - REFUNDED -} - -""" -Represents the order's current fulfillment status. -""" -enum OrderFulfillmentStatus { - """ - Displayed as **Unfulfilled**. - """ - UNFULFILLED - - """ - Displayed as **Partially fulfilled**. - """ - PARTIALLY_FULFILLED - - """ - Displayed as **Fulfilled**. - """ - FULFILLED - - """ - Displayed as **Restocked**. - """ - RESTOCKED - - """ - Displayed as **Pending fulfillment**. - """ - PENDING_FULFILLMENT - - """ - Displayed as **Open**. - """ - OPEN - - """ - Displayed as **In progress**. - """ - IN_PROGRESS - - """ - Displayed as **Scheduled**. - """ - SCHEDULED -} - -""" -Represents a single line in an order. There is one line item for each distinct product variant. -""" -type OrderLineItem { - """ - The number of entries associated to the line item minus the items that have been removed. - """ - currentQuantity: Int! - - """ - List of custom attributes associated to the line item. - """ - customAttributes: [Attribute!]! - - """ - The discounts that have been allocated onto the order line item by discount applications. - """ - discountAllocations: [DiscountAllocation!]! - - """ - The total price of the line item, including discounts, and displayed in the presentment currency. - """ - discountedTotalPrice: MoneyV2! - - """ - The total price of the line item, not including any discounts. The total price is calculated using the original unit price multiplied by the quantity, and it is displayed in the presentment currency. - """ - originalTotalPrice: MoneyV2! - - """ - The number of products variants associated to the line item. - """ - quantity: Int! - - """ - The title of the product combined with title of the variant. - """ - title: String! - - """ - The product variant object associated to the line item. - """ - variant: ProductVariant -} - -""" -An auto-generated type for paginating through multiple OrderLineItems. -""" -type OrderLineItemConnection { - """ - A list of edges. - """ - edges: [OrderLineItemEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one OrderLineItem and a cursor during pagination. -""" -type OrderLineItemEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of OrderLineItemEdge. - """ - node: OrderLineItem! -} - -""" -The set of valid sort keys for the Order query. -""" -enum OrderSortKeys { - """ - Sort by the `processed_at` value. - """ - PROCESSED_AT - - """ - Sort by the `total_price` value. - """ - TOTAL_PRICE - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -Shopify merchants can create pages to hold static HTML content. Each Page object represents a custom page on the online store. -""" -type Page implements Node { - """ - The description of the page, complete with HTML formatting. - """ - body: HTML! - - """ - Summary of the page body. - """ - bodySummary: String! - - """ - The timestamp of the page creation. - """ - createdAt: DateTime! - - """ - A human-friendly unique string for the page automatically generated from its title. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - The page's SEO information. - """ - seo: SEO - - """ - The title of the page. - """ - title: String! - - """ - The timestamp of the latest page update. - """ - updatedAt: DateTime! - - """ - The url pointing to the page accessible from the web. - """ - url: URL! -} - -""" -An auto-generated type for paginating through multiple Pages. -""" -type PageConnection { - """ - A list of edges. - """ - edges: [PageEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Page and a cursor during pagination. -""" -type PageEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of PageEdge. - """ - node: Page! -} - -""" -Information about pagination in a connection. -""" -type PageInfo { - """ - Indicates if there are more pages to fetch. - """ - hasNextPage: Boolean! - - """ - Indicates if there are any pages prior to the current page. - """ - hasPreviousPage: Boolean! -} - -""" -The set of valid sort keys for the Page query. -""" -enum PageSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -A payment applied to a checkout. -""" -type Payment implements Node { - """ - The amount of the payment. - """ - amount: Money! @deprecated(reason: "Use `amountV2` instead") - - """ - The amount of the payment. - """ - amountV2: MoneyV2! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddress - - """ - The checkout to which the payment belongs. - """ - checkout: Checkout! - - """ - The credit card used for the payment in the case of direct payments. - """ - creditCard: CreditCard - - """ - A message describing a processing error during asynchronous processing. - """ - errorMessage: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - A client-side generated token to identify a payment and perform idempotent operations. - """ - idempotencyKey: String - - """ - The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. - """ - nextActionUrl: URL - - """ - Whether or not the payment is still processing asynchronously. - """ - ready: Boolean! - - """ - A flag to indicate if the payment is to be done in test mode for gateways that support it. - """ - test: Boolean! - - """ - The actual transaction recorded by Shopify after having processed the payment with the gateway. - """ - transaction: Transaction -} - -""" -Settings related to payments. -""" -type PaymentSettings { - """ - List of the card brands which the shop accepts. - """ - acceptedCardBrands: [CardBrand!]! - - """ - The url pointing to the endpoint to vault credit cards. - """ - cardVaultUrl: URL! - - """ - The country where the shop is located. - """ - countryCode: CountryCode! - - """ - The three-letter code for the shop's primary currency. - """ - currencyCode: CurrencyCode! - - """ - A list of enabled currencies (ISO 4217 format) that the shop accepts. Merchants can enable currencies from their Shopify Payments settings in the Shopify admin. - """ - enabledPresentmentCurrencies: [CurrencyCode!]! - - """ - The shop’s Shopify Payments account id. - """ - shopifyPaymentsAccountId: String - - """ - List of the digital wallets which the shop supports. - """ - supportedDigitalWallets: [DigitalWallet!]! -} - -""" -The valid values for the types of payment token. -""" -enum PaymentTokenType { - """ - Apple Pay token type. - """ - APPLE_PAY - - """ - Vault payment token type. - """ - VAULT - - """ - Shopify Pay token type. - """ - SHOPIFY_PAY - - """ - Google Pay token type. - """ - GOOGLE_PAY -} - -""" -The value of the percentage pricing object. -""" -type PricingPercentageValue { - """ - The percentage value of the object. - """ - percentage: Float! -} - -""" -The price value (fixed or percentage) for a discount application. -""" -union PricingValue = MoneyV2 | PricingPercentageValue - -""" -A product represents an individual item for sale in a Shopify store. Products are often physical, but they don't have to be. -For example, a digital download (such as a movie, music or ebook file) also qualifies as a product, as do services (such as equipment rental, work for hire, customization of another product or an extended warranty). -""" -type Product implements Node & HasMetafields { - """ - Indicates if at least one product variant is available for sale. - """ - availableForSale: Boolean! - - """ - List of collections a product belongs to. - """ - collections( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): CollectionConnection! - - """ - The compare at price of the product across all variants. - """ - compareAtPriceRange: ProductPriceRange! - - """ - The date and time when the product was created. - """ - createdAt: DateTime! - - """ - Stripped description of the product, single line with HTML tags removed. - """ - description( - """ - Truncates string after the given length. - """ - truncateAt: Int - ): String! - - """ - The description of the product, complete with HTML formatting. - """ - descriptionHtml: HTML! - - """ - A human-friendly unique string for the Product automatically generated from its title. - They are used by the Liquid templating language to refer to objects. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - List of images associated with the product. - """ - images( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductImageSortKeys = POSITION - - """ - Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. - """ - scale: Int = 1 - ): ImageConnection! - - """ - The media associated with the product. - """ - media( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductMediaSortKeys = POSITION - ): MediaConnection! - - """ - The metafield associated with the resource. - """ - metafield( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String! - - """ - Identifier for the metafield (maximum of 30 characters). - """ - key: String! - ): Metafield - - """ - A paginated list of metafields associated with the resource. - """ - metafields( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - The online store URL for the product. - A value of `null` indicates that the product is not published to the Online Store sales channel. - """ - onlineStoreUrl: URL - - """ - List of product options. - """ - options( - """ - Truncate the array result to this size. - """ - first: Int - ): [ProductOption!]! - - """ - List of price ranges in the presentment currencies for this shop. - """ - presentmentPriceRanges( - """ - Specifies the presentment currencies to return a price range in. - """ - presentmentCurrencies: [CurrencyCode!] - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductPriceRangeConnection! - - """ - The price range. - """ - priceRange: ProductPriceRange! - - """ - A categorization that a product can be tagged with, commonly used for filtering and searching. - """ - productType: String! - - """ - The date and time when the product was published to the channel. - """ - publishedAt: DateTime! - - """ - The product's SEO information. - """ - seo: SEO! - - """ - A comma separated list of tags that have been added to the product. - Additional access scope required for private apps: unauthenticated_read_product_tags. - """ - tags: [String!]! - - """ - The product’s title. - """ - title: String! - - """ - The total quantity of inventory in stock for this Product. - """ - totalInventory: Int - - """ - The date and time when the product was last modified. - A product's `updatedAt` value can change for different reasons. For example, if an order - is placed for a product that has inventory tracking set up, then the inventory adjustment - is counted as an update. - """ - updatedAt: DateTime! - - """ - Find a product’s variant based on its selected options. - This is useful for converting a user’s selection of product options into a single matching variant. - If there is not a variant for the selected options, `null` will be returned. - """ - variantBySelectedOptions( - """ - The input fields used for a selected option. - """ - selectedOptions: [SelectedOptionInput!]! - ): ProductVariant - - """ - List of the product’s variants. - """ - variants( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductVariantSortKeys = POSITION - ): ProductVariantConnection! - - """ - The product’s vendor name. - """ - vendor: String! -} - -""" -The set of valid sort keys for the ProductCollection query. -""" -enum ProductCollectionSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `price` value. - """ - PRICE - - """ - Sort by the `best-selling` value. - """ - BEST_SELLING - - """ - Sort by the `created` value. - """ - CREATED - - """ - Sort by the `id` value. - """ - ID - - """ - Sort by the `manual` value. - """ - MANUAL - - """ - Sort by the `collection-default` value. - """ - COLLECTION_DEFAULT - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -An auto-generated type for paginating through multiple Products. -""" -type ProductConnection { - """ - A list of edges. - """ - edges: [ProductEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one Product and a cursor during pagination. -""" -type ProductEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ProductEdge. - """ - node: Product! -} - -""" -The set of valid sort keys for the ProductImage query. -""" -enum ProductImageSortKeys { - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `position` value. - """ - POSITION - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -The set of valid sort keys for the ProductMedia query. -""" -enum ProductMediaSortKeys { - """ - Sort by the `position` value. - """ - POSITION - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -Product property names like "Size", "Color", and "Material" that the customers can select. -Variants are selected based on permutations of these options. -255 characters limit each. -""" -type ProductOption implements Node { - """ - Globally unique identifier. - """ - id: ID! - - """ - The product option’s name. - """ - name: String! - - """ - The corresponding value to the product option name. - """ - values: [String!]! -} - -""" -The price range of the product. -""" -type ProductPriceRange { - """ - The highest variant's price. - """ - maxVariantPrice: MoneyV2! - - """ - The lowest variant's price. - """ - minVariantPrice: MoneyV2! -} - -""" -An auto-generated type for paginating through multiple ProductPriceRanges. -""" -type ProductPriceRangeConnection { - """ - A list of edges. - """ - edges: [ProductPriceRangeEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one ProductPriceRange and a cursor during pagination. -""" -type ProductPriceRangeEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ProductPriceRangeEdge. - """ - node: ProductPriceRange! -} - -""" -The set of valid sort keys for the Product query. -""" -enum ProductSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `product_type` value. - """ - PRODUCT_TYPE - - """ - Sort by the `vendor` value. - """ - VENDOR - - """ - Sort by the `updated_at` value. - """ - UPDATED_AT - - """ - Sort by the `created_at` value. - """ - CREATED_AT - - """ - Sort by the `best_selling` value. - """ - BEST_SELLING - - """ - Sort by the `price` value. - """ - PRICE - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -A product variant represents a different version of a product, such as differing sizes or differing colors. -""" -type ProductVariant implements Node & HasMetafields { - """ - Indicates if the product variant is in stock. - """ - available: Boolean @deprecated(reason: "Use `availableForSale` instead") - - """ - Indicates if the product variant is available for sale. - """ - availableForSale: Boolean! - - """ - The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPrice` is higher than `price`. - """ - compareAtPrice: Money @deprecated(reason: "Use `compareAtPriceV2` instead") - - """ - The compare at price of the variant. This can be used to mark a variant as on sale, when `compareAtPriceV2` is higher than `priceV2`. - """ - compareAtPriceV2: MoneyV2 - - """ - Whether a product is out of stock but still available for purchase (used for backorders). - """ - currentlyNotInStock: Boolean! - - """ - Globally unique identifier. - """ - id: ID! - - """ - Image associated with the product variant. This field falls back to the product image if no image is available. - """ - image( - """ - Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. - """ - maxWidth: Int - - """ - Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. - """ - maxHeight: Int - - """ - Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. - """ - crop: CropRegion - - """ - Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. - """ - scale: Int = 1 - ): Image - - """ - The metafield associated with the resource. - """ - metafield( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String! - - """ - Identifier for the metafield (maximum of 30 characters). - """ - key: String! - ): Metafield - - """ - A paginated list of metafields associated with the resource. - """ - metafields( - """ - Container for a set of metafields (maximum of 20 characters). - """ - namespace: String - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MetafieldConnection! - - """ - List of prices and compare-at prices in the presentment currencies for this shop. - """ - presentmentPrices( - """ - The presentment currencies prices should return in. - """ - presentmentCurrencies: [CurrencyCode!] - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): ProductVariantPricePairConnection! - - """ - List of unit prices in the presentment currencies for this shop. - """ - presentmentUnitPrices( - """ - Specify the currencies in which to return presentment unit prices. - """ - presentmentCurrencies: [CurrencyCode!] - - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - ): MoneyV2Connection! - - """ - The product variant’s price. - """ - price: Money! @deprecated(reason: "Use `priceV2` instead") - - """ - The product variant’s price. - """ - priceV2: MoneyV2! - - """ - The product object that the product variant belongs to. - """ - product: Product! - - """ - The total sellable quantity of the variant for online sales channels. - """ - quantityAvailable: Int - - """ - Whether a customer needs to provide a shipping address when placing an order for the product variant. - """ - requiresShipping: Boolean! - - """ - List of product options applied to the variant. - """ - selectedOptions: [SelectedOption!]! - - """ - The SKU (stock keeping unit) associated with the variant. - """ - sku: String - - """ - The product variant’s title. - """ - title: String! - - """ - The unit price value for the variant based on the variant's measurement. - """ - unitPrice: MoneyV2 - - """ - The unit price measurement for the variant. - """ - unitPriceMeasurement: UnitPriceMeasurement - - """ - The weight of the product variant in the unit system specified with `weight_unit`. - """ - weight: Float - - """ - Unit of measurement for weight. - """ - weightUnit: WeightUnit! -} - -""" -An auto-generated type for paginating through multiple ProductVariants. -""" -type ProductVariantConnection { - """ - A list of edges. - """ - edges: [ProductVariantEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one ProductVariant and a cursor during pagination. -""" -type ProductVariantEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ProductVariantEdge. - """ - node: ProductVariant! -} - -""" -The compare-at price and price of a variant sharing a currency. -""" -type ProductVariantPricePair { - """ - The compare-at price of the variant with associated currency. - """ - compareAtPrice: MoneyV2 - - """ - The price of the variant with associated currency. - """ - price: MoneyV2! -} - -""" -An auto-generated type for paginating through multiple ProductVariantPricePairs. -""" -type ProductVariantPricePairConnection { - """ - A list of edges. - """ - edges: [ProductVariantPricePairEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. -""" -type ProductVariantPricePairEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of ProductVariantPricePairEdge. - """ - node: ProductVariantPricePair! -} - -""" -The set of valid sort keys for the ProductVariant query. -""" -enum ProductVariantSortKeys { - """ - Sort by the `title` value. - """ - TITLE - - """ - Sort by the `sku` value. - """ - SKU - - """ - Sort by the `position` value. - """ - POSITION - - """ - Sort by the `id` value. - """ - ID - - """ - During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the - results by relevance to the search term(s). When no search query is specified, this sort key is not - deterministic and should not be used. - """ - RELEVANCE -} - -""" -The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. -""" -type QueryRoot { - """ - List of the shop's articles. - """ - articles( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ArticleSortKeys = ID - - """ - Supported filter parameters: - - `author` - - `blog_title` - - `created_at` - - `tag` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ArticleConnection! - - """ - Find a blog by its handle. - """ - blogByHandle( - """ - The handle of the blog. - """ - handle: String! - ): Blog - - """ - List of the shop's blogs. - """ - blogs( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: BlogSortKeys = ID - - """ - Supported filter parameters: - - `created_at` - - `handle` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): BlogConnection! - - """ - Find a collection by its handle. - """ - collectionByHandle( - """ - The handle of the collection. - """ - handle: String! - ): Collection - - """ - List of the shop’s collections. - """ - collections( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CollectionSortKeys = ID - - """ - Supported filter parameters: - - `collection_type` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): CollectionConnection! - - """ - Find a customer by its access token. - """ - customer( - """ - The customer access token. - """ - customerAccessToken: String! - ): Customer - node( - """ - The ID of the Node to return. - """ - id: ID! - ): Node - nodes( - """ - The IDs of the Nodes to return. - """ - ids: [ID!]! - ): [Node]! - - """ - Find a page by its handle. - """ - pageByHandle( - """ - The handle of the page. - """ - handle: String! - ): Page - - """ - List of the shop's pages. - """ - pages( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: PageSortKeys = ID - - """ - Supported filter parameters: - - `created_at` - - `handle` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): PageConnection! - - """ - Find a product by its handle. - """ - productByHandle( - """ - The handle of the product. - """ - handle: String! - ): Product - - """ - Find recommended products related to a given `product_id`. - To learn more about how recommendations are generated, see - [*Showing product recommendations on product pages*](https://help.shopify.com/themes/development/recommended-products). - """ - productRecommendations( - """ - The id of the product. - """ - productId: ID! - ): [Product!] - - """ - Tags added to products. - Additional access scope required: unauthenticated_read_product_tags. - """ - productTags( - """ - Returns up to the first `n` elements from the list. - """ - first: Int! - ): StringConnection! - - """ - List of product types for the shop's products that are published to your app. - """ - productTypes( - """ - Returns up to the first `n` elements from the list. - """ - first: Int! - ): StringConnection! - - """ - List of the shop’s products. - """ - products( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductSortKeys = ID - - """ - Supported filter parameters: - - `available_for_sale` - - `created_at` - - `product_type` - - `tag` - - `title` - - `updated_at` - - `variants.price` - - `vendor` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ProductConnection! - - """ - The list of public Storefront API versions, including supported, release candidate and unstable versions. - """ - publicApiVersions: [ApiVersion!]! - - """ - The shop associated with the storefront access token. - """ - shop: Shop! -} - -""" -SEO information. -""" -type SEO { - """ - The meta description. - """ - description: String - - """ - The SEO title. - """ - title: String -} - -""" -Script discount applications capture the intentions of a discount that -was created by a Shopify Script. -""" -type ScriptDiscountApplication implements DiscountApplication { - """ - The method by which the discount's value is allocated to its entitled items. - """ - allocationMethod: DiscountApplicationAllocationMethod! - - """ - The description of the application as defined by the Script. - """ - description: String! @deprecated(reason: "Use `title` instead") - - """ - Which lines of targetType that the discount is allocated over. - """ - targetSelection: DiscountApplicationTargetSelection! - - """ - The type of line that the discount is applicable towards. - """ - targetType: DiscountApplicationTargetType! - - """ - The title of the application as defined by the Script. - """ - title: String! - - """ - The value of the discount application. - """ - value: PricingValue! -} - -""" -Properties used by customers to select a product variant. -Products can have multiple options, like different sizes or colors. -""" -type SelectedOption { - """ - The product option’s name. - """ - name: String! - - """ - The product option’s value. - """ - value: String! -} - -""" -Specifies the input fields required for a selected option. -""" -input SelectedOptionInput { - """ - The product option’s name. - """ - name: String! - - """ - The product option’s value. - """ - value: String! -} - -""" -A shipping rate to be applied to a checkout. -""" -type ShippingRate { - """ - Human-readable unique identifier for this shipping rate. - """ - handle: String! - - """ - Price of this shipping rate. - """ - price: Money! @deprecated(reason: "Use `priceV2` instead") - - """ - Price of this shipping rate. - """ - priceV2: MoneyV2! - - """ - Title of this shipping rate. - """ - title: String! -} - -""" -Shop represents a collection of the general settings and information about the shop. -""" -type Shop { - """ - List of the shop' articles. - """ - articles( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ArticleSortKeys = ID - - """ - Supported filter parameters: - - `author` - - `blog_title` - - `created_at` - - `tag` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ArticleConnection! @deprecated(reason: "Use `QueryRoot.articles` instead.") - - """ - List of the shop' blogs. - """ - blogs( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: BlogSortKeys = ID - - """ - Supported filter parameters: - - `created_at` - - `handle` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): BlogConnection! @deprecated(reason: "Use `QueryRoot.blogs` instead.") - - """ - Find a collection by its handle. - """ - collectionByHandle( - """ - The handle of the collection. - """ - handle: String! - ): Collection - @deprecated(reason: "Use `QueryRoot.collectionByHandle` instead.") - - """ - List of the shop’s collections. - """ - collections( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: CollectionSortKeys = ID - - """ - Supported filter parameters: - - `collection_type` - - `title` - - `updated_at` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): CollectionConnection! - @deprecated(reason: "Use `QueryRoot.collections` instead.") - - """ - The three-letter code for the currency that the shop accepts. - """ - currencyCode: CurrencyCode! - @deprecated(reason: "Use `paymentSettings` instead") - - """ - A description of the shop. - """ - description: String - - """ - A string representing the way currency is formatted when the currency isn’t specified. - """ - moneyFormat: String! - - """ - The shop’s name. - """ - name: String! - - """ - Settings related to payments. - """ - paymentSettings: PaymentSettings! - - """ - The shop’s primary domain. - """ - primaryDomain: Domain! - - """ - The shop’s privacy policy. - """ - privacyPolicy: ShopPolicy - - """ - Find a product by its handle. - """ - productByHandle( - """ - The handle of the product. - """ - handle: String! - ): Product @deprecated(reason: "Use `QueryRoot.productByHandle` instead.") - - """ - A list of tags that have been added to products. - Additional access scope required: unauthenticated_read_product_tags. - """ - productTags( - """ - Returns up to the first `n` elements from the list. - """ - first: Int! - ): StringConnection! - @deprecated(reason: "Use `QueryRoot.productTags` instead.") - - """ - List of the shop’s product types. - """ - productTypes( - """ - Returns up to the first `n` elements from the list. - """ - first: Int! - ): StringConnection! - @deprecated(reason: "Use `QueryRoot.productTypes` instead.") - - """ - List of the shop’s products. - """ - products( - """ - Returns up to the first `n` elements from the list. - """ - first: Int - - """ - Returns the elements that come after the specified cursor. - """ - after: String - - """ - Returns up to the last `n` elements from the list. - """ - last: Int - - """ - Returns the elements that come before the specified cursor. - """ - before: String - - """ - Reverse the order of the underlying list. - """ - reverse: Boolean = false - - """ - Sort the underlying list by the given key. - """ - sortKey: ProductSortKeys = ID - - """ - Supported filter parameters: - - `available_for_sale` - - `created_at` - - `product_type` - - `tag` - - `title` - - `updated_at` - - `variants.price` - - `vendor` - - See the detailed [search syntax](https://help.shopify.com/api/getting-started/search-syntax) - for more information about using filters. - """ - query: String - ): ProductConnection! @deprecated(reason: "Use `QueryRoot.products` instead.") - - """ - The shop’s refund policy. - """ - refundPolicy: ShopPolicy - - """ - The shop’s shipping policy. - """ - shippingPolicy: ShopPolicy - - """ - Countries that the shop ships to. - """ - shipsToCountries: [CountryCode!]! - - """ - The shop’s Shopify Payments account id. - """ - shopifyPaymentsAccountId: String - @deprecated(reason: "Use `paymentSettings` instead") - - """ - The shop’s terms of service. - """ - termsOfService: ShopPolicy -} - -""" -Policy that a merchant has configured for their store, such as their refund or privacy policy. -""" -type ShopPolicy implements Node { - """ - Policy text, maximum size of 64kb. - """ - body: String! - - """ - Policy’s handle. - """ - handle: String! - - """ - Globally unique identifier. - """ - id: ID! - - """ - Policy’s title. - """ - title: String! - - """ - Public URL to the policy. - """ - url: URL! -} - -""" -An auto-generated type for paginating through multiple Strings. -""" -type StringConnection { - """ - A list of edges. - """ - edges: [StringEdge!]! - - """ - Information to aid in pagination. - """ - pageInfo: PageInfo! -} - -""" -An auto-generated type which holds one String and a cursor during pagination. -""" -type StringEdge { - """ - A cursor for use in pagination. - """ - cursor: String! - - """ - The item at the end of StringEdge. - """ - node: String! -} - -""" -Specifies the fields required to complete a checkout with -a tokenized payment. -""" -input TokenizedPaymentInput { - """ - The amount of the payment. - """ - amount: Money! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - The type of payment token. - """ - type: String! - - """ - A simple string or JSON containing the required payment data for the tokenized payment. - """ - paymentData: String! - - """ - Executes the payment in test mode if possible. Defaults to `false`. - """ - test: Boolean - - """ - Public Hash Key used for AndroidPay payments only. - """ - identifier: String -} - -""" -Specifies the fields required to complete a checkout with -a tokenized payment. -""" -input TokenizedPaymentInputV2 { - """ - The amount and currency of the payment. - """ - paymentAmount: MoneyInput! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - A simple string or JSON containing the required payment data for the tokenized payment. - """ - paymentData: String! - - """ - Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. - """ - test: Boolean - - """ - Public Hash Key used for AndroidPay payments only. - """ - identifier: String - - """ - The type of payment token. - """ - type: String! -} - -""" -Specifies the fields required to complete a checkout with -a tokenized payment. -""" -input TokenizedPaymentInputV3 { - """ - The amount and currency of the payment. - """ - paymentAmount: MoneyInput! - - """ - A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. - """ - idempotencyKey: String! - - """ - The billing address for the payment. - """ - billingAddress: MailingAddressInput! - - """ - A simple string or JSON containing the required payment data for the tokenized payment. - """ - paymentData: String! - - """ - Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. - """ - test: Boolean - - """ - Public Hash Key used for AndroidPay payments only. - """ - identifier: String - - """ - The type of payment token. - """ - type: PaymentTokenType! -} - -""" -An object representing exchange of money for a product or service. -""" -type Transaction { - """ - The amount of money that the transaction was for. - """ - amount: Money! @deprecated(reason: "Use `amountV2` instead") - - """ - The amount of money that the transaction was for. - """ - amountV2: MoneyV2! - - """ - The kind of the transaction. - """ - kind: TransactionKind! - - """ - The status of the transaction. - """ - status: TransactionStatus! @deprecated(reason: "Use `statusV2` instead") - - """ - The status of the transaction. - """ - statusV2: TransactionStatus - - """ - Whether the transaction was done in test mode or not. - """ - test: Boolean! -} - -enum TransactionKind { - SALE - CAPTURE - AUTHORIZATION - EMV_AUTHORIZATION - CHANGE -} - -enum TransactionStatus { - PENDING - SUCCESS - FAILURE - ERROR -} - -""" -An RFC 3986 and RFC 3987 compliant URI string. - -Example value: `"https://johns-apparel.myshopify.com"`. -""" -scalar URL - -""" -The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml). -""" -type UnitPriceMeasurement { - """ - The type of unit of measurement for the unit price measurement. - """ - measuredType: UnitPriceMeasurementMeasuredType - - """ - The quantity unit for the unit price measurement. - """ - quantityUnit: UnitPriceMeasurementMeasuredUnit - - """ - The quantity value for the unit price measurement. - """ - quantityValue: Float! - - """ - The reference unit for the unit price measurement. - """ - referenceUnit: UnitPriceMeasurementMeasuredUnit - - """ - The reference value for the unit price measurement. - """ - referenceValue: Int! -} - -""" -The accepted types of unit of measurement. -""" -enum UnitPriceMeasurementMeasuredType { - """ - Unit of measurements representing volumes. - """ - VOLUME - - """ - Unit of measurements representing weights. - """ - WEIGHT - - """ - Unit of measurements representing lengths. - """ - LENGTH - - """ - Unit of measurements representing areas. - """ - AREA -} - -""" -The valid units of measurement for a unit price measurement. -""" -enum UnitPriceMeasurementMeasuredUnit { - """ - 1000 milliliters equals 1 liter. - """ - ML - - """ - 100 centiliters equals 1 liter. - """ - CL - - """ - Metric system unit of volume. - """ - L - - """ - 1 cubic meter equals 1000 liters. - """ - M3 - - """ - 1000 milligrams equals 1 gram. - """ - MG - - """ - Metric system unit of weight. - """ - G - - """ - 1 kilogram equals 1000 grams. - """ - KG - - """ - 1000 millimeters equals 1 meter. - """ - MM - - """ - 100 centimeters equals 1 meter. - """ - CM - - """ - Metric system unit of length. - """ - M - - """ - Metric system unit of area. - """ - M2 -} - -""" -Represents an error in the input of a mutation. -""" -type UserError implements DisplayableError { - """ - Path to the input field which caused the error. - """ - field: [String!] - - """ - The error message. - """ - message: String! -} - -""" -Represents a Shopify hosted video. -""" -type Video implements Node & Media { - """ - A word or phrase to share the nature or contents of a media. - """ - alt: String - - """ - Globally unique identifier. - """ - id: ID! - - """ - The media content type. - """ - mediaContentType: MediaContentType! - - """ - The preview image for the media. - """ - previewImage: Image - - """ - The sources for a video. - """ - sources: [VideoSource!]! -} - -""" -Represents a source for a Shopify hosted video. -""" -type VideoSource { - """ - The format of the video source. - """ - format: String! - - """ - The height of the video. - """ - height: Int! - - """ - The video MIME type. - """ - mimeType: String! - - """ - The URL of the video. - """ - url: String! - - """ - The width of the video. - """ - width: Int! -} - -""" -Units of measurement for weight. -""" -enum WeightUnit { - """ - 1 kilogram equals 1000 grams. - """ - KILOGRAMS - - """ - Metric system unit of mass. - """ - GRAMS - - """ - 1 pound equals 16 ounces. - """ - POUNDS - - """ - Imperial system unit of mass. - """ - OUNCES -} diff --git a/framework/swell/types.ts b/framework/swell/types.ts deleted file mode 100644 index ad8ee3b68..000000000 --- a/framework/swell/types.ts +++ /dev/null @@ -1,112 +0,0 @@ -import * as Core from '@commerce/types/cart' -import { Customer } from '@commerce/types' -import { CheckoutLineItem } from './schema' - -export type SwellImage = { - file: { - url: String - height: Number - width: Number - } - id: string -} - -export type CartLineItem = { - id: string - product: SwellProduct - price: number - variant: { - name: string | null - sku: string | null - id: string - } - quantity: number -} - -export type SwellCart = { - id: string - account_id: number - currency: string - tax_included_total: number - sub_total: number - grand_total: number - discount_total: number - quantity: number - items: CartLineItem[] - date_created: string - discounts?: { id: number; amount: number }[] | null - // TODO: add missing fields -} - -export type SwellVariant = { - id: string - option_value_ids: string[] - name: string - price?: number - stock_status?: string - __type?: 'MultipleChoiceOption' | undefined -} - -export interface SwellProductOptionValue { - id: string - label: string - hexColors?: string[] -} - -export interface ProductOptionValue { - label: string - hexColors?: string[] -} - -export type ProductOptions = { - id: string - name: string - variant: boolean - values: ProductOptionValue[] - required: boolean - active: boolean - attribute_id: string -} - -export interface SwellProduct { - id: string - description: string - name: string - slug: string - currency: string - price: number - images: any[] - options: any[] - variants: any[] -} - -export type SwellCustomer = any - -export type SwellCheckout = { - id: string - webUrl: string - lineItems: CheckoutLineItem[] -} - -export interface Cart extends Core.Cart { - id: string - lineItems: LineItem[] -} - -export interface LineItem extends Core.LineItem { - options?: any[] -} - -/** - * Cart mutations - */ - -export type OptionSelections = { - option_id: number - option_value: number | string -} - -export type CartItemBody = Core.CartItemBody & { - productId: string // The product id is always required for BC - optionSelections?: OptionSelections -} diff --git a/framework/swell/types/cart.ts b/framework/swell/types/cart.ts deleted file mode 100644 index 6ed5c6c64..000000000 --- a/framework/swell/types/cart.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/cart' diff --git a/framework/swell/types/checkout.ts b/framework/swell/types/checkout.ts deleted file mode 100644 index 4e2412ef6..000000000 --- a/framework/swell/types/checkout.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/checkout' diff --git a/framework/swell/types/common.ts b/framework/swell/types/common.ts deleted file mode 100644 index b52c33a4d..000000000 --- a/framework/swell/types/common.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/common' diff --git a/framework/swell/types/customer.ts b/framework/swell/types/customer.ts deleted file mode 100644 index 87c9afcc4..000000000 --- a/framework/swell/types/customer.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/customer' diff --git a/framework/swell/types/index.ts b/framework/swell/types/index.ts deleted file mode 100644 index 7ab0b7f64..000000000 --- a/framework/swell/types/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as Cart from './cart' -import * as Checkout from './checkout' -import * as Common from './common' -import * as Customer from './customer' -import * as Login from './login' -import * as Logout from './logout' -import * as Page from './page' -import * as Product from './product' -import * as Signup from './signup' -import * as Site from './site' -import * as Wishlist from './wishlist' - -export type { - Cart, - Checkout, - Common, - Customer, - Login, - Logout, - Page, - Product, - Signup, - Site, - Wishlist, -} diff --git a/framework/swell/types/login.ts b/framework/swell/types/login.ts deleted file mode 100644 index ab11a420a..000000000 --- a/framework/swell/types/login.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as Core from '@commerce/types/login' -import { LoginBody, LoginTypes } from '@commerce/types/login' - -export * from '@commerce/types/login' - -export type LoginHook = { - data: null - actionInput: LoginBody - fetcherInput: LoginBody - body: T['body'] -} diff --git a/framework/swell/types/logout.ts b/framework/swell/types/logout.ts deleted file mode 100644 index 9f0a466af..000000000 --- a/framework/swell/types/logout.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/logout' diff --git a/framework/swell/types/page.ts b/framework/swell/types/page.ts deleted file mode 100644 index 20ec8ea38..000000000 --- a/framework/swell/types/page.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/page' diff --git a/framework/swell/types/product.ts b/framework/swell/types/product.ts deleted file mode 100644 index c776d58fa..000000000 --- a/framework/swell/types/product.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/product' diff --git a/framework/swell/types/signup.ts b/framework/swell/types/signup.ts deleted file mode 100644 index 58543c6f6..000000000 --- a/framework/swell/types/signup.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/signup' diff --git a/framework/swell/types/site.ts b/framework/swell/types/site.ts deleted file mode 100644 index bfef69cf9..000000000 --- a/framework/swell/types/site.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/site' diff --git a/framework/swell/types/wishlist.ts b/framework/swell/types/wishlist.ts deleted file mode 100644 index 8907fbf82..000000000 --- a/framework/swell/types/wishlist.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@commerce/types/wishlist' diff --git a/framework/swell/utils/customer-token.ts b/framework/swell/utils/customer-token.ts deleted file mode 100644 index 63bd51bc0..000000000 --- a/framework/swell/utils/customer-token.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Cookies, { CookieAttributes } from 'js-cookie' -import { SWELL_COOKIE_EXPIRE, SWELL_CUSTOMER_TOKEN_COOKIE } from '../const' - -export const getCustomerToken = () => Cookies.get(SWELL_CUSTOMER_TOKEN_COOKIE) - -export const setCustomerToken = ( - token: string | null, - options?: CookieAttributes -) => { - if (!token) { - Cookies.remove(SWELL_CUSTOMER_TOKEN_COOKIE) - } else { - Cookies.set( - SWELL_CUSTOMER_TOKEN_COOKIE, - token, - options ?? { - expires: SWELL_COOKIE_EXPIRE, - } - ) - } -} diff --git a/framework/swell/utils/get-categories.ts b/framework/swell/utils/get-categories.ts deleted file mode 100644 index ab38bae96..000000000 --- a/framework/swell/utils/get-categories.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { SwellConfig } from '../api' -import { Category } from '../types/site' - -const getCategories = async (config: SwellConfig): Promise => { - const data = await config.fetch('categories', 'get') - return ( - data.results.map(({ id, name, slug }: any) => ({ - id, - name, - slug, - path: `/${slug}`, - })) ?? [] - ) -} - -export default getCategories diff --git a/framework/swell/utils/get-checkout-id.ts b/framework/swell/utils/get-checkout-id.ts deleted file mode 100644 index 07643f475..000000000 --- a/framework/swell/utils/get-checkout-id.ts +++ /dev/null @@ -1,8 +0,0 @@ -import Cookies from 'js-cookie' -import { SWELL_CHECKOUT_ID_COOKIE } from '../const' - -const getCheckoutId = (id?: string) => { - return id ?? Cookies.get(SWELL_CHECKOUT_ID_COOKIE) -} - -export default getCheckoutId diff --git a/framework/swell/utils/get-search-variables.ts b/framework/swell/utils/get-search-variables.ts deleted file mode 100644 index c1b40ae5d..000000000 --- a/framework/swell/utils/get-search-variables.ts +++ /dev/null @@ -1,27 +0,0 @@ -import getSortVariables from './get-sort-variables' -import type { SearchProductsInput } from '../product/use-search' - -export const getSearchVariables = ({ - brandId, - search, - categoryId, - sort, -}: SearchProductsInput) => { - let query = '' - - if (search) { - query += `product_type:${search} OR title:${search} OR tag:${search}` - } - - if (brandId) { - query += `${search ? ' AND ' : ''}vendor:${brandId}` - } - - return { - categoryId, - query, - ...getSortVariables(sort, !!categoryId), - } -} - -export default getSearchVariables diff --git a/framework/swell/utils/get-sort-variables.ts b/framework/swell/utils/get-sort-variables.ts deleted file mode 100644 index b8cdeec51..000000000 --- a/framework/swell/utils/get-sort-variables.ts +++ /dev/null @@ -1,32 +0,0 @@ -const getSortVariables = (sort?: string, isCategory = false) => { - let output = {} - switch (sort) { - case 'price-asc': - output = { - sortKey: 'PRICE', - reverse: false, - } - break - case 'price-desc': - output = { - sortKey: 'PRICE', - reverse: true, - } - break - case 'trending-desc': - output = { - sortKey: 'BEST_SELLING', - reverse: false, - } - break - case 'latest-desc': - output = { - sortKey: isCategory ? 'CREATED' : 'CREATED_AT', - reverse: true, - } - break - } - return output -} - -export default getSortVariables diff --git a/framework/swell/utils/get-vendors.ts b/framework/swell/utils/get-vendors.ts deleted file mode 100644 index 1ede68835..000000000 --- a/framework/swell/utils/get-vendors.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SwellConfig } from '../api' - -export type BrandNode = { - name: string - path: string -} - -export type BrandEdge = { - node: BrandNode -} - -export type Brands = BrandEdge[] - -const getVendors = async (config: SwellConfig) => { - const vendors: [string] = - (await config.fetch('attributes', 'get', ['brand']))?.values ?? [] - - return [...new Set(vendors)].map((v) => ({ - node: { - entityId: v, - name: v, - path: `brands/${v}`, - }, - })) -} - -export default getVendors diff --git a/framework/swell/utils/handle-fetch-response.ts b/framework/swell/utils/handle-fetch-response.ts deleted file mode 100644 index 2688c9c70..000000000 --- a/framework/swell/utils/handle-fetch-response.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CommerceError } from '@commerce/utils/errors' - -type SwellFetchResponse = { - error: { - message: string - code?: string - } -} - -const handleFetchResponse = async (res: SwellFetchResponse) => { - if (res) { - if (res.error) { - throw new CommerceError(res.error) - } - return res - } -} - -export default handleFetchResponse diff --git a/framework/swell/utils/handle-login.ts b/framework/swell/utils/handle-login.ts deleted file mode 100644 index 77b6873e3..000000000 --- a/framework/swell/utils/handle-login.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { ValidationError } from '@commerce/utils/errors' -import { setCustomerToken } from './customer-token' - -const getErrorMessage = ({ - code, - message, -}: { - code: string - message: string -}) => { - switch (code) { - case 'UNIDENTIFIED_CUSTOMER': - message = 'Cannot find an account that matches the provided credentials' - break - } - return message -} - -const handleLogin = (data: any) => { - const response = data.customerAccessTokenCreate - const errors = response?.customerUserErrors - - if (errors && errors.length) { - throw new ValidationError({ - message: getErrorMessage(errors[0]), - }) - } - - const customerAccessToken = response?.customerAccessToken - const accessToken = customerAccessToken?.accessToken - - if (accessToken) { - setCustomerToken(accessToken) - } - - return customerAccessToken -} - -export default handleLogin diff --git a/framework/swell/utils/index.ts b/framework/swell/utils/index.ts deleted file mode 100644 index 9ec81bfb8..000000000 --- a/framework/swell/utils/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { default as handleFetchResponse } from './handle-fetch-response' -export { default as getSearchVariables } from './get-search-variables' -export { default as getSortVariables } from './get-sort-variables' -export { default as getVendors } from './get-vendors' -export { default as getCategories } from './get-categories' -export { default as getCheckoutId } from './get-checkout-id' - -export * from './normalize' -export * from './customer-token' diff --git a/framework/swell/utils/normalize.ts b/framework/swell/utils/normalize.ts deleted file mode 100644 index 2306f0662..000000000 --- a/framework/swell/utils/normalize.ts +++ /dev/null @@ -1,226 +0,0 @@ -import { Customer } from '../types/customer' -import { Product, ProductOption } from '../types/product' -import { MoneyV2 } from '../schema' - -import type { - Cart, - CartLineItem, - SwellCustomer, - SwellProduct, - SwellImage, - SwellVariant, - ProductOptionValue, - SwellProductOptionValue, - SwellCart, - LineItem, -} from '../types' - -const money = ({ amount, currencyCode }: MoneyV2) => { - return { - value: +amount, - currencyCode, - } -} - -type swellProductOption = { - id: string - name: string - values: any[] -} - -type normalizedProductOption = { - id: string - displayName: string - values: ProductOptionValue[] -} - -const normalizeProductOption = ({ - id, - name: displayName = '', - values = [], -}: swellProductOption): ProductOption => { - let returnValues = values.map((value) => { - let output: any = { - label: value.name, - // id: value?.id || id, - } - if (displayName.match(/colou?r/gi)) { - output = { - ...output, - hexColors: [value.name], - } - } - return output - }) - return { - __typename: 'MultipleChoiceOption', - id, - displayName, - values: returnValues, - } -} - -const normalizeProductImages = (images: SwellImage[]) => { - if (!images || images.length < 1) { - return [{ url: '/' }] - } - return images?.map(({ file, ...rest }: SwellImage) => ({ - url: file?.url + '', - height: Number(file?.height), - width: Number(file?.width), - ...rest, - })) -} - -const normalizeProductVariants = ( - variants: SwellVariant[], - productOptions: swellProductOption[] -) => { - return variants?.map( - ({ id, name, price, option_value_ids: optionValueIds = [] }) => { - const values = name - .split(',') - .map((i) => ({ name: i.trim(), label: i.trim() })) - - const options = optionValueIds.map((id) => { - const matchingOption = productOptions.find((option) => { - return option.values.find( - (value: SwellProductOptionValue) => value.id == id - ) - }) - return normalizeProductOption({ - id, - name: matchingOption?.name ?? '', - values, - }) - }) - - return { - id, - // name, - // sku: sku ?? id, - // price: price ?? null, - // listPrice: price ?? null, - // requiresShipping: true, - options, - } - } - ) -} - -export function normalizeProduct(swellProduct: SwellProduct): Product { - const { - id, - name, - description, - images, - options, - slug, - variants, - price: value, - currency: currencyCode, - } = swellProduct - // ProductView accesses variants for each product - const emptyVariants = [{ options: [], id, name }] - - const productOptions = options - ? options.map((o) => normalizeProductOption(o)) - : [] - const productVariants = variants - ? normalizeProductVariants(variants, options) - : [] - - const productImages = normalizeProductImages(images) - const product = { - ...swellProduct, - description, - id, - vendor: '', - path: `/${slug}`, - images: productImages, - variants: - productVariants && productVariants.length - ? productVariants - : emptyVariants, - options: productOptions, - price: { - value, - currencyCode, - }, - } - return product -} - -export function normalizeCart({ - id, - account_id, - date_created, - currency, - tax_included_total, - items, - sub_total, - grand_total, - discounts, -}: SwellCart) { - const cart: Cart = { - id: id, - customerId: account_id + '', - email: '', - createdAt: date_created, - currency: { code: currency }, - taxesIncluded: tax_included_total > 0, - lineItems: items?.map(normalizeLineItem) ?? [], - lineItemsSubtotalPrice: +sub_total, - subtotalPrice: +sub_total, - totalPrice: grand_total, - discounts: discounts?.map((discount) => ({ value: discount.amount })), - } - return cart -} - -export function normalizeCustomer(customer: SwellCustomer): Customer { - const { first_name: firstName, last_name: lastName } = customer - return { - ...customer, - firstName, - lastName, - } -} - -function normalizeLineItem({ - id, - product, - price, - variant, - quantity, -}: CartLineItem): LineItem { - const item = { - id, - variantId: variant?.id, - productId: product.id ?? '', - name: product?.name ?? '', - quantity, - variant: { - id: variant?.id ?? '', - sku: variant?.sku ?? '', - name: variant?.name!, - image: { - url: - product?.images && product.images.length > 0 - ? product?.images[0].file.url - : '/', - }, - requiresShipping: false, - price: price, - listPrice: price, - }, - path: '', - discounts: [], - options: [ - { - value: variant?.name, - }, - ], - } - return item -} diff --git a/framework/swell/utils/storage.ts b/framework/swell/utils/storage.ts deleted file mode 100644 index d46dadb21..000000000 --- a/framework/swell/utils/storage.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const getCheckoutIdFromStorage = (token: string) => { - if (window && window.sessionStorage) { - return window.sessionStorage.getItem(token) - } - - return null -} - -export const setCheckoutIdInStorage = (token: string, id: string | number) => { - if (window && window.sessionStorage) { - return window.sessionStorage.setItem(token, id + '') - } -} diff --git a/framework/swell/wishlist/use-add-item.tsx b/framework/swell/wishlist/use-add-item.tsx deleted file mode 100644 index 75f067c3a..000000000 --- a/framework/swell/wishlist/use-add-item.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { useCallback } from 'react' - -export function emptyHook() { - const useEmptyHook = async (options = {}) => { - return useCallback(async function () { - return Promise.resolve() - }, []) - } - - return useEmptyHook -} - -export default emptyHook diff --git a/framework/swell/wishlist/use-remove-item.tsx b/framework/swell/wishlist/use-remove-item.tsx deleted file mode 100644 index a2d3a8a05..000000000 --- a/framework/swell/wishlist/use-remove-item.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { useCallback } from 'react' - -type Options = { - includeProducts?: boolean -} - -export function emptyHook(options?: Options) { - const useEmptyHook = async ({ id }: { id: string | number }) => { - return useCallback(async function () { - return Promise.resolve() - }, []) - } - - return useEmptyHook -} - -export default emptyHook diff --git a/framework/swell/wishlist/use-wishlist.tsx b/framework/swell/wishlist/use-wishlist.tsx deleted file mode 100644 index cd1bfa0ad..000000000 --- a/framework/swell/wishlist/use-wishlist.tsx +++ /dev/null @@ -1,46 +0,0 @@ -// TODO: replace this hook and other wishlist hooks with a handler, or remove them if -// Swell doesn't have a wishlist - -import { HookFetcher } from '@commerce/utils/types' -import { Product } from '../schema' - -const defaultOpts = {} - -export type Wishlist = { - items: [ - { - product_id: number - variant_id: number - id: number - product: Product - } - ] -} - -export interface UseWishlistOptions { - includeProducts?: boolean -} - -export interface UseWishlistInput extends UseWishlistOptions { - customerId?: number -} - -export const fetcher: HookFetcher = () => { - return null -} - -export function extendHook( - customFetcher: typeof fetcher, - // swrOptions?: SwrOptions - swrOptions?: any -) { - const useWishlist = ({ includeProducts }: UseWishlistOptions = {}) => { - return { data: null } - } - - useWishlist.extend = extendHook - - return useWishlist -} - -export default extendHook(fetcher) diff --git a/framework/vendure/README.md b/framework/vendure/README.md index 7f1dccb3f..c1bcd7b5b 100644 --- a/framework/vendure/README.md +++ b/framework/vendure/README.md @@ -13,8 +13,6 @@ UI hooks and data fetching methods built from the ground up for e-commerce appli ``` 3. With the Vendure server running, start this project using `yarn dev` or `npm run dev`. -**Note:** The Vendure server needs to be configured to use the "cookie" tokenMethod rather than "bearer" to work with this provider. For more information see the [Managing Sessions docs](https://www.vendure.io/docs/storefront/managing-sessions/). - ## Known Limitations 1. Vendure does not ship with built-in wishlist functionality. diff --git a/lib/focus-trap.tsx b/lib/focus-trap.tsx index d886d6df2..6e1dc5fef 100644 --- a/lib/focus-trap.tsx +++ b/lib/focus-trap.tsx @@ -55,13 +55,10 @@ export default function FocusTrap({ children, focusFirst = false }: Props) { } }, [root, children]) - return React.createElement( - 'div', - { - ref: root, - className: 'outline-none focus-trap', - tabIndex: -1, - }, - children - ) + return React.createElement('div', { + ref: root, + children, + className: 'outline-none focus-trap', + tabIndex: -1, + }) } diff --git a/lib/search.tsx b/lib/search.tsx index eaeaf66fc..87b42db36 100644 --- a/lib/search.tsx +++ b/lib/search.tsx @@ -18,10 +18,10 @@ export function useSearchMeta(asPath: string) { c = parts[4] } - if (path !== pathname) setPathname(path) + setPathname(path) if (c !== category) setCategory(c) if (b !== brand) setBrand(b) - }, [asPath, pathname, category, brand]) + }, [asPath]) return { pathname, category, brand } } diff --git a/package.json b/package.json index 68bf0059d..95b46c497 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "build": "next build", "start": "next start", "analyze": "BUNDLE_ANALYZE=both yarn build", - "lint": "next lint", "prettier-fix": "prettier --write .", "find:unused": "npx next-unused", "generate": "graphql-codegen", @@ -64,9 +63,6 @@ "@types/node": "^15.12.4", "@types/react": "^17.0.8", "deepmerge": "^4.2.2", - "eslint": "^7.31.0", - "eslint-config-next": "^11.0.1", - "eslint-config-prettier": "^8.3.0", "graphql": "^15.5.1", "husky": "^6.0.0", "lint-staged": "^11.0.0", @@ -82,7 +78,6 @@ }, "lint-staged": { "**/*.{js,jsx,ts,tsx}": [ - "eslint", "prettier --write", "git add" ], diff --git a/pages/index.tsx b/pages/index.tsx index b399923f7..82e112bd6 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -4,6 +4,7 @@ import { ProductCard } from '@components/product' import { Grid, Marquee, Hero } from '@components/ui' // import HomeAllProductsGrid from '@components/common/HomeAllProductsGrid' import type { GetStaticPropsContext, InferGetStaticPropsType } from 'next' +import HomeAllProductsGrid from '@components/common/HomeAllProductsGrid' export async function getStaticProps({ preview, @@ -37,52 +38,16 @@ export async function getStaticProps({ export default function Home({ products, + categories, + brands, }: InferGetStaticPropsType) { return ( <> - - {products.slice(0, 3).map((product: any, i: number) => ( - - ))} - - - {products.slice(0, 3).map((product: any, i: number) => ( - - ))} - - - - {products.slice(0, 3).map((product: any, i: number) => ( - - ))} - - - {products.slice(3).map((product: any, i: number) => ( - - ))} - - {/* */} + /> ) } diff --git a/pages/orders.tsx b/pages/orders.tsx deleted file mode 100644 index b8b10814b..000000000 --- a/pages/orders.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import type { GetStaticPropsContext } from 'next' -import commerce from '@lib/api/commerce' -import { Bag } from '@components/icons' -import { Layout } from '@components/common' -import { Container, Text } from '@components/ui' - -export async function getStaticProps({ - preview, - locale, - locales, -}: GetStaticPropsContext) { - const config = { locale, locales } - const pagesPromise = commerce.getAllPages({ config, preview }) - const siteInfoPromise = commerce.getSiteInfo({ config, preview }) - const { pages } = await pagesPromise - const { categories } = await siteInfoPromise - - return { - props: { pages, categories }, - } -} - -export default function Orders() { - return ( - - My Orders -
- - - -

- No orders found -

-

- Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake. -

-
-
- ) -} - -Orders.Layout = Layout diff --git a/pages/profile.tsx b/pages/profile.tsx deleted file mode 100644 index eb54004ee..000000000 --- a/pages/profile.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import type { GetStaticPropsContext } from 'next' -import useCustomer from '@framework/customer/use-customer' -import commerce from '@lib/api/commerce' -import { Layout } from '@components/common' -import { Container, Text } from '@components/ui' - -export async function getStaticProps({ - preview, - locale, - locales, -}: GetStaticPropsContext) { - const config = { locale, locales } - const pagesPromise = commerce.getAllPages({ config, preview }) - const siteInfoPromise = commerce.getSiteInfo({ config, preview }) - const { pages } = await pagesPromise - const { categories } = await siteInfoPromise - - return { - props: { pages, categories }, - } -} - -export default function Profile() { - const { data } = useCustomer() - return ( - - My Profile - {data && ( -
-
-
- Full Name - - {data.firstName} {data.lastName} - -
-
- Email - {data.email} -
-
-
- )} -
- ) -} - -Profile.Layout = Layout diff --git a/pages/search.tsx b/pages/search.tsx deleted file mode 100644 index 23f0ee04e..000000000 --- a/pages/search.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { getSearchStaticProps } from '@lib/search-props' -import type { GetStaticPropsContext } from 'next' -import Search from '@components/search' - -export async function getStaticProps(context: GetStaticPropsContext) { - return getSearchStaticProps(context) -} - -export default Search diff --git a/pages/search/[category].tsx b/pages/search/[category].tsx deleted file mode 100644 index 02eddd035..000000000 --- a/pages/search/[category].tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { getSearchStaticProps } from '@lib/search-props' -import type { GetStaticPathsResult, GetStaticPropsContext } from 'next' -import Search from '@components/search' - -export async function getStaticProps(context: GetStaticPropsContext) { - return getSearchStaticProps(context) -} - -export function getStaticPaths(): GetStaticPathsResult { - return { - paths: [], - fallback: 'blocking', - } -} - -export default Search diff --git a/pages/search/designers/[name].tsx b/pages/search/designers/[name].tsx deleted file mode 100644 index 02eddd035..000000000 --- a/pages/search/designers/[name].tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { getSearchStaticProps } from '@lib/search-props' -import type { GetStaticPathsResult, GetStaticPropsContext } from 'next' -import Search from '@components/search' - -export async function getStaticProps(context: GetStaticPropsContext) { - return getSearchStaticProps(context) -} - -export function getStaticPaths(): GetStaticPathsResult { - return { - paths: [], - fallback: 'blocking', - } -} - -export default Search diff --git a/pages/search/designers/[name]/[category].tsx b/pages/search/designers/[name]/[category].tsx deleted file mode 100644 index 02eddd035..000000000 --- a/pages/search/designers/[name]/[category].tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { getSearchStaticProps } from '@lib/search-props' -import type { GetStaticPathsResult, GetStaticPropsContext } from 'next' -import Search from '@components/search' - -export async function getStaticProps(context: GetStaticPropsContext) { - return getSearchStaticProps(context) -} - -export function getStaticPaths(): GetStaticPathsResult { - return { - paths: [], - fallback: 'blocking', - } -} - -export default Search diff --git a/pages/wishlist.tsx b/pages/wishlist.tsx deleted file mode 100644 index fd28edff4..000000000 --- a/pages/wishlist.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import type { GetStaticPropsContext } from 'next' -import commerce from '@lib/api/commerce' -import { Heart } from '@components/icons' -import { Layout } from '@components/common' -import { Text, Container } from '@components/ui' -import { useCustomer } from '@framework/customer' -import { WishlistCard } from '@components/wishlist' -import useWishlist from '@framework/wishlist/use-wishlist' - -export async function getStaticProps({ - preview, - locale, - locales, -}: GetStaticPropsContext) { - // Disabling page if Feature is not available - if (!process.env.COMMERCE_WISHLIST_ENABLED) { - return { - notFound: true, - } - } - - const config = { locale, locales } - const pagesPromise = commerce.getAllPages({ config, preview }) - const siteInfoPromise = commerce.getSiteInfo({ config, preview }) - const { pages } = await pagesPromise - const { categories } = await siteInfoPromise - - return { - props: { - pages, - categories, - }, - } -} - -export default function Wishlist() { - const { data: customer } = useCustomer() - // @ts-ignore Shopify - Fix this types - const { data, isLoading, isEmpty } = useWishlist({ includeProducts: true }) - - return ( - -
- My Wishlist -
- {isLoading || isEmpty ? ( -
- - - -

- Your wishlist is empty -

-

- Biscuit oat cake wafer icing ice cream tiramisu pudding cupcake. -

-
- ) : ( - data && - // @ts-ignore Shopify - Fix this types - data.items?.map((item) => ( - - )) - )} -
-
-
- ) -} - -Wishlist.Layout = Layout diff --git a/tsconfig.json b/tsconfig.json index 340929669..72608f830 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,8 +23,8 @@ "@components/*": ["components/*"], "@commerce": ["framework/commerce"], "@commerce/*": ["framework/commerce/*"], - "@framework": ["framework/local"], - "@framework/*": ["framework/local/*"] + "@framework": ["framework/vendure"], + "@framework/*": ["framework/vendure/*"] } }, "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], diff --git a/yarn.lock b/yarn.lock index 35e9ca835..5e80fda3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -423,14 +423,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/runtime-corejs3@^7.10.2": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.14.8.tgz#68539e0129f13eb1ed9a9aa273d3542b93c88384" - integrity sha512-4dMD5QRBkumn45oweR0SxoNtt15oz3BUBAQ8cIx7HJqZTtE8zjpM0My8aHJHVnyf4XfRg6DNzaE1080WLBiC1w== - dependencies: - core-js-pure "^3.15.0" - regenerator-runtime "^0.13.4" - "@babel/runtime@7.12.5": version "7.12.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" @@ -452,13 +444,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" - integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" @@ -539,21 +524,6 @@ ts-node "^9" tslib "^2" -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== - dependencies: - ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" - import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - strip-json-comments "^3.1.1" - "@fullhuman/postcss-purgecss@^4.0.3": version "4.0.3" resolved "https://registry.yarnpkg.com/@fullhuman/postcss-purgecss/-/postcss-purgecss-4.0.3.tgz#55d71712ec1c7a88e0d1ba5f10ce7fb6aa05beb4" @@ -910,20 +880,6 @@ resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.0.tgz#f3933a44e365864f4dad5db94158106d511e8131" integrity sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug== -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== - dependencies: - "@humanwhocodes/object-schema" "^1.2.0" - debug "^4.1.1" - minimatch "^3.0.4" - -"@humanwhocodes/object-schema@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" - integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== - "@iarna/toml@^2.2.5": version "2.2.5" resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" @@ -946,11 +902,6 @@ resolved "https://registry.yarnpkg.com/@next/env/-/env-11.0.1.tgz#6dc96ac76f1663ab747340e907e8933f190cc8fd" integrity sha512-yZfKh2U6R9tEYyNUrs2V3SBvCMufkJ07xMH5uWy8wqcl5gAXoEw6A/1LDqwX3j7pUutF9d1ZxpdGDA3Uag+aQQ== -"@next/eslint-plugin-next@11.0.1": - version "11.0.1" - resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-11.0.1.tgz#5dd3264a40fadcf28eba00d914d69103422bb7e6" - integrity sha512-UzdX3y6XSrj9YuASUb/p4sRvfjP2klj2YgIOfMwrWoLTTPJQMh00hREB9Ftr7m7RIxjVSAaaLXIRLdxvq948GA== - "@next/polyfill-module@11.0.1": version "11.0.1" resolved "https://registry.yarnpkg.com/@next/polyfill-module/-/polyfill-module-11.0.1.tgz#ca2a110c1c44672cbcff6c2b983f0c0549d87291" @@ -1049,11 +1000,6 @@ "@react-spring/shared" "~9.2.0" "@react-spring/types" "~9.2.0" -"@rushstack/eslint-patch@^1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.0.6.tgz#023d72a5c4531b4ce204528971700a78a85a0c50" - integrity sha512-Myxw//kzromB9yWgS8qYGuGVf91oBUUJpNvy5eM50sqvmKLbKjwLxohJnkWGTeeI9v9IBMtPLxz5Gc60FIfvCA== - "@samverschueren/stream-to-observable@^0.3.0": version "0.3.1" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz#a21117b19ee9be70c379ec1877537ef2e1c63301" @@ -1206,50 +1152,6 @@ dependencies: "@types/node" "*" -"@typescript-eslint/parser@^4.20.0": - version "4.28.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.28.5.tgz#9c971668f86d1b5c552266c47788a87488a47d1c" - integrity sha512-NPCOGhTnkXGMqTznqgVbA5LqVsnw+i3+XA1UKLnAb+MG1Y1rP4ZSK9GX0kJBmAZTMIktf+dTwXToT6kFwyimbw== - dependencies: - "@typescript-eslint/scope-manager" "4.28.5" - "@typescript-eslint/types" "4.28.5" - "@typescript-eslint/typescript-estree" "4.28.5" - debug "^4.3.1" - -"@typescript-eslint/scope-manager@4.28.5": - version "4.28.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.5.tgz#3a1b70c50c1535ac33322786ea99ebe403d3b923" - integrity sha512-PHLq6n9nTMrLYcVcIZ7v0VY1X7dK309NM8ya9oL/yG8syFINIMHxyr2GzGoBYUdv3NUfCOqtuqps0ZmcgnZTfQ== - dependencies: - "@typescript-eslint/types" "4.28.5" - "@typescript-eslint/visitor-keys" "4.28.5" - -"@typescript-eslint/types@4.28.5": - version "4.28.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.5.tgz#d33edf8e429f0c0930a7c3d44e9b010354c422e9" - integrity sha512-MruOu4ZaDOLOhw4f/6iudyks/obuvvZUAHBDSW80Trnc5+ovmViLT2ZMDXhUV66ozcl6z0LJfKs1Usldgi/WCA== - -"@typescript-eslint/typescript-estree@4.28.5": - version "4.28.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.5.tgz#4906d343de693cf3d8dcc301383ed638e0441cd1" - integrity sha512-FzJUKsBX8poCCdve7iV7ShirP8V+ys2t1fvamVeD1rWpiAnIm550a+BX/fmTHrjEpQJ7ZAn+Z7ZZwJjytk9rZw== - dependencies: - "@typescript-eslint/types" "4.28.5" - "@typescript-eslint/visitor-keys" "4.28.5" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/visitor-keys@4.28.5": - version "4.28.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.5.tgz#ffee2c602762ed6893405ee7c1144d9cc0a29675" - integrity sha512-dva/7Rr+EkxNWdJWau26xU/0slnFlkh88v3TsyTgRS/IIYFi5iIfpCFM4ikw0vQTFUR9FYSSyqgK4w64gsgxhg== - dependencies: - "@typescript-eslint/types" "4.28.5" - eslint-visitor-keys "^2.0.0" - "@vercel/fetch-cached-dns@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@vercel/fetch-cached-dns/-/fetch-cached-dns-2.0.2.tgz#975c395cf53f188fa618fad57f27af6b5ffc5bab" @@ -1295,11 +1197,6 @@ abort-controller@3.0.0: dependencies: event-target-shim "^5.0.0" -acorn-jsx@^5.3.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - acorn-node@^1.6.1: version "1.8.2" resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8" @@ -1319,7 +1216,7 @@ acorn-walk@^8.0.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.0.tgz#d3c6a9faf00987a5e2b9bdb506c2aa76cd707f83" integrity sha512-mjmzmv12YIG/G8JQdQuz2MUDShEJ6teYpT5bmWA4q7iwoGen8xtt3twF3OvzIUl+Q06aWIjvnwQUKvQ6TtMRjg== -acorn@^7.0.0, acorn@^7.4.0: +acorn@^7.0.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -1351,26 +1248,6 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^8.0.1: - version "8.6.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.2.tgz#2fb45e0e5fcbc0813326c1c3da535d1881bb0571" - integrity sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - anser@1.4.9: version "1.4.9" resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.9.tgz#1f85423a5dcf8da4631a341665ff675b96845760" @@ -1450,26 +1327,11 @@ arg@^5.0.0: resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.0.tgz#a20e2bb5710e82950a516b3f933fee5ed478be90" integrity sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ== -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -aria-query@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" - integrity sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA== - dependencies: - "@babel/runtime" "^7.10.2" - "@babel/runtime-corejs3" "^7.10.2" - array-includes-with-glob@^3.0.6: version "3.1.0" resolved "https://registry.yarnpkg.com/array-includes-with-glob/-/array-includes-with-glob-3.1.0.tgz#f04e8172f231ab8261e52bfe9756b65c08b87ab9" @@ -1478,31 +1340,11 @@ array-includes-with-glob@^3.0.6: "@babel/runtime" "^7.14.0" matcher "^4.0.0" -array-includes@^3.1.1, array-includes@^3.1.2, array-includes@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" - integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - get-intrinsic "^1.1.1" - is-string "^1.0.5" - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.flat@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" - integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - array.prototype.flatmap@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz#94cfd47cc1556ec0747d97f7c7738c58122004c9" @@ -1546,11 +1388,6 @@ assert@^1.1.1: object-assign "^4.1.1" util "0.10.3" -ast-types-flow@^0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" - integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0= - ast-types@0.13.2: version "0.13.2" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.2.tgz#df39b677a911a83f3a049644fb74fdded23cea48" @@ -1615,16 +1452,6 @@ available-typed-arrays@^1.0.2: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== -axe-core@^4.0.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.3.2.tgz#fcf8777b82c62cfc69c7e9f32c0d2226287680e7" - integrity sha512-5LMaDRWm8ZFPAEdzTYmgjjEdj1YnQcpfrVajO/sn/LhbpGp0Y0H64c2hLZI1gRMxfA+w1S71Uc/nHaOXgcCvGg== - -axobject-query@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" - integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA== - babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" @@ -2230,11 +2057,6 @@ cookie@^0.4.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== -core-js-pure@^3.15.0: - version "3.15.2" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.15.2.tgz#c8e0874822705f3385d3197af9348f7c9ae2e3ce" - integrity sha512-D42L7RYh1J2grW8ttxoY1+17Y4wXZeKe7uyplAI3FkNQyI5OgBIAjUfFiTPfL1rs0qLpxaabITNbjKl1Sp82tA== - core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -2308,7 +2130,7 @@ cross-fetch@3.1.4, cross-fetch@^3.0.4, cross-fetch@^3.0.6: dependencies: node-fetch "2.6.1" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -2400,11 +2222,6 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.8.tgz#d2266a792729fb227cd216fb572f43728e1ad340" integrity sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw== -damerau-levenshtein@^1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz#64368003512a1a6992593741a09a9d31a836f55d" - integrity sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw== - data-uri-to-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" @@ -2425,7 +2242,7 @@ debounce@^1.2.0: resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== -debug@2, debug@^2.6.9: +debug@2: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2446,20 +2263,13 @@ debug@4, debug@^4.1.0, debug@^4.3.1: dependencies: ms "2.1.2" -debug@^3.1.0, debug@^3.2.7: +debug@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -2482,11 +2292,6 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -deep-is@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - deepmerge@4.2.2, deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" @@ -2582,20 +2387,6 @@ dlv@^1.1.3: resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - domain-browser@4.19.0: version "4.19.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.19.0.tgz#1093e17c0a17dbd521182fe90d49ac1370054af1" @@ -2669,11 +2460,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -emoji-regex@^9.0.0: - version "9.2.2" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" - integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -2693,7 +2479,7 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enquirer@^2.3.5, enquirer@^2.3.6: +enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -2707,7 +2493,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: +es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: version "1.18.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== @@ -2758,223 +2544,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-next@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-11.0.1.tgz#abdd2565a6fa5841556a89ba935f044bec173d0b" - integrity sha512-yy63K4Bmy8amE6VMb26CZK6G99cfVX3JaMTvuvmq/LL8/b8vKHcauUZREBTAQ+2DrIvlH4YrFXrkQ1vpYDL9Eg== - dependencies: - "@next/eslint-plugin-next" "11.0.1" - "@rushstack/eslint-patch" "^1.0.6" - "@typescript-eslint/parser" "^4.20.0" - eslint-import-resolver-node "^0.3.4" - eslint-import-resolver-typescript "^2.4.0" - eslint-plugin-import "^2.22.1" - eslint-plugin-jsx-a11y "^6.4.1" - eslint-plugin-react "^7.23.1" - eslint-plugin-react-hooks "^4.2.0" - -eslint-config-prettier@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" - integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== - -eslint-import-resolver-node@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" - integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== - dependencies: - debug "^2.6.9" - resolve "^1.13.1" - -eslint-import-resolver-typescript@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.4.0.tgz#ec1e7063ebe807f0362a7320543aaed6fe1100e1" - integrity sha512-useJKURidCcldRLCNKWemr1fFQL1SzB3G4a0li6lFGvlc5xGe1hY343bvG07cbpCzPuM/lK19FIJB3XGFSkplA== - dependencies: - debug "^4.1.1" - glob "^7.1.6" - is-glob "^4.0.1" - resolve "^1.17.0" - tsconfig-paths "^3.9.0" - -eslint-module-utils@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" - integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== - dependencies: - debug "^3.2.7" - pkg-dir "^2.0.0" - -eslint-plugin-import@^2.22.1: - version "2.23.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" - integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== - dependencies: - array-includes "^3.1.3" - array.prototype.flat "^1.2.4" - debug "^2.6.9" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.1" - find-up "^2.0.0" - has "^1.0.3" - is-core-module "^2.4.0" - minimatch "^3.0.4" - object.values "^1.1.3" - pkg-up "^2.0.0" - read-pkg-up "^3.0.0" - resolve "^1.20.0" - tsconfig-paths "^3.9.0" - -eslint-plugin-jsx-a11y@^6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz#a2d84caa49756942f42f1ffab9002436391718fd" - integrity sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg== - dependencies: - "@babel/runtime" "^7.11.2" - aria-query "^4.2.2" - array-includes "^3.1.1" - ast-types-flow "^0.0.7" - axe-core "^4.0.2" - axobject-query "^2.2.0" - damerau-levenshtein "^1.0.6" - emoji-regex "^9.0.0" - has "^1.0.3" - jsx-ast-utils "^3.1.0" - language-tags "^1.0.5" - -eslint-plugin-react-hooks@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556" - integrity sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ== - -eslint-plugin-react@^7.23.1: - version "7.24.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.24.0.tgz#eadedfa351a6f36b490aa17f4fa9b14e842b9eb4" - integrity sha512-KJJIx2SYx7PBx3ONe/mEeMz4YE0Lcr7feJTCMyyKb/341NcjuAgim3Acgan89GfPv7nxXK2+0slu0CWXYM4x+Q== - dependencies: - array-includes "^3.1.3" - array.prototype.flatmap "^1.2.4" - doctrine "^2.1.0" - has "^1.0.3" - jsx-ast-utils "^2.4.1 || ^3.0.0" - minimatch "^3.0.4" - object.entries "^1.1.4" - object.fromentries "^2.0.4" - object.values "^1.1.4" - prop-types "^15.7.2" - resolve "^2.0.0-next.3" - string.prototype.matchall "^4.0.5" - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint@^7.31.0: - version "7.31.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.31.0.tgz#f972b539424bf2604907a970860732c5d99d3aca" - integrity sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.0.1" - doctrine "^3.0.0" - enquirer "^2.3.5" - escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^3.13.1" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.0.4" - natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.9" - text-table "^0.2.0" - v8-compile-cache "^2.0.3" - -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== - dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -3037,11 +2606,6 @@ extract-files@9.0.0, extract-files@^9.0.0: resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - fast-glob@^3.1.1, fast-glob@^3.2.5: version "3.2.5" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" @@ -3054,16 +2618,6 @@ fast-glob@^3.1.1, fast-glob@^3.2.5: micromatch "^4.0.2" picomatch "^2.2.1" -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - fastq@^1.6.0: version "1.11.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" @@ -3118,13 +2672,6 @@ figures@^3.0.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -3141,13 +2688,6 @@ find-cache-dir@3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-up@^2.0.0, find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -3156,19 +2696,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flatted@^3.1.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" - integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== - flatten@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" @@ -3226,11 +2753,6 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -3241,7 +2763,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== @@ -3281,7 +2803,7 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: +glob-parent@^5.1.0, glob-parent@~5.1.0, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -3317,13 +2839,6 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.6.0, globals@^13.9.0: - version "13.10.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.10.0.tgz#60ba56c3ac2ca845cfbf4faeca727ad9dd204676" - integrity sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g== - dependencies: - type-fest "^0.20.2" - globby@11.0.3: version "11.0.3" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" @@ -3336,18 +2851,6 @@ globby@11.0.3: merge2 "^1.3.0" slash "^3.0.0" -globby@^11.0.3: - version "11.0.4" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" - integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -3493,11 +2996,6 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - html-tags@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.1.0.tgz#7b5e6f7e665e9fb41f30007ed9e0d41e97fb2140" @@ -3577,11 +3075,6 @@ ieee754@^1.1.13, ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - ignore@^5.1.4: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" @@ -3611,7 +3104,7 @@ import-cwd@^3.0.0: dependencies: import-from "^3.0.0" -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -3626,11 +3119,6 @@ import-from@3.0.0, import-from@^3.0.0: dependencies: resolve-from "^5.0.0" -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - indent-string@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" @@ -3693,15 +3181,6 @@ inquirer@^7.3.3: strip-ansi "^6.0.0" through "^2.3.6" -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - is-absolute@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" @@ -3758,13 +3237,6 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" -is-core-module@^2.4.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491" - integrity sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg== - dependencies: - has "^1.0.3" - is-date-object@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" @@ -3797,7 +3269,7 @@ is-generator-function@^1.0.7: resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c" integrity sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A== -is-glob@4.0.1, is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@4.0.1, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -3980,14 +3452,6 @@ js-cookie@^2.2.1: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - js-yaml@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -4005,31 +3469,11 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-parse-better-errors@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" @@ -4052,7 +3496,7 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.2, json5@^2.2.0: +json5@^2.1.2: version "2.2.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== @@ -4089,14 +3533,6 @@ jsonwebtoken@^8.5.1: ms "^2.1.1" semver "^5.6.0" -"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz#41108d2cec408c3453c1bbe8a4aae9e1e2bd8f82" - integrity sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q== - dependencies: - array-includes "^3.1.2" - object.assign "^4.1.2" - jwa@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" @@ -4126,18 +3562,6 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -language-subtag-registry@~0.3.2: - version "0.3.21" - resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz#04ac218bea46f04cb039084602c6da9e788dd45a" - integrity sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg== - -language-tags@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a" - integrity sha1-0yHbxNowuovzAk4ED6XBRmH5GTo= - dependencies: - language-subtag-registry "~0.3.2" - latest-version@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" @@ -4145,14 +3569,6 @@ latest-version@5.1.0: dependencies: package-json "^6.3.0" -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - lilconfig@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.3.tgz#68f3005e921dafbd2a2afb48379986aa6d2579fd" @@ -4241,16 +3657,6 @@ listr@^0.14.3: p-map "^2.0.0" rxjs "^6.3.3" -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - loader-utils@1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" @@ -4260,14 +3666,6 @@ loader-utils@1.2.3: emojis-list "^2.0.0" json5 "^1.0.1" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -4330,11 +3728,6 @@ lodash.isstring@^4.0.1: resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" @@ -4370,11 +3763,6 @@ lodash.topath@^4.5.2: resolved "https://registry.yarnpkg.com/lodash.topath/-/lodash.topath-4.5.2.tgz#3616351f3bba61994a0931989660bd03254fd009" integrity sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak= -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= - lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -4457,13 +3845,6 @@ lru-cache@5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - make-dir@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -4624,11 +4005,6 @@ native-url@0.3.4: dependencies: querystring "^0.2.0" -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - next-seo@^4.26.0: version "4.26.0" resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-4.26.0.tgz#4218cfae5651fdc2e330dcdf1cc1b34ce199d41c" @@ -4761,16 +4137,6 @@ node-releases@^1.1.71: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg== -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -4830,11 +4196,6 @@ object-inspect@^1.10.3: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== -object-inspect@^1.9.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== - object-is@^1.0.1: version "1.1.5" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" @@ -4880,34 +4241,6 @@ object.assign@^4.1.0, object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.entries@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.4.tgz#43ccf9a50bc5fd5b649d45ab1a579f24e088cafd" - integrity sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.2" - -object.fromentries@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.4.tgz#26e1ba5c4571c5c6f0890cef4473066456a120b8" - integrity sha512-EsFBshs5RUUpQEY1D4q/m59kMfz4YJvxuNCJcv/jWwOJr34EaVnG11ZrZa0UHB3wnzV1wx8m58T4hQL8IuNXlQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - has "^1.0.3" - -object.values@^1.1.3, object.values@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" - integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.2" - once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -4934,18 +4267,6 @@ opener@^1.5.2: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - os-browserify@0.3.0, os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" @@ -4968,13 +4289,6 @@ p-limit@3.1.0: dependencies: yocto-queue "^0.1.0" -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -4982,13 +4296,6 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -5008,11 +4315,6 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -5068,14 +4370,6 @@ parse-filepath@^1.0.2: map-cache "^0.2.0" path-root "^0.1.1" -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - parse-json@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -5112,11 +4406,6 @@ path-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -5149,13 +4438,6 @@ path-root@^0.1.1: dependencies: path-root-regex "^0.1.0" -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -5177,18 +4459,6 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - pkg-dir@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -5196,13 +4466,6 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" -pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" - integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= - dependencies: - find-up "^2.1.0" - platform@1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" @@ -5585,11 +4848,6 @@ postcss@^8.1.6, postcss@^8.2.1, postcss@^8.3.5: nanoid "^3.1.23" source-map-js "^0.6.2" -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" @@ -5615,11 +4873,6 @@ process@0.11.10, process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" @@ -5627,7 +4880,7 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@15.7.2, prop-types@^15.7.2: +prop-types@15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -5802,23 +5055,6 @@ react@^17.0.2: loose-envify "^1.1.0" object-assign "^4.1.1" -read-pkg-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" - integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= - dependencies: - find-up "^2.0.0" - read-pkg "^3.0.0" - -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - readable-stream@^2.0.2, readable-stream@^2.3.3, readable-stream@^2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" @@ -5868,19 +5104,6 @@ regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== -regexp.prototype.flags@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" - integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -regexpp@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - registry-auth-token@^4.0.0: version "4.2.1" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250" @@ -5950,11 +5173,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -5970,7 +5188,7 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.20.0: +resolve@^1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -5978,14 +5196,6 @@ resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.20.0: is-core-module "^2.2.0" path-parse "^1.0.6" -resolve@^2.0.0-next.3: - version "2.0.0-next.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46" - integrity sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -6019,7 +5229,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -6086,7 +5296,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -"semver@2 || 3 || 4 || 5", semver@^5.6.0: +semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -6096,13 +5306,6 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.2.1, semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - sentence-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-3.0.4.tgz#3645a7b8c117c787fde8702056225bb62a45131f" @@ -6152,15 +5355,6 @@ shell-quote@1.7.2: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -6258,32 +5452,6 @@ source-map@^0.6.0, source-map@^0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz#8a595135def9592bda69709474f1cbeea7c2467f" - integrity sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ== - sponge-case@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/sponge-case/-/sponge-case-1.0.1.tgz#260833b86453883d974f84854cdb63aecc5aef4c" @@ -6291,11 +5459,6 @@ sponge-case@^1.0.1: dependencies: tslib "^2.0.3" -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - stacktrace-parser@0.1.10: version "0.1.10" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" @@ -6393,20 +5556,6 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string.prototype.matchall@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz#59370644e1db7e4c0c045277690cf7b01203c4da" - integrity sha512-Z5ZaXO0svs0M2xd/6By3qpeKpLKd9mO4v4q3oMEQrk8Ck4xOD5d5XeBOOjGrmVZZ/AHB1S0CgG4N5r1G9N3E2Q== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.2" - get-intrinsic "^1.1.1" - has-symbols "^1.0.2" - internal-slot "^1.0.3" - regexp.prototype.flags "^1.3.1" - side-channel "^1.0.4" - string.prototype.trimend@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" @@ -6467,21 +5616,11 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -6600,18 +5739,6 @@ tabbable@^5.2.0: resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-5.2.0.tgz#4fba60991d8bb89d06e5d9455c92b453acf88fb2" integrity sha512-0uyt8wbP0P3T4rrsfYg/5Rg3cIJ8Shl1RJ54QMqYxm1TLdWqJD1u6+RQjr2Lor3wmfT7JRHkirIwy99ydBsyPg== -table@^6.0.9: - version "6.7.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" - integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== - dependencies: - ajv "^8.0.1" - lodash.clonedeep "^4.5.0" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.0" - strip-ansi "^6.0.0" - tailwindcss@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.2.tgz#28a99c87b5a6b2bf6298a77d88dc0590e84fa8ee" @@ -6649,11 +5776,6 @@ tailwindcss@^2.2.2: resolve "^1.20.0" tmp "^0.2.1" -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -6748,16 +5870,7 @@ ts-pnp@^1.1.6: resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== -tsconfig-paths@^3.9.0: - version "3.10.1" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz#79ae67a68c15289fdf5c51cb74f397522d795ed7" - integrity sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q== - dependencies: - json5 "^2.2.0" - minimist "^1.2.0" - strip-bom "^3.0.0" - -tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -6782,13 +5895,6 @@ tslib@~2.2.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -6799,18 +5905,6 @@ tty-browserify@0.0.1: resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -6882,13 +5976,6 @@ upper-case@^2.0.2: dependencies: tslib "^2.0.3" -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" @@ -6968,31 +6055,18 @@ uuid@8.3.2: integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== uuidv4@^6.2.10: - version "6.2.11" - resolved "https://registry.yarnpkg.com/uuidv4/-/uuidv4-6.2.11.tgz#34d5a03324eb38296b87ae523a64233b5286cc27" - integrity sha512-OTS4waH9KplrXNADKo+Q1kT9AHWr8DaC0S5F54RQzEwcUaEzBEWQQlJyDUw/u1bkRhJyqkqhLD4M4lbFbV+89g== + version "6.2.12" + resolved "https://registry.yarnpkg.com/uuidv4/-/uuidv4-6.2.12.tgz#e8c1d1d733c3fa4963d4610b8a3a09b4ec58ca96" + integrity sha512-UnN4ThIYWhv3ZUE8UwDnnCvh4JafCNu+sQkxmLyjCVwK3rjLfkg3DYiEv6oCMDIAIVEDP4INg4kX/C5hKaRzZA== dependencies: "@types/uuid" "8.3.1" uuid "8.3.2" -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - valid-url@1.0.9, valid-url@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" integrity sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA= -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - value-or-promise@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/value-or-promise/-/value-or-promise-1.0.6.tgz#218aa4794aa2ee24dcf48a29aba4413ed584747f" @@ -7081,11 +6155,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - wrap-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" @@ -7147,11 +6216,6 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yaml-ast-parser@^0.0.43: version "0.0.43" resolved "https://registry.yarnpkg.com/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz#e8a23e6fb4c38076ab92995c5dca33f3d3d7c9bb"