From f47481a74e27242f1a79942cd0fc3a2a1ebca661 Mon Sep 17 00:00:00 2001 From: Adrian Pilarczyk Date: Tue, 22 Aug 2023 13:55:26 +0200 Subject: [PATCH] feat: :sparkles: update schema version to 3.14 breaking --- apps/taxes/graphql/schema.graphql | 8142 +++++++++++++++++++++-------- apps/taxes/package.json | 2 +- 2 files changed, 5928 insertions(+), 2216 deletions(-) diff --git a/apps/taxes/graphql/schema.graphql b/apps/taxes/graphql/schema.graphql index bd0b177..9a3320b 100644 --- a/apps/taxes/graphql/schema.graphql +++ b/apps/taxes/graphql/schema.graphql @@ -4,6 +4,12 @@ schema { subscription: Subscription } +"""Groups fields and operations into named groups.""" +directive @doc( + """Name of the grouping category""" + category: String! +) on ENUM | FIELD | FIELD_DEFINITION | INPUT_OBJECT | OBJECT + type Query { """ Look up a webhook by ID. Requires one of the following permissions: MANAGE_APPS, OWNER. @@ -11,14 +17,14 @@ type Query { webhook( """ID of the webhook.""" id: ID! - ): Webhook + ): Webhook @doc(category: "Webhooks") """ List of all available webhook events. Requires one of the following permissions: MANAGE_APPS. """ - webhookEvents: [WebhookEvent!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `WebhookEventTypeAsyncEnum` and `WebhookEventTypeSyncEnum` to get available event types.") + webhookEvents: [WebhookEvent!] @doc(category: "Webhooks") @deprecated(reason: "This field will be removed in Saleor 4.0. Use `WebhookEventTypeAsyncEnum` and `WebhookEventTypeSyncEnum` to get available event types.") """ 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. @@ -26,7 +32,7 @@ type Query { webhookSamplePayload( """Name of the requested event type.""" eventType: WebhookSampleEventTypeEnum! - ): JSONString + ): JSONString @doc(category: "Webhooks") """ Look up a warehouse by ID. @@ -43,7 +49,7 @@ type Query { Added in Saleor 3.10. """ externalReference: String - ): Warehouse + ): Warehouse @doc(category: "Products") """ List of warehouses. @@ -60,12 +66,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): WarehouseCountableConnection + ): WarehouseCountableConnection @doc(category: "Products") """ Returns a list of all translatable items of a given kind. @@ -82,10 +92,14 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): TranslatableItemConnection @@ -107,22 +121,18 @@ type Query { Added in Saleor 3.9. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxConfiguration( """ID of a tax configuration.""" id: ID! - ): TaxConfiguration + ): TaxConfiguration @doc(category: "Taxes") """ List of tax configurations. Added in Saleor 3.9. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxConfigurations( @@ -135,34 +145,34 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): TaxConfigurationCountableConnection + ): TaxConfigurationCountableConnection @doc(category: "Taxes") """ Look up a tax class. Added in Saleor 3.9. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass( """ID of a tax class.""" id: ID! - ): TaxClass + ): TaxClass @doc(category: "Taxes") """ List of tax classes. Added in Saleor 3.9. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClasses( @@ -178,12 +188,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): TaxClassCountableConnection + ): TaxClassCountableConnection @doc(category: "Taxes") """ Tax class rates grouped by country. @@ -193,10 +207,10 @@ type Query { taxCountryConfiguration( """Country for which to return tax class rates.""" countryCode: CountryCode! - ): TaxCountryConfiguration + ): TaxCountryConfiguration @doc(category: "Taxes") "\\n\\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP." - taxCountryConfigurations: [TaxCountryConfiguration!] + taxCountryConfigurations: [TaxCountryConfiguration!] @doc(category: "Taxes") """ Look up a stock by ID @@ -206,7 +220,7 @@ type Query { stock( """ID of an warehouse""" id: ID! - ): Stock + ): Stock @doc(category: "Products") """ List of stocks. @@ -222,29 +236,33 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): StockCountableConnection + ): StockCountableConnection @doc(category: "Products") """Return information about the shop.""" shop: Shop! """ - Order related settings from site settings. + Order related settings from site settings. Returns `orderSettings` for the first `channel` in alphabetical order. Requires one of the following permissions: MANAGE_ORDERS. """ - orderSettings: OrderSettings + orderSettings: OrderSettings @doc(category: "Orders") @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `channel` query to fetch the `orderSettings` field instead.") """ Gift card related settings from site settings. Requires one of the following permissions: MANAGE_GIFT_CARD. """ - giftCardSettings: GiftCardSettings! + giftCardSettings: GiftCardSettings! @doc(category: "Gift cards") """ Look up a shipping zone by ID. @@ -257,7 +275,7 @@ type Query { """Slug of a channel for which the data should be returned.""" channel: String - ): ShippingZone + ): ShippingZone @doc(category: "Shipping") """ List of the shop's shipping zones. @@ -277,12 +295,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): ShippingZoneCountableConnection + ): ShippingZoneCountableConnection @doc(category: "Shipping") """ Look up digital content by ID. @@ -292,7 +314,7 @@ type Query { digitalContent( """ID of the digital content.""" id: ID! - ): DigitalContent + ): DigitalContent @doc(category: "Products") """ List of digital content. @@ -306,12 +328,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): DigitalContentCountableConnection + ): DigitalContentCountableConnection @doc(category: "Products") """List of the shop's categories.""" categories( @@ -330,12 +356,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): CategoryCountableConnection + ): CategoryCountableConnection @doc(category: "Products") """Look up a category by ID or slug.""" category( @@ -344,7 +374,7 @@ type Query { """Slug of the category""" slug: String - ): Category + ): Category @doc(category: "Products") """ Look up a collection by ID. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. @@ -358,7 +388,7 @@ type Query { """Slug of a channel for which the data should be returned.""" channel: String - ): Collection + ): Collection @doc(category: "Products") """ List of the shop's collections. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. @@ -379,12 +409,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): CollectionCountableConnection + ): CollectionCountableConnection @doc(category: "Products") """ Look up a product by ID. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. @@ -405,7 +439,7 @@ type Query { """Slug of a channel for which the data should be returned.""" channel: String - ): Product + ): Product @doc(category: "Products") """ List of the shop's products. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. @@ -414,9 +448,25 @@ type Query { """Filtering options for products.""" filter: ProductFilterInput + """ + Where filtering options. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + where: ProductWhereInput + """Sort products.""" sortBy: ProductOrder + """ + Search products. + + Added in Saleor 3.14. + """ + search: String + """Slug of a channel for which the data should be returned.""" channel: String @@ -426,18 +476,22 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): ProductCountableConnection + ): ProductCountableConnection @doc(category: "Products") """Look up a product type by ID.""" productType( """ID of the product type.""" id: ID! - ): ProductType + ): ProductType @doc(category: "Products") """List of the shop's product types.""" productTypes( @@ -453,12 +507,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): ProductTypeCountableConnection + ): ProductTypeCountableConnection @doc(category: "Products") """ Look up a product variant by ID or SKU. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. @@ -467,7 +525,7 @@ type Query { """ID of the product variant.""" id: ID - """Sku of the product variant.""" + """SKU of the product variant.""" sku: String """ @@ -479,7 +537,7 @@ type Query { """Slug of a channel for which the data should be returned.""" channel: String - ): ProductVariant + ): ProductVariant @doc(category: "Products") """ List of product variants. Requires one of the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. @@ -503,12 +561,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): ProductVariantCountableConnection + ): ProductVariantCountableConnection @doc(category: "Products") """ List of top selling products. @@ -528,12 +590,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): ProductVariantCountableConnection + ): ProductVariantCountableConnection @doc(category: "Products") """ Look up a payment by ID. @@ -543,7 +609,7 @@ type Query { payment( """ID of the payment.""" id: ID! - ): Payment + ): Payment @doc(category: "Payments") """ List of payments. @@ -560,12 +626,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): PaymentCountableConnection + ): PaymentCountableConnection @doc(category: "Payments") """ Look up a transaction by ID. @@ -579,7 +649,7 @@ type Query { transaction( """ID of a transaction.""" id: ID! - ): TransactionItem + ): TransactionItem @doc(category: "Payments") """Look up a page by ID or slug.""" page( @@ -588,7 +658,7 @@ type Query { """The slug of the page.""" slug: String - ): Page + ): Page @doc(category: "Pages") """List of the shop's pages.""" pages( @@ -604,18 +674,22 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): PageCountableConnection + ): PageCountableConnection @doc(category: "Pages") """Look up a page type by ID.""" pageType( """ID of the page type.""" id: ID! - ): PageType + ): PageType @doc(category: "Pages") """List of the page types.""" pageTypes( @@ -631,12 +705,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): PageTypeCountableConnection + ): PageTypeCountableConnection @doc(category: "Pages") """ List of activity events to display on homepage (at the moment it only contains order-events). @@ -650,12 +728,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): OrderEventCountableConnection + ): OrderEventCountableConnection @doc(category: "Orders") """Look up an order by ID or external reference.""" order( @@ -668,7 +750,7 @@ type Query { Added in Saleor 3.10. """ externalReference: String - ): Order + ): Order @doc(category: "Orders") """ List of orders. @@ -691,12 +773,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): OrderCountableConnection + ): OrderCountableConnection @doc(category: "Orders") """ List of draft orders. @@ -716,12 +802,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): OrderCountableConnection + ): OrderCountableConnection @doc(category: "Orders") """ Return the total sales amount from a specific period. @@ -734,13 +824,13 @@ type Query { """Slug of a channel for which the data should be returned.""" channel: String - ): TaxedMoney + ): TaxedMoney @doc(category: "Orders") """Look up an order by token.""" orderByToken( """The order's token.""" token: UUID! - ): Order @deprecated(reason: "This field will be removed in Saleor 4.0.") + ): Order @doc(category: "Orders") @deprecated(reason: "This field will be removed in Saleor 4.0.") """Look up a navigation menu by ID or name.""" menu( @@ -755,7 +845,7 @@ type Query { """The menu's slug.""" slug: String - ): Menu + ): Menu @doc(category: "Menu") """List of the storefront's menus.""" menus( @@ -778,12 +868,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): MenuCountableConnection + ): MenuCountableConnection @doc(category: "Menu") """Look up a menu item by ID.""" menuItem( @@ -792,7 +886,7 @@ type Query { """Slug of a channel for which the data should be returned.""" channel: String - ): MenuItem + ): MenuItem @doc(category: "Menu") """List of the storefronts's menu items.""" menuItems( @@ -811,12 +905,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): MenuItemCountableConnection + ): MenuItemCountableConnection @doc(category: "Menu") """ Look up a gift card by ID. @@ -826,7 +924,7 @@ type Query { giftCard( """ID of the gift card.""" id: ID! - ): GiftCard + ): GiftCard @doc(category: "Gift cards") """ List of gift cards. @@ -838,8 +936,6 @@ type Query { Sort gift cards. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ sortBy: GiftCardSortingInput @@ -847,8 +943,6 @@ type Query { Filtering options for gift cards. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ filter: GiftCardFilterInput @@ -858,31 +952,31 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): GiftCardCountableConnection + ): GiftCardCountableConnection @doc(category: "Gift cards") """ List of gift card currencies. Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: MANAGE_GIFT_CARD. """ - giftCardCurrencies: [String!]! + giftCardCurrencies: [String!]! @doc(category: "Gift cards") """ List of gift card tags. Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardTags( @@ -895,12 +989,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): GiftCardTagCountableConnection + ): GiftCardTagCountableConnection @doc(category: "Gift cards") """ Look up a plugin by ID. @@ -930,10 +1028,14 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): PluginCountableConnection @@ -948,7 +1050,7 @@ type Query { """Slug of a channel for which the data should be returned.""" channel: String - ): Sale + ): Sale @doc(category: "Discounts") """ List of the shop's sales. @@ -978,12 +1080,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): SaleCountableConnection + ): SaleCountableConnection @doc(category: "Discounts") """ Look up a voucher by ID. @@ -996,7 +1102,7 @@ type Query { """Slug of a channel for which the data should be returned.""" channel: String - ): Voucher + ): Voucher @doc(category: "Discounts") """ List of the shop's vouchers. @@ -1026,12 +1132,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): VoucherCountableConnection + ): VoucherCountableConnection @doc(category: "Discounts") """ Look up a export file by ID. @@ -1061,15 +1171,19 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ExportFileCountableConnection """List of all tax rates available from tax gateway.""" - taxTypes: [TaxType!] + taxTypes: [TaxType!] @doc(category: "Taxes") """Look up a checkout by token and slug of channel.""" checkout( @@ -1086,7 +1200,7 @@ type Query { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): Checkout + ): Checkout @doc(category: "Checkout") """ List of checkouts. @@ -1117,12 +1231,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): CheckoutCountableConnection + ): CheckoutCountableConnection @doc(category: "Checkout") """ List of checkout lines. @@ -1136,12 +1254,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): CheckoutLineCountableConnection + ): CheckoutLineCountableConnection @doc(category: "Checkout") """Look up a channel by ID or slug.""" channel( @@ -1152,24 +1274,38 @@ type Query { Slug of the channel. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ slug: String - ): Channel + ): Channel @doc(category: "Channels") """ List of all channels. Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ - channels: [Channel!] + channels: [Channel!] @doc(category: "Channels") """List of the shop's attributes.""" attributes( """Filtering options for attributes.""" filter: AttributeFilterInput + """ + Filtering options for attributes. + + Added in Saleor 3.11. + """ + where: AttributeWhereInput + + """ + Search attributes. + + Added in Saleor 3.11. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + search: String + """Sorting options for attributes.""" sortBy: AttributeSortingInput @@ -1182,12 +1318,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): AttributeCountableConnection + ): AttributeCountableConnection @doc(category: "Attributes") """Look up an attribute by ID, slug or external reference.""" attribute( @@ -1203,14 +1343,14 @@ type Query { Added in Saleor 3.10. """ externalReference: String - ): Attribute + ): Attribute @doc(category: "Attributes") """ List of all apps installations Requires one of the following permissions: MANAGE_APPS. """ - appsInstallations: [AppInstallation!]! + appsInstallations: [AppInstallation!]! @doc(category: "Apps") """ List of the apps. @@ -1230,12 +1370,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): AppCountableConnection + ): AppCountableConnection @doc(category: "Apps") """ Look up an app by ID. If ID is not provided, return the currently authenticated app. @@ -1245,15 +1389,13 @@ type Query { app( """ID of the app.""" id: ID - ): App + ): App @doc(category: "Apps") """ List of all extensions. Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ appExtensions( @@ -1266,26 +1408,28 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): AppExtensionCountableConnection + ): AppExtensionCountableConnection @doc(category: "Apps") """ Look up an app extension by ID. Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ appExtension( """ID of the app extension.""" id: ID! - ): AppExtension + ): AppExtension @doc(category: "Apps") """Returns address validation rules.""" addressValidationRules( @@ -1300,13 +1444,17 @@ type Query { """Sublocality like a district.""" cityArea: String - ): AddressValidationData + ): AddressValidationData @doc(category: "Users") - """Look up an address by ID.""" + """ + Look up an address by ID. + + Requires one of the following permissions: MANAGE_USERS, OWNER. + """ address( """ID of an address.""" id: ID! - ): Address + ): Address @doc(category: "Users") """ List of the shop's customers. @@ -1326,12 +1474,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): UserCountableConnection + ): UserCountableConnection @doc(category: "Users") """ List of permission groups. @@ -1351,12 +1503,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): GroupCountableConnection + ): GroupCountableConnection @doc(category: "Users") """ Look up permission group by ID. @@ -1366,10 +1522,10 @@ type Query { permissionGroup( """ID of the group.""" id: ID! - ): Group + ): Group @doc(category: "Users") """Return the currently authenticated user.""" - me: User + me: User @doc(category: "Users") """ List of the shop's staff users. @@ -1389,12 +1545,16 @@ type Query { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int - ): UserCountableConnection + ): UserCountableConnection @doc(category: "Users") """ Look up a user by ID or email address. @@ -1414,13 +1574,13 @@ type Query { Added in Saleor 3.10. """ externalReference: String - ): User + ): User @doc(category: "Users") _entities(representations: [_Any]): [_Entity] _service: _Service } """Webhook.""" -type Webhook implements Node { +type Webhook implements Node @doc(category: "Webhooks") { id: ID! name: String! @@ -1448,10 +1608,14 @@ type Webhook implements Node { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): EventDeliveryCountableConnection @@ -1466,6 +1630,15 @@ type Webhook implements Node { """Used to define payloads for specific events.""" subscriptionQuery: String + + """ + Custom headers, which will be added to HTTP request. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + customHeaders: JSONString } """An object with an ID""" @@ -1475,7 +1648,7 @@ interface Node { } """Webhook event.""" -type WebhookEvent { +type WebhookEvent @doc(category: "Webhooks") { """Display name of the event.""" name: String! @@ -1484,7 +1657,7 @@ type WebhookEvent { } """Enum determining type of webhook.""" -enum WebhookEventTypeEnum { +enum WebhookEventTypeEnum @doc(category: "Webhooks") { """All the events.""" ANY_EVENTS @@ -1557,6 +1730,15 @@ enum WebhookEventTypeEnum { """A gift card is deleted.""" GIFT_CARD_DELETED + """ + A gift card has been sent. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + GIFT_CARD_SENT + """A gift card status is changed.""" GIFT_CARD_STATUS_CHANGED @@ -1564,8 +1746,6 @@ enum WebhookEventTypeEnum { A gift card metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ GIFT_CARD_METADATA_UPDATED @@ -1595,9 +1775,36 @@ enum WebhookEventTypeEnum { """ ORDER_CONFIRMED + """ + Payment has been made. The order may be partially or fully paid. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_PAID + """Payment is made and an order is fully paid.""" ORDER_FULLY_PAID + """ + The order received a refund. The order may be partially or fully refunded. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_REFUNDED + + """ + The order is fully refunded. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_FULLY_REFUNDED + """ An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. """ @@ -1606,6 +1813,9 @@ enum WebhookEventTypeEnum { """An order is cancelled.""" ORDER_CANCELLED + """An order is expired.""" + ORDER_EXPIRED + """An order is fulfilled.""" ORDER_FULFILLED @@ -1613,10 +1823,17 @@ enum WebhookEventTypeEnum { An order metadata is updated. Added in Saleor 3.8. + """ + ORDER_METADATA_UPDATED + + """ + Orders are imported. + + Added in Saleor 3.14. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - ORDER_METADATA_UPDATED + ORDER_BULK_CREATED """A draft order is created.""" DRAFT_ORDER_CREATED @@ -1661,8 +1878,6 @@ enum WebhookEventTypeEnum { A customer account metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ CUSTOMER_METADATA_UPDATED @@ -1679,8 +1894,6 @@ enum WebhookEventTypeEnum { A collection metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ COLLECTION_METADATA_UPDATED @@ -1693,12 +1906,31 @@ enum WebhookEventTypeEnum { """A product is deleted.""" PRODUCT_DELETED + """ + A new product media is created. + + Added in Saleor 3.12. + """ + PRODUCT_MEDIA_CREATED + + """ + A product media is updated. + + Added in Saleor 3.12. + """ + PRODUCT_MEDIA_UPDATED + + """ + A product media is deleted. + + Added in Saleor 3.12. + """ + PRODUCT_MEDIA_DELETED + """ A product metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ PRODUCT_METADATA_UPDATED @@ -1717,12 +1949,13 @@ enum WebhookEventTypeEnum { """A product variant is back in stock.""" PRODUCT_VARIANT_BACK_IN_STOCK + """A product variant stock is updated""" + PRODUCT_VARIANT_STOCK_UPDATED + """ A product variant metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ PRODUCT_VARIANT_METADATA_UPDATED @@ -1733,13 +1966,12 @@ enum WebhookEventTypeEnum { A checkout is updated. It also triggers all updates related to the checkout. """ CHECKOUT_UPDATED + CHECKOUT_FULLY_PAID """ A checkout metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ CHECKOUT_METADATA_UPDATED @@ -1756,8 +1988,6 @@ enum WebhookEventTypeEnum { A fulfillment metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ FULFILLMENT_METADATA_UPDATED @@ -1813,8 +2043,6 @@ enum WebhookEventTypeEnum { A shipping zone metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ SHIPPING_ZONE_METADATA_UPDATED @@ -1827,15 +2055,17 @@ enum WebhookEventTypeEnum { """A staff user is deleted.""" STAFF_DELETED - """An action requested for transaction.""" + """ + An action requested for transaction. + + DEPRECATED: this subscription will be removed in Saleor 3.14 (Preview Feature). Use `TRANSACTION_CHARGE_REQUESTED`, `TRANSACTION_REFUND_REQUESTED`, `TRANSACTION_CANCELATION_REQUESTED` instead. + """ TRANSACTION_ACTION_REQUEST """ Transaction item metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ TRANSACTION_ITEM_METADATA_UPDATED @@ -1858,8 +2088,6 @@ enum WebhookEventTypeEnum { A warehouse metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ WAREHOUSE_METADATA_UPDATED @@ -1876,14 +2104,19 @@ enum WebhookEventTypeEnum { A voucher metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ VOUCHER_METADATA_UPDATED """An observability event is created.""" OBSERVABILITY + """ + A thumbnail is created. + + Added in Saleor 3.12. + """ + THUMBNAIL_CREATED + """Authorize payment.""" PAYMENT_AUTHORIZE @@ -1905,12 +2138,37 @@ enum WebhookEventTypeEnum { """Void payment.""" PAYMENT_VOID + """ + Event called when charge has been requested for transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + TRANSACTION_CHARGE_REQUESTED + + """ + Event called when refund has been requested for transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + TRANSACTION_REFUND_REQUESTED + + """ + Event called when cancel has been requested for transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + TRANSACTION_CANCELATION_REQUESTED + """ Event called for checkout tax calculation. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ CHECKOUT_CALCULATE_TAXES @@ -1918,8 +2176,6 @@ enum WebhookEventTypeEnum { Event called for order tax calculation. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ ORDER_CALCULATE_TAXES @@ -1931,10 +2187,13 @@ enum WebhookEventTypeEnum { """Filter shipping methods for checkout.""" CHECKOUT_FILTER_SHIPPING_METHODS + PAYMENT_GATEWAY_INITIALIZE_SESSION + TRANSACTION_INITIALIZE_SESSION + TRANSACTION_PROCESS_SESSION } """Synchronous webhook event.""" -type WebhookEventSync { +type WebhookEventSync @doc(category: "Webhooks") { """Display name of the event.""" name: String! @@ -1943,7 +2202,7 @@ type WebhookEventSync { } """Enum determining type of webhook.""" -enum WebhookEventTypeSyncEnum { +enum WebhookEventTypeSyncEnum @doc(category: "Webhooks") { """Authorize payment.""" PAYMENT_AUTHORIZE @@ -1965,12 +2224,37 @@ enum WebhookEventTypeSyncEnum { """Void payment.""" PAYMENT_VOID + """ + Event called when charge has been requested for transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + TRANSACTION_CHARGE_REQUESTED + + """ + Event called when refund has been requested for transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + TRANSACTION_REFUND_REQUESTED + + """ + Event called when cancel has been requested for transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + TRANSACTION_CANCELATION_REQUESTED + """ Event called for checkout tax calculation. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ CHECKOUT_CALCULATE_TAXES @@ -1978,8 +2262,6 @@ enum WebhookEventTypeSyncEnum { Event called for order tax calculation. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ ORDER_CALCULATE_TAXES @@ -1991,10 +2273,13 @@ enum WebhookEventTypeSyncEnum { """Filter shipping methods for checkout.""" CHECKOUT_FILTER_SHIPPING_METHODS + PAYMENT_GATEWAY_INITIALIZE_SESSION + TRANSACTION_INITIALIZE_SESSION + TRANSACTION_PROCESS_SESSION } """Asynchronous webhook event.""" -type WebhookEventAsync { +type WebhookEventAsync @doc(category: "Webhooks") { """Display name of the event.""" name: String! @@ -2003,7 +2288,7 @@ type WebhookEventAsync { } """Enum determining type of webhook.""" -enum WebhookEventTypeAsyncEnum { +enum WebhookEventTypeAsyncEnum @doc(category: "Webhooks") { """All the events.""" ANY_EVENTS @@ -2076,6 +2361,15 @@ enum WebhookEventTypeAsyncEnum { """A gift card is deleted.""" GIFT_CARD_DELETED + """ + A gift card has been sent. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + GIFT_CARD_SENT + """A gift card status is changed.""" GIFT_CARD_STATUS_CHANGED @@ -2083,8 +2377,6 @@ enum WebhookEventTypeAsyncEnum { A gift card metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ GIFT_CARD_METADATA_UPDATED @@ -2114,9 +2406,36 @@ enum WebhookEventTypeAsyncEnum { """ ORDER_CONFIRMED + """ + Payment has been made. The order may be partially or fully paid. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_PAID + """Payment is made and an order is fully paid.""" ORDER_FULLY_PAID + """ + The order received a refund. The order may be partially or fully refunded. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_REFUNDED + + """ + The order is fully refunded. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_FULLY_REFUNDED + """ An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. """ @@ -2125,6 +2444,9 @@ enum WebhookEventTypeAsyncEnum { """An order is cancelled.""" ORDER_CANCELLED + """An order is expired.""" + ORDER_EXPIRED + """An order is fulfilled.""" ORDER_FULFILLED @@ -2132,10 +2454,17 @@ enum WebhookEventTypeAsyncEnum { An order metadata is updated. Added in Saleor 3.8. + """ + ORDER_METADATA_UPDATED + + """ + Orders are imported. + + Added in Saleor 3.14. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - ORDER_METADATA_UPDATED + ORDER_BULK_CREATED """A draft order is created.""" DRAFT_ORDER_CREATED @@ -2180,8 +2509,6 @@ enum WebhookEventTypeAsyncEnum { A customer account metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ CUSTOMER_METADATA_UPDATED @@ -2198,8 +2525,6 @@ enum WebhookEventTypeAsyncEnum { A collection metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ COLLECTION_METADATA_UPDATED @@ -2212,12 +2537,31 @@ enum WebhookEventTypeAsyncEnum { """A product is deleted.""" PRODUCT_DELETED + """ + A new product media is created. + + Added in Saleor 3.12. + """ + PRODUCT_MEDIA_CREATED + + """ + A product media is updated. + + Added in Saleor 3.12. + """ + PRODUCT_MEDIA_UPDATED + + """ + A product media is deleted. + + Added in Saleor 3.12. + """ + PRODUCT_MEDIA_DELETED + """ A product metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ PRODUCT_METADATA_UPDATED @@ -2236,12 +2580,13 @@ enum WebhookEventTypeAsyncEnum { """A product variant is back in stock.""" PRODUCT_VARIANT_BACK_IN_STOCK + """A product variant stock is updated""" + PRODUCT_VARIANT_STOCK_UPDATED + """ A product variant metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ PRODUCT_VARIANT_METADATA_UPDATED @@ -2252,13 +2597,12 @@ enum WebhookEventTypeAsyncEnum { A checkout is updated. It also triggers all updates related to the checkout. """ CHECKOUT_UPDATED + CHECKOUT_FULLY_PAID """ A checkout metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ CHECKOUT_METADATA_UPDATED @@ -2275,8 +2619,6 @@ enum WebhookEventTypeAsyncEnum { A fulfillment metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ FULFILLMENT_METADATA_UPDATED @@ -2332,8 +2674,6 @@ enum WebhookEventTypeAsyncEnum { A shipping zone metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ SHIPPING_ZONE_METADATA_UPDATED @@ -2346,15 +2686,17 @@ enum WebhookEventTypeAsyncEnum { """A staff user is deleted.""" STAFF_DELETED - """An action requested for transaction.""" + """ + An action requested for transaction. + + DEPRECATED: this subscription will be removed in Saleor 3.14 (Preview Feature). Use `TRANSACTION_CHARGE_REQUESTED`, `TRANSACTION_REFUND_REQUESTED`, `TRANSACTION_CANCELATION_REQUESTED` instead. + """ TRANSACTION_ACTION_REQUEST """ Transaction item metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ TRANSACTION_ITEM_METADATA_UPDATED @@ -2377,8 +2719,6 @@ enum WebhookEventTypeAsyncEnum { A warehouse metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ WAREHOUSE_METADATA_UPDATED @@ -2395,17 +2735,22 @@ enum WebhookEventTypeAsyncEnum { A voucher metadata is updated. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ VOUCHER_METADATA_UPDATED """An observability event is created.""" OBSERVABILITY + + """ + A thumbnail is created. + + Added in Saleor 3.12. + """ + THUMBNAIL_CREATED } """Represents app data.""" -type App implements Node & ObjectWithMetadata { +type App implements Node & ObjectWithMetadata @doc(category: "Apps") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -2518,13 +2863,29 @@ type App implements Node & ObjectWithMetadata { accessToken: String """ - App's dashboard extensions. + The App's author name. - Added in Saleor 3.1. + Added in Saleor 3.13. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ + author: String + + """ + App's dashboard extensions. + + Added in Saleor 3.1. + """ extensions: [AppExtension!]! + + """ + App's brand data. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + brand: AppBrand } interface ObjectWithMetadata { @@ -2535,19 +2896,11 @@ interface ObjectWithMetadata { A single key from private metadata. Requires staff permissions to access. Tip: Use GraphQL aliases to fetch multiple keys. - - Added in Saleor 3.3. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - - Added in Saleor 3.3. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata @@ -2558,19 +2911,11 @@ interface ObjectWithMetadata { A single key from public metadata. Tip: Use GraphQL aliases to fetch multiple keys. - - Added in Saleor 3.3. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - - Added in Saleor 3.3. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata } @@ -2597,7 +2942,7 @@ Example: scalar Metadata """Represents a permission object in a friendly form.""" -type Permission { +type Permission @doc(category: "Authentication") { """Internal code for permission.""" code: PermissionEnum! @@ -2606,7 +2951,7 @@ type Permission { } """An enumeration.""" -enum PermissionEnum { +enum PermissionEnum @doc(category: "Users") { MANAGE_USERS MANAGE_STAFF IMPERSONATE_USER @@ -2621,6 +2966,7 @@ enum PermissionEnum { MANAGE_GIFT_CARD MANAGE_MENUS MANAGE_ORDERS + MANAGE_ORDERS_IMPORT MANAGE_PAGES MANAGE_PAGE_TYPES_AND_ATTRIBUTES HANDLE_PAYMENTS @@ -2640,7 +2986,7 @@ value as specified by scalar DateTime """Enum determining type of your App.""" -enum AppTypeEnum { +enum AppTypeEnum @doc(category: "Apps") { """ Local Saleor App. The app is fully manageable from dashboard. You can change assigned permissions, add webhooks, or authentication token """ @@ -2653,7 +2999,7 @@ enum AppTypeEnum { } """Represents token data.""" -type AppToken implements Node { +type AppToken implements Node @doc(category: "Apps") { id: ID! """Name of the authenticated token.""" @@ -2664,7 +3010,7 @@ type AppToken implements Node { } """Represents app data.""" -type AppExtension implements Node { +type AppExtension implements Node @doc(category: "Apps") { id: ID! """List of the app extension's permissions.""" @@ -2688,7 +3034,7 @@ type AppExtension implements Node { } """All places where app extension can be mounted.""" -enum AppExtensionMountEnum { +enum AppExtensionMountEnum @doc(category: "Apps") { CUSTOMER_OVERVIEW_CREATE CUSTOMER_OVERVIEW_MORE_ACTIONS CUSTOMER_DETAILS_MORE_ACTIONS @@ -2712,11 +3058,67 @@ All available ways of opening an app extension. POPUP - app's extension will be mounted as a popup window APP_PAGE - redirect to app's page """ -enum AppExtensionTargetEnum { +enum AppExtensionTargetEnum @doc(category: "Apps") { POPUP APP_PAGE } +""" +Represents the app's brand data. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type AppBrand @doc(category: "Apps") { + """ + App's logos details. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + logo: AppBrandLogo! +} + +""" +Represents the app's brand logo data. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type AppBrandLogo @doc(category: "Apps") { + """ + URL to the default logo image. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + default( + """ + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). + """ + size: Int + + """ + The format of the image. When not provided, format of the original image will be used. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + format: IconThumbnailFormatEnum = ORIGINAL + ): String! +} + +"""Thumbnail formats for icon images.""" +enum IconThumbnailFormatEnum { + ORIGINAL + WEBP +} + type EventDeliveryCountableConnection { """Pagination data for this connection.""" pageInfo: PageInfo! @@ -2773,10 +3175,14 @@ type EventDelivery implements Node { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): EventDeliveryAttemptCountableConnection @@ -2784,7 +3190,7 @@ type EventDelivery implements Node { payload: String } -enum EventDeliveryStatusEnum { +enum EventDeliveryStatusEnum @doc(category: "Webhooks") { PENDING SUCCESS FAILED @@ -2808,7 +3214,7 @@ type EventDeliveryAttemptCountableEdge { } """Event delivery attempts.""" -type EventDeliveryAttempt implements Node { +type EventDeliveryAttempt implements Node @doc(category: "Webhooks") { id: ID! """Event delivery creation date and time.""" @@ -2836,8 +3242,8 @@ type EventDeliveryAttempt implements Node { status: EventDeliveryStatusEnum! } -input EventDeliveryAttemptSortingInput { - """Specifies the direction in which to sort products.""" +input EventDeliveryAttemptSortingInput @doc(category: "Webhooks") { + """Specifies the direction in which to sort attempts.""" direction: OrderDirection! """Sort attempts by the selected field.""" @@ -2852,20 +3258,20 @@ enum OrderDirection { DESC } -enum EventDeliveryAttemptSortField { +enum EventDeliveryAttemptSortField @doc(category: "Webhooks") { """Sort event delivery attempts by created at.""" CREATED_AT } -input EventDeliverySortingInput { - """Specifies the direction in which to sort products.""" +input EventDeliverySortingInput @doc(category: "Webhooks") { + """Specifies the direction in which to sort deliveries.""" direction: OrderDirection! """Sort deliveries by the selected field.""" field: EventDeliverySortField! } -enum EventDeliverySortField { +enum EventDeliverySortField @doc(category: "Webhooks") { """Sort event deliveries by created at.""" CREATED_AT } @@ -2878,7 +3284,7 @@ input EventDeliveryFilterInput { scalar JSONString """An enumeration.""" -enum WebhookSampleEventTypeEnum { +enum WebhookSampleEventTypeEnum @doc(category: "Webhooks") { ADDRESS_CREATED ADDRESS_UPDATED ADDRESS_DELETED @@ -2902,6 +3308,7 @@ enum WebhookSampleEventTypeEnum { GIFT_CARD_CREATED GIFT_CARD_UPDATED GIFT_CARD_DELETED + GIFT_CARD_SENT GIFT_CARD_STATUS_CHANGED GIFT_CARD_METADATA_UPDATED MENU_CREATED @@ -2912,11 +3319,16 @@ enum WebhookSampleEventTypeEnum { MENU_ITEM_DELETED ORDER_CREATED ORDER_CONFIRMED + ORDER_PAID ORDER_FULLY_PAID + ORDER_REFUNDED + ORDER_FULLY_REFUNDED ORDER_UPDATED ORDER_CANCELLED + ORDER_EXPIRED ORDER_FULFILLED ORDER_METADATA_UPDATED + ORDER_BULK_CREATED DRAFT_ORDER_CREATED DRAFT_ORDER_UPDATED DRAFT_ORDER_DELETED @@ -2938,15 +3350,20 @@ enum WebhookSampleEventTypeEnum { PRODUCT_CREATED PRODUCT_UPDATED PRODUCT_DELETED + PRODUCT_MEDIA_CREATED + PRODUCT_MEDIA_UPDATED + PRODUCT_MEDIA_DELETED PRODUCT_METADATA_UPDATED PRODUCT_VARIANT_CREATED PRODUCT_VARIANT_UPDATED PRODUCT_VARIANT_DELETED PRODUCT_VARIANT_OUT_OF_STOCK PRODUCT_VARIANT_BACK_IN_STOCK + PRODUCT_VARIANT_STOCK_UPDATED PRODUCT_VARIANT_METADATA_UPDATED CHECKOUT_CREATED CHECKOUT_UPDATED + CHECKOUT_FULLY_PAID CHECKOUT_METADATA_UPDATED FULFILLMENT_CREATED FULFILLMENT_CANCELED @@ -2985,10 +3402,11 @@ enum WebhookSampleEventTypeEnum { VOUCHER_DELETED VOUCHER_METADATA_UPDATED OBSERVABILITY + THUMBNAIL_CREATED } """Represents warehouse.""" -type Warehouse implements Node & ObjectWithMetadata { +type Warehouse implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -3049,8 +3467,6 @@ type Warehouse implements Node & ObjectWithMetadata { Click and collect options: local, all or disabled. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ clickAndCollectOption: WarehouseClickAndCollectOptionEnum! shippingZones( @@ -3060,10 +3476,14 @@ type Warehouse implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ShippingZoneCountableConnection! @@ -3076,7 +3496,7 @@ type Warehouse implements Node & ObjectWithMetadata { } """Represents user address data.""" -type Address implements Node & ObjectWithMetadata { +type Address implements Node & ObjectWithMetadata @doc(category: "Users") { id: ID! """ @@ -3169,7 +3589,7 @@ type CountryDisplay { } """Represents a VAT rate for a country.""" -type VAT { +type VAT @doc(category: "Taxes") { """Country code.""" countryCode: String! @@ -3181,7 +3601,7 @@ type VAT { } """Represents a reduced VAT rate for a particular type of goods.""" -type ReducedRate { +type ReducedRate @doc(category: "Taxes") { """Reduced VAT rate in percent.""" rate: Float! @@ -3190,13 +3610,13 @@ type ReducedRate { } """An enumeration.""" -enum WarehouseClickAndCollectOptionEnum { +enum WarehouseClickAndCollectOptionEnum @doc(category: "Products") { DISABLED LOCAL ALL } -type ShippingZoneCountableConnection { +type ShippingZoneCountableConnection @doc(category: "Shipping") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ShippingZoneCountableEdge!]! @@ -3205,7 +3625,7 @@ type ShippingZoneCountableConnection { totalCount: Int } -type ShippingZoneCountableEdge { +type ShippingZoneCountableEdge @doc(category: "Shipping") { """The item at the end of the edge.""" node: ShippingZone! @@ -3216,7 +3636,7 @@ type ShippingZoneCountableEdge { """ 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 { +type ShippingZone implements Node & ObjectWithMetadata @doc(category: "Shipping") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -3309,7 +3729,7 @@ type Money { """ Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. """ -type ShippingMethodType implements Node & ObjectWithMetadata { +type ShippingMethodType implements Node & ObjectWithMetadata @doc(category: "Shipping") { """Shipping method ID.""" id: ID! @@ -3408,10 +3828,14 @@ type ShippingMethodType implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductCountableConnection @@ -3430,18 +3854,18 @@ type ShippingMethodType implements Node & ObjectWithMetadata { """ Tax class assigned to this shipping method. - Requires one of the following permissions: MANAGE_TAXES, MANAGE_SHIPPING. + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass: TaxClass } """An enumeration.""" -enum ShippingMethodTypeEnum { +enum ShippingMethodTypeEnum @doc(category: "Shipping") { PRICE WEIGHT } -type ShippingMethodTranslation implements Node { +type ShippingMethodTranslation implements Node @doc(category: "Shipping") { id: ID! """Translation language.""" @@ -4248,7 +4672,7 @@ enum LanguageCodeEnum { } """Represents shipping method channel listing.""" -type ShippingMethodChannelListing implements Node { +type ShippingMethodChannelListing implements Node @doc(category: "Shipping") { id: ID! channel: Channel! maximumOrderPrice: Money @@ -4257,7 +4681,7 @@ type ShippingMethodChannelListing implements Node { } """Represents channel.""" -type Channel implements Node { +type Channel implements Node @doc(category: "Channels") { id: ID! """Slug of the channel.""" @@ -4305,8 +4729,6 @@ type Channel implements Node { Added in Saleor 3.5. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ warehouses: [Warehouse!]! @@ -4315,8 +4737,6 @@ type Channel implements Node { List of shippable countries for the channel. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ countries: [CountryDisplay!] @@ -4324,8 +4744,6 @@ type Channel implements Node { Shipping methods that are available for the channel. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ availableShippingMethodsPerCountry(countries: [CountryCode!]): [ShippingMethodsPerCountry!] @@ -4334,21 +4752,26 @@ type Channel implements Node { Added in Saleor 3.7. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ stockSettings: StockSettings! + + """ + Channel-specific order settings. + + Added in Saleor 3.12. + + Requires one of the following permissions: MANAGE_CHANNELS, MANAGE_ORDERS. + """ + orderSettings: OrderSettings! } """ List of shipping methods available for the country. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingMethodsPerCountry { +type ShippingMethodsPerCountry @doc(category: "Shipping") { """The country code.""" countryCode: CountryCode! @@ -4613,7 +5036,7 @@ enum CountryCode { """ Shipping methods that can be used as means of shipping for orders and checkouts. """ -type ShippingMethod implements Node & ObjectWithMetadata { +type ShippingMethod implements Node & ObjectWithMetadata @doc(category: "Shipping") { """Unique ID of ShippingMethod available for Order.""" id: ID! @@ -4624,19 +5047,11 @@ type ShippingMethod implements Node & ObjectWithMetadata { A single key from private metadata. Requires staff permissions to access. Tip: Use GraphQL aliases to fetch multiple keys. - - Added in Saleor 3.3. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - - Added in Saleor 3.3. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata @@ -4647,19 +5062,11 @@ type ShippingMethod implements Node & ObjectWithMetadata { A single key from public metadata. Tip: Use GraphQL aliases to fetch multiple keys. - - Added in Saleor 3.3. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - - Added in Saleor 3.3. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -4732,10 +5139,8 @@ enum WeightUnitsEnum { Represents the channel stock settings. Added in Saleor 3.7. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type StockSettings { +type StockSettings @doc(category: "Products") { """ Allocation strategy defines the preference of warehouses for allocations and reservations. """ @@ -4750,13 +5155,97 @@ Determine the allocation strategy for the channel. PRIORITIZE_HIGH_STOCK - allocate stock in a warehouse with the most stock """ -enum AllocationStrategyEnum { +enum AllocationStrategyEnum @doc(category: "Products") { PRIORITIZE_SORTING_ORDER PRIORITIZE_HIGH_STOCK } +"""Represents the channel-specific order settings.""" +type OrderSettings { + """ + When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. + """ + automaticallyConfirmAllNewOrders: Boolean! + + """ + When enabled, all non-shippable gift card orders will be fulfilled automatically. + """ + automaticallyFulfillNonShippableGiftCard: Boolean! + + """ + Expiration time in minutes. Default null - means do not expire any orders. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + expireOrdersAfter: Minute + + """ + Determine what strategy will be used to mark the order as paid. Based on the chosen option, the proper object will be created and attached to the order when it's manually marked as paid. + `PAYMENT_FLOW` - [default option] creates the `Payment` object. + `TRANSACTION_FLOW` - creates the `TransactionItem` object. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + markAsPaidStrategy: MarkAsPaidStrategyEnum! + + """ + Determine the transaction flow strategy to be used. Include the selected option in the payload sent to the payment app, as a requested action for the transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + defaultTransactionFlowStrategy: TransactionFlowStrategyEnum! + + """ + The time in days after expired orders will be deleted. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + deleteExpiredOrdersAfter: Day! +} + +""" +The `Minute` scalar type represents number of minutes by integer value. +""" +scalar Minute + +""" +Determine the mark as paid strategy for the channel. + + TRANSACTION_FLOW - new orders marked as paid will receive a + `TransactionItem` object, that will cover the `order.total`. + + PAYMENT_FLOW - new orders marked as paid will receive a + `Payment` object, that will cover the `order.total`. +""" +enum MarkAsPaidStrategyEnum @doc(category: "Channels") { + TRANSACTION_FLOW + PAYMENT_FLOW +} + +""" +Determine the transaction flow strategy. + + AUTHORIZATION - the processed transaction should be only authorized + CHARGE - the processed transaction should be charged. +""" +enum TransactionFlowStrategyEnum @doc(category: "Payments") { + AUTHORIZATION + CHARGE +} + +"""The `Day` scalar type represents number of days by integer value.""" +scalar Day + """Represents shipping method postal code rule.""" -type ShippingMethodPostalCodeRule implements Node { +type ShippingMethodPostalCodeRule implements Node @doc(category: "Shipping") { """The ID of the object.""" id: ID! @@ -4771,12 +5260,12 @@ type ShippingMethodPostalCodeRule implements Node { } """An enumeration.""" -enum PostalCodeRuleInclusionTypeEnum { +enum PostalCodeRuleInclusionTypeEnum @doc(category: "Shipping") { INCLUDE EXCLUDE } -type ProductCountableConnection { +type ProductCountableConnection @doc(category: "Products") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ProductCountableEdge!]! @@ -4785,7 +5274,7 @@ type ProductCountableConnection { totalCount: Int } -type ProductCountableEdge { +type ProductCountableEdge @doc(category: "Products") { """The item at the end of the edge.""" node: Product! @@ -4794,7 +5283,7 @@ type ProductCountableEdge { } """Represents an individual item for sale in the storefront.""" -type Product implements Node & ObjectWithMetadata { +type Product implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -4875,18 +5364,16 @@ type Product implements Node & ObjectWithMetadata { descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") thumbnail( """ - Size of the image. If not provided, the original image will be returned. + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). """ size: Int """ - The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned. + The format of the image. When not provided, format of the original image will be used. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - format: ThumbnailFormatEnum + format: ThumbnailFormatEnum = ORIGINAL ): Image """ @@ -4953,7 +5440,7 @@ type Product implements Node & ObjectWithMetadata { """SKU of the variant.""" sku: String - ): ProductVariant + ): ProductVariant @deprecated(reason: "This field will be removed in Saleor 4.0. Use top-level `variant` query.") """ List of variants for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. @@ -4996,7 +5483,7 @@ type Product implements Node & ObjectWithMetadata { """ Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type. - Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass: TaxClass @@ -5011,7 +5498,7 @@ type Product implements Node & ObjectWithMetadata { """ Represents a type of product. It defines what attributes are available to products of this type. """ -type ProductType implements Node & ObjectWithMetadata { +type ProductType implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -5080,10 +5567,14 @@ type ProductType implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter.") @@ -5093,7 +5584,7 @@ type ProductType implements Node & ObjectWithMetadata { """ Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type. - Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass: TaxClass @@ -5123,6 +5614,7 @@ type ProductType implements Node & ObjectWithMetadata { """ availableAttributes( filter: AttributeFilterInput + where: AttributeWhereInput """Return the elements in the list that come before the specified cursor.""" before: String @@ -5130,22 +5622,26 @@ type ProductType implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): AttributeCountableConnection } """An enumeration.""" -enum ProductTypeKindEnum { +enum ProductTypeKindEnum @doc(category: "Products") { NORMAL GIFT_CARD } """Representation of tax types fetched from tax gateway.""" -type TaxType { +type TaxType @doc(category: "Taxes") { """Description of the tax type.""" description: String @@ -5157,10 +5653,8 @@ type TaxType { Tax class is a named object used to define tax rates per country. Tax class can be assigned to product types, products and shipping methods to define their tax rates. Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type TaxClass implements Node & ObjectWithMetadata { +type TaxClass implements Node & ObjectWithMetadata @doc(category: "Taxes") { """The ID of the object.""" id: ID! @@ -5221,10 +5715,8 @@ type TaxClass implements Node & ObjectWithMetadata { Tax rate for a country. When tax class is null, it represents the default tax rate for that country; otherwise it's a country tax rate specific to the given tax class. Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type TaxClassCountryRate { +type TaxClassCountryRate @doc(category: "Taxes") { """Country in which this tax rate applies.""" country: CountryDisplay! @@ -5238,7 +5730,7 @@ type TaxClassCountryRate { """ Custom attribute of a product. Attributes can be assigned to products and variants at the product type level. """ -type Attribute implements Node & ObjectWithMetadata { +type Attribute implements Node & ObjectWithMetadata @doc(category: "Attributes") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -5319,10 +5811,14 @@ type Attribute implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): AttributeValueCountableConnection @@ -5339,7 +5835,7 @@ type Attribute implements Node & ObjectWithMetadata { """ Whether the attribute can be filtered in storefront. Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ - filterableInStorefront: Boolean! + filterableInStorefront: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0.") """ Whether the attribute can be filtered in dashboard. Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. @@ -5349,12 +5845,12 @@ type Attribute implements Node & ObjectWithMetadata { """ Whether the attribute can be displayed in the admin product list. Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ - availableInGrid: Boolean! + availableInGrid: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0.") """ The position of the attribute in the storefront navigation (0 by default). Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES, MANAGE_PRODUCTS, MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ - storefrontSearchPosition: Int! + storefrontSearchPosition: Int! @deprecated(reason: "This field will be removed in Saleor 4.0.") """Returns translated attribute fields for the given language code.""" translation( @@ -5371,10 +5867,14 @@ type Attribute implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductTypeCountableConnection! productVariantTypes( @@ -5384,10 +5884,14 @@ type Attribute implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductTypeCountableConnection! @@ -5400,7 +5904,7 @@ type Attribute implements Node & ObjectWithMetadata { } """An enumeration.""" -enum AttributeInputTypeEnum { +enum AttributeInputTypeEnum @doc(category: "Attributes") { DROPDOWN MULTISELECT FILE @@ -5415,14 +5919,14 @@ enum AttributeInputTypeEnum { } """An enumeration.""" -enum AttributeEntityTypeEnum { +enum AttributeEntityTypeEnum @doc(category: "Attributes") { PAGE PRODUCT PRODUCT_VARIANT } """An enumeration.""" -enum AttributeTypeEnum { +enum AttributeTypeEnum @doc(category: "Attributes") { PRODUCT_TYPE PAGE_TYPE } @@ -5461,7 +5965,7 @@ enum MeasurementUnitsEnum { TONNE } -type AttributeValueCountableConnection { +type AttributeValueCountableConnection @doc(category: "Attributes") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [AttributeValueCountableEdge!]! @@ -5470,7 +5974,7 @@ type AttributeValueCountableConnection { totalCount: Int } -type AttributeValueCountableEdge { +type AttributeValueCountableEdge @doc(category: "Attributes") { """The item at the end of the edge.""" node: AttributeValue! @@ -5479,7 +5983,7 @@ type AttributeValueCountableEdge { } """Represents a value of an attribute.""" -type AttributeValue implements Node { +type AttributeValue implements Node @doc(category: "Attributes") { id: ID! """Name of a value displayed in the interface.""" @@ -5537,7 +6041,7 @@ type AttributeValue implements Node { externalReference: String } -type AttributeValueTranslation implements Node { +type AttributeValueTranslation implements Node @doc(category: "Attributes") { id: ID! """Translation language.""" @@ -5570,15 +6074,15 @@ value as specified by """ scalar Date -input AttributeChoicesSortingInput { - """Specifies the direction in which to sort products.""" +input AttributeChoicesSortingInput @doc(category: "Attributes") { + """Specifies the direction in which to sort attribute choices.""" direction: OrderDirection! """Sort attribute choices by the selected field.""" field: AttributeChoicesSortField! } -enum AttributeChoicesSortField { +enum AttributeChoicesSortField @doc(category: "Attributes") { """Sort attribute choice by name.""" NAME @@ -5586,12 +6090,12 @@ enum AttributeChoicesSortField { SLUG } -input AttributeValueFilterInput { +input AttributeValueFilterInput @doc(category: "Attributes") { search: String ids: [ID!] } -type AttributeTranslation implements Node { +type AttributeTranslation implements Node @doc(category: "Attributes") { id: ID! """Translation language.""" @@ -5599,7 +6103,7 @@ type AttributeTranslation implements Node { name: String! } -type ProductTypeCountableConnection { +type ProductTypeCountableConnection @doc(category: "Products") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ProductTypeCountableEdge!]! @@ -5608,7 +6112,7 @@ type ProductTypeCountableConnection { totalCount: Int } -type ProductTypeCountableEdge { +type ProductTypeCountableEdge @doc(category: "Products") { """The item at the end of the edge.""" node: ProductType! @@ -5616,7 +6120,7 @@ type ProductTypeCountableEdge { cursor: String! } -enum VariantAttributeScope { +enum VariantAttributeScope @doc(category: "Products") { ALL VARIANT_SELECTION NOT_VARIANT_SELECTION @@ -5627,7 +6131,7 @@ Represents assigned attribute to variant with variant selection attached. Added in Saleor 3.1. """ -type AssignedVariantAttribute { +type AssignedVariantAttribute @doc(category: "Attributes") { """Attribute assigned to variant.""" attribute: Attribute! @@ -5637,7 +6141,7 @@ type AssignedVariantAttribute { variantSelection: Boolean! } -type AttributeCountableConnection { +type AttributeCountableConnection @doc(category: "Attributes") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [AttributeCountableEdge!]! @@ -5646,7 +6150,7 @@ type AttributeCountableConnection { totalCount: Int } -type AttributeCountableEdge { +type AttributeCountableEdge @doc(category: "Attributes") { """The item at the end of the edge.""" node: Attribute! @@ -5654,7 +6158,7 @@ type AttributeCountableEdge { cursor: String! } -input AttributeFilterInput { +input AttributeFilterInput @doc(category: "Attributes") { valueRequired: Boolean isVariantOnly: Boolean visibleInStorefront: Boolean @@ -5685,10 +6189,87 @@ input MetadataFilter { value: String } +""" +Where filtering options. + +Added in Saleor 3.11. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +input AttributeWhereInput @doc(category: "Attributes") { + valueRequired: Boolean + visibleInStorefront: Boolean + filterableInDashboard: Boolean + metadata: [MetadataFilter!] + ids: [ID!] + name: StringFilterInput + slug: StringFilterInput + withChoices: Boolean + inputType: AttributeInputTypeEnumFilterInput + entityType: AttributeEntityTypeEnumFilterInput + type: AttributeTypeEnumFilterInput + unit: MeasurementUnitsEnumFilterInput + inCollection: ID + inCategory: ID + + """List of conditions that must be met.""" + AND: [AttributeWhereInput!] + + """A list of conditions of which at least one must be met.""" + OR: [AttributeWhereInput!] +} + +""" +Define the filtering options for string fields. + +Added in Saleor 3.11. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +input StringFilterInput { + """The value equal to.""" + eq: String + + """The value included in.""" + oneOf: [String!] +} + +input AttributeInputTypeEnumFilterInput @doc(category: "Attributes") { + """The value equal to.""" + eq: AttributeInputTypeEnum + + """The value included in.""" + oneOf: [AttributeInputTypeEnum!] +} + +input AttributeEntityTypeEnumFilterInput @doc(category: "Attributes") { + """The value equal to.""" + eq: AttributeEntityTypeEnum + + """The value included in.""" + oneOf: [AttributeEntityTypeEnum!] +} + +input AttributeTypeEnumFilterInput @doc(category: "Attributes") { + """The value equal to.""" + eq: AttributeTypeEnum + + """The value included in.""" + oneOf: [AttributeTypeEnum!] +} + +input MeasurementUnitsEnumFilterInput @doc(category: "Attributes") { + """The value equal to.""" + eq: MeasurementUnitsEnum + + """The value included in.""" + oneOf: [MeasurementUnitsEnum!] +} + """ 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 { +type Category implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -5765,10 +6346,14 @@ type Category implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): CategoryCountableConnection @@ -5783,6 +6368,15 @@ type Category implements Node & ObjectWithMetadata { """ filter: ProductFilterInput + """ + Filtering options for products. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + where: ProductWhereInput + """ Sort products. @@ -5799,10 +6393,14 @@ type Category implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductCountableConnection @@ -5814,26 +6412,28 @@ type Category implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): CategoryCountableConnection backgroundImage( """ - Size of the image. If not provided, the original image will be returned. + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). """ size: Int """ - The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned. + The format of the image. When not provided, format of the original image will be used. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - format: ThumbnailFormatEnum + format: ThumbnailFormatEnum = ORIGINAL ): Image """Returns translated category fields for the given language code.""" @@ -5843,7 +6443,7 @@ type Category implements Node & ObjectWithMetadata { ): CategoryTranslation } -type CategoryCountableConnection { +type CategoryCountableConnection @doc(category: "Products") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [CategoryCountableEdge!]! @@ -5852,7 +6452,7 @@ type CategoryCountableConnection { totalCount: Int } -type CategoryCountableEdge { +type CategoryCountableEdge @doc(category: "Products") { """The item at the end of the edge.""" node: Category! @@ -5860,7 +6460,7 @@ type CategoryCountableEdge { cursor: String! } -input ProductFilterInput { +input ProductFilterInput @doc(category: "Products") { isPublished: Boolean collections: [ID!] categories: [ID!] @@ -5923,7 +6523,7 @@ input ProductFilterInput { channel: String } -input AttributeInput { +input AttributeInput @doc(category: "Attributes") { """Internal representation of an attribute name.""" slug: String! @@ -5969,12 +6569,12 @@ input DateRangeInput { lte: Date } -enum StockAvailability { +enum StockAvailability @doc(category: "Products") { IN_STOCK OUT_OF_STOCK } -input ProductStockFilterInput { +input ProductStockFilterInput @doc(category: "Products") { warehouseIds: [ID!] quantity: IntRangeInput } @@ -5987,7 +6587,124 @@ input PriceRangeInput { lte: Float } -input ProductOrder { +input ProductWhereInput @doc(category: "Products") { + metadata: [MetadataFilter!] + ids: [ID!] + + """Filter by product name.""" + name: StringFilterInput + + """Filter by product slug.""" + slug: StringFilterInput + + """Filter by product type.""" + productType: GlobalIDFilterInput + + """Filter by product category.""" + category: GlobalIDFilterInput + + """Filter by collection.""" + collection: GlobalIDFilterInput + + """Filter by availability for purchase.""" + isAvailable: Boolean + + """Filter by public visibility.""" + isPublished: Boolean + + """Filter by visibility on the channel.""" + isVisibleInListing: Boolean + + """Filter by the publication date.""" + publishedFrom: DateTime + + """Filter by the date of availability for purchase.""" + availableFrom: DateTime + + """Filter by product with category assigned.""" + hasCategory: Boolean + + """Filter by product variant price.""" + price: DecimalFilterInput + + """Filter by the lowest variant price after discounts.""" + minimalPrice: DecimalFilterInput + + """Filter by attributes associated with the product.""" + attributes: [AttributeInput!] + + """Filter by variants having specific stock status.""" + stockAvailability: StockAvailability + + """Filter by stock of the product variant.""" + stocks: ProductStockFilterInput + + """Filter on whether product is a gift card or not.""" + giftCard: Boolean + + """Filter by product with preordered variants.""" + hasPreorderedVariants: Boolean + + """Filter by when was the most recent update.""" + updatedAt: DateTimeRangeInput + + """List of conditions that must be met.""" + AND: [ProductWhereInput!] + + """A list of conditions of which at least one must be met.""" + OR: [ProductWhereInput!] +} + +""" +Define the filtering options for foreign key fields. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +input GlobalIDFilterInput { + """The value equal to.""" + eq: ID + + """The value included in.""" + oneOf: [ID!] +} + +""" +Define the filtering options for decimal fields. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +input DecimalFilterInput { + """The value equal to.""" + eq: Decimal + + """The value included in.""" + oneOf: [Decimal!] + + """The value in range.""" + range: DecimalRangeInput +} + +""" +Custom Decimal implementation. + +Returns Decimal as a float in the API, +parses float to the Decimal on the way back. +""" +scalar Decimal + +input DecimalRangeInput { + """Decimal value greater than or equal to.""" + gte: Decimal + + """Decimal value less than or equal to.""" + lte: Decimal +} + +input ProductOrder @doc(category: "Products") { """Specifies the direction in which to sort products.""" direction: OrderDirection! @@ -6008,7 +6725,7 @@ input ProductOrder { field: ProductOrderField } -enum ProductOrderField { +enum ProductOrderField @doc(category: "Products") { """Sort products by name.""" NAME @@ -6093,10 +6810,12 @@ type Image { """An enumeration.""" enum ThumbnailFormatEnum { + ORIGINAL + AVIF WEBP } -type CategoryTranslation implements Node { +type CategoryTranslation implements Node @doc(category: "Products") { id: ID! """Translation language.""" @@ -6121,7 +6840,7 @@ type CategoryTranslation implements Node { } """Represents a version of a product such as different size or color.""" -type ProductVariant implements Node & ObjectWithMetadata { +type ProductVariant implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -6280,8 +6999,6 @@ type ProductVariant implements Node & ObjectWithMetadata { Preorder data for product variant. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ preorder: PreorderData created: DateTime! @@ -6295,8 +7012,8 @@ type ProductVariant implements Node & ObjectWithMetadata { externalReference: String } -"""Represents product varaint channel listing.""" -type ProductVariantChannelListing implements Node { +"""Represents product variant channel listing.""" +type ProductVariantChannelListing implements Node @doc(category: "Products") { id: ID! channel: Channel! price: Money @@ -6315,14 +7032,12 @@ type ProductVariantChannelListing implements Node { Preorder variant data. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ preorderThreshold: PreorderThreshold } """Represents preorder variant data for channel.""" -type PreorderThreshold { +type PreorderThreshold @doc(category: "Products") { """Preorder threshold for product variant in this channel.""" quantity: Int @@ -6331,7 +7046,7 @@ type PreorderThreshold { } """Represents availability of a variant in the storefront.""" -type VariantPricingInfo { +type VariantPricingInfo @doc(category: "Products") { """Whether it is in sale or not.""" onSale: Boolean @@ -6404,7 +7119,7 @@ input AddressInput { } """Represents a custom attribute.""" -type SelectedAttribute { +type SelectedAttribute @doc(category: "Attributes") { """Name of an attribute displayed in the interface.""" attribute: Attribute! @@ -6418,7 +7133,7 @@ enum ReportingPeriod { } """Represents a product image.""" -type ProductImage { +type ProductImage @doc(category: "Products") { """The ID of the image.""" id: ID! @@ -6431,52 +7146,113 @@ type ProductImage { sortOrder: Int url( """ - Size of the image. If not provided, the original image will be returned. + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). """ size: Int """ - The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned. + The format of the image. When not provided, format of the original image will be used. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - format: ThumbnailFormatEnum + format: ThumbnailFormatEnum = ORIGINAL ): String! } """Represents a product media.""" -type ProductMedia implements Node { +type ProductMedia implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! + + """ + List of private metadata items. Requires staff permissions to access. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetadata: [MetadataItem!]! + + """ + A single key from private metadata. Requires staff permissions to access. + + Tip: Use GraphQL aliases to fetch multiple keys. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetafield(key: String!): String + + """ + Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetafields(keys: [String!]): Metadata + + """ + List of public metadata items. Can be accessed without permissions. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + metadata: [MetadataItem!]! + + """ + A single key from public metadata. + + Tip: Use GraphQL aliases to fetch multiple keys. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + metafield(key: String!): String + + """ + Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + metafields(keys: [String!]): Metadata sortOrder: Int alt: String! type: ProductMediaType! oembedData: JSONString! url( """ - Size of the image. If not provided, the original image will be returned. + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). """ size: Int """ - The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned. + The format of the image. When not provided, format of the original image will be used. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - format: ThumbnailFormatEnum + format: ThumbnailFormatEnum = ORIGINAL ): String! + + """ + Product id the media refers to. + + Added in Saleor 3.12. + """ + productId: ID } """An enumeration.""" -enum ProductMediaType { +enum ProductMediaType @doc(category: "Products") { IMAGE VIDEO } -type ProductVariantTranslation implements Node { +type ProductVariantTranslation implements Node @doc(category: "Products") { id: ID! """Translation language.""" @@ -6484,7 +7260,7 @@ type ProductVariantTranslation implements Node { name: String! } -type DigitalContent implements Node & ObjectWithMetadata { +type DigitalContent implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -6545,7 +7321,7 @@ type DigitalContent implements Node & ObjectWithMetadata { productVariant: ProductVariant! } -type DigitalContentUrl implements Node { +type DigitalContentUrl implements Node @doc(category: "Products") { id: ID! content: DigitalContent! created: DateTime! @@ -6561,7 +7337,7 @@ type DigitalContentUrl implements Node { scalar UUID """Represents stock.""" -type Stock implements Node { +type Stock implements Node @doc(category: "Products") { id: ID! warehouse: Warehouse! productVariant: ProductVariant! @@ -6589,7 +7365,7 @@ type Stock implements Node { } """Represents preorder settings for product variant.""" -type PreorderData { +type PreorderData @doc(category: "Products") { """ The global preorder threshold for product variant. @@ -6609,7 +7385,7 @@ type PreorderData { } """Represents availability of a product in the storefront.""" -type ProductPricingInfo { +type ProductPricingInfo @doc(category: "Products") { """Whether it is in sale or not.""" onSale: Boolean @@ -6634,8 +7410,6 @@ type ProductPricingInfo { Determines whether this product's price displayed in a storefront should include taxes. Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ displayGrossPrices: Boolean! } @@ -6650,7 +7424,7 @@ type TaxedMoneyRange { } """Represents product channel listing.""" -type ProductChannelListing implements Node { +type ProductChannelListing implements Node @doc(category: "Products") { id: ID! publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.") @@ -6703,26 +7477,26 @@ type ProductChannelListing implements Node { ): ProductPricingInfo } -type Margin { +type Margin @doc(category: "Products") { start: Int stop: Int } -input MediaSortingInput { - """Specifies the direction in which to sort products.""" +input MediaSortingInput @doc(category: "Products") { + """Specifies the direction in which to sort media.""" direction: OrderDirection! """Sort media by the selected field.""" field: MediaChoicesSortField! } -enum MediaChoicesSortField { +enum MediaChoicesSortField @doc(category: "Products") { """Sort media by ID.""" ID } """Represents a collection of products.""" -type Collection implements Node & ObjectWithMetadata { +type Collection implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -6799,6 +7573,15 @@ type Collection implements Node & ObjectWithMetadata { """Filtering options for products.""" filter: ProductFilterInput + """ + Filtering options for products. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + where: ProductWhereInput + """Sort products.""" sortBy: ProductOrder @@ -6808,26 +7591,28 @@ type Collection implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductCountableConnection backgroundImage( """ - Size of the image. If not provided, the original image will be returned. + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). """ size: Int """ - The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned. + The format of the image. When not provided, format of the original image will be used. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - format: ThumbnailFormatEnum + format: ThumbnailFormatEnum = ORIGINAL ): Image """Returns translated collection fields for the given language code.""" @@ -6844,7 +7629,7 @@ type Collection implements Node & ObjectWithMetadata { channelListings: [CollectionChannelListing!] } -type CollectionTranslation implements Node { +type CollectionTranslation implements Node @doc(category: "Products") { id: ID! """Translation language.""" @@ -6869,7 +7654,7 @@ type CollectionTranslation implements Node { } """Represents collection channel listing.""" -type CollectionChannelListing implements Node { +type CollectionChannelListing implements Node @doc(category: "Products") { id: ID! publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.") @@ -6883,7 +7668,7 @@ type CollectionChannelListing implements Node { channel: Channel! } -type ProductTranslation implements Node { +type ProductTranslation implements Node @doc(category: "Products") { id: ID! """Translation language.""" @@ -6907,7 +7692,7 @@ type ProductTranslation implements Node { descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") } -type WarehouseCountableConnection { +type WarehouseCountableConnection @doc(category: "Products") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [WarehouseCountableEdge!]! @@ -6916,7 +7701,7 @@ type WarehouseCountableConnection { totalCount: Int } -type WarehouseCountableEdge { +type WarehouseCountableEdge @doc(category: "Products") { """The item at the end of the edge.""" node: Warehouse! @@ -6924,7 +7709,7 @@ type WarehouseCountableEdge { cursor: String! } -input WarehouseFilterInput { +input WarehouseFilterInput @doc(category: "Products") { clickAndCollectOption: WarehouseClickAndCollectOptionEnum search: String ids: [ID!] @@ -6933,15 +7718,15 @@ input WarehouseFilterInput { slugs: [String!] } -input WarehouseSortingInput { - """Specifies the direction in which to sort products.""" +input WarehouseSortingInput @doc(category: "Products") { + """Specifies the direction in which to sort warehouses.""" direction: OrderDirection! """Sort warehouses by the selected field.""" field: WarehouseSortField! } -enum WarehouseSortField { +enum WarehouseSortField @doc(category: "Products") { """Sort warehouses by name.""" NAME } @@ -6965,7 +7750,7 @@ type TranslatableItemEdge { union TranslatableItem = ProductTranslatableContent | CollectionTranslatableContent | CategoryTranslatableContent | AttributeTranslatableContent | AttributeValueTranslatableContent | ProductVariantTranslatableContent | PageTranslatableContent | ShippingMethodTranslatableContent | SaleTranslatableContent | VoucherTranslatableContent | MenuItemTranslatableContent -type ProductTranslatableContent implements Node { +type ProductTranslatableContent implements Node @doc(category: "Products") { id: ID! seoTitle: String seoDescription: String @@ -6998,7 +7783,7 @@ type ProductTranslatableContent implements Node { attributeValues: [AttributeValueTranslatableContent!]! } -type AttributeValueTranslatableContent implements Node { +type AttributeValueTranslatableContent implements Node @doc(category: "Attributes") { id: ID! name: String! @@ -7029,7 +7814,7 @@ type AttributeValueTranslatableContent implements Node { attribute: AttributeTranslatableContent } -type AttributeTranslatableContent implements Node { +type AttributeTranslatableContent implements Node @doc(category: "Attributes") { id: ID! name: String! @@ -7043,7 +7828,7 @@ type AttributeTranslatableContent implements Node { attribute: Attribute @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") } -type CollectionTranslatableContent implements Node { +type CollectionTranslatableContent implements Node @doc(category: "Products") { id: ID! seoTitle: String seoDescription: String @@ -7073,7 +7858,7 @@ type CollectionTranslatableContent implements Node { collection: Collection @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") } -type CategoryTranslatableContent implements Node { +type CategoryTranslatableContent implements Node @doc(category: "Products") { id: ID! seoTitle: String seoDescription: String @@ -7103,7 +7888,7 @@ type CategoryTranslatableContent implements Node { category: Category @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") } -type ProductVariantTranslatableContent implements Node { +type ProductVariantTranslatableContent implements Node @doc(category: "Products") { id: ID! name: String! @@ -7120,7 +7905,7 @@ type ProductVariantTranslatableContent implements Node { attributeValues: [AttributeValueTranslatableContent!]! } -type PageTranslatableContent implements Node { +type PageTranslatableContent implements Node @doc(category: "Pages") { id: ID! seoTitle: String seoDescription: String @@ -7155,7 +7940,7 @@ type PageTranslatableContent implements Node { attributeValues: [AttributeValueTranslatableContent!]! } -type PageTranslation implements Node { +type PageTranslation implements Node @doc(category: "Pages") { id: ID! """Translation language.""" @@ -7182,7 +7967,7 @@ type PageTranslation implements Node { """ A static page that can be manually added by a shop operator through the dashboard. """ -type Page implements Node & ObjectWithMetadata { +type Page implements Node & ObjectWithMetadata @doc(category: "Pages") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -7273,7 +8058,7 @@ type Page implements Node & ObjectWithMetadata { """ Represents a type of page. It defines what attributes are available to pages of this type. """ -type PageType implements Node & ObjectWithMetadata { +type PageType implements Node & ObjectWithMetadata @doc(category: "Pages") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -7330,10 +8115,11 @@ type PageType implements Node & ObjectWithMetadata { """ Attributes that can be assigned to the page type. - Requires one of the following permissions: MANAGE_PAGES. + Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ availableAttributes( filter: AttributeFilterInput + where: AttributeWhereInput """Return the elements in the list that come before the specified cursor.""" before: String @@ -7341,22 +8127,26 @@ type PageType implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): AttributeCountableConnection """ Whether page type has pages assigned. - Requires one of the following permissions: MANAGE_PAGES. + Requires one of the following permissions: MANAGE_PAGES, MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ hasPages: Boolean } -type ShippingMethodTranslatableContent implements Node { +type ShippingMethodTranslatableContent implements Node @doc(category: "Shipping") { id: ID! name: String! @@ -7381,7 +8171,7 @@ type ShippingMethodTranslatableContent implements Node { shippingMethod: ShippingMethodType @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") } -type SaleTranslatableContent implements Node { +type SaleTranslatableContent implements Node @doc(category: "Discounts") { id: ID! name: String! @@ -7399,7 +8189,7 @@ type SaleTranslatableContent implements Node { sale: Sale @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") } -type SaleTranslation implements Node { +type SaleTranslation implements Node @doc(category: "Discounts") { id: ID! """Translation language.""" @@ -7410,7 +8200,7 @@ type SaleTranslation implements Node { """ Sales allow creating discounts for categories, collections or products and are visible to all the customers. """ -type Sale implements Node & ObjectWithMetadata { +type Sale implements Node & ObjectWithMetadata @doc(category: "Discounts") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -7473,10 +8263,14 @@ type Sale implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): CategoryCountableConnection @@ -7492,10 +8286,14 @@ type Sale implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): CollectionCountableConnection @@ -7511,10 +8309,14 @@ type Sale implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductCountableConnection @@ -7532,10 +8334,14 @@ type Sale implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductVariantCountableConnection @@ -7559,12 +8365,12 @@ type Sale implements Node & ObjectWithMetadata { currency: String } -enum SaleType { +enum SaleType @doc(category: "Discounts") { FIXED PERCENTAGE } -type CollectionCountableConnection { +type CollectionCountableConnection @doc(category: "Products") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [CollectionCountableEdge!]! @@ -7573,7 +8379,7 @@ type CollectionCountableConnection { totalCount: Int } -type CollectionCountableEdge { +type CollectionCountableEdge @doc(category: "Products") { """The item at the end of the edge.""" node: Collection! @@ -7581,7 +8387,7 @@ type CollectionCountableEdge { cursor: String! } -type ProductVariantCountableConnection { +type ProductVariantCountableConnection @doc(category: "Products") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ProductVariantCountableEdge!]! @@ -7590,7 +8396,7 @@ type ProductVariantCountableConnection { totalCount: Int } -type ProductVariantCountableEdge { +type ProductVariantCountableEdge @doc(category: "Products") { """The item at the end of the edge.""" node: ProductVariant! @@ -7599,14 +8405,14 @@ type ProductVariantCountableEdge { } """Represents sale channel listing.""" -type SaleChannelListing implements Node { +type SaleChannelListing implements Node @doc(category: "Discounts") { id: ID! channel: Channel! discountValue: Float! currency: String! } -type VoucherTranslatableContent implements Node { +type VoucherTranslatableContent implements Node @doc(category: "Discounts") { id: ID! name: String @@ -7624,7 +8430,7 @@ type VoucherTranslatableContent implements Node { voucher: Voucher @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") } -type VoucherTranslation implements Node { +type VoucherTranslation implements Node @doc(category: "Discounts") { id: ID! """Translation language.""" @@ -7635,7 +8441,7 @@ type VoucherTranslation implements Node { """ 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 & ObjectWithMetadata { +type Voucher implements Node & ObjectWithMetadata @doc(category: "Discounts") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -7702,10 +8508,14 @@ type Voucher implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): CategoryCountableConnection @@ -7721,10 +8531,14 @@ type Voucher implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): CollectionCountableConnection @@ -7740,10 +8554,14 @@ type Voucher implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductCountableConnection @@ -7761,10 +8579,14 @@ type Voucher implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): ProductVariantCountableConnection @@ -7800,19 +8622,19 @@ type Voucher implements Node & ObjectWithMetadata { channelListings: [VoucherChannelListing!] } -enum DiscountValueTypeEnum { +enum DiscountValueTypeEnum @doc(category: "Discounts") { FIXED PERCENTAGE } -enum VoucherTypeEnum { +enum VoucherTypeEnum @doc(category: "Discounts") { SHIPPING ENTIRE_ORDER SPECIFIC_PRODUCT } """Represents voucher channel listing.""" -type VoucherChannelListing implements Node { +type VoucherChannelListing implements Node @doc(category: "Discounts") { id: ID! channel: Channel! discountValue: Float! @@ -7820,7 +8642,7 @@ type VoucherChannelListing implements Node { minSpent: Money } -type MenuItemTranslatableContent implements Node { +type MenuItemTranslatableContent implements Node @doc(category: "Menu") { id: ID! name: String! @@ -7836,7 +8658,7 @@ type MenuItemTranslatableContent implements Node { menuItem: MenuItem @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") } -type MenuItemTranslation implements Node { +type MenuItemTranslation implements Node @doc(category: "Menu") { id: ID! """Translation language.""" @@ -7847,7 +8669,7 @@ type MenuItemTranslation implements Node { """ Represents a single item of the related menu. Can store categories, collection or pages. """ -type MenuItem implements Node & ObjectWithMetadata { +type MenuItem implements Node & ObjectWithMetadata @doc(category: "Menu") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -7925,7 +8747,7 @@ type MenuItem implements Node & ObjectWithMetadata { """ Represents a single menu - an object that is used to help navigate through the store. """ -type Menu implements Node & ObjectWithMetadata { +type Menu implements Node & ObjectWithMetadata @doc(category: "Menu") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -7996,10 +8818,8 @@ enum TranslatableKinds { Channel-specific tax configuration. Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type TaxConfiguration implements Node & ObjectWithMetadata { +type TaxConfiguration implements Node & ObjectWithMetadata @doc(category: "Taxes") { """The ID of the object.""" id: ID! @@ -8072,7 +8892,7 @@ type TaxConfiguration implements Node & ObjectWithMetadata { countries: [TaxConfigurationPerCountry!]! } -enum TaxCalculationStrategy { +enum TaxCalculationStrategy @doc(category: "Taxes") { FLAT_RATES TAX_APP } @@ -8081,10 +8901,8 @@ enum TaxCalculationStrategy { Country-specific exceptions of a channel's tax configuration. Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type TaxConfigurationPerCountry { +type TaxConfigurationPerCountry @doc(category: "Taxes") { """Country in which this configuration applies.""" country: CountryDisplay! @@ -8102,7 +8920,7 @@ type TaxConfigurationPerCountry { displayGrossPrices: Boolean! } -type TaxConfigurationCountableConnection { +type TaxConfigurationCountableConnection @doc(category: "Taxes") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [TaxConfigurationCountableEdge!]! @@ -8111,7 +8929,7 @@ type TaxConfigurationCountableConnection { totalCount: Int } -type TaxConfigurationCountableEdge { +type TaxConfigurationCountableEdge @doc(category: "Taxes") { """The item at the end of the edge.""" node: TaxConfiguration! @@ -8119,12 +8937,12 @@ type TaxConfigurationCountableEdge { cursor: String! } -input TaxConfigurationFilterInput { +input TaxConfigurationFilterInput @doc(category: "Taxes") { metadata: [MetadataFilter!] ids: [ID!] } -type TaxClassCountableConnection { +type TaxClassCountableConnection @doc(category: "Taxes") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [TaxClassCountableEdge!]! @@ -8133,7 +8951,7 @@ type TaxClassCountableConnection { totalCount: Int } -type TaxClassCountableEdge { +type TaxClassCountableEdge @doc(category: "Taxes") { """The item at the end of the edge.""" node: TaxClass! @@ -8141,20 +8959,20 @@ type TaxClassCountableEdge { cursor: String! } -input TaxClassSortingInput { - """Specifies the direction in which to sort products.""" +input TaxClassSortingInput @doc(category: "Taxes") { + """Specifies the direction in which to sort tax classes.""" direction: OrderDirection! """Sort tax classes by the selected field.""" field: TaxClassSortField! } -enum TaxClassSortField { +enum TaxClassSortField @doc(category: "Taxes") { """Sort tax classes by name.""" NAME } -input TaxClassFilterInput { +input TaxClassFilterInput @doc(category: "Taxes") { metadata: [MetadataFilter!] ids: [ID!] countries: [CountryCode!] @@ -8164,10 +8982,8 @@ input TaxClassFilterInput { Tax class rates grouped by country. Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type TaxCountryConfiguration { +type TaxCountryConfiguration @doc(category: "Taxes") { """A country for which tax class rates are grouped.""" country: CountryDisplay! @@ -8175,7 +8991,7 @@ type TaxCountryConfiguration { taxClassCountryRates: [TaxClassCountryRate!]! } -type StockCountableConnection { +type StockCountableConnection @doc(category: "Products") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [StockCountableEdge!]! @@ -8184,7 +9000,7 @@ type StockCountableConnection { totalCount: Int } -type StockCountableEdge { +type StockCountableEdge @doc(category: "Products") { """The item at the end of the edge.""" node: Stock! @@ -8192,7 +9008,7 @@ type StockCountableEdge { cursor: String! } -input StockFilterInput { +input StockFilterInput @doc(category: "Products") { quantity: Float search: String } @@ -8342,8 +9158,6 @@ type Shop { Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: MANAGE_SETTINGS. """ limitQuantityPerCheckout: Int @@ -8375,6 +9189,15 @@ type Shop { """ staffNotificationRecipients: [StaffNotificationRecipient!] + """ + Determines if account confirmation by email is enabled. + + Added in Saleor 3.14. + + Requires one of the following permissions: MANAGE_SETTINGS. + """ + enableAccountConfirmationByEmail: Boolean + """ Resource limitations and current usage if any set for a shop @@ -8409,7 +9232,7 @@ type Shop { """ Available payment gateway backend with configuration necessary to setup client. """ -type PaymentGateway { +type PaymentGateway @doc(category: "Payments") { """Payment gateway name.""" name: String! @@ -8424,7 +9247,7 @@ type PaymentGateway { } """Payment gateway client configuration key and value pair.""" -type GatewayConfigLine { +type GatewayConfigLine @doc(category: "Payments") { """Gateway config key.""" field: String! @@ -8432,7 +9255,7 @@ type GatewayConfigLine { value: String } -type ExternalAuthentication { +type ExternalAuthentication @doc(category: "Authentication") { """ID of external authentication plugin.""" id: String! @@ -8459,7 +9282,7 @@ type Domain { url: String! } -type ShopTranslation implements Node { +type ShopTranslation implements Node @doc(category: "Shop") { id: ID! """Translation language.""" @@ -8485,7 +9308,7 @@ type StaffNotificationRecipient implements Node { } """Represents user data.""" -type User implements Node & ObjectWithMetadata { +type User implements Node & ObjectWithMetadata @doc(category: "Users") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -8572,10 +9395,14 @@ type User implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): CheckoutCountableConnection @@ -8587,10 +9414,14 @@ type User implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): GiftCardCountableConnection @@ -8611,10 +9442,14 @@ type User implements Node & ObjectWithMetadata { """Return the elements in the list that come after the specified cursor.""" after: String - """Return the first n elements from the list.""" + """ + Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ first: Int - """Return the last n elements from the list.""" + """ + Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query. + """ last: Int ): OrderCountableConnection @@ -8626,20 +9461,36 @@ type User implements Node & ObjectWithMetadata { """List of user's permission groups which user can manage.""" editableGroups: [Group!] + + """ + List of channels the user has access to. The sum of channels from all user groups. If at least one group has `restrictedAccessToChannels` set to False - all channels are returned. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + accessibleChannels: [Channel!] + + """ + Determine if user have restricted access to channels. False if at least one user group has `restrictedAccessToChannels` set to False. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + restrictedAccessToChannels: Boolean! avatar( """ - Size of the image. If not provided, the original image will be returned. + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). """ size: Int """ - The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned. + The format of the image. When not provided, format of the original image will be used. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - format: ThumbnailFormatEnum + format: ThumbnailFormatEnum = ORIGINAL ): Image """ @@ -8672,7 +9523,7 @@ type User implements Node & ObjectWithMetadata { } """Checkout object.""" -type Checkout implements Node & ObjectWithMetadata { +type Checkout implements Node & ObjectWithMetadata @doc(category: "Checkout") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -8721,7 +9572,14 @@ type Checkout implements Node & ObjectWithMetadata { """ metafields(keys: [String!]): Metadata created: DateTime! - lastChange: DateTime! + + """ + Time of last modification of the given checkout. + + Added in Saleor 3.13. + """ + updatedAt: DateTime! + lastChange: DateTime! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `updatedAt` instead.") user: User channel: Channel! billingAddress: Address @@ -8742,8 +9600,6 @@ type Checkout implements Node & ObjectWithMetadata { Collection points that can be used for this order. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ availableCollectionPoints: [Warehouse!]! @@ -8784,8 +9640,6 @@ type Checkout implements Node & ObjectWithMetadata { The delivery method selected for this checkout. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ deliveryMethod: DeliveryMethod @@ -8796,8 +9650,6 @@ type Checkout implements Node & ObjectWithMetadata { Returns True if checkout has to be exempt from taxes. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ taxExemption: Boolean! @@ -8809,6 +9661,15 @@ type Checkout implements Node & ObjectWithMetadata { """ totalPrice: TaxedMoney! + """ + The difference between the paid and the checkout total amount. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + totalBalance: Money! + """Checkout language code.""" languageCode: LanguageCodeEnum! @@ -8825,16 +9686,32 @@ type Checkout implements Node & ObjectWithMetadata { Determines whether checkout prices should include taxes when displayed in a storefront. Added in Saleor 3.9. + """ + displayGrossPrices: Boolean! + + """ + The authorize status of the checkout. + + Added in Saleor 3.13. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - displayGrossPrices: Boolean! + authorizeStatus: CheckoutAuthorizeStatusEnum! + + """ + The charge status of the checkout. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + chargeStatus: CheckoutChargeStatusEnum! } """ 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 & ObjectWithMetadata { +type GiftCard implements Node & ObjectWithMetadata @doc(category: "Gift cards") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -8899,8 +9776,6 @@ type GiftCard implements Node & ObjectWithMetadata { The user who bought or issued a gift card. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ createdBy: User @@ -8908,18 +9783,14 @@ type GiftCard implements Node & ObjectWithMetadata { The customer who used a gift card. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - usedBy: User + usedBy: User @deprecated(reason: "This field will be removed in Saleor 4.0.") """ Email address of the user who bought or issued gift card. Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: MANAGE_USERS, OWNER. """ createdByEmail: String @@ -8928,10 +9799,8 @@ type GiftCard implements Node & ObjectWithMetadata { Email address of the customer who used a gift card. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - usedByEmail: String + usedByEmail: String @deprecated(reason: "This field will be removed in Saleor 4.0.") lastUsedOn: DateTime expiryDate: Date @@ -8940,8 +9809,6 @@ type GiftCard implements Node & ObjectWithMetadata { Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: MANAGE_APPS, OWNER. """ app: App @@ -8950,8 +9817,6 @@ type GiftCard implements Node & ObjectWithMetadata { Related gift card product. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ product: Product @@ -8960,8 +9825,6 @@ type GiftCard implements Node & ObjectWithMetadata { Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: MANAGE_GIFT_CARD. """ events( @@ -8974,8 +9837,6 @@ type GiftCard implements Node & ObjectWithMetadata { Added in Saleor 3.1. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: MANAGE_GIFT_CARD. """ tags: [GiftCardTag!]! @@ -8984,8 +9845,6 @@ type GiftCard implements Node & ObjectWithMetadata { Slug of the channel where the gift card was bought. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ boughtInChannel: String isActive: Boolean! @@ -9006,10 +9865,8 @@ type GiftCard implements Node & ObjectWithMetadata { History log of the gift card. Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardEvent implements Node { +type GiftCardEvent implements Node @doc(category: "Gift cards") { id: ID! """Date when event happened at in ISO 8601 format.""" @@ -9057,7 +9914,7 @@ type GiftCardEvent implements Node { } """An enumeration.""" -enum GiftCardEventsEnum { +enum GiftCardEventsEnum @doc(category: "Gift cards") { ISSUED BOUGHT UPDATED @@ -9072,7 +9929,7 @@ enum GiftCardEventsEnum { USED_IN_ORDER } -type GiftCardEventBalance { +type GiftCardEventBalance @doc(category: "Gift cards") { """Initial balance of the gift card.""" initialBalance: Money @@ -9086,7 +9943,7 @@ type GiftCardEventBalance { oldCurrentBalance: Money } -input GiftCardEventFilterInput { +input GiftCardEventFilterInput @doc(category: "Gift cards") { type: GiftCardEventsEnum orders: [ID!] } @@ -9095,19 +9952,23 @@ input GiftCardEventFilterInput { The gift card tag. Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardTag implements Node { +type GiftCardTag implements Node @doc(category: "Gift cards") { id: ID! name: String! } """Represents an item in the checkout.""" -type CheckoutLine implements Node & ObjectWithMetadata { +type CheckoutLine implements Node & ObjectWithMetadata @doc(category: "Checkout") { id: ID! - """List of private metadata items. Requires staff permissions to access.""" + """ + List of private metadata items. Requires staff permissions to access. + + Added in Saleor 3.5. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ privateMetadata: [MetadataItem!]! """ @@ -9115,7 +9976,7 @@ type CheckoutLine implements Node & ObjectWithMetadata { Tip: Use GraphQL aliases to fetch multiple keys. - Added in Saleor 3.3. + Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ @@ -9124,13 +9985,19 @@ type CheckoutLine implements Node & ObjectWithMetadata { """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - Added in Saleor 3.3. + Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """List of public metadata items. Can be accessed without permissions.""" + """ + List of public metadata items. Can be accessed without permissions. + + Added in Saleor 3.5. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ metadata: [MetadataItem!]! """ @@ -9138,7 +10005,7 @@ type CheckoutLine implements Node & ObjectWithMetadata { Tip: Use GraphQL aliases to fetch multiple keys. - Added in Saleor 3.3. + Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ @@ -9147,7 +10014,7 @@ type CheckoutLine implements Node & ObjectWithMetadata { """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - Added in Saleor 3.3. + Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ @@ -9175,8 +10042,6 @@ type CheckoutLine implements Node & ObjectWithMetadata { Represents a delivery method chosen for the checkout. `Warehouse` type is used when checkout is marked as "click and collect" and `ShippingMethod` otherwise. Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ union DeliveryMethod = Warehouse | ShippingMethod @@ -9187,7 +10052,7 @@ Added in Saleor 3.4. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type TransactionItem implements Node & ObjectWithMetadata { +type TransactionItem implements Node & ObjectWithMetadata @doc(category: "Payments") { """The ID of the object.""" id: ID! @@ -9247,23 +10112,79 @@ type TransactionItem implements Node & ObjectWithMetadata { """Total amount authorized for this payment.""" authorizedAmount: Money! + """ + Total amount of ongoing authorization requests for the transaction. + + Added in Saleor 3.13. + """ + authorizePendingAmount: Money! + """Total amount refunded for this payment.""" refundedAmount: Money! + """ + Total amount of ongoing refund requests for the transaction. + + Added in Saleor 3.13. + """ + refundPendingAmount: Money! + """Total amount voided for this payment.""" - voidedAmount: Money! + voidedAmount: Money! @deprecated(reason: "This field will be removed in Saleor 3.15 (Preview Feature).Use `canceledAmount` instead.") + + """ + Total amount canceled for this payment. + + Added in Saleor 3.13. + """ + canceledAmount: Money! + + """ + Total amount of ongoing cancel requests for the transaction. + + Added in Saleor 3.13. + """ + cancelPendingAmount: Money! """Total amount charged for this payment.""" chargedAmount: Money! + """ + Total amount of ongoing charge requests for the transaction. + + Added in Saleor 3.13. + """ + chargePendingAmount: Money! + """Status of transaction.""" - status: String! + status: String! @deprecated(reason: "This field will be removed in Saleor 3.15 (Preview Feature). The `status` is not needed. The amounts can be used to define the current status of transactions.") """Type of transaction.""" - type: String! + type: String! @deprecated(reason: "This field will be removed in Saleor 3.15 (Preview Feature). Use `name` or `message` instead.") + + """ + Name of the transaction. + + Added in Saleor 3.13. + """ + name: String! + + """ + Message related to the transaction. + + Added in Saleor 3.13. + """ + message: String! """Reference of transaction.""" - reference: String! + reference: String! @deprecated(reason: "This field will be removed in Saleor 3.15 (Preview Feature).Use `pspReference` instead.") + + """ + PSP reference of transaction. + + Added in Saleor 3.13. + """ + pspReference: String! """ The related order. @@ -9274,6 +10195,20 @@ type TransactionItem implements Node & ObjectWithMetadata { """List of all transaction's events.""" events: [TransactionEvent!]! + + """ + User or App that created the transaction. + + Added in Saleor 3.13. + """ + createdBy: UserOrApp + + """ + The url that will allow to redirect user to payment provider page with transaction details. + + Added in Saleor 3.13. + """ + externalUrl: String! } """ @@ -9282,16 +10217,19 @@ Represents possible actions on payment transaction. The following actions are possible: CHARGE - Represents the charge action. REFUND - Represents a refund action. - VOID - Represents a void action. + VOID - Represents a void action. This field will be removed + in Saleor 3.14 (Preview Feature). Use `CANCEL` instead. + CANCEL - Represents a cancel action. Added in Saleor 3.12. """ -enum TransactionActionEnum { +enum TransactionActionEnum @doc(category: "Payments") { CHARGE REFUND VOID + CANCEL } """Represents an order in the shop.""" -type Order implements Node & ObjectWithMetadata { +type Order implements Node & ObjectWithMetadata @doc(category: "Orders") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -9383,8 +10321,6 @@ type Order implements Node & ObjectWithMetadata { Collection points that can be used for this order. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ availableCollectionPoints: [Warehouse!]! @@ -9415,8 +10351,6 @@ type Order implements Node & ObjectWithMetadata { The authorize status of the order. Added in Saleor 3.4. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ authorizeStatus: OrderAuthorizeStatusEnum! @@ -9424,8 +10358,6 @@ type Order implements Node & ObjectWithMetadata { The charge status of the order. Added in Saleor 3.4. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ chargeStatus: OrderChargeStatusEnum! @@ -9433,8 +10365,6 @@ type Order implements Node & ObjectWithMetadata { Returns True if order has to be exempt from taxes. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ taxExemption: Boolean! @@ -9442,8 +10372,6 @@ type Order implements Node & ObjectWithMetadata { List of transactions for the order. Requires one of the following permissions: MANAGE_ORDERS, HANDLE_PAYMENTS. Added in Saleor 3.4. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ transactions: [TransactionItem!]! @@ -9470,9 +10398,7 @@ type Order implements Node & ObjectWithMetadata { Added in Saleor 3.9. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - - Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ shippingTaxClass: TaxClass @@ -9480,8 +10406,6 @@ type Order implements Node & ObjectWithMetadata { Denormalized name of the tax class assigned to the shipping method. Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingTaxClassName: String @@ -9489,8 +10413,6 @@ type Order implements Node & ObjectWithMetadata { Denormalized public metadata of the shipping method's tax class. Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingTaxClassMetadata: [MetadataItem!]! @@ -9498,8 +10420,6 @@ type Order implements Node & ObjectWithMetadata { Denormalized private metadata of the shipping method's tax class. Requires staff permissions to access. Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingTaxClassPrivateMetadata: [MetadataItem!]! token: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `id` instead.") @@ -9525,8 +10445,22 @@ type Order implements Node & ObjectWithMetadata { """Amount authorized for the order.""" totalAuthorized: Money! - """Amount captured by payment.""" - totalCaptured: Money! + """Amount captured for the order.""" + totalCaptured: Money! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `totalCharged` instead.") + + """ + Amount charged for the order. + + Added in Saleor 3.13. + """ + totalCharged: Money! + + """ + Amount canceled for the order. + + Added in Saleor 3.13. + """ + totalCanceled: Money! """ List of events associated with the order. @@ -9550,8 +10484,6 @@ type Order implements Node & ObjectWithMetadata { The delivery method selected for this order. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ deliveryMethod: DeliveryMethod languageCode: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `languageCodeEnum` field to fetch the language code. ") @@ -9578,8 +10510,6 @@ type Order implements Node & ObjectWithMetadata { Determines whether checkout prices should include taxes when displayed in a storefront. Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ displayGrossPrices: Boolean! @@ -9589,10 +10519,103 @@ type Order implements Node & ObjectWithMetadata { Added in Saleor 3.10. """ externalReference: String + + """ + ID of the checkout that the order was created from. + + Added in Saleor 3.11. + """ + checkoutId: ID + + """ + List of granted refunds. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + grantedRefunds: [OrderGrantedRefund!]! + + """ + Total amount of granted refund. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + totalGrantedRefund: Money! + + """ + Total refund amount for the order. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + totalRefunded: Money! + + """ + Total amount of ongoing refund requests for the order's transactions. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + totalRefundPending: Money! + + """ + Total amount of ongoing authorize requests for the order's transactions. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + totalAuthorizePending: Money! + + """ + Total amount of ongoing charge requests for the order's transactions. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + totalChargePending: Money! + + """ + Total amount of ongoing cancel requests for the order's transactions. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + totalCancelPending: Money! + + """ + The difference amount between granted refund and the amounts that are pending and refunded. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + totalRemainingGrant: Money! } """An enumeration.""" -enum OrderStatus { +enum OrderStatus @doc(category: "Orders") { DRAFT UNCONFIRMED UNFULFILLED @@ -9601,10 +10624,11 @@ enum OrderStatus { RETURNED FULFILLED CANCELED + EXPIRED } """Represents order fulfillment.""" -type Fulfillment implements Node & ObjectWithMetadata { +type Fulfillment implements Node & ObjectWithMetadata @doc(category: "Orders") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -9668,7 +10692,7 @@ type Fulfillment implements Node & ObjectWithMetadata { } """An enumeration.""" -enum FulfillmentStatus { +enum FulfillmentStatus @doc(category: "Orders") { FULFILLED REFUNDED RETURNED @@ -9679,17 +10703,23 @@ enum FulfillmentStatus { } """Represents line of the fulfillment.""" -type FulfillmentLine implements Node { +type FulfillmentLine implements Node @doc(category: "Orders") { id: ID! quantity: Int! orderLine: OrderLine } """Represents order line of particular order.""" -type OrderLine implements Node & ObjectWithMetadata { +type OrderLine implements Node & ObjectWithMetadata @doc(category: "Orders") { id: ID! - """List of private metadata items. Requires staff permissions to access.""" + """ + List of private metadata items. Requires staff permissions to access. + + Added in Saleor 3.5. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ privateMetadata: [MetadataItem!]! """ @@ -9697,7 +10727,7 @@ type OrderLine implements Node & ObjectWithMetadata { Tip: Use GraphQL aliases to fetch multiple keys. - Added in Saleor 3.3. + Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ @@ -9706,13 +10736,19 @@ type OrderLine implements Node & ObjectWithMetadata { """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - Added in Saleor 3.3. + Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """List of public metadata items. Can be accessed without permissions.""" + """ + List of public metadata items. Can be accessed without permissions. + + Added in Saleor 3.5. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ metadata: [MetadataItem!]! """ @@ -9720,7 +10756,7 @@ type OrderLine implements Node & ObjectWithMetadata { Tip: Use GraphQL aliases to fetch multiple keys. - Added in Saleor 3.3. + Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ @@ -9729,7 +10765,7 @@ type OrderLine implements Node & ObjectWithMetadata { """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - Added in Saleor 3.3. + Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ @@ -9746,18 +10782,16 @@ type OrderLine implements Node & ObjectWithMetadata { digitalContentUrl: DigitalContentUrl thumbnail( """ - Size of the image. If not provided, the original image will be returned. + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). """ size: Int """ - The format of the image. When not provided, format of the original image will be used. Must be provided together with the size value, otherwise original image will be returned. + The format of the image. When not provided, format of the original image will be used. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - format: ThumbnailFormatEnum + format: ThumbnailFormatEnum = ORIGINAL ): Image """Price of the single item in the order line.""" @@ -9810,9 +10844,7 @@ type OrderLine implements Node & ObjectWithMetadata { Added in Saleor 3.9. - Note: this API is currently in Feature Preview and can be subject to changes at later point. - - Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass: TaxClass @@ -9820,8 +10852,6 @@ type OrderLine implements Node & ObjectWithMetadata { Denormalized name of the tax class. Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ taxClassName: String @@ -9829,8 +10859,6 @@ type OrderLine implements Node & ObjectWithMetadata { Denormalized public metadata of the tax class. Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ taxClassMetadata: [MetadataItem!]! @@ -9838,21 +10866,19 @@ type OrderLine implements Node & ObjectWithMetadata { Denormalized private metadata of the tax class. Requires staff permissions to access. Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ taxClassPrivateMetadata: [MetadataItem!]! } """ -Positive Decimal scalar implementation. +Nonnegative Decimal scalar implementation. -Should be used in places where value must be positive. +Should be used in places where value must be nonnegative (0 or greater). """ scalar PositiveDecimal """Represents allocation.""" -type Allocation implements Node { +type Allocation implements Node @doc(category: "Products") { id: ID! """ @@ -9870,7 +10896,7 @@ type Allocation implements Node { warehouse: Warehouse! } -enum OrderAction { +enum OrderAction @doc(category: "Payments") { """Represents the capture action.""" CAPTURE @@ -9885,7 +10911,7 @@ enum OrderAction { } """Represents an Invoice.""" -type Invoice implements ObjectWithMetadata & Job & Node { +type Invoice implements ObjectWithMetadata & Job & Node @doc(category: "Orders") { """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! @@ -9977,14 +11003,15 @@ enum JobStatusEnum { } """An enumeration.""" -enum OrderOriginEnum { +enum OrderOriginEnum @doc(category: "Orders") { CHECKOUT DRAFT REISSUE + BULK_CREATE } """An enumeration.""" -enum PaymentChargeStatusEnum { +enum PaymentChargeStatusEnum @doc(category: "Payments") { NOT_CHARGED PENDING PARTIALLY_CHARGED @@ -9999,18 +11026,19 @@ enum PaymentChargeStatusEnum { Determine a current authorize status for order. We treat the order as fully authorized when the sum of authorized and charged funds - cover the order.total. + cover the `order.total`-`order.totalGrantedRefund`. We treat the order as partially authorized when the sum of authorized and charged - funds covers only part of the order.total + funds covers only part of the `order.total`-`order.totalGrantedRefund`. We treat the order as not authorized when the sum of authorized and charged funds is 0. NONE - the funds are not authorized - PARTIAL - the funds that are authorized or charged don't cover fully the order's - total - FULL - the funds that are authorized or charged fully cover the order's total + PARTIAL - the funds that are authorized and charged don't cover fully the + `order.total`-`order.totalGrantedRefund` + FULL - the funds that are authorized and charged fully cover the + `order.total`-`order.totalGrantedRefund` """ -enum OrderAuthorizeStatusEnum { +enum OrderAuthorizeStatusEnum @doc(category: "Orders") { NONE PARTIAL FULL @@ -10019,17 +11047,24 @@ enum OrderAuthorizeStatusEnum { """ Determine the current charge status for the order. - We treat the order as overcharged when the charged amount is bigger that order.total - We treat the order as fully charged when the charged amount is equal to order.total. - We treat the order as partially charged when the charged amount covers only part of - the order.total + An order is considered overcharged when the sum of the + transactionItem's charge amounts exceeds the value of + `order.total` - `order.totalGrantedRefund`. + If the sum of the transactionItem's charge amounts equals + `order.total` - `order.totalGrantedRefund`, we consider the order to be fully + charged. + If the sum of the transactionItem's charge amounts covers a part of the + `order.total` - `order.totalGrantedRefund`, we treat the order as partially charged. NONE - the funds are not charged. - PARTIAL - the funds that are charged don't cover the order's total - FULL - the funds that are charged fully cover the order's total - OVERCHARGED - the charged funds are bigger than order's total + PARTIAL - the funds that are charged don't cover the + `order.total`-`order.totalGrantedRefund` + FULL - the funds that are charged fully cover the + `order.total`-`order.totalGrantedRefund` + OVERCHARGED - the charged funds are bigger than the + `order.total`-`order.totalGrantedRefund` """ -enum OrderChargeStatusEnum { +enum OrderChargeStatusEnum @doc(category: "Orders") { NONE PARTIAL FULL @@ -10037,7 +11072,7 @@ enum OrderChargeStatusEnum { } """Represents a payment of a given type.""" -type Payment implements Node & ObjectWithMetadata { +type Payment implements Node & ObjectWithMetadata @doc(category: "Payments") { id: ID! """List of private metadata items. Requires staff permissions to access.""" @@ -10143,7 +11178,7 @@ type Payment implements Node & ObjectWithMetadata { } """An object representing a single payment.""" -type Transaction implements Node { +type Transaction implements Node @doc(category: "Payments") { id: ID! created: DateTime! payment: Payment! @@ -10158,7 +11193,7 @@ type Transaction implements Node { } """An enumeration.""" -enum TransactionKind { +enum TransactionKind @doc(category: "Payments") { EXTERNAL AUTH PENDING @@ -10171,7 +11206,7 @@ enum TransactionKind { CANCEL } -type CreditCard { +type CreditCard @doc(category: "Payments") { """Card brand.""" brand: String! @@ -10189,7 +11224,7 @@ type CreditCard { } """History log of the order.""" -type OrderEvent implements Node { +type OrderEvent implements Node @doc(category: "Orders") { id: ID! """Date when event happened at in ISO 8601 format.""" @@ -10261,14 +11296,14 @@ type OrderEvent implements Node { discount: OrderEventDiscountObject """The status of payment's transaction.""" - status: TransactionStatus + status: TransactionStatus @deprecated(reason: "This field will be removed in Saleor 3.15 (Preview Feature).Use `TransactionEvent` to track the status of `TransactionItem`.") """The reference of payment's transaction.""" reference: String } -"""An enumeration.""" -enum OrderEventsEnum { +"""The different order event types.""" +enum OrderEventsEnum @doc(category: "Orders") { DRAFT_CREATED DRAFT_CREATED_FROM_REPLACE ADDED_PRODUCTS @@ -10277,6 +11312,7 @@ enum OrderEventsEnum { PLACED_FROM_DRAFT OVERSOLD_ITEMS CANCELED + EXPIRED ORDER_MARKED_AS_PAID ORDER_FULLY_PAID ORDER_REPLACEMENT_CREATED @@ -10298,9 +11334,20 @@ enum OrderEventsEnum { PAYMENT_VOIDED PAYMENT_FAILED TRANSACTION_EVENT + TRANSACTION_CHARGE_REQUESTED + + """ + This field will be removed in Saleor 3.15 (Preview Feature). Use `TRANSACTION_CHARGE_REQUESTED` instead. + """ TRANSACTION_CAPTURE_REQUESTED TRANSACTION_REFUND_REQUESTED + + """ + This field will be removed in Saleor 3.15 (Preview Feature). Use `TRANSACTION_CANCEL_REQUESTED` instead. + """ TRANSACTION_VOID_REQUESTED + TRANSACTION_CANCEL_REQUESTED + TRANSACTION_MARK_AS_PAID_FAILED INVOICE_REQUESTED INVOICE_GENERATED INVOICE_UPDATED @@ -10318,7 +11365,7 @@ enum OrderEventsEnum { } """An enumeration.""" -enum OrderEventsEmailsEnum { +enum OrderEventsEmailsEnum @doc(category: "Orders") { PAYMENT_CONFIRMATION CONFIRMED SHIPPING_CONFIRMATION @@ -10330,7 +11377,7 @@ enum OrderEventsEmailsEnum { DIGITAL_LINKS } -type OrderEventOrderLineObject { +type OrderEventOrderLineObject @doc(category: "Orders") { """The variant quantity.""" quantity: Int @@ -10344,7 +11391,7 @@ type OrderEventOrderLineObject { discount: OrderEventDiscountObject } -type OrderEventDiscountObject { +type OrderEventDiscountObject @doc(category: "Orders") { """Type of the discount: fixed or percent.""" valueType: DiscountValueTypeEnum! @@ -10367,15 +11414,22 @@ type OrderEventDiscountObject { oldAmount: Money } -"""An enumeration.""" -enum TransactionStatus { +""" +Represents a status of payment transaction. + + The following statuses are possible: + SUCCESS - Represents a sucess action. + FAILURE - Represents a failure action. + PENDING - Represents a pending action. +""" +enum TransactionStatus @doc(category: "Payments") { PENDING SUCCESS FAILURE } """Contains all details related to the applied discount to the order.""" -type OrderDiscount implements Node { +type OrderDiscount implements Node @doc(category: "Discounts") { id: ID! type: OrderDiscountType! name: String @@ -10399,12 +11453,13 @@ type OrderDiscount implements Node { } """An enumeration.""" -enum OrderDiscountType { +enum OrderDiscountType @doc(category: "Discounts") { + SALE VOUCHER MANUAL } -type OrderError { +type OrderError @doc(category: "Orders") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -10430,7 +11485,7 @@ type OrderError { } """An enumeration.""" -enum OrderErrorCode { +enum OrderErrorCode @doc(category: "Orders") { BILLING_ADDRESS_NOT_SET CANNOT_CANCEL_FULFILLMENT CANNOT_CANCEL_ORDER @@ -10450,6 +11505,7 @@ enum OrderErrorCode { ORDER_NO_SHIPPING_ADDRESS PAYMENT_ERROR PAYMENT_MISSING + TRANSACTION_ERROR REQUIRED SHIPPING_METHOD_NOT_APPLICABLE SHIPPING_METHOD_REQUIRED @@ -10462,7 +11518,6 @@ enum OrderErrorCode { DUPLICATED_INPUT_ITEM NOT_AVAILABLE_IN_CHANNEL CHANNEL_INACTIVE - MISSING_TRANSACTION_ACTION_REQUEST_WEBHOOK } """An enumeration.""" @@ -10471,23 +11526,189 @@ enum AddressTypeEnum { SHIPPING } +""" +The details of granted refund. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type OrderGrantedRefund @doc(category: "Orders") { + id: ID! + + """Time of creation.""" + createdAt: DateTime! + + """Time of last update.""" + updatedAt: DateTime! + + """Refund amount.""" + amount: Money! + + """Reason of the refund.""" + reason: String + + """ + User who performed the action. Requires of of the following permissions: MANAGE_USERS, MANAGE_STAFF, OWNER. + """ + user: User + + """App that performed the action.""" + app: App +} + """Represents transaction's event.""" -type TransactionEvent implements Node { +type TransactionEvent implements Node @doc(category: "Payments") { """The ID of the object.""" id: ID! createdAt: DateTime! """Status of transaction's event.""" - status: TransactionStatus! + status: TransactionStatus @deprecated(reason: "This field will be removed in Saleor 3.15 (Preview Feature). Use `type` instead.") """Reference of transaction's event.""" - reference: String! + reference: String! @deprecated(reason: "This field will be removed in Saleor 3.15 (Preview Feature).Use `pspReference` instead.") + + """ + PSP reference of transaction. + + Added in Saleor 3.13. + """ + pspReference: String! """Name of the transaction's event.""" - name: String + name: String @deprecated(reason: "This field will be removed in Saleor 3.15 (Preview Feature). Use `message` instead.") + + """ + Message related to the transaction's event. + + Added in Saleor 3.13. + """ + message: String! + + """ + The url that will allow to redirect user to payment provider page with transaction details. + + Added in Saleor 3.13. + """ + externalUrl: String! + + """ + The amount related to this event. + + Added in Saleor 3.13. + """ + amount: Money! + + """ + The type of action related to this event. + + Added in Saleor 3.13. + """ + type: TransactionEventTypeEnum + + """ + User or App that created the transaction event. + + Added in Saleor 3.13. + """ + createdBy: UserOrApp } -type CheckoutCountableConnection { +""" +Represents possible event types. + + Added in Saleor 3.12. + + The following types are possible: + AUTHORIZATION_SUCCESS - represents success authorization. + AUTHORIZATION_FAILURE - represents failure authorization. + AUTHORIZATION_ADJUSTMENT - represents authorization adjustment. + AUTHORIZATION_REQUEST - represents authorization request. + AUTHORIZATION_ACTION_REQUIRED - represents authorization that needs + additional actions from the customer. + CHARGE_ACTION_REQUIRED - represents charge that needs + additional actions from the customer. + CHARGE_SUCCESS - represents success charge. + CHARGE_FAILURE - represents failure charge. + CHARGE_BACK - represents chargeback. + CHARGE_REQUEST - represents charge request. + REFUND_SUCCESS - represents success refund. + REFUND_FAILURE - represents failure refund. + REFUND_REVERSE - represents reverse refund. + REFUND_REQUEST - represents refund request. + CANCEL_SUCCESS - represents success cancel. + CANCEL_FAILURE - represents failure cancel. + CANCEL_REQUEST - represents cancel request. + INFO - represents info event. +""" +enum TransactionEventTypeEnum @doc(category: "Payments") { + AUTHORIZATION_SUCCESS + AUTHORIZATION_FAILURE + AUTHORIZATION_ADJUSTMENT + AUTHORIZATION_REQUEST + AUTHORIZATION_ACTION_REQUIRED + CHARGE_ACTION_REQUIRED + CHARGE_SUCCESS + CHARGE_FAILURE + CHARGE_BACK + CHARGE_REQUEST + REFUND_SUCCESS + REFUND_FAILURE + REFUND_REVERSE + REFUND_REQUEST + CANCEL_SUCCESS + CANCEL_FAILURE + CANCEL_REQUEST + INFO +} + +union UserOrApp = User | App + +""" +Determine a current authorize status for checkout. + + We treat the checkout as fully authorized when the sum of authorized and charged + funds cover the checkout.total. + We treat the checkout as partially authorized when the sum of authorized and charged + funds covers only part of the checkout.total + We treat the checkout as not authorized when the sum of authorized and charged funds + is 0. + + NONE - the funds are not authorized + PARTIAL - the cover funds don't cover fully the checkout's total + FULL - the cover funds covers the checkout's total +""" +enum CheckoutAuthorizeStatusEnum @doc(category: "Checkout") { + NONE + PARTIAL + FULL +} + +""" +Determine the current charge status for the checkout. + + The checkout is considered overcharged when the sum of the transactionItem's charge + amounts exceeds the value of `checkout.total`. + If the sum of the transactionItem's charge amounts equals + `checkout.total`, we consider the checkout to be fully charged. + If the sum of the transactionItem's charge amounts covers a part of the + `checkout.total`, we treat the checkout as partially charged. + + + NONE - the funds are not charged. + PARTIAL - the funds that are charged don't cover the checkout's total + FULL - the funds that are charged fully cover the checkout's total + OVERCHARGED - the charged funds are bigger than checkout's total +""" +enum CheckoutChargeStatusEnum @doc(category: "Checkout") { + NONE + PARTIAL + FULL + OVERCHARGED +} + +type CheckoutCountableConnection @doc(category: "Checkout") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [CheckoutCountableEdge!]! @@ -10496,7 +11717,7 @@ type CheckoutCountableConnection { totalCount: Int } -type CheckoutCountableEdge { +type CheckoutCountableEdge @doc(category: "Checkout") { """The item at the end of the edge.""" node: Checkout! @@ -10504,7 +11725,7 @@ type CheckoutCountableEdge { cursor: String! } -type GiftCardCountableConnection { +type GiftCardCountableConnection @doc(category: "Gift cards") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [GiftCardCountableEdge!]! @@ -10513,7 +11734,7 @@ type GiftCardCountableConnection { totalCount: Int } -type GiftCardCountableEdge { +type GiftCardCountableEdge @doc(category: "Gift cards") { """The item at the end of the edge.""" node: GiftCard! @@ -10521,7 +11742,7 @@ type GiftCardCountableEdge { cursor: String! } -type OrderCountableConnection { +type OrderCountableConnection @doc(category: "Orders") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [OrderCountableEdge!]! @@ -10530,7 +11751,7 @@ type OrderCountableConnection { totalCount: Int } -type OrderCountableEdge { +type OrderCountableEdge @doc(category: "Orders") { """The item at the end of the edge.""" node: Order! @@ -10538,7 +11759,8 @@ type OrderCountableEdge { cursor: String! } -type UserPermission { +"""Represents user's permissions.""" +type UserPermission @doc(category: "Users") { """Internal code for permission.""" code: PermissionEnum! @@ -10553,7 +11775,7 @@ type UserPermission { } """Represents permission group data.""" -type Group implements Node { +type Group implements Node @doc(category: "Users") { id: ID! name: String! @@ -10571,10 +11793,28 @@ type Group implements Node { True, if the currently authenticated user has rights to manage a group. """ userCanManage: Boolean! + + """ + List of channels the group has access to. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + accessibleChannels: [Channel!] + + """ + Determine if the group have restricted access to channels. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + restrictedAccessToChannels: Boolean! } """History log of the customer.""" -type CustomerEvent implements Node { +type CustomerEvent implements Node @doc(category: "Users") { id: ID! """Date when event happened at in ISO 8601 format.""" @@ -10603,7 +11843,7 @@ type CustomerEvent implements Node { } """An enumeration.""" -enum CustomerEventsEnum { +enum CustomerEventsEnum @doc(category: "Users") { ACCOUNT_CREATED ACCOUNT_ACTIVATED ACCOUNT_DEACTIVATED @@ -10624,7 +11864,7 @@ enum CustomerEventsEnum { """ Represents a payment source stored for user in payment gateway, such as credit card. """ -type PaymentSource { +type PaymentSource @doc(category: "Payments") { """Payment gateway name.""" gateway: String! @@ -10660,14 +11900,8 @@ type Limits { warehouses: Int } -"""Order related settings from site settings.""" -type OrderSettings { - automaticallyConfirmAllNewOrders: Boolean! - automaticallyFulfillNonShippableGiftCard: Boolean! -} - """Gift card related settings from site settings.""" -type GiftCardSettings { +type GiftCardSettings @doc(category: "Gift cards") { """The gift card expiry type settings.""" expiryType: GiftCardSettingsExpiryTypeEnum! @@ -10676,7 +11910,7 @@ type GiftCardSettings { } """An enumeration.""" -enum GiftCardSettingsExpiryTypeEnum { +enum GiftCardSettingsExpiryTypeEnum @doc(category: "Gift cards") { NEVER_EXPIRE EXPIRY_PERIOD } @@ -10697,12 +11931,12 @@ enum TimePeriodTypeEnum { YEAR } -input ShippingZoneFilterInput { +input ShippingZoneFilterInput @doc(category: "Shipping") { search: String channels: [ID!] } -type DigitalContentCountableConnection { +type DigitalContentCountableConnection @doc(category: "Products") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [DigitalContentCountableEdge!]! @@ -10711,7 +11945,7 @@ type DigitalContentCountableConnection { totalCount: Int } -type DigitalContentCountableEdge { +type DigitalContentCountableEdge @doc(category: "Products") { """The item at the end of the edge.""" node: DigitalContent! @@ -10719,15 +11953,15 @@ type DigitalContentCountableEdge { cursor: String! } -input CategoryFilterInput { +input CategoryFilterInput @doc(category: "Products") { search: String metadata: [MetadataFilter!] ids: [ID!] slugs: [String!] } -input CategorySortingInput { - """Specifies the direction in which to sort products.""" +input CategorySortingInput @doc(category: "Products") { + """Specifies the direction in which to sort categories.""" direction: OrderDirection! """ @@ -10741,7 +11975,7 @@ input CategorySortingInput { field: CategorySortField! } -enum CategorySortField { +enum CategorySortField @doc(category: "Products") { """Sort categories by name.""" NAME @@ -10752,7 +11986,7 @@ enum CategorySortField { SUBCATEGORY_COUNT } -input CollectionFilterInput { +input CollectionFilterInput @doc(category: "Products") { published: CollectionPublished search: String metadata: [MetadataFilter!] @@ -10767,13 +12001,13 @@ input CollectionFilterInput { channel: String } -enum CollectionPublished { +enum CollectionPublished @doc(category: "Products") { PUBLISHED HIDDEN } -input CollectionSortingInput { - """Specifies the direction in which to sort products.""" +input CollectionSortingInput @doc(category: "Products") { + """Specifies the direction in which to sort collections.""" direction: OrderDirection! """ @@ -10787,7 +12021,7 @@ input CollectionSortingInput { field: CollectionSortField! } -enum CollectionSortField { +enum CollectionSortField @doc(category: "Products") { """Sort collections by name.""" NAME @@ -10816,7 +12050,7 @@ enum CollectionSortField { PUBLISHED_AT } -input ProductTypeFilterInput { +input ProductTypeFilterInput @doc(category: "Products") { search: String configurable: ProductTypeConfigurable productType: ProductTypeEnum @@ -10826,25 +12060,25 @@ input ProductTypeFilterInput { slugs: [String!] } -enum ProductTypeConfigurable { +enum ProductTypeConfigurable @doc(category: "Products") { CONFIGURABLE SIMPLE } -enum ProductTypeEnum { +enum ProductTypeEnum @doc(category: "Products") { DIGITAL SHIPPABLE } -input ProductTypeSortingInput { - """Specifies the direction in which to sort products.""" +input ProductTypeSortingInput @doc(category: "Products") { + """Specifies the direction in which to sort product types.""" direction: OrderDirection! """Sort product types by the selected field.""" field: ProductTypeSortField! } -enum ProductTypeSortField { +enum ProductTypeSortField @doc(category: "Products") { """Sort products by name.""" NAME @@ -10855,7 +12089,7 @@ enum ProductTypeSortField { SHIPPING_REQUIRED } -input ProductVariantFilterInput { +input ProductVariantFilterInput @doc(category: "Products") { search: String sku: [String!] metadata: [MetadataFilter!] @@ -10863,20 +12097,20 @@ input ProductVariantFilterInput { updatedAt: DateTimeRangeInput } -input ProductVariantSortingInput { - """Specifies the direction in which to sort products.""" +input ProductVariantSortingInput @doc(category: "Products") { + """Specifies the direction in which to sort productVariants.""" direction: OrderDirection! """Sort productVariants by the selected field.""" field: ProductVariantSortField! } -enum ProductVariantSortField { +enum ProductVariantSortField @doc(category: "Products") { """Sort products variants by last modified at.""" LAST_MODIFIED_AT } -type PaymentCountableConnection { +type PaymentCountableConnection @doc(category: "Payments") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [PaymentCountableEdge!]! @@ -10885,7 +12119,7 @@ type PaymentCountableConnection { totalCount: Int } -type PaymentCountableEdge { +type PaymentCountableEdge @doc(category: "Payments") { """The item at the end of the edge.""" node: Payment! @@ -10893,7 +12127,7 @@ type PaymentCountableEdge { cursor: String! } -input PaymentFilterInput { +input PaymentFilterInput @doc(category: "Payments") { """ Filter by ids. @@ -10903,7 +12137,7 @@ input PaymentFilterInput { checkouts: [ID!] } -type PageCountableConnection { +type PageCountableConnection @doc(category: "Pages") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [PageCountableEdge!]! @@ -10912,7 +12146,7 @@ type PageCountableConnection { totalCount: Int } -type PageCountableEdge { +type PageCountableEdge @doc(category: "Pages") { """The item at the end of the edge.""" node: Page! @@ -10920,15 +12154,15 @@ type PageCountableEdge { cursor: String! } -input PageSortingInput { - """Specifies the direction in which to sort products.""" +input PageSortingInput @doc(category: "Pages") { + """Specifies the direction in which to sort pages.""" direction: OrderDirection! """Sort pages by the selected field.""" field: PageSortField! } -enum PageSortField { +enum PageSortField @doc(category: "Pages") { """Sort pages by title.""" TITLE @@ -10967,7 +12201,7 @@ enum PageSortField { CREATED_AT } -input PageFilterInput { +input PageFilterInput @doc(category: "Pages") { search: String metadata: [MetadataFilter!] pageTypes: [ID!] @@ -10975,7 +12209,7 @@ input PageFilterInput { slugs: [String!] } -type PageTypeCountableConnection { +type PageTypeCountableConnection @doc(category: "Pages") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [PageTypeCountableEdge!]! @@ -10984,7 +12218,7 @@ type PageTypeCountableConnection { totalCount: Int } -type PageTypeCountableEdge { +type PageTypeCountableEdge @doc(category: "Pages") { """The item at the end of the edge.""" node: PageType! @@ -10992,15 +12226,15 @@ type PageTypeCountableEdge { cursor: String! } -input PageTypeSortingInput { - """Specifies the direction in which to sort products.""" +input PageTypeSortingInput @doc(category: "Pages") { + """Specifies the direction in which to sort page types.""" direction: OrderDirection! """Sort page types by the selected field.""" field: PageTypeSortField! } -enum PageTypeSortField { +enum PageTypeSortField @doc(category: "Pages") { """Sort page types by name.""" NAME @@ -11008,12 +12242,12 @@ enum PageTypeSortField { SLUG } -input PageTypeFilterInput { +input PageTypeFilterInput @doc(category: "Pages") { search: String slugs: [String!] } -type OrderEventCountableConnection { +type OrderEventCountableConnection @doc(category: "Orders") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [OrderEventCountableEdge!]! @@ -11022,7 +12256,7 @@ type OrderEventCountableConnection { totalCount: Int } -type OrderEventCountableEdge { +type OrderEventCountableEdge @doc(category: "Orders") { """The item at the end of the edge.""" node: OrderEvent! @@ -11030,15 +12264,15 @@ type OrderEventCountableEdge { cursor: String! } -input OrderSortingInput { - """Specifies the direction in which to sort products.""" +input OrderSortingInput @doc(category: "Orders") { + """Specifies the direction in which to sort orders.""" direction: OrderDirection! """Sort orders by the selected field.""" field: OrderSortField! } -enum OrderSortField { +enum OrderSortField @doc(category: "Orders") { """Sort orders by number.""" NUMBER @@ -11074,7 +12308,7 @@ enum OrderSortField { FULFILLMENT_STATUS } -input OrderFilterInput { +input OrderFilterInput @doc(category: "Orders") { paymentStatus: [PaymentChargeStatusEnum!] status: [OrderStatusFilter!] customer: String @@ -11091,9 +12325,10 @@ input OrderFilterInput { giftCardUsed: Boolean giftCardBought: Boolean numbers: [String!] + checkoutIds: [ID!] } -enum OrderStatusFilter { +enum OrderStatusFilter @doc(category: "Orders") { READY_TO_FULFILL READY_TO_CAPTURE UNFULFILLED @@ -11103,7 +12338,7 @@ enum OrderStatusFilter { CANCELED } -input OrderDraftFilterInput { +input OrderDraftFilterInput @doc(category: "Orders") { customer: String created: DateRangeInput search: String @@ -11111,7 +12346,7 @@ input OrderDraftFilterInput { channels: [ID!] } -type MenuCountableConnection { +type MenuCountableConnection @doc(category: "Menu") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [MenuCountableEdge!]! @@ -11120,7 +12355,7 @@ type MenuCountableConnection { totalCount: Int } -type MenuCountableEdge { +type MenuCountableEdge @doc(category: "Menu") { """The item at the end of the edge.""" node: Menu! @@ -11129,7 +12364,7 @@ type MenuCountableEdge { } input MenuSortingInput { - """Specifies the direction in which to sort products.""" + """Specifies the direction in which to sort menus.""" direction: OrderDirection! """Sort menus by the selected field.""" @@ -11151,7 +12386,7 @@ input MenuFilterInput { slugs: [String!] } -type MenuItemCountableConnection { +type MenuItemCountableConnection @doc(category: "Menu") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [MenuItemCountableEdge!]! @@ -11160,7 +12395,7 @@ type MenuItemCountableConnection { totalCount: Int } -type MenuItemCountableEdge { +type MenuItemCountableEdge @doc(category: "Menu") { """The item at the end of the edge.""" node: MenuItem! @@ -11169,7 +12404,7 @@ type MenuItemCountableEdge { } input MenuItemSortingInput { - """Specifies the direction in which to sort products.""" + """Specifies the direction in which to sort menu items.""" direction: OrderDirection! """Sort menu items by the selected field.""" @@ -11186,15 +12421,15 @@ input MenuItemFilterInput { metadata: [MetadataFilter!] } -input GiftCardSortingInput { - """Specifies the direction in which to sort products.""" +input GiftCardSortingInput @doc(category: "Gift cards") { + """Specifies the direction in which to sort gift cards.""" direction: OrderDirection! """Sort gift cards by the selected field.""" field: GiftCardSortField! } -enum GiftCardSortField { +enum GiftCardSortField @doc(category: "Gift cards") { """Sort gift cards by product.""" PRODUCT @@ -11212,7 +12447,7 @@ enum GiftCardSortField { CREATED_AT } -input GiftCardFilterInput { +input GiftCardFilterInput @doc(category: "Gift cards") { isActive: Boolean metadata: [MetadataFilter!] tags: [String!] @@ -11225,7 +12460,7 @@ input GiftCardFilterInput { code: String } -type GiftCardTagCountableConnection { +type GiftCardTagCountableConnection @doc(category: "Gift cards") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [GiftCardTagCountableEdge!]! @@ -11234,7 +12469,7 @@ type GiftCardTagCountableConnection { totalCount: Int } -type GiftCardTagCountableEdge { +type GiftCardTagCountableEdge @doc(category: "Gift cards") { """The item at the end of the edge.""" node: GiftCardTag! @@ -11242,7 +12477,7 @@ type GiftCardTagCountableEdge { cursor: String! } -input GiftCardTagFilterInput { +input GiftCardTagFilterInput @doc(category: "Gift cards") { search: String } @@ -11339,7 +12574,7 @@ enum PluginConfigurationType { } input PluginSortingInput { - """Specifies the direction in which to sort products.""" + """Specifies the direction in which to sort plugins.""" direction: OrderDirection! """Sort plugins by the selected field.""" @@ -11351,7 +12586,7 @@ enum PluginSortField { IS_ACTIVE } -type SaleCountableConnection { +type SaleCountableConnection @doc(category: "Discounts") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [SaleCountableEdge!]! @@ -11360,7 +12595,7 @@ type SaleCountableConnection { totalCount: Int } -type SaleCountableEdge { +type SaleCountableEdge @doc(category: "Discounts") { """The item at the end of the edge.""" node: Sale! @@ -11368,7 +12603,7 @@ type SaleCountableEdge { cursor: String! } -input SaleFilterInput { +input SaleFilterInput @doc(category: "Discounts") { status: [DiscountStatusEnum!] saleType: DiscountValueTypeEnum started: DateTimeRangeInput @@ -11377,14 +12612,14 @@ input SaleFilterInput { updatedAt: DateTimeRangeInput } -enum DiscountStatusEnum { +enum DiscountStatusEnum @doc(category: "Discounts") { ACTIVE EXPIRED SCHEDULED } -input SaleSortingInput { - """Specifies the direction in which to sort products.""" +input SaleSortingInput @doc(category: "Discounts") { + """Specifies the direction in which to sort sales.""" direction: OrderDirection! """ @@ -11398,7 +12633,7 @@ input SaleSortingInput { field: SaleSortField! } -enum SaleSortField { +enum SaleSortField @doc(category: "Discounts") { """Sort sales by name.""" NAME @@ -11425,7 +12660,7 @@ enum SaleSortField { LAST_MODIFIED_AT } -type VoucherCountableConnection { +type VoucherCountableConnection @doc(category: "Discounts") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [VoucherCountableEdge!]! @@ -11434,7 +12669,7 @@ type VoucherCountableConnection { totalCount: Int } -type VoucherCountableEdge { +type VoucherCountableEdge @doc(category: "Discounts") { """The item at the end of the edge.""" node: Voucher! @@ -11442,7 +12677,7 @@ type VoucherCountableEdge { cursor: String! } -input VoucherFilterInput { +input VoucherFilterInput @doc(category: "Discounts") { status: [DiscountStatusEnum!] timesUsed: IntRangeInput discountType: [VoucherDiscountType!] @@ -11452,14 +12687,14 @@ input VoucherFilterInput { ids: [ID!] } -enum VoucherDiscountType { +enum VoucherDiscountType @doc(category: "Discounts") { FIXED PERCENTAGE SHIPPING } -input VoucherSortingInput { - """Specifies the direction in which to sort products.""" +input VoucherSortingInput @doc(category: "Discounts") { + """Specifies the direction in which to sort vouchers.""" direction: OrderDirection! """ @@ -11590,7 +12825,7 @@ input ExportFileFilterInput { } input ExportFileSortingInput { - """Specifies the direction in which to sort products.""" + """Specifies the direction in which to sort export file.""" direction: OrderDirection! """Sort export file by the selected field.""" @@ -11604,15 +12839,15 @@ enum ExportFileSortField { LAST_MODIFIED_AT } -input CheckoutSortingInput { - """Specifies the direction in which to sort products.""" +input CheckoutSortingInput @doc(category: "Checkout") { + """Specifies the direction in which to sort checkouts.""" direction: OrderDirection! """Sort checkouts by the selected field.""" field: CheckoutSortField! } -enum CheckoutSortField { +enum CheckoutSortField @doc(category: "Checkout") { """Sort checkouts by creation date.""" CREATION_DATE @@ -11623,15 +12858,18 @@ enum CheckoutSortField { PAYMENT } -input CheckoutFilterInput { +input CheckoutFilterInput @doc(category: "Checkout") { customer: String created: DateRangeInput search: String metadata: [MetadataFilter!] channels: [ID!] + updatedAt: DateRangeInput + authorizeStatus: [CheckoutAuthorizeStatusEnum!] + chargeStatus: [CheckoutChargeStatusEnum!] } -type CheckoutLineCountableConnection { +type CheckoutLineCountableConnection @doc(category: "Checkout") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [CheckoutLineCountableEdge!]! @@ -11640,7 +12878,7 @@ type CheckoutLineCountableConnection { totalCount: Int } -type CheckoutLineCountableEdge { +type CheckoutLineCountableEdge @doc(category: "Checkout") { """The item at the end of the edge.""" node: CheckoutLine! @@ -11648,15 +12886,15 @@ type CheckoutLineCountableEdge { cursor: String! } -input AttributeSortingInput { - """Specifies the direction in which to sort products.""" +input AttributeSortingInput @doc(category: "Attributes") { + """Specifies the direction in which to sort attributes.""" direction: OrderDirection! """Sort attributes by the selected field.""" field: AttributeSortField! } -enum AttributeSortField { +enum AttributeSortField @doc(category: "Attributes") { """Sort attributes by name""" NAME @@ -11688,7 +12926,7 @@ enum AttributeSortField { } """Represents ongoing installation of app.""" -type AppInstallation implements Node & Job { +type AppInstallation implements Node & Job @doc(category: "Apps") { id: ID! """Job status.""" @@ -11704,9 +12942,18 @@ type AppInstallation implements Node & Job { message: String appName: String! manifestUrl: String! + + """ + App's brand data. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + brand: AppBrand } -type AppCountableConnection { +type AppCountableConnection @doc(category: "Apps") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [AppCountableEdge!]! @@ -11715,7 +12962,7 @@ type AppCountableConnection { totalCount: Int } -type AppCountableEdge { +type AppCountableEdge @doc(category: "Apps") { """The item at the end of the edge.""" node: App! @@ -11723,21 +12970,21 @@ type AppCountableEdge { cursor: String! } -input AppFilterInput { +input AppFilterInput @doc(category: "Apps") { search: String isActive: Boolean type: AppTypeEnum } -input AppSortingInput { - """Specifies the direction in which to sort products.""" +input AppSortingInput @doc(category: "Apps") { + """Specifies the direction in which to sort apps.""" direction: OrderDirection! """Sort apps by the selected field.""" field: AppSortField! } -enum AppSortField { +enum AppSortField @doc(category: "Apps") { """Sort apps by name.""" NAME @@ -11745,7 +12992,7 @@ enum AppSortField { CREATION_DATE } -type AppExtensionCountableConnection { +type AppExtensionCountableConnection @doc(category: "Apps") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [AppExtensionCountableEdge!]! @@ -11754,7 +13001,7 @@ type AppExtensionCountableConnection { totalCount: Int } -type AppExtensionCountableEdge { +type AppExtensionCountableEdge @doc(category: "Apps") { """The item at the end of the edge.""" node: AppExtension! @@ -11762,12 +13009,13 @@ type AppExtensionCountableEdge { cursor: String! } -input AppExtensionFilterInput { +input AppExtensionFilterInput @doc(category: "Apps") { mount: [AppExtensionMountEnum!] target: AppExtensionTargetEnum } -type AddressValidationData { +"""Represents address validation rules for a country.""" +type AddressValidationData @doc(category: "Users") { countryCode: String! countryName: String! addressFormat: String! @@ -11792,7 +13040,7 @@ type ChoiceValue { verbose: String } -type UserCountableConnection { +type UserCountableConnection @doc(category: "Users") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [UserCountableEdge!]! @@ -11801,7 +13049,7 @@ type UserCountableConnection { totalCount: Int } -type UserCountableEdge { +type UserCountableEdge @doc(category: "Users") { """The item at the end of the edge.""" node: User! @@ -11809,7 +13057,7 @@ type UserCountableEdge { cursor: String! } -input CustomerFilterInput { +input CustomerFilterInput @doc(category: "Users") { dateJoined: DateRangeInput numberOfOrders: IntRangeInput placedOrders: DateRangeInput @@ -11825,15 +13073,15 @@ input CustomerFilterInput { updatedAt: DateTimeRangeInput } -input UserSortingInput { - """Specifies the direction in which to sort products.""" +input UserSortingInput @doc(category: "Users") { + """Specifies the direction in which to sort users.""" direction: OrderDirection! """Sort users by the selected field.""" field: UserSortField! } -enum UserSortField { +enum UserSortField @doc(category: "Users") { """Sort users by first name.""" FIRST_NAME @@ -11853,7 +13101,7 @@ enum UserSortField { LAST_MODIFIED_AT } -type GroupCountableConnection { +type GroupCountableConnection @doc(category: "Users") { """Pagination data for this connection.""" pageInfo: PageInfo! edges: [GroupCountableEdge!]! @@ -11862,7 +13110,7 @@ type GroupCountableConnection { totalCount: Int } -type GroupCountableEdge { +type GroupCountableEdge @doc(category: "Users") { """The item at the end of the edge.""" node: Group! @@ -11870,31 +13118,33 @@ type GroupCountableEdge { cursor: String! } -input PermissionGroupFilterInput { +input PermissionGroupFilterInput @doc(category: "Users") { search: String ids: [ID!] } -input PermissionGroupSortingInput { - """Specifies the direction in which to sort products.""" +input PermissionGroupSortingInput @doc(category: "Users") { + """Specifies the direction in which to sort permission group.""" direction: OrderDirection! """Sort permission group by the selected field.""" field: PermissionGroupSortField! } -enum PermissionGroupSortField { +"""Sorting options for permission groups.""" +enum PermissionGroupSortField @doc(category: "Users") { """Sort permission group accounts by name.""" NAME } -input StaffUserInput { +input StaffUserInput @doc(category: "Users") { status: StaffMemberStatus search: String ids: [ID!] } -enum StaffMemberStatus { +"""Represents status of a staff account.""" +enum StaffMemberStatus @doc(category: "Users") { """User account has been activated.""" ACTIVE @@ -11911,7 +13161,7 @@ type Mutation { webhookCreate( """Fields required to create a webhook.""" input: WebhookCreateInput! - ): WebhookCreate + ): WebhookCreate @doc(category: "Webhooks") """ Delete a webhook. Before the deletion, the webhook is deactivated to pause any deliveries that are already scheduled. The deletion might fail if delivery is in progress. In such a case, the webhook is not deleted but remains deactivated. @@ -11921,12 +13171,12 @@ type Mutation { webhookDelete( """ID of a webhook to delete.""" id: ID! - ): WebhookDelete + ): WebhookDelete @doc(category: "Webhooks") """ Updates a webhook subscription. - Requires one of the following permissions: MANAGE_APPS. + Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ webhookUpdate( """ID of a webhook to update.""" @@ -11934,7 +13184,7 @@ type Mutation { """Fields required to update a webhook.""" input: WebhookUpdateInput! - ): WebhookUpdate + ): WebhookUpdate @doc(category: "Webhooks") """ Retries event delivery. @@ -11944,7 +13194,41 @@ type Mutation { eventDeliveryRetry( """ID of the event delivery to retry.""" id: ID! - ): EventDeliveryRetry + ): EventDeliveryRetry @doc(category: "Webhooks") + + """ + Performs a dry run of a webhook event. Supports a single event (the first, if multiple provided in the `query`). Requires permission relevant to processed event. + + Added in Saleor 3.11. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + """ + webhookDryRun( + """The ID of an object to serialize.""" + objectId: ID! + + """The subscription query that defines the webhook event and its payload.""" + query: String! + ): WebhookDryRun @doc(category: "Webhooks") + + """ + Trigger a webhook event. Supports a single event (the first, if multiple provided in the `webhook.subscription_query`). Requires permission relevant to processed event. Successfully delivered webhook returns `delivery` with status='PENDING' and empty payload. + + Added in Saleor 3.11. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + """ + webhookTrigger( + """The ID of an object to serialize.""" + objectId: ID! + + """The ID of the webhook.""" + webhookId: ID! + ): WebhookTrigger @doc(category: "Webhooks") """ Creates new warehouse. @@ -11954,7 +13238,7 @@ type Mutation { createWarehouse( """Fields required to create warehouse.""" input: WarehouseCreateInput! - ): WarehouseCreate + ): WarehouseCreate @doc(category: "Products") """ Updates given warehouse. @@ -11967,7 +13251,7 @@ type Mutation { """Fields required to update warehouse.""" input: WarehouseUpdateInput! - ): WarehouseUpdate + ): WarehouseUpdate @doc(category: "Products") """ Deletes selected warehouse. @@ -11977,7 +13261,7 @@ type Mutation { deleteWarehouse( """ID of a warehouse to delete.""" id: ID! - ): WarehouseDelete + ): WarehouseDelete @doc(category: "Products") """ Add shipping zone to given warehouse. @@ -11990,7 +13274,7 @@ type Mutation { """List of shipping zone IDs.""" shippingZoneIds: [ID!]! - ): WarehouseShippingZoneAssign + ): WarehouseShippingZoneAssign @doc(category: "Products") """ Remove shipping zone from given warehouse. @@ -12003,42 +13287,36 @@ type Mutation { """List of shipping zone IDs.""" shippingZoneIds: [ID!]! - ): WarehouseShippingZoneUnassign + ): WarehouseShippingZoneUnassign @doc(category: "Products") """ Create a tax class. - Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ taxClassCreate( """Fields required to create a tax class.""" input: TaxClassCreateInput! - ): TaxClassCreate + ): TaxClassCreate @doc(category: "Taxes") """ Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class. - Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ taxClassDelete( """ID of a tax class to delete.""" id: ID! - ): TaxClassDelete + ): TaxClassDelete @doc(category: "Taxes") """ Update a tax class. - Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ @@ -12048,14 +13326,12 @@ type Mutation { """Fields required to update a tax class.""" input: TaxClassUpdateInput! - ): TaxClassUpdate + ): TaxClassUpdate @doc(category: "Taxes") """ Update tax configuration for a channel. - Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ @@ -12065,14 +13341,12 @@ type Mutation { """Fields required to update the tax configuration.""" input: TaxConfigurationUpdateInput! - ): TaxConfigurationUpdate + ): TaxConfigurationUpdate @doc(category: "Taxes") """ Update tax class rates for a specific country. - Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ @@ -12084,28 +13358,24 @@ type Mutation { List of tax rates per tax class to update. When `{taxClass: id, rate: null`} is passed, it deletes the rate object for given taxClass ID. When `{rate: Int}` is passed without a tax class, it updates the default tax class for this country. """ updateTaxClassRates: [TaxClassRateInput!]! - ): TaxCountryConfigurationUpdate + ): TaxCountryConfigurationUpdate @doc(category: "Taxes") """ Remove all tax class rates for a specific country. - Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ taxCountryConfigurationDelete( """Country in which to update the tax class rates.""" countryCode: CountryCode! - ): TaxCountryConfigurationDelete + ): TaxCountryConfigurationDelete @doc(category: "Taxes") """ Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known. - Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.8. Requires one of the following permissions: MANAGE_TAXES. """ @@ -12115,7 +13385,24 @@ type Mutation { """Determines if a taxes should be exempt.""" taxExemption: Boolean! - ): TaxExemptionManage + ): TaxExemptionManage @doc(category: "Taxes") + + """ + Updates stocks for a given variant and warehouse. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_PRODUCTS. + """ + stockBulkUpdate( + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" + errorPolicy: ErrorPolicyEnum + + """Input list of stocks to update.""" + stocks: [StockBulkUpdateInput!]! + ): StockBulkUpdate @doc(category: "Products") """ Creates a new staff notification recipient. @@ -12125,7 +13412,7 @@ type Mutation { staffNotificationRecipientCreate( """Fields required to create a staff notification recipient.""" input: StaffNotificationRecipientInput! - ): StaffNotificationRecipientCreate + ): StaffNotificationRecipientCreate @doc(category: "Users") """ Updates a staff notification recipient. @@ -12138,7 +13425,7 @@ type Mutation { """Fields required to update a staff notification recipient.""" input: StaffNotificationRecipientInput! - ): StaffNotificationRecipientUpdate + ): StaffNotificationRecipientUpdate @doc(category: "Users") """ Delete staff notification recipient. @@ -12148,7 +13435,7 @@ type Mutation { staffNotificationRecipientDelete( """ID of a staff notification recipient to delete.""" id: ID! - ): StaffNotificationRecipientDelete + ): StaffNotificationRecipientDelete @doc(category: "Users") """ Updates site domain of the shop. @@ -12158,7 +13445,7 @@ type Mutation { shopDomainUpdate( """Fields required to update site.""" input: SiteDomainInput - ): ShopDomainUpdate + ): ShopDomainUpdate @doc(category: "Shop") """ Updates shop settings. @@ -12168,14 +13455,14 @@ type Mutation { shopSettingsUpdate( """Fields required to update shop settings.""" input: ShopSettingsInput! - ): ShopSettingsUpdate + ): ShopSettingsUpdate @doc(category: "Shop") """ Fetch tax rates. Requires one of the following permissions: MANAGE_SETTINGS. """ - shopFetchTaxRates: ShopFetchTaxRates @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0.") + shopFetchTaxRates: ShopFetchTaxRates @doc(category: "Shop") @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0.") """ Creates/updates translations for shop settings. @@ -12188,7 +13475,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): ShopSettingsTranslate + ): ShopSettingsTranslate @doc(category: "Shop") """ Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. @@ -12198,17 +13485,17 @@ type Mutation { shopAddressUpdate( """Fields required to update shop address.""" input: AddressInput - ): ShopAddressUpdate + ): ShopAddressUpdate @doc(category: "Shop") """ - Update shop order settings. + Update shop order settings across all channels. Returns `orderSettings` for the first `channel` in alphabetical order. Requires one of the following permissions: MANAGE_ORDERS. """ orderSettingsUpdate( """Fields required to update shop order settings.""" input: OrderSettingsUpdateInput! - ): OrderSettingsUpdate + ): OrderSettingsUpdate @doc(category: "Orders") @deprecated(reason: "\\n\\nDEPRECATED: this mutation will be removed in Saleor 4.0. Use `channelUpdate` mutation instead.") """ Update gift card settings. @@ -12218,7 +13505,7 @@ type Mutation { giftCardSettingsUpdate( """Fields required to update gift card settings.""" input: GiftCardSettingsUpdateInput! - ): GiftCardSettingsUpdate + ): GiftCardSettingsUpdate @doc(category: "Gift cards") """ Manage shipping method's availability in channels. @@ -12231,7 +13518,7 @@ type Mutation { """Fields required to update shipping method channel listings.""" input: ShippingMethodChannelListingInput! - ): ShippingMethodChannelListingUpdate + ): ShippingMethodChannelListingUpdate @doc(category: "Shipping") """ Creates a new shipping price. @@ -12241,7 +13528,7 @@ type Mutation { shippingPriceCreate( """Fields required to create a shipping price.""" input: ShippingPriceInput! - ): ShippingPriceCreate + ): ShippingPriceCreate @doc(category: "Shipping") """ Deletes a shipping price. @@ -12251,7 +13538,7 @@ type Mutation { shippingPriceDelete( """ID of a shipping price to delete.""" id: ID! - ): ShippingPriceDelete + ): ShippingPriceDelete @doc(category: "Shipping") """ Deletes shipping prices. @@ -12261,7 +13548,7 @@ type Mutation { shippingPriceBulkDelete( """List of shipping price IDs to delete.""" ids: [ID!]! - ): ShippingPriceBulkDelete + ): ShippingPriceBulkDelete @doc(category: "Shipping") """ Updates a new shipping price. @@ -12274,7 +13561,7 @@ type Mutation { """Fields required to update a shipping price.""" input: ShippingPriceInput! - ): ShippingPriceUpdate + ): ShippingPriceUpdate @doc(category: "Shipping") """ Creates/updates translations for a shipping method. @@ -12288,7 +13575,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): ShippingPriceTranslate + ): ShippingPriceTranslate @doc(category: "Shipping") """ Exclude products from shipping price. @@ -12301,7 +13588,7 @@ type Mutation { """Exclude products input.""" input: ShippingPriceExcludeProductsInput! - ): ShippingPriceExcludeProducts + ): ShippingPriceExcludeProducts @doc(category: "Shipping") """ Remove product from excluded list for shipping price. @@ -12314,7 +13601,7 @@ type Mutation { """List of products which will be removed from excluded list.""" products: [ID!]! - ): ShippingPriceRemoveProductFromExclude + ): ShippingPriceRemoveProductFromExclude @doc(category: "Shipping") """ Creates a new shipping zone. @@ -12324,7 +13611,7 @@ type Mutation { shippingZoneCreate( """Fields required to create a shipping zone.""" input: ShippingZoneCreateInput! - ): ShippingZoneCreate + ): ShippingZoneCreate @doc(category: "Shipping") """ Deletes a shipping zone. @@ -12334,7 +13621,7 @@ type Mutation { shippingZoneDelete( """ID of a shipping zone to delete.""" id: ID! - ): ShippingZoneDelete + ): ShippingZoneDelete @doc(category: "Shipping") """ Deletes shipping zones. @@ -12344,7 +13631,7 @@ type Mutation { shippingZoneBulkDelete( """List of shipping zone IDs to delete.""" ids: [ID!]! - ): ShippingZoneBulkDelete + ): ShippingZoneBulkDelete @doc(category: "Shipping") """ Updates a new shipping zone. @@ -12357,7 +13644,7 @@ type Mutation { """Fields required to update a shipping zone.""" input: ShippingZoneUpdateInput! - ): ShippingZoneUpdate + ): ShippingZoneUpdate @doc(category: "Shipping") """ Assign attributes to a given product type. @@ -12370,7 +13657,7 @@ type Mutation { """ID of the product type to assign the attributes into.""" productTypeId: ID! - ): ProductAttributeAssign + ): ProductAttributeAssign @doc(category: "Products") """ Update attributes assigned to product variant for given product type. @@ -12385,7 +13672,7 @@ type Mutation { """ID of the product type to assign the attributes into.""" productTypeId: ID! - ): ProductAttributeAssignmentUpdate + ): ProductAttributeAssignmentUpdate @doc(category: "Products") """ Un-assign attributes from a given product type. @@ -12398,7 +13685,7 @@ type Mutation { """ID of the product type from which the attributes should be unassigned.""" productTypeId: ID! - ): ProductAttributeUnassign + ): ProductAttributeUnassign @doc(category: "Products") """ Creates a new category. @@ -12413,7 +13700,7 @@ type Mutation { ID of the parent category. If empty, category will be top level category. """ parent: ID - ): CategoryCreate + ): CategoryCreate @doc(category: "Products") """ Deletes a category. @@ -12423,7 +13710,7 @@ type Mutation { categoryDelete( """ID of a category to delete.""" id: ID! - ): CategoryDelete + ): CategoryDelete @doc(category: "Products") """ Deletes categories. @@ -12433,7 +13720,7 @@ type Mutation { categoryBulkDelete( """List of category IDs to delete.""" ids: [ID!]! - ): CategoryBulkDelete + ): CategoryBulkDelete @doc(category: "Products") """ Updates a category. @@ -12446,7 +13733,7 @@ type Mutation { """Fields required to update a category.""" input: CategoryInput! - ): CategoryUpdate + ): CategoryUpdate @doc(category: "Products") """ Creates/updates translations for a category. @@ -12460,7 +13747,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): CategoryTranslate + ): CategoryTranslate @doc(category: "Products") """ Adds products to a collection. @@ -12473,7 +13760,7 @@ type Mutation { """List of product IDs.""" products: [ID!]! - ): CollectionAddProducts + ): CollectionAddProducts @doc(category: "Products") """ Creates a new collection. @@ -12483,7 +13770,7 @@ type Mutation { collectionCreate( """Fields required to create a collection.""" input: CollectionCreateInput! - ): CollectionCreate + ): CollectionCreate @doc(category: "Products") """ Deletes a collection. @@ -12493,7 +13780,7 @@ type Mutation { collectionDelete( """ID of a collection to delete.""" id: ID! - ): CollectionDelete + ): CollectionDelete @doc(category: "Products") """ Reorder the products of a collection. @@ -12506,7 +13793,7 @@ type Mutation { """The collection products position operations.""" moves: [MoveProductInput!]! - ): CollectionReorderProducts + ): CollectionReorderProducts @doc(category: "Products") """ Deletes collections. @@ -12516,7 +13803,7 @@ type Mutation { collectionBulkDelete( """List of collection IDs to delete.""" ids: [ID!]! - ): CollectionBulkDelete + ): CollectionBulkDelete @doc(category: "Products") """ Remove products from a collection. @@ -12529,7 +13816,7 @@ type Mutation { """List of product IDs.""" products: [ID!]! - ): CollectionRemoveProducts + ): CollectionRemoveProducts @doc(category: "Products") """ Updates a collection. @@ -12542,7 +13829,7 @@ type Mutation { """Fields required to update a collection.""" input: CollectionInput! - ): CollectionUpdate + ): CollectionUpdate @doc(category: "Products") """ Creates/updates translations for a collection. @@ -12556,7 +13843,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): CollectionTranslate + ): CollectionTranslate @doc(category: "Products") """ Manage collection's availability in channels. @@ -12569,7 +13856,7 @@ type Mutation { """Fields required to create or update collection channel listings.""" input: CollectionChannelListingUpdateInput! - ): CollectionChannelListingUpdate + ): CollectionChannelListingUpdate @doc(category: "Products") """ Creates a new product. @@ -12579,7 +13866,7 @@ type Mutation { productCreate( """Fields required to create a product.""" input: ProductCreateInput! - ): ProductCreate + ): ProductCreate @doc(category: "Products") """ Deletes a product. @@ -12596,7 +13883,24 @@ type Mutation { """ID of a product to delete.""" id: ID - ): ProductDelete + ): ProductDelete @doc(category: "Products") + + """ + Creates products. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_PRODUCTS. + """ + productBulkCreate( + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" + errorPolicy: ErrorPolicyEnum + + """Input list of products to create.""" + products: [ProductBulkCreateInput!]! + ): ProductBulkCreate @doc(category: "Products") """ Deletes products. @@ -12606,7 +13910,7 @@ type Mutation { productBulkDelete( """List of product IDs to delete.""" ids: [ID!]! - ): ProductBulkDelete + ): ProductBulkDelete @doc(category: "Products") """ Updates an existing product. @@ -12626,7 +13930,7 @@ type Mutation { """Fields required to update a product.""" input: ProductInput! - ): ProductUpdate + ): ProductUpdate @doc(category: "Products") """ Creates/updates translations for a product. @@ -12640,7 +13944,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): ProductTranslate + ): ProductTranslate @doc(category: "Products") """ Manage product's availability in channels. @@ -12653,7 +13957,7 @@ type Mutation { """Fields required to create or update product channel listings.""" input: ProductChannelListingUpdateInput! - ): ProductChannelListingUpdate + ): ProductChannelListingUpdate @doc(category: "Products") """ 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 @@ -12663,7 +13967,7 @@ type Mutation { productMediaCreate( """Fields required to create a product media.""" input: ProductMediaCreateInput! - ): ProductMediaCreate + ): ProductMediaCreate @doc(category: "Products") """ Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. @@ -12676,7 +13980,7 @@ type Mutation { """Id of product that variants order will be altered.""" productId: ID! - ): ProductVariantReorder + ): ProductVariantReorder @doc(category: "Products") """ Deletes a product media. @@ -12686,7 +13990,7 @@ type Mutation { productMediaDelete( """ID of a product media to delete.""" id: ID! - ): ProductMediaDelete + ): ProductMediaDelete @doc(category: "Products") """ Deletes product media. @@ -12696,7 +14000,7 @@ type Mutation { productMediaBulkDelete( """List of product media IDs to delete.""" ids: [ID!]! - ): ProductMediaBulkDelete + ): ProductMediaBulkDelete @doc(category: "Products") """ Changes ordering of the product media. @@ -12709,7 +14013,7 @@ type Mutation { """ID of product that media order will be altered.""" productId: ID! - ): ProductMediaReorder + ): ProductMediaReorder @doc(category: "Products") """ Updates a product media. @@ -12722,7 +14026,7 @@ type Mutation { """Fields required to update a product media.""" input: ProductMediaUpdateInput! - ): ProductMediaUpdate + ): ProductMediaUpdate @doc(category: "Products") """ Creates a new product type. @@ -12732,7 +14036,7 @@ type Mutation { productTypeCreate( """Fields required to create a product type.""" input: ProductTypeInput! - ): ProductTypeCreate + ): ProductTypeCreate @doc(category: "Products") """ Deletes a product type. @@ -12742,7 +14046,7 @@ type Mutation { productTypeDelete( """ID of a product type to delete.""" id: ID! - ): ProductTypeDelete + ): ProductTypeDelete @doc(category: "Products") """ Deletes product types. @@ -12752,7 +14056,7 @@ type Mutation { productTypeBulkDelete( """List of product type IDs to delete.""" ids: [ID!]! - ): ProductTypeBulkDelete + ): ProductTypeBulkDelete @doc(category: "Products") """ Updates an existing product type. @@ -12765,7 +14069,7 @@ type Mutation { """Fields required to update a product type.""" input: ProductTypeInput! - ): ProductTypeUpdate + ): ProductTypeUpdate @doc(category: "Products") """ Reorder the attributes of a product type. @@ -12781,7 +14085,7 @@ type Mutation { """The attribute type to reorder.""" type: ProductAttributeType! - ): ProductTypeReorderAttributes + ): ProductTypeReorderAttributes @doc(category: "Products") """ Reorder product attribute values. @@ -12797,7 +14101,7 @@ type Mutation { """ID of a product.""" productId: ID! - ): ProductReorderAttributeValues + ): ProductReorderAttributeValues @doc(category: "Products") """ 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 @@ -12810,7 +14114,7 @@ type Mutation { """ID of a product variant to upload digital content.""" variantId: ID! - ): DigitalContentCreate + ): DigitalContentCreate @doc(category: "Products") """ Remove digital content assigned to given variant. @@ -12820,7 +14124,7 @@ type Mutation { digitalContentDelete( """ID of a product variant with digital content to remove.""" variantId: ID! - ): DigitalContentDelete + ): DigitalContentDelete @doc(category: "Products") """ Update digital content. @@ -12833,7 +14137,7 @@ type Mutation { """ID of a product variant with digital content to update.""" variantId: ID! - ): DigitalContentUpdate + ): DigitalContentUpdate @doc(category: "Products") """ Generate new URL to digital content. @@ -12843,7 +14147,7 @@ type Mutation { digitalContentUrlCreate( """Fields required to create a new url.""" input: DigitalContentUrlCreateInput! - ): DigitalContentUrlCreate + ): DigitalContentUrlCreate @doc(category: "Products") """ Creates a new variant for a product. @@ -12853,7 +14157,7 @@ type Mutation { productVariantCreate( """Fields required to create a product variant.""" input: ProductVariantCreateInput! - ): ProductVariantCreate + ): ProductVariantCreate @doc(category: "Products") """ Deletes a product variant. @@ -12877,7 +14181,7 @@ type Mutation { Added in Saleor 3.8. """ sku: String - ): ProductVariantDelete + ): ProductVariantDelete @doc(category: "Products") """ Creates product variants for a given product. @@ -12885,12 +14189,41 @@ type Mutation { Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantBulkCreate( + """ + Policies of error handling. DEFAULT: REJECT_EVERYTHING + + Added in Saleor 3.11. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + errorPolicy: ErrorPolicyEnum + """ID of the product to create the variants for.""" product: ID! """Input list of product variants to create.""" variants: [ProductVariantBulkCreateInput!]! - ): ProductVariantBulkCreate + ): ProductVariantBulkCreate @doc(category: "Products") + + """ + Update multiple product variants. + + Added in Saleor 3.11. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_PRODUCTS. + """ + productVariantBulkUpdate( + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" + errorPolicy: ErrorPolicyEnum + + """ID of the product to update the variants for.""" + product: ID! + + """Input list of product variants to update.""" + variants: [ProductVariantBulkUpdateInput!]! + ): ProductVariantBulkUpdate @doc(category: "Products") """ Deletes product variants. @@ -12907,7 +14240,7 @@ type Mutation { Added in Saleor 3.8. """ skus: [String!] - ): ProductVariantBulkDelete + ): ProductVariantBulkDelete @doc(category: "Products") """ Creates stocks for product variant. @@ -12920,7 +14253,7 @@ type Mutation { """ID of a product variant for which stocks will be created.""" variantId: ID! - ): ProductVariantStocksCreate + ): ProductVariantStocksCreate @doc(category: "Products") """ Delete stocks from product variant. @@ -12936,7 +14269,7 @@ type Mutation { """Input list of warehouse IDs.""" warehouseIds: [ID!] - ): ProductVariantStocksDelete + ): ProductVariantStocksDelete @doc(category: "Products") """ Update stocks for product variant. @@ -12952,7 +14285,7 @@ type Mutation { """ID of a product variant for which stocks will be updated.""" variantId: ID - ): ProductVariantStocksUpdate + ): ProductVariantStocksUpdate @doc(category: "Products") """ Updates an existing variant for product. @@ -12979,7 +14312,7 @@ type Mutation { Added in Saleor 3.8. """ sku: String - ): ProductVariantUpdate + ): ProductVariantUpdate @doc(category: "Products") """ Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. @@ -12992,7 +14325,7 @@ type Mutation { """Id of a variant that will be set as default.""" variantId: ID! - ): ProductVariantSetDefault + ): ProductVariantSetDefault @doc(category: "Products") """ Creates/updates translations for a product variant. @@ -13006,7 +14339,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): ProductVariantTranslate + ): ProductVariantTranslate @doc(category: "Products") """ Manage product variant prices in channels. @@ -13028,7 +14361,7 @@ type Mutation { Added in Saleor 3.8. """ sku: String - ): ProductVariantChannelListingUpdate + ): ProductVariantChannelListingUpdate @doc(category: "Products") """ Reorder product variant attribute values. @@ -13044,21 +14377,19 @@ type Mutation { """ID of a product variant.""" variantId: ID! - ): ProductVariantReorderAttributeValues + ): ProductVariantReorderAttributeValues @doc(category: "Products") """ Deactivates product variant preorder. It changes all preorder allocation into regular allocation. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantPreorderDeactivate( """ID of a variant which preorder should be deactivated.""" id: ID! - ): ProductVariantPreorderDeactivate + ): ProductVariantPreorderDeactivate @doc(category: "Products") """ Assign an media to a product variant. @@ -13071,7 +14402,7 @@ type Mutation { """ID of a product variant.""" variantId: ID! - ): VariantMediaAssign + ): VariantMediaAssign @doc(category: "Products") """ Unassign an media from a product variant. @@ -13084,7 +14415,7 @@ type Mutation { """ID of a product variant.""" variantId: ID! - ): VariantMediaUnassign + ): VariantMediaUnassign @doc(category: "Products") """ Captures the authorized payment amount. @@ -13097,7 +14428,7 @@ type Mutation { """Payment ID.""" paymentId: ID! - ): PaymentCapture + ): PaymentCapture @doc(category: "Payments") """ Refunds the captured payment amount. @@ -13110,7 +14441,7 @@ type Mutation { """Payment ID.""" paymentId: ID! - ): PaymentRefund + ): PaymentRefund @doc(category: "Payments") """ Voids the authorized payment. @@ -13120,7 +14451,7 @@ type Mutation { paymentVoid( """Payment ID.""" paymentId: ID! - ): PaymentVoid + ): PaymentVoid @doc(category: "Payments") """Initializes payment process when it is required by gateway.""" paymentInitialize( @@ -13132,20 +14463,22 @@ type Mutation { """Client-side generated data required to initialize the payment.""" paymentData: JSONString - ): PaymentInitialize + ): PaymentInitialize @doc(category: "Payments") """Check payment balance.""" paymentCheckBalance( """Fields required to check payment balance.""" input: PaymentCheckBalanceInput! - ): PaymentCheckBalance + ): PaymentCheckBalance @doc(category: "Payments") """ - Create transaction for checkout or order. Requires the following permissions: AUTHENTICATED_APP and HANDLE_PAYMENTS. + Create transaction for checkout or order. Added in Saleor 3.4. - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: HANDLE_PAYMENTS. """ transactionCreate( """The ID of the checkout or order.""" @@ -13156,14 +14489,16 @@ type Mutation { """Data that defines a transaction event.""" transactionEvent: TransactionEventInput - ): TransactionCreate + ): TransactionCreate @doc(category: "Payments") """ - Create transaction for checkout or order. Requires the following permissions: AUTHENTICATED_APP and HANDLE_PAYMENTS. + Update transaction. Added in Saleor 3.4. Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires the following permissions: OWNER and HANDLE_PAYMENTS for apps, HANDLE_PAYMENTS for staff users. Staff user cannot update a transaction that is owned by the app. """ transactionUpdate( """The ID of the transaction.""" @@ -13174,7 +14509,7 @@ type Mutation { """Data that defines a transaction transaction.""" transactionEvent: TransactionEventInput - ): TransactionUpdate + ): TransactionUpdate @doc(category: "Payments") """ Request an action for payment transaction. @@ -13183,7 +14518,7 @@ type Mutation { Note: this API is currently in Feature Preview and can be subject to changes at later point. - Requires one of the following permissions: HANDLE_PAYMENTS, MANAGE_ORDERS. + Requires one of the following permissions: HANDLE_PAYMENTS. """ transactionRequestAction( """Determines the action type.""" @@ -13196,7 +14531,106 @@ type Mutation { """The ID of the transaction.""" id: ID! - ): TransactionRequestAction + ): TransactionRequestAction @doc(category: "Payments") + + """ + Report the event for the transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires the following permissions: OWNER and HANDLE_PAYMENTS for apps, HANDLE_PAYMENTS for staff users. Staff user cannot update a transaction that is owned by the app. + """ + transactionEventReport( + """The amount of the event to report.""" + amount: PositiveDecimal! + + """List of all possible actions for the transaction""" + availableActions: [TransactionActionEnum!] + + """ + The url that will allow to redirect user to payment provider page with event details. + """ + externalUrl: String + + """The ID of the transaction.""" + id: ID! + + """The message related to the event.""" + message: String + + """PSP Reference of the event to report.""" + pspReference: String! + + """ + The time of the event to report. If not provide, the current time will be used. + """ + time: DateTime + + """Current status of the event to report.""" + type: TransactionEventTypeEnum! + ): TransactionEventReport @doc(category: "Payments") + + """ + Initializes a payment gateway session. It triggers the webhook `PAYMENT_GATEWAY_INITIALIZE_SESSION`, to the requested `paymentGateways`. If `paymentGateways` is not provided, the webhook will be send to all subscribed payment gateways. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + paymentGatewayInitialize( + """ + The amount requested for initializing the payment gateway. If not provided, the difference between checkout.total - transactions that are already processed will be send. + """ + amount: PositiveDecimal + + """The ID of the checkout or order.""" + id: ID! + + """List of payment gateways to initialize.""" + paymentGateways: [PaymentGatewayToInitialize!] + ): PaymentGatewayInitialize @doc(category: "Payments") + + """ + Initializes a transaction session. It triggers the webhook `TRANSACTION_INITIALIZE_SESSION`, to the requested `paymentGateways`. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + transactionInitialize( + """ + The expected action called for the transaction. By default, the `channel.defaultTransactionFlowStrategy` will be used. The field can be used only by app that has `HANDLE_PAYMENTS` permission. + """ + action: TransactionFlowStrategyEnum + + """ + The amount requested for initializing the payment gateway. If not provided, the difference between checkout.total - transactions that are already processed will be send. + """ + amount: PositiveDecimal + + """The ID of the checkout or order.""" + id: ID! + + """Payment gateway used to initialize the transaction.""" + paymentGateway: PaymentGatewayToInitialize! + ): TransactionInitialize @doc(category: "Payments") + + """ + Processes a transaction session. It triggers the webhook `TRANSACTION_PROCESS_SESSION`, to the assigned `paymentGateways`. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + transactionProcess( + """The data that will be passed to the payment gateway.""" + data: JSON + + """The ID of the transaction to process.""" + id: ID! + ): TransactionProcess @doc(category: "Payments") """ Creates a new page. @@ -13206,7 +14640,7 @@ type Mutation { pageCreate( """Fields required to create a page.""" input: PageCreateInput! - ): PageCreate + ): PageCreate @doc(category: "Pages") """ Deletes a page. @@ -13216,7 +14650,7 @@ type Mutation { pageDelete( """ID of a page to delete.""" id: ID! - ): PageDelete + ): PageDelete @doc(category: "Pages") """ Deletes pages. @@ -13226,7 +14660,7 @@ type Mutation { pageBulkDelete( """List of page IDs to delete.""" ids: [ID!]! - ): PageBulkDelete + ): PageBulkDelete @doc(category: "Pages") """ Publish pages. @@ -13239,7 +14673,7 @@ type Mutation { """Determine if pages will be published or not.""" isPublished: Boolean! - ): PageBulkPublish + ): PageBulkPublish @doc(category: "Pages") """ Updates an existing page. @@ -13252,7 +14686,7 @@ type Mutation { """Fields required to update a page.""" input: PageInput! - ): PageUpdate + ): PageUpdate @doc(category: "Pages") """ Creates/updates translations for a page. @@ -13266,7 +14700,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): PageTranslate + ): PageTranslate @doc(category: "Pages") """ Create a new page type. @@ -13276,7 +14710,7 @@ type Mutation { pageTypeCreate( """Fields required to create page type.""" input: PageTypeCreateInput! - ): PageTypeCreate + ): PageTypeCreate @doc(category: "Pages") """ Update page type. @@ -13289,7 +14723,7 @@ type Mutation { """Fields required to update page type.""" input: PageTypeUpdateInput! - ): PageTypeUpdate + ): PageTypeUpdate @doc(category: "Pages") """ Delete a page type. @@ -13299,7 +14733,7 @@ type Mutation { pageTypeDelete( """ID of the page type to delete.""" id: ID! - ): PageTypeDelete + ): PageTypeDelete @doc(category: "Pages") """ Delete page types. @@ -13309,7 +14743,7 @@ type Mutation { pageTypeBulkDelete( """List of page type IDs to delete""" ids: [ID!]! - ): PageTypeBulkDelete + ): PageTypeBulkDelete @doc(category: "Pages") """ Assign attributes to a given page type. @@ -13322,7 +14756,7 @@ type Mutation { """ID of the page type to assign the attributes into.""" pageTypeId: ID! - ): PageAttributeAssign + ): PageAttributeAssign @doc(category: "Pages") """ Unassign attributes from a given page type. @@ -13335,7 +14769,7 @@ type Mutation { """ID of the page type from which the attributes should be unassign.""" pageTypeId: ID! - ): PageAttributeUnassign + ): PageAttributeUnassign @doc(category: "Pages") """ Reorder the attributes of a page type. @@ -13348,7 +14782,7 @@ type Mutation { """ID of a page type.""" pageTypeId: ID! - ): PageTypeReorderAttributes + ): PageTypeReorderAttributes @doc(category: "Pages") """ Reorder page attribute values. @@ -13364,7 +14798,7 @@ type Mutation { """ID of a page.""" pageId: ID! - ): PageReorderAttributeValues + ): PageReorderAttributeValues @doc(category: "Pages") """ Completes creating an order. @@ -13374,7 +14808,7 @@ type Mutation { draftOrderComplete( """ID of the order that will be completed.""" id: ID! - ): DraftOrderComplete + ): DraftOrderComplete @doc(category: "Orders") """ Creates a new draft order. @@ -13384,7 +14818,7 @@ type Mutation { draftOrderCreate( """Fields required to create an order.""" input: DraftOrderCreateInput! - ): DraftOrderCreate + ): DraftOrderCreate @doc(category: "Orders") """ Deletes a draft order. @@ -13401,7 +14835,7 @@ type Mutation { """ID of a product to delete.""" id: ID - ): DraftOrderDelete + ): DraftOrderDelete @doc(category: "Orders") """ Deletes draft orders. @@ -13411,7 +14845,7 @@ type Mutation { draftOrderBulkDelete( """List of draft order IDs to delete.""" ids: [ID!]! - ): DraftOrderBulkDelete + ): DraftOrderBulkDelete @doc(category: "Orders") """ Deletes order lines. @@ -13421,7 +14855,7 @@ type Mutation { draftOrderLinesBulkDelete( """List of order lines IDs to delete.""" ids: [ID!]! - ): DraftOrderLinesBulkDelete @deprecated(reason: "This field will be removed in Saleor 4.0.") + ): DraftOrderLinesBulkDelete @doc(category: "Orders") @deprecated(reason: "This field will be removed in Saleor 4.0.") """ Updates a draft order. @@ -13441,7 +14875,7 @@ type Mutation { """Fields required to update an order.""" input: DraftOrderInput! - ): DraftOrderUpdate + ): DraftOrderUpdate @doc(category: "Orders") """ Adds note to the order. @@ -13454,7 +14888,7 @@ type Mutation { """Fields required to create a note for the order.""" input: OrderAddNoteInput! - ): OrderAddNote + ): OrderAddNote @doc(category: "Orders") """ Cancel an order. @@ -13464,7 +14898,7 @@ type Mutation { orderCancel( """ID of the order to cancel.""" id: ID! - ): OrderCancel + ): OrderCancel @doc(category: "Orders") """ Capture an order. @@ -13477,7 +14911,7 @@ type Mutation { """ID of the order to capture.""" id: ID! - ): OrderCapture + ): OrderCapture @doc(category: "Orders") """ Confirms an unconfirmed order by changing status to unfulfilled. @@ -13487,7 +14921,7 @@ type Mutation { orderConfirm( """ID of an order to confirm.""" id: ID! - ): OrderConfirm + ): OrderConfirm @doc(category: "Orders") """ Creates new fulfillments for an order. @@ -13500,7 +14934,7 @@ type Mutation { """ID of the order to be fulfilled.""" order: ID - ): OrderFulfill + ): OrderFulfill @doc(category: "Orders") """ Cancels existing fulfillment and optionally restocks items. @@ -13513,7 +14947,7 @@ type Mutation { """Fields required to cancel a fulfillment.""" input: FulfillmentCancelInput - ): FulfillmentCancel + ): FulfillmentCancel @doc(category: "Orders") """ Approve existing fulfillment. @@ -13531,7 +14965,7 @@ type Mutation { """True if confirmation email should be send.""" notifyCustomer: Boolean! - ): FulfillmentApprove + ): FulfillmentApprove @doc(category: "Orders") """ Updates a fulfillment for an order. @@ -13544,7 +14978,7 @@ type Mutation { """Fields required to update a fulfillment.""" input: FulfillmentUpdateTrackingInput! - ): FulfillmentUpdateTracking + ): FulfillmentUpdateTracking @doc(category: "Orders") """ Refund products. @@ -13557,7 +14991,7 @@ type Mutation { """ID of the order to be refunded.""" order: ID! - ): FulfillmentRefundProducts + ): FulfillmentRefundProducts @doc(category: "Orders") """ Return products. @@ -13570,7 +15004,41 @@ type Mutation { """ID of the order to be returned.""" order: ID! - ): FulfillmentReturnProducts + ): FulfillmentReturnProducts @doc(category: "Orders") + + """ + Adds granted refund to the order. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + orderGrantRefundCreate( + """ID of the order.""" + id: ID! + + """Fields required to create a granted refund for the order.""" + input: OrderGrantRefundCreateInput! + ): OrderGrantRefundCreate @doc(category: "Orders") + + """ + Updates granted refund. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS. + """ + orderGrantRefundUpdate( + """ID of the granted refund.""" + id: ID! + + """Fields required to update a granted refund.""" + input: OrderGrantRefundUpdateInput! + ): OrderGrantRefundUpdate @doc(category: "Orders") """ Create order lines for an order. @@ -13583,7 +15051,7 @@ type Mutation { """Fields required to add order lines.""" input: [OrderLineCreateInput!]! - ): OrderLinesCreate + ): OrderLinesCreate @doc(category: "Orders") """ Deletes an order line from an order. @@ -13593,7 +15061,7 @@ type Mutation { orderLineDelete( """ID of the order line to delete.""" id: ID! - ): OrderLineDelete + ): OrderLineDelete @doc(category: "Orders") """ Updates an order line of an order. @@ -13606,7 +15074,7 @@ type Mutation { """Fields required to update an order line.""" input: OrderLineInput! - ): OrderLineUpdate + ): OrderLineUpdate @doc(category: "Orders") """ Adds discount to the order. @@ -13619,7 +15087,7 @@ type Mutation { """ID of an order to discount.""" orderId: ID! - ): OrderDiscountAdd + ): OrderDiscountAdd @doc(category: "Orders") """ Update discount for the order. @@ -13632,7 +15100,7 @@ type Mutation { """Fields required to update a discount for the order.""" input: OrderDiscountCommonInput! - ): OrderDiscountUpdate + ): OrderDiscountUpdate @doc(category: "Orders") """ Remove discount from the order. @@ -13642,7 +15110,7 @@ type Mutation { orderDiscountDelete( """ID of a discount to remove.""" discountId: ID! - ): OrderDiscountDelete + ): OrderDiscountDelete @doc(category: "Orders") """ Update discount for the order line. @@ -13655,7 +15123,7 @@ type Mutation { """ID of a order line to update price""" orderLineId: ID! - ): OrderLineDiscountUpdate + ): OrderLineDiscountUpdate @doc(category: "Orders") """ Remove discount applied to the order line. @@ -13665,7 +15133,7 @@ type Mutation { orderLineDiscountRemove( """ID of a order line to remove its discount""" orderLineId: ID! - ): OrderLineDiscountRemove + ): OrderLineDiscountRemove @doc(category: "Orders") """ Mark order as manually paid. @@ -13678,7 +15146,7 @@ type Mutation { """The external transaction reference.""" transactionReference: String - ): OrderMarkAsPaid + ): OrderMarkAsPaid @doc(category: "Orders") """ Refund an order. @@ -13691,7 +15159,7 @@ type Mutation { """ID of the order to refund.""" id: ID! - ): OrderRefund + ): OrderRefund @doc(category: "Orders") """ Updates an order. @@ -13711,7 +15179,7 @@ type Mutation { """Fields required to update an order.""" input: OrderUpdateInput! - ): OrderUpdate + ): OrderUpdate @doc(category: "Orders") """ Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed. @@ -13724,7 +15192,7 @@ type Mutation { """Fields required to change shipping method of the order.""" input: OrderUpdateShippingInput! - ): OrderUpdateShipping + ): OrderUpdateShipping @doc(category: "Orders") """ Void an order. @@ -13734,7 +15202,7 @@ type Mutation { orderVoid( """ID of the order to void.""" id: ID! - ): OrderVoid + ): OrderVoid @doc(category: "Orders") """ Cancels orders. @@ -13744,7 +15212,29 @@ type Mutation { orderBulkCancel( """List of orders IDs to cancel.""" ids: [ID!]! - ): OrderBulkCancel + ): OrderBulkCancel @doc(category: "Orders") + + """ + Creates multiple orders. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_ORDERS_IMPORT. + """ + orderBulkCreate( + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" + errorPolicy: ErrorPolicyEnum + + """Input list of orders to create. Orders limit: 50.""" + orders: [OrderBulkCreateInput!]! + + """ + Determine how stock should be updated, while processing the order. DEFAULT: UPDATE - Only do update, if there is enough stocks. + """ + stockUpdatePolicy: StockUpdatePolicyEnum + ): OrderBulkCreate @doc(category: "Orders") """ Delete metadata of an object. To use it, you need to have access to the modified object. @@ -13801,7 +15291,7 @@ type Mutation { """Type of the navigation bar to assign the menu to.""" navigationType: NavigationType! - ): AssignNavigation + ): AssignNavigation @doc(category: "Menu") """ Creates a new Menu. @@ -13811,7 +15301,7 @@ type Mutation { menuCreate( """Fields required to create a menu.""" input: MenuCreateInput! - ): MenuCreate + ): MenuCreate @doc(category: "Menu") """ Deletes a menu. @@ -13821,7 +15311,7 @@ type Mutation { menuDelete( """ID of a menu to delete.""" id: ID! - ): MenuDelete + ): MenuDelete @doc(category: "Menu") """ Deletes menus. @@ -13831,7 +15321,7 @@ type Mutation { menuBulkDelete( """List of menu IDs to delete.""" ids: [ID!]! - ): MenuBulkDelete + ): MenuBulkDelete @doc(category: "Menu") """ Updates a menu. @@ -13844,7 +15334,7 @@ type Mutation { """Fields required to update a menu.""" input: MenuInput! - ): MenuUpdate + ): MenuUpdate @doc(category: "Menu") """ Creates a new menu item. @@ -13856,7 +15346,7 @@ type Mutation { Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item. """ input: MenuItemCreateInput! - ): MenuItemCreate + ): MenuItemCreate @doc(category: "Menu") """ Deletes a menu item. @@ -13866,7 +15356,7 @@ type Mutation { menuItemDelete( """ID of a menu item to delete.""" id: ID! - ): MenuItemDelete + ): MenuItemDelete @doc(category: "Menu") """ Deletes menu items. @@ -13876,7 +15366,7 @@ type Mutation { menuItemBulkDelete( """List of menu item IDs to delete.""" ids: [ID!]! - ): MenuItemBulkDelete + ): MenuItemBulkDelete @doc(category: "Menu") """ Updates a menu item. @@ -13891,7 +15381,7 @@ type Mutation { Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item. """ input: MenuItemInput! - ): MenuItemUpdate + ): MenuItemUpdate @doc(category: "Menu") """ Creates/updates translations for a menu item. @@ -13905,7 +15395,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): MenuItemTranslate + ): MenuItemTranslate @doc(category: "Menu") """ Moves items of menus. @@ -13918,7 +15408,7 @@ type Mutation { """The menu position data.""" moves: [MenuItemMoveInput!]! - ): MenuItemMove + ): MenuItemMove @doc(category: "Menu") """ Request an invoice for the order using plugin. @@ -13931,7 +15421,7 @@ type Mutation { """ID of the order related to invoice.""" orderId: ID! - ): InvoiceRequest + ): InvoiceRequest @doc(category: "Orders") """ Requests deletion of an invoice. @@ -13941,7 +15431,7 @@ type Mutation { invoiceRequestDelete( """ID of an invoice to request the deletion.""" id: ID! - ): InvoiceRequestDelete + ): InvoiceRequestDelete @doc(category: "Orders") """ Creates a ready to send invoice. @@ -13954,7 +15444,7 @@ type Mutation { """ID of the order related to invoice.""" orderId: ID! - ): InvoiceCreate + ): InvoiceCreate @doc(category: "Orders") """ Deletes an invoice. @@ -13964,7 +15454,7 @@ type Mutation { invoiceDelete( """ID of an invoice to delete.""" id: ID! - ): InvoiceDelete + ): InvoiceDelete @doc(category: "Orders") """ Updates an invoice. @@ -13977,7 +15467,7 @@ type Mutation { """Fields to use when updating an invoice.""" input: UpdateInvoiceInput! - ): InvoiceUpdate + ): InvoiceUpdate @doc(category: "Orders") """ Send an invoice notification to the customer. @@ -13987,7 +15477,7 @@ type Mutation { invoiceSendNotification( """ID of an invoice to be sent.""" id: ID! - ): InvoiceSendNotification + ): InvoiceSendNotification @doc(category: "Orders") """ Activate a gift card. @@ -13997,7 +15487,7 @@ type Mutation { giftCardActivate( """ID of a gift card to activate.""" id: ID! - ): GiftCardActivate + ): GiftCardActivate @doc(category: "Gift cards") """ Creates a new gift card. @@ -14007,21 +15497,19 @@ type Mutation { giftCardCreate( """Fields required to create a gift card.""" input: GiftCardCreateInput! - ): GiftCardCreate + ): GiftCardCreate @doc(category: "Gift cards") """ Delete gift card. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardDelete( """ID of the gift card to delete.""" id: ID! - ): GiftCardDelete + ): GiftCardDelete @doc(category: "Gift cards") """ Deactivate a gift card. @@ -14031,7 +15519,7 @@ type Mutation { giftCardDeactivate( """ID of a gift card to deactivate.""" id: ID! - ): GiftCardDeactivate + ): GiftCardDeactivate @doc(category: "Gift cards") """ Update a gift card. @@ -14044,28 +15532,24 @@ type Mutation { """Fields required to update a gift card.""" input: GiftCardUpdateInput! - ): GiftCardUpdate + ): GiftCardUpdate @doc(category: "Gift cards") """ Resend a gift card. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardResend( """Fields required to resend a gift card.""" input: GiftCardResendInput! - ): GiftCardResend + ): GiftCardResend @doc(category: "Gift cards") """ Adds note to the gift card. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ @@ -14075,63 +15559,55 @@ type Mutation { """Fields required to create a note for the gift card.""" input: GiftCardAddNoteInput! - ): GiftCardAddNote + ): GiftCardAddNote @doc(category: "Gift cards") """ Create gift cards. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardBulkCreate( """Fields required to create gift cards.""" input: GiftCardBulkCreateInput! - ): GiftCardBulkCreate + ): GiftCardBulkCreate @doc(category: "Gift cards") """ Delete gift cards. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardBulkDelete( """List of gift card IDs to delete.""" ids: [ID!]! - ): GiftCardBulkDelete + ): GiftCardBulkDelete @doc(category: "Gift cards") """ Activate gift cards. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardBulkActivate( """List of gift card IDs to activate.""" ids: [ID!]! - ): GiftCardBulkActivate + ): GiftCardBulkActivate @doc(category: "Gift cards") """ Deactivate gift cards. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardBulkDeactivate( """List of gift card IDs to deactivate.""" ids: [ID!]! - ): GiftCardBulkDeactivate + ): GiftCardBulkDeactivate @doc(category: "Gift cards") """ Update plugin configuration. @@ -14175,7 +15651,7 @@ type Mutation { saleCreate( """Fields required to create a sale.""" input: SaleInput! - ): SaleCreate + ): SaleCreate @doc(category: "Discounts") """ Deletes a sale. @@ -14185,7 +15661,7 @@ type Mutation { saleDelete( """ID of a sale to delete.""" id: ID! - ): SaleDelete + ): SaleDelete @doc(category: "Discounts") """ Deletes sales. @@ -14195,7 +15671,7 @@ type Mutation { saleBulkDelete( """List of sale IDs to delete.""" ids: [ID!]! - ): SaleBulkDelete + ): SaleBulkDelete @doc(category: "Discounts") """ Updates a sale. @@ -14208,7 +15684,7 @@ type Mutation { """Fields required to update a sale.""" input: SaleInput! - ): SaleUpdate + ): SaleUpdate @doc(category: "Discounts") """ Adds products, categories, collections to a voucher. @@ -14221,7 +15697,7 @@ type Mutation { """Fields required to modify catalogue IDs of sale.""" input: CatalogueInput! - ): SaleAddCatalogues + ): SaleAddCatalogues @doc(category: "Discounts") """ Removes products, categories, collections from a sale. @@ -14234,7 +15710,7 @@ type Mutation { """Fields required to modify catalogue IDs of sale.""" input: CatalogueInput! - ): SaleRemoveCatalogues + ): SaleRemoveCatalogues @doc(category: "Discounts") """ Creates/updates translations for a sale. @@ -14248,7 +15724,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): SaleTranslate + ): SaleTranslate @doc(category: "Discounts") """ Manage sale's availability in channels. @@ -14261,7 +15737,7 @@ type Mutation { """Fields required to update sale channel listings.""" input: SaleChannelListingInput! - ): SaleChannelListingUpdate + ): SaleChannelListingUpdate @doc(category: "Discounts") """ Creates a new voucher. @@ -14271,7 +15747,7 @@ type Mutation { voucherCreate( """Fields required to create a voucher.""" input: VoucherInput! - ): VoucherCreate + ): VoucherCreate @doc(category: "Discounts") """ Deletes a voucher. @@ -14281,7 +15757,7 @@ type Mutation { voucherDelete( """ID of a voucher to delete.""" id: ID! - ): VoucherDelete + ): VoucherDelete @doc(category: "Discounts") """ Deletes vouchers. @@ -14291,7 +15767,7 @@ type Mutation { voucherBulkDelete( """List of voucher IDs to delete.""" ids: [ID!]! - ): VoucherBulkDelete + ): VoucherBulkDelete @doc(category: "Discounts") """ Updates a voucher. @@ -14304,7 +15780,7 @@ type Mutation { """Fields required to update a voucher.""" input: VoucherInput! - ): VoucherUpdate + ): VoucherUpdate @doc(category: "Discounts") """ Adds products, categories, collections to a voucher. @@ -14317,7 +15793,7 @@ type Mutation { """Fields required to modify catalogue IDs of voucher.""" input: CatalogueInput! - ): VoucherAddCatalogues + ): VoucherAddCatalogues @doc(category: "Discounts") """ Removes products, categories, collections from a voucher. @@ -14330,7 +15806,7 @@ type Mutation { """Fields required to modify catalogue IDs of voucher.""" input: CatalogueInput! - ): VoucherRemoveCatalogues + ): VoucherRemoveCatalogues @doc(category: "Discounts") """ Creates/updates translations for a voucher. @@ -14344,7 +15820,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): VoucherTranslate + ): VoucherTranslate @doc(category: "Discounts") """ Manage voucher's availability in channels. @@ -14357,7 +15833,7 @@ type Mutation { """Fields required to update voucher channel listings.""" input: VoucherChannelListingInput! - ): VoucherChannelListingUpdate + ): VoucherChannelListingUpdate @doc(category: "Discounts") """ Export products to csv file. @@ -14367,21 +15843,19 @@ type Mutation { exportProducts( """Fields required to export product data.""" input: ExportProductsInput! - ): ExportProducts + ): ExportProducts @doc(category: "Products") """ Export gift cards to csv file. - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ exportGiftCards( """Fields required to export gift cards data.""" input: ExportGiftCardsInput! - ): ExportGiftCards + ): ExportGiftCards @doc(category: "Gift cards") """ 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 @@ -14418,7 +15892,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutAddPromoCode + ): CheckoutAddPromoCode @doc(category: "Checkout") """Update billing address in the existing checkout.""" checkoutBillingAddressUpdate( @@ -14450,11 +15924,9 @@ type Mutation { The rules for changing validation for received billing address data. Added in Saleor 3.5. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ validationRules: CheckoutAddressValidationRules - ): CheckoutBillingAddressUpdate + ): CheckoutBillingAddressUpdate @doc(category: "Checkout") """ 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. @@ -14502,13 +15974,25 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutComplete + ): CheckoutComplete @doc(category: "Checkout") """Create a new checkout.""" checkoutCreate( """Fields required to create checkout.""" input: CheckoutCreateInput! - ): CheckoutCreate + ): CheckoutCreate @doc(category: "Checkout") + + """ + Create new checkout from existing order. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + checkoutCreateFromOrder( + """ID of a order that will be used to create the checkout.""" + id: ID! + ): CheckoutCreateFromOrder @doc(category: "Checkout") """ Sets the customer as the owner of the checkout. @@ -14541,7 +16025,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutCustomerAttach + ): CheckoutCustomerAttach @doc(category: "Checkout") """ Removes the user assigned as the owner of the checkout. @@ -14569,7 +16053,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutCustomerDetach + ): CheckoutCustomerDetach @doc(category: "Checkout") """Updates email address in the existing checkout object.""" checkoutEmailUpdate( @@ -14596,7 +16080,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutEmailUpdate + ): CheckoutEmailUpdate @doc(category: "Checkout") """Deletes a CheckoutLine.""" checkoutLineDelete( @@ -14623,7 +16107,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutLineDelete @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead.") + ): CheckoutLineDelete @doc(category: "Checkout") @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutLinesDelete` instead.") """Deletes checkout lines.""" checkoutLinesDelete( @@ -14643,7 +16127,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutLinesDelete + ): CheckoutLinesDelete @doc(category: "Checkout") """ Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased. @@ -14674,7 +16158,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutLinesAdd + ): CheckoutLinesAdd @doc(category: "Checkout") """Updates checkout line in the existing checkout.""" checkoutLinesUpdate( @@ -14703,7 +16187,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutLinesUpdate + ): CheckoutLinesUpdate @doc(category: "Checkout") """Remove a gift card or a voucher from a checkout.""" checkoutRemovePromoCode( @@ -14733,7 +16217,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutRemovePromoCode + ): CheckoutRemovePromoCode @doc(category: "Checkout") """Create a new payment for given checkout.""" checkoutPaymentCreate( @@ -14760,7 +16244,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutPaymentCreate + ): CheckoutPaymentCreate @doc(category: "Checkout") """Update shipping address in the existing checkout.""" checkoutShippingAddressUpdate( @@ -14792,11 +16276,9 @@ type Mutation { The rules for changing validation for received shipping address data. Added in Saleor 3.5. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ validationRules: CheckoutAddressValidationRules - ): CheckoutShippingAddressUpdate + ): CheckoutShippingAddressUpdate @doc(category: "Checkout") """Updates the shipping method of the checkout.""" checkoutShippingMethodUpdate( @@ -14823,14 +16305,12 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutShippingMethodUpdate @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutDeliveryMethodUpdate` instead.") + ): CheckoutShippingMethodUpdate @doc(category: "Checkout") @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutDeliveryMethodUpdate` instead.") """ Updates the delivery method (shipping method or pick up point) of the checkout. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ checkoutDeliveryMethodUpdate( """Delivery Method ID (`Warehouse` ID or `ShippingMethod` ID).""" @@ -14849,7 +16329,7 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutDeliveryMethodUpdate + ): CheckoutDeliveryMethodUpdate @doc(category: "Checkout") """Update language code in the existing checkout.""" checkoutLanguageCodeUpdate( @@ -14876,14 +16356,12 @@ type Mutation { DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutLanguageCodeUpdate + ): CheckoutLanguageCodeUpdate @doc(category: "Checkout") """ Create new order from existing checkout. Requires the following permissions: AUTHENTICATED_APP and HANDLE_CHECKOUTS. Added in Saleor 3.2. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ orderCreateFromCheckout( """ID of a checkout that will be converted to an order.""" @@ -14907,7 +16385,7 @@ type Mutation { Determines if checkout should be removed after creating an order. Default true. """ removeCheckout: Boolean = true - ): OrderCreateFromCheckout + ): OrderCreateFromCheckout @doc(category: "Checkout") """ Creates new channel. @@ -14917,12 +16395,13 @@ type Mutation { channelCreate( """Fields required to create channel.""" input: ChannelCreateInput! - ): ChannelCreate + ): ChannelCreate @doc(category: "Channels") """ - Update a channel. + Update a channel. Requires one of the following permissions: MANAGE_CHANNELS. + Requires one of the following permissions when updating only orderSettings field: MANAGE_CHANNELS, MANAGE_ORDERS. """ channelUpdate( """ID of a channel to update.""" @@ -14930,7 +16409,7 @@ type Mutation { """Fields required to update a channel.""" input: ChannelUpdateInput! - ): ChannelUpdate + ): ChannelUpdate @doc(category: "Channels") """ Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. @@ -14943,7 +16422,7 @@ type Mutation { """Fields required to delete a channel.""" input: ChannelDeleteInput - ): ChannelDelete + ): ChannelDelete @doc(category: "Channels") """ Activate a channel. @@ -14953,7 +16432,7 @@ type Mutation { channelActivate( """ID of the channel to activate.""" id: ID! - ): ChannelActivate + ): ChannelActivate @doc(category: "Channels") """ Deactivate a channel. @@ -14963,14 +16442,12 @@ type Mutation { channelDeactivate( """ID of the channel to deactivate.""" id: ID! - ): ChannelDeactivate + ): ChannelDeactivate @doc(category: "Channels") """ Reorder the warehouses of a channel. - Added in Saleor 3.7. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. + Added in Saleor 3.7. Requires one of the following permissions: MANAGE_CHANNELS. """ @@ -14980,13 +16457,13 @@ type Mutation { """The list of reordering operations for the given channel warehouses.""" moves: [ReorderInput!]! - ): ChannelReorderWarehouses + ): ChannelReorderWarehouses @doc(category: "Channels") """Creates an attribute.""" attributeCreate( """Fields required to create an attribute.""" input: AttributeCreateInput! - ): AttributeCreate + ): AttributeCreate @doc(category: "Attributes") """ Deletes an attribute. @@ -15003,7 +16480,7 @@ type Mutation { """ID of an attribute to delete.""" id: ID - ): AttributeDelete + ): AttributeDelete @doc(category: "Attributes") """ Updates attribute. @@ -15023,7 +16500,7 @@ type Mutation { """Fields required to update an attribute.""" input: AttributeUpdateInput! - ): AttributeUpdate + ): AttributeUpdate @doc(category: "Attributes") """ Creates/updates translations for an attribute. @@ -15037,7 +16514,24 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): AttributeTranslate + ): AttributeTranslate @doc(category: "Attributes") + + """ + Creates/updates translations for attributes. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_TRANSLATIONS. + """ + attributeBulkTranslate( + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" + errorPolicy: ErrorPolicyEnum + + """List of attributes translations.""" + translations: [AttributeBulkTranslateInput!]! + ): AttributeBulkTranslate @doc(category: "Attributes") """ Deletes attributes. @@ -15047,7 +16541,7 @@ type Mutation { attributeBulkDelete( """List of attribute IDs to delete.""" ids: [ID!]! - ): AttributeBulkDelete + ): AttributeBulkDelete @doc(category: "Attributes") """ Deletes values of attributes. @@ -15057,7 +16551,7 @@ type Mutation { attributeValueBulkDelete( """List of attribute value IDs to delete.""" ids: [ID!]! - ): AttributeValueBulkDelete + ): AttributeValueBulkDelete @doc(category: "Attributes") """ Creates a value for an attribute. @@ -15070,7 +16564,7 @@ type Mutation { """Fields required to create an AttributeValue.""" input: AttributeValueCreateInput! - ): AttributeValueCreate + ): AttributeValueCreate @doc(category: "Attributes") """ Deletes a value of an attribute. @@ -15087,7 +16581,7 @@ type Mutation { """ID of a value to delete.""" id: ID - ): AttributeValueDelete + ): AttributeValueDelete @doc(category: "Attributes") """ Updates value of an attribute. @@ -15107,7 +16601,24 @@ type Mutation { """Fields required to update an AttributeValue.""" input: AttributeValueUpdateInput! - ): AttributeValueUpdate + ): AttributeValueUpdate @doc(category: "Attributes") + + """ + Creates/updates translations for attributes values. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_TRANSLATIONS. + """ + attributeValueBulkTranslate( + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" + errorPolicy: ErrorPolicyEnum + + """List of attribute values translations.""" + translations: [AttributeValueBulkTranslateInput!]! + ): AttributeValueBulkTranslate @doc(category: "Attributes") """ Creates/updates translations for an attribute value. @@ -15121,7 +16632,7 @@ type Mutation { """Translation language code.""" languageCode: LanguageCodeEnum! - ): AttributeValueTranslate + ): AttributeValueTranslate @doc(category: "Attributes") """ Reorder the values of an attribute. @@ -15134,7 +16645,7 @@ type Mutation { """The list of reordering operations for given attribute values.""" moves: [ReorderInput!]! - ): AttributeReorderValues + ): AttributeReorderValues @doc(category: "Attributes") """ Creates a new app. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. @@ -15142,7 +16653,7 @@ type Mutation { appCreate( """Fields required to create a new app.""" input: AppInput! - ): AppCreate + ): AppCreate @doc(category: "Apps") """ Updates an existing app. @@ -15155,7 +16666,7 @@ type Mutation { """Fields required to update an existing app.""" input: AppInput! - ): AppUpdate + ): AppUpdate @doc(category: "Apps") """ Deletes an app. @@ -15165,7 +16676,7 @@ type Mutation { appDelete( """ID of an app to delete.""" id: ID! - ): AppDelete + ): AppDelete @doc(category: "Apps") """ Creates a new token. @@ -15175,7 +16686,7 @@ type Mutation { appTokenCreate( """Fields required to create a new auth token.""" input: AppTokenInput! - ): AppTokenCreate + ): AppTokenCreate @doc(category: "Apps") """ Deletes an authentication token assigned to app. @@ -15185,13 +16696,13 @@ type Mutation { appTokenDelete( """ID of an auth token to delete.""" id: ID! - ): AppTokenDelete + ): AppTokenDelete @doc(category: "Apps") """Verify provided app token.""" appTokenVerify( """App token to verify.""" token: String! - ): AppTokenVerify + ): AppTokenVerify @doc(category: "Apps") """ Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. @@ -15199,7 +16710,7 @@ type Mutation { appInstall( """Fields required to install a new app.""" input: AppInstallInput! - ): AppInstall + ): AppInstall @doc(category: "Apps") """ Retry failed installation of new app. @@ -15212,7 +16723,7 @@ type Mutation { """ID of failed installation.""" id: ID! - ): AppRetryInstall + ): AppRetryInstall @doc(category: "Apps") """ Delete failed installation. @@ -15222,14 +16733,14 @@ type Mutation { appDeleteFailedInstallation( """ID of failed installation to delete.""" id: ID! - ): AppDeleteFailedInstallation + ): AppDeleteFailedInstallation @doc(category: "Apps") """ Fetch and validate manifest. Requires one of the following permissions: MANAGE_APPS. """ - appFetchManifest(manifestUrl: String!): AppFetchManifest + appFetchManifest(manifestUrl: String!): AppFetchManifest @doc(category: "Apps") """ Activate the app. @@ -15239,7 +16750,7 @@ type Mutation { appActivate( """ID of app to activate.""" id: ID! - ): AppActivate + ): AppActivate @doc(category: "Apps") """ Deactivate the app. @@ -15249,7 +16760,7 @@ type Mutation { appDeactivate( """ID of app to deactivate.""" id: ID! - ): AppDeactivate + ): AppDeactivate @doc(category: "Apps") """Create JWT token.""" tokenCreate( @@ -15257,8 +16768,6 @@ type Mutation { The audience that will be included to JWT tokens with prefix `custom:`. Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ audience: String @@ -15267,42 +16776,42 @@ type Mutation { """Password of a user.""" password: String! - ): CreateToken + ): CreateToken @doc(category: "Authentication") """ - 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. + 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. + CSRF token required to refresh token. This argument is required when `refreshToken` is provided as a cookie. """ csrfToken: String """Refresh token.""" refreshToken: String - ): RefreshToken + ): RefreshToken @doc(category: "Authentication") """Verify JWT token.""" tokenVerify( """JWT token to validate.""" token: String! - ): VerifyToken + ): VerifyToken @doc(category: "Authentication") """ Deactivate all JWT tokens of the currently authenticated user. Requires one of the following permissions: AUTHENTICATED_USER. """ - tokensDeactivateAll: DeactivateAllUserTokens + tokensDeactivateAll: DeactivateAllUserTokens @doc(category: "Authentication") - """Prepare external authentication url for user by custom plugin.""" + """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 + ): ExternalAuthenticationUrl @doc(category: "Authentication") """Obtain external access tokens for user by custom plugin.""" externalObtainAccessTokens( @@ -15311,7 +16820,7 @@ type Mutation { """The ID of the authentication plugin.""" pluginId: String! - ): ExternalObtainAccessTokens + ): ExternalObtainAccessTokens @doc(category: "Authentication") """Refresh user's access by custom plugin.""" externalRefresh( @@ -15320,7 +16829,7 @@ type Mutation { """The ID of the authentication plugin.""" pluginId: String! - ): ExternalRefresh + ): ExternalRefresh @doc(category: "Authentication") """Logout user by custom plugin.""" externalLogout( @@ -15329,7 +16838,7 @@ type Mutation { """The ID of the authentication plugin.""" pluginId: String! - ): ExternalLogout + ): ExternalLogout @doc(category: "Authentication") """Verify external authentication data by plugin.""" externalVerify( @@ -15338,7 +16847,7 @@ type Mutation { """The ID of the authentication plugin.""" pluginId: String! - ): ExternalVerify + ): ExternalVerify @doc(category: "Authentication") """Sends an email with the account password modification link.""" requestPasswordReset( @@ -15354,7 +16863,7 @@ type Mutation { URL of a view where users should be redirected to reset the password. URL in RFC 1808 format. """ redirectUrl: String! - ): RequestPasswordReset + ): RequestPasswordReset @doc(category: "Users") """Confirm user account with token sent by email during registration.""" confirmAccount( @@ -15363,7 +16872,7 @@ type Mutation { """A one-time token required to confirm the account.""" token: String! - ): ConfirmAccount + ): ConfirmAccount @doc(category: "Users") """ Sets the user's password from the token sent by email using the RequestPasswordReset mutation. @@ -15377,7 +16886,7 @@ type Mutation { """A one-time token required to set the password.""" token: String! - ): SetPassword + ): SetPassword @doc(category: "Users") """ Change the password of the logged in user. @@ -15389,8 +16898,8 @@ type Mutation { newPassword: String! """Current user password.""" - oldPassword: String! - ): PasswordChange + oldPassword: String + ): PasswordChange @doc(category: "Users") """ Request email change of the logged in user. @@ -15413,7 +16922,7 @@ type Mutation { URL of a view where users should be redirected to update the email address. URL in RFC 1808 format. """ redirectUrl: String! - ): RequestEmailChange + ): RequestEmailChange @doc(category: "Users") """ Confirm the email change of the logged-in user. @@ -15428,7 +16937,7 @@ type Mutation { """A one-time token required to change the email.""" token: String! - ): ConfirmEmailChange + ): ConfirmEmailChange @doc(category: "Users") """ Create a new address for the customer. @@ -15443,7 +16952,7 @@ type Mutation { 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 + ): AccountAddressCreate @doc(category: "Users") """ Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. @@ -15454,7 +16963,7 @@ type Mutation { """Fields required to update the address.""" input: AddressInput! - ): AccountAddressUpdate + ): AccountAddressUpdate @doc(category: "Users") """ Delete an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. @@ -15462,7 +16971,7 @@ type Mutation { accountAddressDelete( """ID of the address to delete.""" id: ID! - ): AccountAddressDelete + ): AccountAddressDelete @doc(category: "Users") """ Sets a default address for the authenticated user. @@ -15475,13 +16984,13 @@ type Mutation { """The type of address.""" type: AddressTypeEnum! - ): AccountSetDefaultAddress + ): AccountSetDefaultAddress @doc(category: "Users") """Register a new user.""" accountRegister( """Fields required to create a user.""" input: AccountRegisterInput! - ): AccountRegister + ): AccountRegister @doc(category: "Users") """ Updates the account of the logged-in user. @@ -15491,7 +17000,7 @@ type Mutation { accountUpdate( """Fields required to update the account of the logged-in user.""" input: AccountInput! - ): AccountUpdate + ): AccountUpdate @doc(category: "Users") """ Sends an email with the account removal link for the logged-in user. @@ -15508,7 +17017,7 @@ type Mutation { URL of a view where users should be redirected to delete their account. URL in RFC 1808 format. """ redirectUrl: String! - ): AccountRequestDeletion + ): AccountRequestDeletion @doc(category: "Users") """ Remove user account. @@ -15520,7 +17029,7 @@ type Mutation { A one-time token required to remove account. Sent by email using AccountRequestDeletion mutation. """ token: String! - ): AccountDelete + ): AccountDelete @doc(category: "Users") """ Creates user address. @@ -15533,7 +17042,7 @@ type Mutation { """ID of a user to create address for.""" userId: ID! - ): AddressCreate + ): AddressCreate @doc(category: "Users") """ Updates an address. @@ -15546,7 +17055,7 @@ type Mutation { """Fields required to update the address.""" input: AddressInput! - ): AddressUpdate + ): AddressUpdate @doc(category: "Users") """ Deletes an address. @@ -15556,7 +17065,7 @@ type Mutation { addressDelete( """ID of the address to delete.""" id: ID! - ): AddressDelete + ): AddressDelete @doc(category: "Users") """ Sets a default address for the given user. @@ -15572,7 +17081,7 @@ type Mutation { """ID of the user to change the address for.""" userId: ID! - ): AddressSetDefault + ): AddressSetDefault @doc(category: "Users") """ Creates a new customer. @@ -15582,7 +17091,7 @@ type Mutation { customerCreate( """Fields required to create a customer.""" input: UserCreateInput! - ): CustomerCreate + ): CustomerCreate @doc(category: "Users") """ Updates an existing customer. @@ -15602,7 +17111,7 @@ type Mutation { """Fields required to update a customer.""" input: CustomerInput! - ): CustomerUpdate + ): CustomerUpdate @doc(category: "Users") """ Deletes a customer. @@ -15619,7 +17128,7 @@ type Mutation { """ID of a customer to delete.""" id: ID - ): CustomerDelete + ): CustomerDelete @doc(category: "Users") """ Deletes customers. @@ -15629,7 +17138,24 @@ type Mutation { customerBulkDelete( """List of user IDs to delete.""" ids: [ID!]! - ): CustomerBulkDelete + ): CustomerBulkDelete @doc(category: "Users") + + """ + Updates customers. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: MANAGE_USERS. + """ + customerBulkUpdate( + """Input list of customers to update.""" + customers: [CustomerBulkUpdateInput!]! + + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" + errorPolicy: ErrorPolicyEnum + ): CustomerBulkUpdate @doc(category: "Users") """ Creates a new staff user. Apps are not allowed to perform this mutation. @@ -15639,7 +17165,7 @@ type Mutation { staffCreate( """Fields required to create a staff user.""" input: StaffCreateInput! - ): StaffCreate + ): StaffCreate @doc(category: "Users") """ Updates an existing staff user. Apps are not allowed to perform this mutation. @@ -15652,7 +17178,7 @@ type Mutation { """Fields required to update a staff user.""" input: StaffUpdateInput! - ): StaffUpdate + ): StaffUpdate @doc(category: "Users") """ Deletes a staff user. Apps are not allowed to perform this mutation. @@ -15662,7 +17188,7 @@ type Mutation { staffDelete( """ID of a staff user to delete.""" id: ID! - ): StaffDelete + ): StaffDelete @doc(category: "Users") """ Deletes staff users. Apps are not allowed to perform this mutation. @@ -15672,7 +17198,7 @@ type Mutation { staffBulkDelete( """List of user IDs to delete.""" ids: [ID!]! - ): StaffBulkDelete + ): StaffBulkDelete @doc(category: "Users") """ 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 @@ -15682,14 +17208,14 @@ type Mutation { userAvatarUpdate( """Represents an image file in a multipart request.""" image: Upload! - ): UserAvatarUpdate + ): UserAvatarUpdate @doc(category: "Users") """ Deletes a user avatar. Only for staff members. Requires one of the following permissions: AUTHENTICATED_STAFF_USER. """ - userAvatarDelete: UserAvatarDelete + userAvatarDelete: UserAvatarDelete @doc(category: "Users") """ Activate or deactivate users. @@ -15697,12 +17223,12 @@ type Mutation { Requires one of the following permissions: MANAGE_USERS. """ userBulkSetActive( - """List of user IDs to (de)activate).""" + """List of user IDs to activate/deactivate.""" ids: [ID!]! """Determine if users will be set active or not.""" isActive: Boolean! - ): UserBulkSetActive + ): UserBulkSetActive @doc(category: "Users") """ Create new permission group. Apps are not allowed to perform this mutation. @@ -15712,7 +17238,7 @@ type Mutation { permissionGroupCreate( """Input fields to create permission group.""" input: PermissionGroupCreateInput! - ): PermissionGroupCreate + ): PermissionGroupCreate @doc(category: "Users") """ Update permission group. Apps are not allowed to perform this mutation. @@ -15725,7 +17251,7 @@ type Mutation { """Input fields to create permission group.""" input: PermissionGroupUpdateInput! - ): PermissionGroupUpdate + ): PermissionGroupUpdate @doc(category: "Users") """ Delete permission group. Apps are not allowed to perform this mutation. @@ -15735,7 +17261,7 @@ type Mutation { permissionGroupDelete( """ID of the group to delete.""" id: ID! - ): PermissionGroupDelete + ): PermissionGroupDelete @doc(category: "Users") } """ @@ -15743,13 +17269,13 @@ Creates a new webhook subscription. Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ -type WebhookCreate { +type WebhookCreate @doc(category: "Webhooks") { webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [WebhookError!]! webhook: Webhook } -type WebhookError { +type WebhookError @doc(category: "Webhooks") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -15763,16 +17289,21 @@ type WebhookError { } """An enumeration.""" -enum WebhookErrorCode { +enum WebhookErrorCode @doc(category: "Webhooks") { GRAPHQL_ERROR INVALID NOT_FOUND REQUIRED UNIQUE DELETE_FAILED + SYNTAX + MISSING_SUBSCRIPTION + UNABLE_TO_PARSE + MISSING_EVENT + INVALID_CUSTOM_HEADERS } -input WebhookCreateInput { +input WebhookCreateInput @doc(category: "Webhooks") { """The name of the webhook.""" name: String @@ -15809,10 +17340,17 @@ input WebhookCreateInput { Subscription query used to define a webhook payload. Added in Saleor 3.2. + """ + query: String + + """ + Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only "X-*" and "Authorization*" keys are allowed. + + Added in Saleor 3.12. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - query: String + customHeaders: JSONString } """ @@ -15820,7 +17358,7 @@ Delete a webhook. Before the deletion, the webhook is deactivated to pause any d Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ -type WebhookDelete { +type WebhookDelete @doc(category: "Webhooks") { webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [WebhookError!]! webhook: Webhook @@ -15829,15 +17367,15 @@ type WebhookDelete { """ Updates a webhook subscription. -Requires one of the following permissions: MANAGE_APPS. +Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ -type WebhookUpdate { +type WebhookUpdate @doc(category: "Webhooks") { webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [WebhookError!]! webhook: Webhook } -input WebhookUpdateInput { +input WebhookUpdateInput @doc(category: "Webhooks") { """The new name of the webhook.""" name: String @@ -15874,10 +17412,17 @@ input WebhookUpdateInput { Subscription query used to define a webhook payload. Added in Saleor 3.2. + """ + query: String + + """ + Custom headers, which will be added to HTTP request. There is a limitation of 5 headers per webhook and 998 characters per header.Only "X-*" and "Authorization*" keys are allowed. + + Added in Saleor 3.12. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - query: String + customHeaders: JSONString } """ @@ -15885,24 +17430,106 @@ Retries event delivery. Requires one of the following permissions: MANAGE_APPS. """ -type EventDeliveryRetry { +type EventDeliveryRetry @doc(category: "Webhooks") { """Event delivery.""" delivery: EventDelivery errors: [WebhookError!]! } +""" +Performs a dry run of a webhook event. Supports a single event (the first, if multiple provided in the `query`). Requires permission relevant to processed event. + +Added in Saleor 3.11. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: AUTHENTICATED_STAFF_USER. +""" +type WebhookDryRun @doc(category: "Webhooks") { + """JSON payload, that would be sent out to webhook's target URL.""" + payload: JSONString + errors: [WebhookDryRunError!]! +} + +type WebhookDryRunError @doc(category: "Webhooks") { + """ + 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: WebhookDryRunErrorCode! +} + +"""An enumeration.""" +enum WebhookDryRunErrorCode @doc(category: "Webhooks") { + GRAPHQL_ERROR + NOT_FOUND + INVALID_ID + MISSING_PERMISSION + TYPE_NOT_SUPPORTED + SYNTAX + MISSING_SUBSCRIPTION + UNABLE_TO_PARSE + MISSING_EVENT +} + +""" +Trigger a webhook event. Supports a single event (the first, if multiple provided in the `webhook.subscription_query`). Requires permission relevant to processed event. Successfully delivered webhook returns `delivery` with status='PENDING' and empty payload. + +Added in Saleor 3.11. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: AUTHENTICATED_STAFF_USER. +""" +type WebhookTrigger @doc(category: "Webhooks") { + delivery: EventDelivery + errors: [WebhookTriggerError!]! +} + +type WebhookTriggerError @doc(category: "Webhooks") { + """ + 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: WebhookTriggerErrorCode! +} + +"""An enumeration.""" +enum WebhookTriggerErrorCode @doc(category: "Webhooks") { + GRAPHQL_ERROR + NOT_FOUND + INVALID_ID + MISSING_PERMISSION + TYPE_NOT_SUPPORTED + SYNTAX + MISSING_SUBSCRIPTION + UNABLE_TO_PARSE + MISSING_QUERY + MISSING_EVENT +} + """ Creates new warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseCreate { +type WarehouseCreate @doc(category: "Products") { warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [WarehouseError!]! warehouse: Warehouse } -type WarehouseError { +type WarehouseError @doc(category: "Products") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -15919,7 +17546,7 @@ type WarehouseError { } """An enumeration.""" -enum WarehouseErrorCode { +enum WarehouseErrorCode @doc(category: "Products") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -15928,7 +17555,7 @@ enum WarehouseErrorCode { UNIQUE } -input WarehouseCreateInput { +input WarehouseCreateInput @doc(category: "Products") { """Warehouse slug.""" slug: String @@ -15961,13 +17588,13 @@ Updates given warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseUpdate { +type WarehouseUpdate @doc(category: "Products") { warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [WarehouseError!]! warehouse: Warehouse } -input WarehouseUpdateInput { +input WarehouseUpdateInput @doc(category: "Products") { """Warehouse slug.""" slug: String @@ -15991,8 +17618,6 @@ input WarehouseUpdateInput { Click and collect options: local, all or disabled. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ clickAndCollectOption: WarehouseClickAndCollectOptionEnum @@ -16000,8 +17625,6 @@ input WarehouseUpdateInput { Visibility of warehouse stocks. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ isPrivate: Boolean } @@ -16011,7 +17634,7 @@ Deletes selected warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseDelete { +type WarehouseDelete @doc(category: "Products") { warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [WarehouseError!]! warehouse: Warehouse @@ -16022,7 +17645,7 @@ Add shipping zone to given warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseShippingZoneAssign { +type WarehouseShippingZoneAssign @doc(category: "Products") { warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [WarehouseError!]! warehouse: Warehouse @@ -16033,7 +17656,7 @@ Remove shipping zone from given warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseShippingZoneUnassign { +type WarehouseShippingZoneUnassign @doc(category: "Products") { warehouseErrors: [WarehouseError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [WarehouseError!]! warehouse: Warehouse @@ -16042,18 +17665,16 @@ type WarehouseShippingZoneUnassign { """ Create a tax class. -Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ -type TaxClassCreate { +type TaxClassCreate @doc(category: "Taxes") { errors: [TaxClassCreateError!]! taxClass: TaxClass } -type TaxClassCreateError { +type TaxClassCreateError @doc(category: "Taxes") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16070,13 +17691,13 @@ type TaxClassCreateError { } """An enumeration.""" -enum TaxClassCreateErrorCode { +enum TaxClassCreateErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND } -input TaxClassCreateInput { +input TaxClassCreateInput @doc(category: "Taxes") { """Name of the tax class.""" name: String! @@ -16084,7 +17705,7 @@ input TaxClassCreateInput { createCountryRates: [CountryRateInput!] } -input CountryRateInput { +input CountryRateInput @doc(category: "Taxes") { """Country in which this rate applies.""" countryCode: CountryCode! @@ -16097,18 +17718,16 @@ input CountryRateInput { """ Delete a tax class. After deleting the tax class any products, product types or shipping methods using it are updated to use the default tax class. -Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ -type TaxClassDelete { +type TaxClassDelete @doc(category: "Taxes") { errors: [TaxClassDeleteError!]! taxClass: TaxClass } -type TaxClassDeleteError { +type TaxClassDeleteError @doc(category: "Taxes") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16122,7 +17741,7 @@ type TaxClassDeleteError { } """An enumeration.""" -enum TaxClassDeleteErrorCode { +enum TaxClassDeleteErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -16131,18 +17750,16 @@ enum TaxClassDeleteErrorCode { """ Update a tax class. -Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ -type TaxClassUpdate { +type TaxClassUpdate @doc(category: "Taxes") { errors: [TaxClassUpdateError!]! taxClass: TaxClass } -type TaxClassUpdateError { +type TaxClassUpdateError @doc(category: "Taxes") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16159,14 +17776,14 @@ type TaxClassUpdateError { } """An enumeration.""" -enum TaxClassUpdateErrorCode { +enum TaxClassUpdateErrorCode @doc(category: "Taxes") { DUPLICATED_INPUT_ITEM GRAPHQL_ERROR INVALID NOT_FOUND } -input TaxClassUpdateInput { +input TaxClassUpdateInput @doc(category: "Taxes") { """Name of the tax class.""" name: String @@ -16181,7 +17798,7 @@ input TaxClassUpdateInput { removeCountryRates: [CountryCode!] } -input CountryRateUpdateInput { +input CountryRateUpdateInput @doc(category: "Taxes") { """Country in which this rate applies.""" countryCode: CountryCode! @@ -16194,18 +17811,16 @@ input CountryRateUpdateInput { """ Update tax configuration for a channel. -Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ -type TaxConfigurationUpdate { +type TaxConfigurationUpdate @doc(category: "Taxes") { errors: [TaxConfigurationUpdateError!]! taxConfiguration: TaxConfiguration } -type TaxConfigurationUpdateError { +type TaxConfigurationUpdateError @doc(category: "Taxes") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16222,14 +17837,14 @@ type TaxConfigurationUpdateError { } """An enumeration.""" -enum TaxConfigurationUpdateErrorCode { +enum TaxConfigurationUpdateErrorCode @doc(category: "Taxes") { DUPLICATED_INPUT_ITEM GRAPHQL_ERROR INVALID NOT_FOUND } -input TaxConfigurationUpdateInput { +input TaxConfigurationUpdateInput @doc(category: "Taxes") { """Determines whether taxes are charged in the given channel.""" chargeTaxes: Boolean @@ -16255,7 +17870,7 @@ input TaxConfigurationUpdateInput { removeCountriesConfiguration: [CountryCode!] } -input TaxConfigurationPerCountryInput { +input TaxConfigurationPerCountryInput @doc(category: "Taxes") { """Country in which this configuration applies.""" countryCode: CountryCode! @@ -16276,19 +17891,17 @@ input TaxConfigurationPerCountryInput { """ Update tax class rates for a specific country. -Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ -type TaxCountryConfigurationUpdate { +type TaxCountryConfigurationUpdate @doc(category: "Taxes") { """Updated tax class rates grouped by a country.""" taxCountryConfiguration: TaxCountryConfiguration errors: [TaxCountryConfigurationUpdateError!]! } -type TaxCountryConfigurationUpdateError { +type TaxCountryConfigurationUpdateError @doc(category: "Taxes") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16305,7 +17918,7 @@ type TaxCountryConfigurationUpdateError { } """An enumeration.""" -enum TaxCountryConfigurationUpdateErrorCode { +enum TaxCountryConfigurationUpdateErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -16313,7 +17926,7 @@ enum TaxCountryConfigurationUpdateErrorCode { CANNOT_CREATE_NEGATIVE_RATE } -input TaxClassRateInput { +input TaxClassRateInput @doc(category: "Taxes") { """ID of a tax class for which to update the tax rate""" taxClassId: ID @@ -16324,19 +17937,17 @@ input TaxClassRateInput { """ Remove all tax class rates for a specific country. -Added in Saleor 3.9. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.9. Requires one of the following permissions: MANAGE_TAXES. """ -type TaxCountryConfigurationDelete { +type TaxCountryConfigurationDelete @doc(category: "Taxes") { """Updated tax class rates grouped by a country.""" taxCountryConfiguration: TaxCountryConfiguration errors: [TaxCountryConfigurationDeleteError!]! } -type TaxCountryConfigurationDeleteError { +type TaxCountryConfigurationDeleteError @doc(category: "Taxes") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16350,7 +17961,7 @@ type TaxCountryConfigurationDeleteError { } """An enumeration.""" -enum TaxCountryConfigurationDeleteErrorCode { +enum TaxCountryConfigurationDeleteErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -16359,20 +17970,18 @@ enum TaxCountryConfigurationDeleteErrorCode { """ Exempt checkout or order from charging the taxes. When tax exemption is enabled, taxes won't be charged for the checkout or order. Taxes may still be calculated in cases when product prices are entered with the tax included and the net price needs to be known. -Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.8. Requires one of the following permissions: MANAGE_TAXES. """ -type TaxExemptionManage { +type TaxExemptionManage @doc(category: "Taxes") { taxableObject: TaxSourceObject errors: [TaxExemptionManageError!]! } union TaxSourceObject = Checkout | Order -type TaxExemptionManageError { +type TaxExemptionManageError @doc(category: "Taxes") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16386,25 +17995,102 @@ type TaxExemptionManageError { } """An enumeration.""" -enum TaxExemptionManageErrorCode { +enum TaxExemptionManageErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND NOT_EDITABLE_ORDER } +""" +Updates stocks for a given variant and warehouse. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_PRODUCTS. +""" +type StockBulkUpdate @doc(category: "Products") { + """Returns how many objects were updated.""" + count: Int! + + """List of the updated stocks.""" + results: [StockBulkResult!]! + errors: [StockBulkUpdateError!]! +} + +type StockBulkResult @doc(category: "Products") { + """Stock data.""" + stock: Stock + + """List of errors occurred on create or update attempt.""" + errors: [StockBulkUpdateError!] +} + +type StockBulkUpdateError @doc(category: "Products") { + """ + 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: StockBulkUpdateErrorCode! +} + +"""An enumeration.""" +enum StockBulkUpdateErrorCode @doc(category: "Products") { + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED +} + +enum ErrorPolicyEnum { + """ + Save what is possible within a single row. If there are errors in an input data row, try to save it partially and skip the invalid part. + """ + IGNORE_FAILED + + """Reject all rows if there is at least one error in any of them.""" + REJECT_EVERYTHING + + """Reject rows with errors.""" + REJECT_FAILED_ROWS +} + +input StockBulkUpdateInput @doc(category: "Products") { + """Variant ID.""" + variantId: ID + + """Variant external reference.""" + variantExternalReference: String + + """Warehouse ID.""" + warehouseId: ID + + """Warehouse external reference.""" + warehouseExternalReference: String + + """Quantity of items available for sell.""" + quantity: Int! +} + """ Creates a new staff notification recipient. Requires one of the following permissions: MANAGE_SETTINGS. """ -type StaffNotificationRecipientCreate { +type StaffNotificationRecipientCreate @doc(category: "Users") { shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient } -type ShopError { +type ShopError @doc(category: "Shop") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16444,7 +18130,7 @@ Updates a staff notification recipient. Requires one of the following permissions: MANAGE_SETTINGS. """ -type StaffNotificationRecipientUpdate { +type StaffNotificationRecipientUpdate @doc(category: "Users") { shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient @@ -16455,7 +18141,7 @@ Delete staff notification recipient. Requires one of the following permissions: MANAGE_SETTINGS. """ -type StaffNotificationRecipientDelete { +type StaffNotificationRecipientDelete @doc(category: "Users") { shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShopError!]! staffNotificationRecipient: StaffNotificationRecipient @@ -16466,7 +18152,7 @@ Updates site domain of the shop. Requires one of the following permissions: MANAGE_SETTINGS. """ -type ShopDomainUpdate { +type ShopDomainUpdate @doc(category: "Shop") { """Updated shop.""" shop: Shop shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -16486,7 +18172,7 @@ Updates shop settings. Requires one of the following permissions: MANAGE_SETTINGS. """ -type ShopSettingsUpdate { +type ShopSettingsUpdate @doc(category: "Shop") { """Updated shop.""" shop: Shop shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -16556,11 +18242,16 @@ input ShopSettingsInput { Default number of maximum line quantity in single checkout. Minimum possible value is 1, default value is 50. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ limitQuantityPerCheckout: Int + """ + Enable automatic account confirmation by email. + + Added in Saleor 3.14. + """ + enableAccountConfirmationByEmail: Boolean + """ Include taxes in prices. @@ -16588,7 +18279,7 @@ Fetch tax rates. Requires one of the following permissions: MANAGE_SETTINGS. """ -type ShopFetchTaxRates { +type ShopFetchTaxRates @doc(category: "Shop") { """Updated shop.""" shop: Shop shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -16600,7 +18291,7 @@ Creates/updates translations for shop settings. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type ShopSettingsTranslate { +type ShopSettingsTranslate @doc(category: "Shop") { """Updated shop settings.""" shop: Shop translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -16638,7 +18329,7 @@ Update the shop's address. If the `null` value is passed, the currently selected Requires one of the following permissions: MANAGE_SETTINGS. """ -type ShopAddressUpdate { +type ShopAddressUpdate @doc(category: "Shop") { """Updated shop.""" shop: Shop shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -16646,18 +18337,18 @@ type ShopAddressUpdate { } """ -Update shop order settings. +Update shop order settings across all channels. Returns `orderSettings` for the first `channel` in alphabetical order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderSettingsUpdate { +type OrderSettingsUpdate @doc(category: "Orders") { """Order settings.""" orderSettings: OrderSettings orderSettingsErrors: [OrderSettingsError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderSettingsError!]! } -type OrderSettingsError { +type OrderSettingsError @doc(category: "Orders") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16671,18 +18362,18 @@ type OrderSettingsError { } """An enumeration.""" -enum OrderSettingsErrorCode { +enum OrderSettingsErrorCode @doc(category: "Orders") { INVALID } -input OrderSettingsUpdateInput { +input OrderSettingsUpdateInput @doc(category: "Orders") { """ - When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. + When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. By default set to True """ automaticallyConfirmAllNewOrders: Boolean """ - When enabled, all non-shippable gift card orders will be fulfilled automatically. + When enabled, all non-shippable gift card orders will be fulfilled automatically. By defualt set to True. """ automaticallyFulfillNonShippableGiftCard: Boolean } @@ -16692,13 +18383,13 @@ Update gift card settings. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardSettingsUpdate { +type GiftCardSettingsUpdate @doc(category: "Gift cards") { """Gift card settings.""" giftCardSettings: GiftCardSettings errors: [GiftCardSettingsError!]! } -type GiftCardSettingsError { +type GiftCardSettingsError @doc(category: "Gift cards") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16712,13 +18403,13 @@ type GiftCardSettingsError { } """An enumeration.""" -enum GiftCardSettingsErrorCode { +enum GiftCardSettingsErrorCode @doc(category: "Gift cards") { INVALID REQUIRED GRAPHQL_ERROR } -input GiftCardSettingsUpdateInput { +input GiftCardSettingsUpdateInput @doc(category: "Gift cards") { """Defines gift card default expiry settings.""" expiryType: GiftCardSettingsExpiryTypeEnum @@ -16739,14 +18430,14 @@ Manage shipping method's availability in channels. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingMethodChannelListingUpdate { +type ShippingMethodChannelListingUpdate @doc(category: "Shipping") { """An updated shipping method instance.""" shippingMethod: ShippingMethodType shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } -type ShippingError { +type ShippingError @doc(category: "Shipping") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -16766,7 +18457,7 @@ type ShippingError { } """An enumeration.""" -enum ShippingErrorCode { +enum ShippingErrorCode @doc(category: "Shipping") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -16777,7 +18468,7 @@ enum ShippingErrorCode { DUPLICATED_INPUT_ITEM } -input ShippingMethodChannelListingInput { +input ShippingMethodChannelListingInput @doc(category: "Shipping") { """List of channels to which the shipping method should be assigned.""" addChannels: [ShippingMethodChannelListingAddInput!] @@ -16785,7 +18476,7 @@ input ShippingMethodChannelListingInput { removeChannels: [ID!] } -input ShippingMethodChannelListingAddInput { +input ShippingMethodChannelListingAddInput @doc(category: "Shipping") { """ID of a channel.""" channelId: ID! @@ -16804,7 +18495,7 @@ Creates a new shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceCreate { +type ShippingPriceCreate @doc(category: "Shipping") { """A shipping zone to which the shipping method belongs.""" shippingZone: ShippingZone shippingMethod: ShippingMethodType @@ -16812,7 +18503,7 @@ type ShippingPriceCreate { errors: [ShippingError!]! } -input ShippingPriceInput { +input ShippingPriceInput @doc(category: "Shipping") { """Name of the shipping method.""" name: String @@ -16854,7 +18545,7 @@ input ShippingPriceInput { scalar WeightScalar -input ShippingPostalCodeRulesCreateInputRange { +input ShippingPostalCodeRulesCreateInputRange @doc(category: "Shipping") { """Start range of the postal code.""" start: String! @@ -16867,7 +18558,7 @@ Deletes a shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceDelete { +type ShippingPriceDelete @doc(category: "Shipping") { """A shipping method to delete.""" shippingMethod: ShippingMethodType @@ -16882,7 +18573,7 @@ Deletes shipping prices. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceBulkDelete { +type ShippingPriceBulkDelete @doc(category: "Shipping") { """Returns how many objects were affected.""" count: Int! shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -16894,7 +18585,7 @@ Updates a new shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceUpdate { +type ShippingPriceUpdate @doc(category: "Shipping") { """A shipping zone to which the shipping method belongs.""" shippingZone: ShippingZone shippingMethod: ShippingMethodType @@ -16907,7 +18598,7 @@ Creates/updates translations for a shipping method. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type ShippingPriceTranslate { +type ShippingPriceTranslate @doc(category: "Shipping") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! shippingMethod: ShippingMethodType @@ -16929,14 +18620,14 @@ Exclude products from shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceExcludeProducts { +type ShippingPriceExcludeProducts @doc(category: "Shipping") { """A shipping method with new list of excluded products.""" shippingMethod: ShippingMethodType shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } -input ShippingPriceExcludeProductsInput { +input ShippingPriceExcludeProductsInput @doc(category: "Shipping") { """List of products which will be excluded.""" products: [ID!]! } @@ -16946,7 +18637,7 @@ Remove product from excluded list for shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceRemoveProductFromExclude { +type ShippingPriceRemoveProductFromExclude @doc(category: "Shipping") { """A shipping method with new list of excluded products.""" shippingMethod: ShippingMethodType shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -16958,13 +18649,13 @@ Creates a new shipping zone. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingZoneCreate { +type ShippingZoneCreate @doc(category: "Shipping") { shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! shippingZone: ShippingZone } -input ShippingZoneCreateInput { +input ShippingZoneCreateInput @doc(category: "Shipping") { """Shipping zone's name. Visible only to the staff.""" name: String @@ -16991,7 +18682,7 @@ Deletes a shipping zone. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingZoneDelete { +type ShippingZoneDelete @doc(category: "Shipping") { shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! shippingZone: ShippingZone @@ -17002,7 +18693,7 @@ Deletes shipping zones. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingZoneBulkDelete { +type ShippingZoneBulkDelete @doc(category: "Shipping") { """Returns how many objects were affected.""" count: Int! shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -17014,13 +18705,13 @@ Updates a new shipping zone. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingZoneUpdate { +type ShippingZoneUpdate @doc(category: "Shipping") { shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! shippingZone: ShippingZone } -input ShippingZoneUpdateInput { +input ShippingZoneUpdateInput @doc(category: "Shipping") { """Shipping zone's name. Visible only to the staff.""" name: String @@ -17053,14 +18744,14 @@ Assign attributes to a given product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductAttributeAssign { +type ProductAttributeAssign @doc(category: "Products") { """The updated product type.""" productType: ProductType productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -type ProductError { +type ProductError @doc(category: "Products") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -17080,7 +18771,7 @@ type ProductError { } """An enumeration.""" -enum ProductErrorCode { +enum ProductErrorCode @doc(category: "Products") { ALREADY_EXISTS ATTRIBUTE_ALREADY_ASSIGNED ATTRIBUTE_CANNOT_BE_ASSIGNED @@ -17089,6 +18780,7 @@ enum ProductErrorCode { DUPLICATED_INPUT_ITEM GRAPHQL_ERROR INVALID + INVALID_PRICE PRODUCT_WITHOUT_CATEGORY NOT_PRODUCTS_IMAGE NOT_PRODUCTS_VARIANT @@ -17102,7 +18794,7 @@ enum ProductErrorCode { PREORDER_VARIANT_CANNOT_BE_DEACTIVATED } -input ProductAttributeAssignInput { +input ProductAttributeAssignInput @doc(category: "Products") { """The ID of the attribute to assign.""" id: ID! @@ -17117,7 +18809,7 @@ input ProductAttributeAssignInput { variantSelection: Boolean } -enum ProductAttributeType { +enum ProductAttributeType @doc(category: "Products") { PRODUCT VARIANT } @@ -17129,14 +18821,14 @@ Added in Saleor 3.1. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductAttributeAssignmentUpdate { +type ProductAttributeAssignmentUpdate @doc(category: "Products") { """The updated product type.""" productType: ProductType productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input ProductAttributeAssignmentUpdateInput { +input ProductAttributeAssignmentUpdateInput @doc(category: "Products") { """The ID of the attribute to assign.""" id: ID! @@ -17153,7 +18845,7 @@ Un-assign attributes from a given product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductAttributeUnassign { +type ProductAttributeUnassign @doc(category: "Products") { """The updated product type.""" productType: ProductType productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -17165,13 +18857,13 @@ Creates a new category. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CategoryCreate { +type CategoryCreate @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! category: Category } -input CategoryInput { +input CategoryInput @doc(category: "Products") { """ Category description. @@ -17235,7 +18927,7 @@ Deletes a category. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CategoryDelete { +type CategoryDelete @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! category: Category @@ -17246,7 +18938,7 @@ Deletes categories. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CategoryBulkDelete { +type CategoryBulkDelete @doc(category: "Products") { """Returns how many objects were affected.""" count: Int! productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -17258,7 +18950,7 @@ Updates a category. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CategoryUpdate { +type CategoryUpdate @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! category: Category @@ -17269,7 +18961,7 @@ Creates/updates translations for a category. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type CategoryTranslate { +type CategoryTranslate @doc(category: "Products") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! category: Category @@ -17293,14 +18985,14 @@ Adds products to a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionAddProducts { +type CollectionAddProducts @doc(category: "Products") { """Collection to which products will be added.""" collection: Collection collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionError!]! } -type CollectionError { +type CollectionError @doc(category: "Products") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -17317,7 +19009,7 @@ type CollectionError { } """An enumeration.""" -enum CollectionErrorCode { +enum CollectionErrorCode @doc(category: "Products") { DUPLICATED_INPUT_ITEM GRAPHQL_ERROR INVALID @@ -17332,13 +19024,13 @@ Creates a new collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionCreate { +type CollectionCreate @doc(category: "Products") { collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionError!]! collection: Collection } -input CollectionCreateInput { +input CollectionCreateInput @doc(category: "Products") { """Informs whether a collection is published.""" isPublished: Boolean @@ -17394,7 +19086,7 @@ Deletes a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionDelete { +type CollectionDelete @doc(category: "Products") { collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionError!]! collection: Collection @@ -17405,14 +19097,14 @@ Reorder the products of a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionReorderProducts { +type CollectionReorderProducts @doc(category: "Products") { """Collection from which products are reordered.""" collection: Collection collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionError!]! } -input MoveProductInput { +input MoveProductInput @doc(category: "Products") { """The ID of the product to move.""" productId: ID! @@ -17427,7 +19119,7 @@ Deletes collections. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionBulkDelete { +type CollectionBulkDelete @doc(category: "Products") { """Returns how many objects were affected.""" count: Int! collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -17439,7 +19131,7 @@ Remove products from a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionRemoveProducts { +type CollectionRemoveProducts @doc(category: "Products") { """Collection from which products will be removed.""" collection: Collection collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -17451,13 +19143,13 @@ Updates a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionUpdate { +type CollectionUpdate @doc(category: "Products") { collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionError!]! collection: Collection } -input CollectionInput { +input CollectionInput @doc(category: "Products") { """Informs whether a collection is published.""" isPublished: Boolean @@ -17510,7 +19202,7 @@ Creates/updates translations for a collection. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type CollectionTranslate { +type CollectionTranslate @doc(category: "Products") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! collection: Collection @@ -17521,14 +19213,14 @@ Manage collection's availability in channels. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionChannelListingUpdate { +type CollectionChannelListingUpdate @doc(category: "Products") { """An updated collection instance.""" collection: Collection collectionChannelListingErrors: [CollectionChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionChannelListingError!]! } -type CollectionChannelListingError { +type CollectionChannelListingError @doc(category: "Products") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -17550,7 +19242,7 @@ type CollectionChannelListingError { channels: [ID!] } -input CollectionChannelListingUpdateInput { +input CollectionChannelListingUpdateInput @doc(category: "Products") { """List of channels to which the collection should be assigned.""" addChannels: [PublishableChannelListingInput!] @@ -17558,7 +19250,7 @@ input CollectionChannelListingUpdateInput { removeChannels: [ID!] } -input PublishableChannelListingInput { +input PublishableChannelListingInput @doc(category: "Products") { """ID of a channel.""" channelId: ID! @@ -17585,13 +19277,13 @@ Creates a new product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductCreate { +type ProductCreate @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! product: Product } -input ProductCreateInput { +input ProductCreateInput @doc(category: "Products") { """List of attributes.""" attributes: [AttributeValueInput!] @@ -17629,7 +19321,7 @@ input ProductCreateInput { """ Tax rate for enabled tax gateway. - DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. + DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. If taxCode is provided, Saleor will try to find a tax class with given code (codes are stored in metadata) and assign it. If no tax class is found, it would be created and assigned. """ taxCode: String @@ -17667,31 +19359,38 @@ input ProductCreateInput { productType: ID! } -input AttributeValueInput { +input AttributeValueInput @doc(category: "Attributes") { """ID of the selected attribute.""" id: ID + """ + External ID of this attribute. + + Added in Saleor 3.14. + """ + externalReference: String + """ The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. This field will be removed in Saleor 4.0. """ values: [String!] """ - Attribute value ID. + Attribute value ID or external reference. Added in Saleor 3.9. """ dropdown: AttributeValueSelectableTypeInput """ - Attribute value ID. + Attribute value ID or external reference. Added in Saleor 3.9. """ swatch: AttributeValueSelectableTypeInput """ - List of attribute value IDs. + List of attribute value IDs or external references. Added in Saleor 3.9. """ @@ -17730,14 +19429,25 @@ input AttributeValueInput { } """ -Represents attribute value. If no ID provided, value will be resolved. +Represents attribute value. +1. If ID is provided, then attribute value will be resolved by ID. +2. If externalReference is provided, then attribute value will be resolved by external reference. +3. If value is provided, then attribute value will be resolved by value. If this attribute value doesn't exist, then it will be created. +4. If externalReference and value is provided then new attribute value will be created. Added in Saleor 3.9. """ -input AttributeValueSelectableTypeInput { +input AttributeValueSelectableTypeInput @doc(category: "Attributes") { """ID of an attribute value.""" id: ID + """ + External reference of an attribute value. + + Added in Saleor 3.14. + """ + externalReference: String + """ The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. """ @@ -17749,36 +19459,83 @@ Deletes a product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductDelete { +type ProductDelete @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! product: Product } """ -Deletes products. +Creates products. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductBulkDelete { - """Returns how many objects were affected.""" +type ProductBulkCreate @doc(category: "Products") { + """Returns how many objects were created.""" count: Int! - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! + + """List of the created products.""" + results: [ProductBulkResult!]! + errors: [ProductBulkCreateError!]! } -""" -Updates an existing product. - -Requires one of the following permissions: MANAGE_PRODUCTS. -""" -type ProductUpdate { - productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ProductError!]! +type ProductBulkResult @doc(category: "Products") { + """Product data.""" product: Product + + """List of errors occurred on create attempt.""" + errors: [ProductBulkCreateError!] } -input ProductInput { +type ProductBulkCreateError @doc(category: "Products") { + """ + Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + path: String + + """The error message.""" + message: String + + """The error code.""" + code: ProductBulkCreateErrorCode! + + """List of attributes IDs which causes the error.""" + attributes: [ID!] + + """List of attribute values IDs which causes the error.""" + values: [ID!] + + """List of warehouse IDs which causes the error.""" + warehouses: [ID!] + + """List of channel IDs which causes the error.""" + channels: [ID!] +} + +"""An enumeration.""" +enum ProductBulkCreateErrorCode @doc(category: "Products") { + ATTRIBUTE_ALREADY_ASSIGNED + ATTRIBUTE_CANNOT_BE_ASSIGNED + ATTRIBUTE_VARIANTS_DISABLED + BLANK + MAX_LENGTH + DUPLICATED_INPUT_ITEM + GRAPHQL_ERROR + INVALID + INVALID_PRICE + PRODUCT_WITHOUT_CATEGORY + NOT_FOUND + REQUIRED + UNIQUE + PRODUCT_NOT_ASSIGNED_TO_CHANNEL + UNSUPPORTED_MEDIA_PROVIDER +} + +input ProductBulkCreateInput @doc(category: "Products") { """List of attributes.""" attributes: [AttributeValueInput!] @@ -17816,7 +19573,331 @@ input ProductInput { """ Tax rate for enabled tax gateway. - DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. + DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. If taxCode is provided, Saleor will try to find a tax class with given code (codes are stored in metadata) and assign it. If no tax class is found, it would be created and assigned. + """ + taxCode: String + + """Search engine optimization fields.""" + seo: SeoInput + + """Weight of the Product.""" + weight: WeightScalar + + """Defines the product rating value.""" + rating: Float + + """Fields required to update the product metadata.""" + metadata: [MetadataInput!] + + """Fields required to update the product private metadata.""" + privateMetadata: [MetadataInput!] + + """External ID of this product.""" + externalReference: String + + """ID of the type that product belongs to.""" + productType: ID! + + """List of media inputs associated with the product.""" + media: [MediaInput!] + + """List of channels in which the product is available.""" + channelListings: [ProductChannelListingCreateInput!] + + """Input list of product variants to create.""" + variants: [ProductVariantBulkCreateInput!] +} + +input MediaInput { + """Alt text for a product media.""" + alt: String + + """Represents an image file in a multipart request.""" + image: Upload + + """Represents an URL to an external media.""" + mediaUrl: String +} + +input ProductChannelListingCreateInput @doc(category: "Products") { + """ID of a channel.""" + channelId: ID! + + """Determines if object is visible to customers.""" + isPublished: Boolean + + """Publication date time. ISO 8601 standard.""" + publishedAt: DateTime + + """ + 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 time from which a product will be available for purchase. When not set and `isAvailable` is set to True, the current day is assumed. + """ + availableForPurchaseAt: DateTime +} + +input ProductVariantBulkCreateInput @doc(category: "Products") { + """List of attributes specific to this variant.""" + attributes: [BulkAttributeValueInput!]! + + """Stock keeping unit.""" + sku: String + + """Variant name.""" + name: 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 + + """ + Determines if variant is in preorder. + + Added in Saleor 3.1. + """ + preorder: PreorderSettingsInput + + """ + Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. + + Added in Saleor 3.1. + """ + quantityLimitPerCustomer: Int + + """ + Fields required to update the product variant metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the product variant private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] + + """ + External ID of this product variant. + + Added in Saleor 3.10. + """ + externalReference: String + + """Stocks of a product available for sale.""" + stocks: [StockInput!] + + """List of prices assigned to channels.""" + channelListings: [ProductVariantChannelListingAddInput!] +} + +input BulkAttributeValueInput @doc(category: "Products") { + """ID of the selected attribute.""" + id: ID + + """ + External ID of this attribute. + + Added in Saleor 3.14. + """ + externalReference: String + + """ + The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created.This field will be removed in Saleor 4.0. + """ + values: [String!] + + """ + Attribute value ID. + + Added in Saleor 3.12. + """ + dropdown: AttributeValueSelectableTypeInput + + """ + Attribute value ID. + + Added in Saleor 3.12. + """ + swatch: AttributeValueSelectableTypeInput + + """ + List of attribute value IDs. + + Added in Saleor 3.12. + """ + multiselect: [AttributeValueSelectableTypeInput!] + + """ + Numeric value of an attribute. + + Added in Saleor 3.12. + """ + numeric: String + + """ + URL of the file attribute. Every time, a new value is created. + + Added in Saleor 3.12. + """ + file: String + + """ + File content type. + + Added in Saleor 3.12. + """ + contentType: String + + """ + List of entity IDs that will be used as references. + + Added in Saleor 3.12. + """ + references: [ID!] + + """ + Text content in JSON format. + + Added in Saleor 3.12. + """ + richText: JSONString + + """ + Plain text content. + + Added in Saleor 3.12. + """ + plainText: String + + """ + The boolean value of an attribute to resolve. If the passed value is non-existent, it will be created. + """ + boolean: Boolean + + """ + Represents the date value of the attribute value. + + Added in Saleor 3.12. + """ + date: Date + + """ + Represents the date/time value of the attribute value. + + Added in Saleor 3.12. + """ + dateTime: DateTime +} + +input PreorderSettingsInput @doc(category: "Products") { + """The global threshold for preorder variant.""" + globalThreshold: Int + + """The end date for preorder.""" + endDate: DateTime +} + +input StockInput @doc(category: "Products") { + """Warehouse in which stock is located.""" + warehouse: ID! + + """Quantity of items available for sell.""" + quantity: Int! +} + +input ProductVariantChannelListingAddInput @doc(category: "Products") { + """ID of a channel.""" + channelId: ID! + + """Price of the particular variant in channel.""" + price: PositiveDecimal! + + """Cost price of the variant in channel.""" + costPrice: PositiveDecimal + + """ + The threshold for preorder variant in channel. + + Added in Saleor 3.1. + """ + preorderThreshold: Int +} + +""" +Deletes products. + +Requires one of the following permissions: MANAGE_PRODUCTS. +""" +type ProductBulkDelete @doc(category: "Products") { + """Returns how many objects were affected.""" + count: Int! + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + errors: [ProductError!]! +} + +""" +Updates an existing product. + +Requires one of the following permissions: MANAGE_PRODUCTS. +""" +type ProductUpdate @doc(category: "Products") { + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + errors: [ProductError!]! + product: Product +} + +input ProductInput @doc(category: "Products") { + """List of attributes.""" + attributes: [AttributeValueInput!] + + """ID of the product's category.""" + category: ID + + """ + Determine if taxes are being charged for the product. + + DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled. + """ + chargeTaxes: Boolean + + """List of IDs of collections that the product belongs to.""" + collections: [ID!] + + """ + Product description. + + Rich text format. For reference see https://editorjs.io/ + """ + description: JSONString + + """Product name.""" + name: String + + """Product slug.""" + slug: String + + """ + ID of a tax class to assign to this product. If not provided, product will use the tax class which is assigned to the product type. + """ + taxClass: ID + + """ + Tax rate for enabled tax gateway. + + DEPRECATED: this field will be removed in Saleor 4.0. Use tax classes to control the tax calculation for a product. If taxCode is provided, Saleor will try to find a tax class with given code (codes are stored in metadata) and assign it. If no tax class is found, it would be created and assigned. """ taxCode: String @@ -17856,7 +19937,7 @@ Creates/updates translations for a product. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type ProductTranslate { +type ProductTranslate @doc(category: "Products") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! product: Product @@ -17867,14 +19948,14 @@ Manage product's availability in channels. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductChannelListingUpdate { +type ProductChannelListingUpdate @doc(category: "Products") { """An updated product instance.""" product: Product productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductChannelListingError!]! } -type ProductChannelListingError { +type ProductChannelListingError @doc(category: "Products") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -17899,7 +19980,7 @@ type ProductChannelListingError { variants: [ID!] } -input ProductChannelListingUpdateInput { +input ProductChannelListingUpdateInput @doc(category: "Products") { """List of channels to which the product should be assigned or updated.""" updateChannels: [ProductChannelListingAddInput!] @@ -17907,7 +19988,7 @@ input ProductChannelListingUpdateInput { removeChannels: [ID!] } -input ProductChannelListingAddInput { +input ProductChannelListingAddInput @doc(category: "Products") { """ID of a channel.""" channelId: ID! @@ -17962,14 +20043,14 @@ Create a media object (image or video URL) associated with product. For image, t Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductMediaCreate { +type ProductMediaCreate @doc(category: "Products") { product: Product media: ProductMedia productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input ProductMediaCreateInput { +input ProductMediaCreateInput @doc(category: "Products") { """Alt text for a product media.""" alt: String @@ -17988,7 +20069,7 @@ Reorder the variants of a product. Mutation updates updated_at on product and tr Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantReorder { +type ProductVariantReorder @doc(category: "Products") { product: Product productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! @@ -18009,7 +20090,7 @@ Deletes a product media. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductMediaDelete { +type ProductMediaDelete @doc(category: "Products") { product: Product media: ProductMedia productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18021,7 +20102,7 @@ Deletes product media. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductMediaBulkDelete { +type ProductMediaBulkDelete @doc(category: "Products") { """Returns how many objects were affected.""" count: Int! productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18033,7 +20114,7 @@ Changes ordering of the product media. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductMediaReorder { +type ProductMediaReorder @doc(category: "Products") { product: Product media: [ProductMedia!] productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18045,14 +20126,14 @@ Updates a product media. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductMediaUpdate { +type ProductMediaUpdate @doc(category: "Products") { product: Product media: ProductMedia productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input ProductMediaUpdateInput { +input ProductMediaUpdateInput @doc(category: "Products") { """Alt text for a product media.""" alt: String } @@ -18062,13 +20143,13 @@ Creates a new product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeCreate { +type ProductTypeCreate @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! productType: ProductType } -input ProductTypeInput { +input ProductTypeInput @doc(category: "Products") { """Name of the product type.""" name: String @@ -18103,7 +20184,7 @@ input ProductTypeInput { """ Tax rate for enabled tax gateway. - DEPRECATED: this field will be removed in Saleor 4.0.. Use tax classes to control the tax calculation for a product type. + DEPRECATED: this field will be removed in Saleor 4.0.. Use tax classes to control the tax calculation for a product type. If taxCode is provided, Saleor will try to find a tax class with given code (codes are stored in metadata) and assign it. If no tax class is found, it would be created and assigned. """ taxCode: String @@ -18118,7 +20199,7 @@ Deletes a product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeDelete { +type ProductTypeDelete @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! productType: ProductType @@ -18129,7 +20210,7 @@ Deletes product types. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeBulkDelete { +type ProductTypeBulkDelete @doc(category: "Products") { """Returns how many objects were affected.""" count: Int! productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18141,7 +20222,7 @@ Updates an existing product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeUpdate { +type ProductTypeUpdate @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! productType: ProductType @@ -18152,7 +20233,7 @@ Reorder the attributes of a product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeReorderAttributes { +type ProductTypeReorderAttributes @doc(category: "Products") { """Product type from which attributes are reordered.""" productType: ProductType productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18164,7 +20245,7 @@ Reorder product attribute values. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductReorderAttributeValues { +type ProductReorderAttributeValues @doc(category: "Products") { """Product from which attribute values are reordered.""" product: Product productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18176,14 +20257,14 @@ Create new digital content. This mutation must be sent as a `multipart` request. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type DigitalContentCreate { +type DigitalContentCreate @doc(category: "Products") { variant: ProductVariant content: DigitalContent productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input DigitalContentUploadInput { +input DigitalContentUploadInput @doc(category: "Products") { """Use default digital content settings for this product.""" useDefaultSettings: Boolean! @@ -18223,7 +20304,7 @@ Remove digital content assigned to given variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type DigitalContentDelete { +type DigitalContentDelete @doc(category: "Products") { variant: ProductVariant productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! @@ -18234,14 +20315,14 @@ Update digital content. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type DigitalContentUpdate { +type DigitalContentUpdate @doc(category: "Products") { variant: ProductVariant content: DigitalContent productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input DigitalContentInput { +input DigitalContentInput @doc(category: "Products") { """Use default digital content settings for this product.""" useDefaultSettings: Boolean! @@ -18278,13 +20359,13 @@ Generate new URL to digital content. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type DigitalContentUrlCreate { +type DigitalContentUrlCreate @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! digitalContentUrl: DigitalContentUrl } -input DigitalContentUrlCreateInput { +input DigitalContentUrlCreateInput @doc(category: "Products") { """Digital content ID which URL will belong to.""" content: ID! } @@ -18294,13 +20375,13 @@ Creates a new variant for a product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantCreate { +type ProductVariantCreate @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! productVariant: ProductVariant } -input ProductVariantCreateInput { +input ProductVariantCreateInput @doc(category: "Products") { """List of attributes specific to this variant.""" attributes: [AttributeValueInput!]! @@ -18322,8 +20403,6 @@ input ProductVariantCreateInput { Determines if variant is in preorder. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ preorder: PreorderSettingsInput @@ -18331,8 +20410,6 @@ input ProductVariantCreateInput { Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ quantityLimitPerCustomer: Int @@ -18364,28 +20441,12 @@ input ProductVariantCreateInput { stocks: [StockInput!] } -input PreorderSettingsInput { - """The global threshold for preorder variant.""" - globalThreshold: Int - - """The end date for preorder.""" - endDate: DateTime -} - -input StockInput { - """Warehouse in which stock is located.""" - warehouse: ID! - - """Quantity of items available for sell.""" - quantity: Int! -} - """ Deletes a product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantDelete { +type ProductVariantDelete @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! productVariant: ProductVariant @@ -18396,17 +20457,94 @@ Creates product variants for a given product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantBulkCreate { +type ProductVariantBulkCreate @doc(category: "Products") { """Returns how many objects were created.""" count: Int! - """List of the created variants.""" + """List of the created variants.This field will be removed in Saleor 4.0.""" productVariants: [ProductVariant!]! + + """ + List of the created variants. + + Added in Saleor 3.11. + """ + results: [ProductVariantBulkResult!]! bulkProductErrors: [BulkProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [BulkProductError!]! } -type BulkProductError { +type ProductVariantBulkResult @doc(category: "Products") { + """Product variant data.""" + productVariant: ProductVariant + + """List of errors occurred on create attempt.""" + errors: [ProductVariantBulkError!] +} + +type ProductVariantBulkError @doc(category: "Products") { + """ + 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: ProductVariantBulkErrorCode! + + """ + Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + + Added in Saleor 3.14. + """ + path: String + + """List of attributes IDs which causes the error.""" + attributes: [ID!] + + """List of attribute values IDs which causes the error.""" + values: [ID!] + + """List of warehouse IDs which causes the error.""" + warehouses: [ID!] + + """ + List of stocks IDs which causes the error. + + Added in Saleor 3.12. + """ + stocks: [ID!] + + """ + List of channel IDs which causes the error. + + Added in Saleor 3.12. + """ + channels: [ID!] + + """List of channel listings IDs which causes the error.""" + channelListings: [ID!] +} + +"""An enumeration.""" +enum ProductVariantBulkErrorCode @doc(category: "Products") { + ATTRIBUTE_ALREADY_ASSIGNED + ATTRIBUTE_CANNOT_BE_ASSIGNED + ATTRIBUTE_VARIANTS_DISABLED + DUPLICATED_INPUT_ITEM + GRAPHQL_ERROR + INVALID + INVALID_PRICE + NOT_PRODUCTS_VARIANT + NOT_FOUND + REQUIRED + UNIQUE + PRODUCT_NOT_ASSIGNED_TO_CHANNEL +} + +type BulkProductError @doc(category: "Products") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -18434,9 +20572,32 @@ type BulkProductError { channels: [ID!] } -input ProductVariantBulkCreateInput { +""" +Update multiple product variants. + +Added in Saleor 3.11. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_PRODUCTS. +""" +type ProductVariantBulkUpdate @doc(category: "Products") { + """Returns how many objects were updated.""" + count: Int! + + """List of the updated variants.""" + results: [ProductVariantBulkResult!]! + errors: [ProductVariantBulkError!]! +} + +""" +Input fields to update product variants. + +Added in Saleor 3.11. +""" +input ProductVariantBulkUpdateInput @doc(category: "Products") { """List of attributes specific to this variant.""" - attributes: [BulkAttributeValueInput!]! + attributes: [BulkAttributeValueInput!] """Stock keeping unit.""" sku: String @@ -18456,8 +20617,6 @@ input ProductVariantBulkCreateInput { Determines if variant is in preorder. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ preorder: PreorderSettingsInput @@ -18465,8 +20624,6 @@ input ProductVariantBulkCreateInput { Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ quantityLimitPerCustomer: Int @@ -18491,45 +20648,69 @@ input ProductVariantBulkCreateInput { """ externalReference: String - """Stocks of a product available for sale.""" - stocks: [StockInput!] + """ + Stocks input. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + stocks: ProductVariantStocksUpdateInput - """List of prices assigned to channels.""" - channelListings: [ProductVariantChannelListingAddInput!] + """ + Channel listings input. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + channelListings: ProductVariantChannelListingUpdateInput + + """ID of the product variant to update.""" + id: ID! } -input BulkAttributeValueInput { - """ID of the selected attribute.""" - id: ID +input ProductVariantStocksUpdateInput @doc(category: "Products") { + """List of warehouses to create stocks.""" + create: [StockInput!] - """ - The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. - """ - values: [String!] + """List of stocks to update.""" + update: [StockUpdateInput!] - """ - The boolean value of an attribute to resolve. If the passed value is non-existent, it will be created. - """ - boolean: Boolean + """List of stocks to remove.""" + remove: [ID!] } -input ProductVariantChannelListingAddInput { - """ID of a channel.""" - channelId: ID! +input StockUpdateInput @doc(category: "Products") { + """Stock.""" + stock: ID! + + """Quantity of items available for sell.""" + quantity: Int! +} + +input ProductVariantChannelListingUpdateInput @doc(category: "Products") { + """List of channels to create variant channel listings.""" + create: [ProductVariantChannelListingAddInput!] + + """List of channel listings to update.""" + update: [ChannelListingUpdateInput!] + + """List of channel listings to remove.""" + remove: [ID!] +} + +input ChannelListingUpdateInput @doc(category: "Products") { + """ID of a channel listing.""" + channelListing: ID! """Price of the particular variant in channel.""" - price: PositiveDecimal! + price: PositiveDecimal """Cost price of the variant in channel.""" costPrice: PositiveDecimal - """ - The threshold for preorder variant in channel. - - Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - """ + """The threshold for preorder variant in channel.""" preorderThreshold: Int } @@ -18538,7 +20719,7 @@ Deletes product variants. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantBulkDelete { +type ProductVariantBulkDelete @doc(category: "Products") { """Returns how many objects were affected.""" count: Int! productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18550,14 +20731,14 @@ Creates stocks for product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantStocksCreate { +type ProductVariantStocksCreate @doc(category: "Products") { """Updated product variant.""" productVariant: ProductVariant bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [BulkStockError!]! } -type BulkStockError { +type BulkStockError @doc(category: "Products") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -18584,14 +20765,14 @@ Delete stocks from product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantStocksDelete { +type ProductVariantStocksDelete @doc(category: "Products") { """Updated product variant.""" productVariant: ProductVariant stockErrors: [StockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [StockError!]! } -type StockError { +type StockError @doc(category: "Products") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -18605,7 +20786,7 @@ type StockError { } """An enumeration.""" -enum StockErrorCode { +enum StockErrorCode @doc(category: "Products") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -18619,7 +20800,7 @@ Update stocks for product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantStocksUpdate { +type ProductVariantStocksUpdate @doc(category: "Products") { """Updated product variant.""" productVariant: ProductVariant bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18631,13 +20812,13 @@ Updates an existing variant for product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantUpdate { +type ProductVariantUpdate @doc(category: "Products") { productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! productVariant: ProductVariant } -input ProductVariantInput { +input ProductVariantInput @doc(category: "Products") { """List of attributes specific to this variant.""" attributes: [AttributeValueInput!] @@ -18659,8 +20840,6 @@ input ProductVariantInput { Determines if variant is in preorder. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ preorder: PreorderSettingsInput @@ -18668,8 +20847,6 @@ input ProductVariantInput { Determines maximum quantity of `ProductVariant`,that can be bought in a single checkout. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ quantityLimitPerCustomer: Int @@ -18700,7 +20877,7 @@ Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantSetDefault { +type ProductVariantSetDefault @doc(category: "Products") { product: Product productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! @@ -18711,7 +20888,7 @@ Creates/updates translations for a product variant. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type ProductVariantTranslate { +type ProductVariantTranslate @doc(category: "Products") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! productVariant: ProductVariant @@ -18726,7 +20903,7 @@ Manage product variant prices in channels. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantChannelListingUpdate { +type ProductVariantChannelListingUpdate @doc(category: "Products") { """An updated product variant instance.""" variant: ProductVariant productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18738,7 +20915,7 @@ Reorder product variant attribute values. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantReorderAttributeValues { +type ProductVariantReorderAttributeValues @doc(category: "Products") { """Product variant from which attribute values are reordered.""" productVariant: ProductVariant productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18748,13 +20925,11 @@ type ProductVariantReorderAttributeValues { """ Deactivates product variant preorder. It changes all preorder allocation into regular allocation. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantPreorderDeactivate { +type ProductVariantPreorderDeactivate @doc(category: "Products") { """Product variant with ended preorder.""" productVariant: ProductVariant errors: [ProductError!]! @@ -18765,7 +20940,7 @@ Assign an media to a product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type VariantMediaAssign { +type VariantMediaAssign @doc(category: "Products") { productVariant: ProductVariant media: ProductMedia productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18777,7 +20952,7 @@ Unassign an media from a product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type VariantMediaUnassign { +type VariantMediaUnassign @doc(category: "Products") { productVariant: ProductVariant media: ProductMedia productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18789,14 +20964,14 @@ Captures the authorized payment amount. Requires one of the following permissions: MANAGE_ORDERS. """ -type PaymentCapture { +type PaymentCapture @doc(category: "Payments") { """Updated payment.""" payment: Payment paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PaymentError!]! } -type PaymentError { +type PaymentError @doc(category: "Payments") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -18813,7 +20988,7 @@ type PaymentError { } """An enumeration.""" -enum PaymentErrorCode { +enum PaymentErrorCode @doc(category: "Payments") { BILLING_ADDRESS_NOT_SET GRAPHQL_ERROR INVALID @@ -18838,7 +21013,7 @@ Refunds the captured payment amount. Requires one of the following permissions: MANAGE_ORDERS. """ -type PaymentRefund { +type PaymentRefund @doc(category: "Payments") { """Updated payment.""" payment: Payment paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18850,7 +21025,7 @@ Voids the authorized payment. Requires one of the following permissions: MANAGE_ORDERS. """ -type PaymentVoid { +type PaymentVoid @doc(category: "Payments") { """Updated payment.""" payment: Payment paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -18858,7 +21033,7 @@ type PaymentVoid { } """Initializes payment process when it is required by gateway.""" -type PaymentInitialize { +type PaymentInitialize @doc(category: "Payments") { initializedPayment: PaymentInitialized paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PaymentError!]! @@ -18867,7 +21042,7 @@ type PaymentInitialize { """ Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session. """ -type PaymentInitialized { +type PaymentInitialized @doc(category: "Payments") { """ID of a payment gateway.""" gateway: String! @@ -18879,14 +21054,14 @@ type PaymentInitialized { } """Check payment balance.""" -type PaymentCheckBalance { +type PaymentCheckBalance @doc(category: "Payments") { """Response from the gateway.""" data: JSONString paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PaymentError!]! } -input PaymentCheckBalanceInput { +input PaymentCheckBalanceInput @doc(category: "Payments") { """An ID of a payment gateway to check.""" gatewayId: String! @@ -18922,18 +21097,20 @@ input MoneyInput { } """ -Create transaction for checkout or order. Requires the following permissions: AUTHENTICATED_APP and HANDLE_PAYMENTS. +Create transaction for checkout or order. Added in Saleor 3.4. -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: HANDLE_PAYMENTS. """ -type TransactionCreate { +type TransactionCreate @doc(category: "Payments") { transaction: TransactionItem errors: [TransactionCreateError!]! } -type TransactionCreateError { +type TransactionCreateError @doc(category: "Payments") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -18947,24 +21124,58 @@ type TransactionCreateError { } """An enumeration.""" -enum TransactionCreateErrorCode { +enum TransactionCreateErrorCode @doc(category: "Payments") { INVALID GRAPHQL_ERROR NOT_FOUND INCORRECT_CURRENCY METADATA_KEY_REQUIRED + UNIQUE } -input TransactionCreateInput { - """Status of the transaction.""" - status: String! +input TransactionCreateInput @doc(category: "Payments") { + """ + Status of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). The `status` is not needed. The amounts can be used to define the current status of transactions. + """ + status: String - """Payment type used for this transaction.""" - type: String! + """ + Payment type used for this transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Use `name` and `message` instead. + """ + type: String - """Reference of the transaction.""" + """ + Payment name of the transaction. + + Added in Saleor 3.13. + """ + name: String + + """ + The message of the transaction. + + Added in Saleor 3.13. + """ + message: String + + """ + Reference of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Use `pspReference` instead. + """ reference: String + """ + PSP Reference of the transaction. + + Added in Saleor 3.13. + """ + pspReference: String + """List of all possible actions for the transaction""" availableActions: [TransactionActionEnum!] @@ -18977,40 +21188,86 @@ input TransactionCreateInput { """Amount refunded by this transaction.""" amountRefunded: MoneyInput - """Amount voided by this transaction.""" + """ + Amount voided by this transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Use `amountCanceled` instead. + """ amountVoided: MoneyInput + """ + Amount canceled by this transaction. + + Added in Saleor 3.13. + """ + amountCanceled: MoneyInput + """Payment public metadata.""" metadata: [MetadataInput!] """Payment private metadata.""" privateMetadata: [MetadataInput!] + + """ + The url that will allow to redirect user to payment provider page with transaction event details. + + Added in Saleor 3.13. + """ + externalUrl: String } -input TransactionEventInput { - """Current status of the payment transaction.""" - status: TransactionStatus! +input TransactionEventInput @doc(category: "Payments") { + """ + Current status of the payment transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Status will be calculated by Saleor. + """ + status: TransactionStatus - """Reference of the transaction.""" + """ + Reference of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Use `pspReference` instead. + """ reference: String - """Name of the transaction.""" + """ + PSP Reference related to this action. + + Added in Saleor 3.13. + """ + pspReference: String + + """ + Name of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Use `message` instead. `name` field will be added to `message`. + """ name: String + + """ + The message related to the event. + + Added in Saleor 3.13. + """ + message: String } """ -Create transaction for checkout or order. Requires the following permissions: AUTHENTICATED_APP and HANDLE_PAYMENTS. +Update transaction. Added in Saleor 3.4. Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires the following permissions: OWNER and HANDLE_PAYMENTS for apps, HANDLE_PAYMENTS for staff users. Staff user cannot update a transaction that is owned by the app. """ -type TransactionUpdate { +type TransactionUpdate @doc(category: "Payments") { transaction: TransactionItem errors: [TransactionUpdateError!]! } -type TransactionUpdateError { +type TransactionUpdateError @doc(category: "Payments") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -19024,24 +21281,58 @@ type TransactionUpdateError { } """An enumeration.""" -enum TransactionUpdateErrorCode { +enum TransactionUpdateErrorCode @doc(category: "Payments") { INVALID GRAPHQL_ERROR NOT_FOUND INCORRECT_CURRENCY METADATA_KEY_REQUIRED + UNIQUE } -input TransactionUpdateInput { - """Status of the transaction.""" +input TransactionUpdateInput @doc(category: "Payments") { + """ + Status of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). The `status` is not needed. The amounts can be used to define the current status of transactions. + """ status: String - """Payment type used for this transaction.""" + """ + Payment type used for this transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Use `name` and `message` instead. + """ type: String - """Reference of the transaction.""" + """ + Payment name of the transaction. + + Added in Saleor 3.13. + """ + name: String + + """ + The message of the transaction. + + Added in Saleor 3.13. + """ + message: String + + """ + Reference of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Use `pspReference` instead. + """ reference: String + """ + PSP Reference of the transaction. + + Added in Saleor 3.13. + """ + pspReference: String + """List of all possible actions for the transaction""" availableActions: [TransactionActionEnum!] @@ -19054,14 +21345,32 @@ input TransactionUpdateInput { """Amount refunded by this transaction.""" amountRefunded: MoneyInput - """Amount voided by this transaction.""" + """ + Amount voided by this transaction. + + DEPRECATED: this field will be removed in Saleor 3.15 (Preview Feature). Use `amountCanceled` instead. + """ amountVoided: MoneyInput + """ + Amount canceled by this transaction. + + Added in Saleor 3.13. + """ + amountCanceled: MoneyInput + """Payment public metadata.""" metadata: [MetadataInput!] """Payment private metadata.""" privateMetadata: [MetadataInput!] + + """ + The url that will allow to redirect user to payment provider page with transaction event details. + + Added in Saleor 3.13. + """ + externalUrl: String } """ @@ -19071,14 +21380,14 @@ Added in Saleor 3.4. Note: this API is currently in Feature Preview and can be subject to changes at later point. -Requires one of the following permissions: HANDLE_PAYMENTS, MANAGE_ORDERS. +Requires one of the following permissions: HANDLE_PAYMENTS. """ -type TransactionRequestAction { +type TransactionRequestAction @doc(category: "Payments") { transaction: TransactionItem errors: [TransactionRequestActionError!]! } -type TransactionRequestActionError { +type TransactionRequestActionError @doc(category: "Payments") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -19092,25 +21401,222 @@ type TransactionRequestActionError { } """An enumeration.""" -enum TransactionRequestActionErrorCode { +enum TransactionRequestActionErrorCode @doc(category: "Payments") { INVALID GRAPHQL_ERROR NOT_FOUND MISSING_TRANSACTION_ACTION_REQUEST_WEBHOOK } +""" +Report the event for the transaction. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires the following permissions: OWNER and HANDLE_PAYMENTS for apps, HANDLE_PAYMENTS for staff users. Staff user cannot update a transaction that is owned by the app. +""" +type TransactionEventReport @doc(category: "Payments") { + """Defines if the reported event hasn't been processed earlier.""" + alreadyProcessed: Boolean + + """The transaction related to the reported event.""" + transaction: TransactionItem + + """ + The event assigned to this report. if `alreadyProcessed` is set to `true`, the previously processed event will be returned. + """ + transactionEvent: TransactionEvent + errors: [TransactionEventReportError!]! +} + +type TransactionEventReportError @doc(category: "Payments") { + """ + 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: TransactionEventReportErrorCode! +} + +"""An enumeration.""" +enum TransactionEventReportErrorCode @doc(category: "Payments") { + INVALID + GRAPHQL_ERROR + NOT_FOUND + INCORRECT_DETAILS + ALREADY_EXISTS +} + +""" +Initializes a payment gateway session. It triggers the webhook `PAYMENT_GATEWAY_INITIALIZE_SESSION`, to the requested `paymentGateways`. If `paymentGateways` is not provided, the webhook will be send to all subscribed payment gateways. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type PaymentGatewayInitialize @doc(category: "Payments") { + gatewayConfigs: [PaymentGatewayConfig!] + errors: [PaymentGatewayInitializeError!]! +} + +type PaymentGatewayConfig @doc(category: "Payments") { + """The app identifier.""" + id: String! + + """The JSON data required to initialize the payment gateway.""" + data: JSON + errors: [PaymentGatewayConfigError!] +} + +scalar JSON + +type PaymentGatewayConfigError @doc(category: "Payments") { + """ + 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: PaymentGatewayConfigErrorCode! +} + +"""An enumeration.""" +enum PaymentGatewayConfigErrorCode @doc(category: "Payments") { + GRAPHQL_ERROR + INVALID + NOT_FOUND +} + +type PaymentGatewayInitializeError @doc(category: "Payments") { + """ + 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: PaymentGatewayInitializeErrorCode! +} + +"""An enumeration.""" +enum PaymentGatewayInitializeErrorCode @doc(category: "Payments") { + GRAPHQL_ERROR + INVALID + NOT_FOUND +} + +input PaymentGatewayToInitialize @doc(category: "Payments") { + """The identifier of the payment gateway app to initialize.""" + id: String! + + """The data that will be passed to the payment gateway.""" + data: JSON +} + +""" +Initializes a transaction session. It triggers the webhook `TRANSACTION_INITIALIZE_SESSION`, to the requested `paymentGateways`. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TransactionInitialize @doc(category: "Payments") { + """The initialized transaction.""" + transaction: TransactionItem + + """The event created for the initialized transaction.""" + transactionEvent: TransactionEvent + + """The JSON data required to finalize the payment.""" + data: JSON + errors: [TransactionInitializeError!]! +} + +type TransactionInitializeError @doc(category: "Payments") { + """ + 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: TransactionInitializeErrorCode! +} + +"""An enumeration.""" +enum TransactionInitializeErrorCode @doc(category: "Payments") { + GRAPHQL_ERROR + INVALID + NOT_FOUND +} + +""" +Processes a transaction session. It triggers the webhook `TRANSACTION_PROCESS_SESSION`, to the assigned `paymentGateways`. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TransactionProcess @doc(category: "Payments") { + """The processed transaction.""" + transaction: TransactionItem + + """The event created for the processed transaction.""" + transactionEvent: TransactionEvent + + """The json data required to finalize the payment.""" + data: JSON + errors: [TransactionProcessError!]! +} + +type TransactionProcessError @doc(category: "Payments") { + """ + 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: TransactionProcessErrorCode! +} + +"""An enumeration.""" +enum TransactionProcessErrorCode @doc(category: "Payments") { + GRAPHQL_ERROR + INVALID + NOT_FOUND + TRANSACTION_ALREADY_PROCESSED + MISSING_PAYMENT_APP_RELATION + MISSING_PAYMENT_APP +} + """ Creates a new page. Requires one of the following permissions: MANAGE_PAGES. """ -type PageCreate { +type PageCreate @doc(category: "Pages") { pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! page: Page } -type PageError { +type PageError @doc(category: "Pages") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -19130,7 +21636,7 @@ type PageError { } """An enumeration.""" -enum PageErrorCode { +enum PageErrorCode @doc(category: "Pages") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -19140,7 +21646,7 @@ enum PageErrorCode { ATTRIBUTE_ALREADY_ASSIGNED } -input PageCreateInput { +input PageCreateInput @doc(category: "Pages") { """Page internal name.""" slug: String @@ -19186,7 +21692,7 @@ Deletes a page. Requires one of the following permissions: MANAGE_PAGES. """ -type PageDelete { +type PageDelete @doc(category: "Pages") { pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! page: Page @@ -19197,7 +21703,7 @@ Deletes pages. Requires one of the following permissions: MANAGE_PAGES. """ -type PageBulkDelete { +type PageBulkDelete @doc(category: "Pages") { """Returns how many objects were affected.""" count: Int! pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19209,7 +21715,7 @@ Publish pages. Requires one of the following permissions: MANAGE_PAGES. """ -type PageBulkPublish { +type PageBulkPublish @doc(category: "Pages") { """Returns how many objects were affected.""" count: Int! pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19221,13 +21727,13 @@ Updates an existing page. Requires one of the following permissions: MANAGE_PAGES. """ -type PageUpdate { +type PageUpdate @doc(category: "Pages") { pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! page: Page } -input PageInput { +input PageInput @doc(category: "Pages") { """Page internal name.""" slug: String @@ -19270,7 +21776,7 @@ Creates/updates translations for a page. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type PageTranslate { +type PageTranslate @doc(category: "Pages") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! page: PageTranslatableContent @@ -19294,13 +21800,13 @@ Create a new page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeCreate { +type PageTypeCreate @doc(category: "Pages") { pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! pageType: PageType } -input PageTypeCreateInput { +input PageTypeCreateInput @doc(category: "Pages") { """Name of the page type.""" name: String @@ -19316,13 +21822,13 @@ Update page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeUpdate { +type PageTypeUpdate @doc(category: "Pages") { pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! pageType: PageType } -input PageTypeUpdateInput { +input PageTypeUpdateInput @doc(category: "Pages") { """Name of the page type.""" name: String @@ -19341,7 +21847,7 @@ Delete a page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeDelete { +type PageTypeDelete @doc(category: "Pages") { pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! pageType: PageType @@ -19352,7 +21858,7 @@ Delete page types. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeBulkDelete { +type PageTypeBulkDelete @doc(category: "Pages") { """Returns how many objects were affected.""" count: Int! pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19364,7 +21870,7 @@ Assign attributes to a given page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageAttributeAssign { +type PageAttributeAssign @doc(category: "Pages") { """The updated page type.""" pageType: PageType pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19376,7 +21882,7 @@ Unassign attributes from a given page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageAttributeUnassign { +type PageAttributeUnassign @doc(category: "Pages") { """The updated page type.""" pageType: PageType pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19388,7 +21894,7 @@ Reorder the attributes of a page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeReorderAttributes { +type PageTypeReorderAttributes @doc(category: "Pages") { """Page type from which attributes are reordered.""" pageType: PageType pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19400,7 +21906,7 @@ Reorder page attribute values. Requires one of the following permissions: MANAGE_PAGES. """ -type PageReorderAttributeValues { +type PageReorderAttributeValues @doc(category: "Pages") { """Page from which attribute values are reordered.""" page: Page pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19412,7 +21918,7 @@ Completes creating an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderComplete { +type DraftOrderComplete @doc(category: "Orders") { """Completed order.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19424,13 +21930,13 @@ Creates a new draft order. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderCreate { +type DraftOrderCreate @doc(category: "Orders") { orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! order: Order } -input DraftOrderCreateInput { +input DraftOrderCreateInput @doc(category: "Orders") { """Billing address of the customer.""" billingAddress: AddressInput @@ -19474,7 +21980,7 @@ input DraftOrderCreateInput { lines: [OrderLineCreateInput!] } -input OrderLineCreateInput { +input OrderLineCreateInput @doc(category: "Orders") { """Number of variant items ordered.""" quantity: Int! @@ -19485,10 +21991,17 @@ input OrderLineCreateInput { Flag that allow force splitting the same variant into multiple lines by skipping the matching logic. Added in Saleor 3.6. + """ + forceNewLine: Boolean = false + + """ + Custom price of the item.When the line with the same variant will be provided multiple times, the last price will be used. + + Added in Saleor 3.14. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - forceNewLine: Boolean = false + price: PositiveDecimal } """ @@ -19496,7 +22009,7 @@ Deletes a draft order. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderDelete { +type DraftOrderDelete @doc(category: "Orders") { orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! order: Order @@ -19507,7 +22020,7 @@ Deletes draft orders. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderBulkDelete { +type DraftOrderBulkDelete @doc(category: "Orders") { """Returns how many objects were affected.""" count: Int! orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19519,7 +22032,7 @@ Deletes order lines. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderLinesBulkDelete { +type DraftOrderLinesBulkDelete @doc(category: "Orders") { """Returns how many objects were affected.""" count: Int! orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19531,13 +22044,13 @@ Updates a draft order. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderUpdate { +type DraftOrderUpdate @doc(category: "Orders") { orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! order: Order } -input DraftOrderInput { +input DraftOrderInput @doc(category: "Orders") { """Billing address of the customer.""" billingAddress: AddressInput @@ -19583,7 +22096,7 @@ Adds note to the order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderAddNote { +type OrderAddNote @doc(category: "Orders") { """Order with the note added.""" order: Order @@ -19593,7 +22106,7 @@ type OrderAddNote { errors: [OrderError!]! } -input OrderAddNoteInput { +input OrderAddNoteInput @doc(category: "Orders") { """Note message.""" message: String! } @@ -19603,7 +22116,7 @@ Cancel an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderCancel { +type OrderCancel @doc(category: "Orders") { """Canceled order.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19615,7 +22128,7 @@ Capture an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderCapture { +type OrderCapture @doc(category: "Orders") { """Captured order.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19627,7 +22140,7 @@ Confirms an unconfirmed order by changing status to unfulfilled. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderConfirm { +type OrderConfirm @doc(category: "Orders") { order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! @@ -19638,7 +22151,7 @@ Creates new fulfillments for an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderFulfill { +type OrderFulfill @doc(category: "Orders") { """List of created fulfillments.""" fulfillments: [Fulfillment!] @@ -19648,7 +22161,7 @@ type OrderFulfill { errors: [OrderError!]! } -input OrderFulfillInput { +input OrderFulfillInput @doc(category: "Orders") { """List of items informing how to fulfill the order.""" lines: [OrderFulfillLineInput!]! @@ -19666,7 +22179,7 @@ input OrderFulfillInput { trackingNumber: String } -input OrderFulfillLineInput { +input OrderFulfillLineInput @doc(category: "Orders") { """The ID of the order line.""" orderLineId: ID @@ -19674,7 +22187,7 @@ input OrderFulfillLineInput { stocks: [OrderFulfillStockInput!]! } -input OrderFulfillStockInput { +input OrderFulfillStockInput @doc(category: "Orders") { """The number of line items to be fulfilled from given warehouse.""" quantity: Int! @@ -19687,7 +22200,7 @@ Cancels existing fulfillment and optionally restocks items. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentCancel { +type FulfillmentCancel @doc(category: "Orders") { """A canceled fulfillment.""" fulfillment: Fulfillment @@ -19697,7 +22210,7 @@ type FulfillmentCancel { errors: [OrderError!]! } -input FulfillmentCancelInput { +input FulfillmentCancelInput @doc(category: "Orders") { """ ID of a warehouse where items will be restocked. Optional when fulfillment is in WAITING_FOR_APPROVAL state. """ @@ -19711,7 +22224,7 @@ Added in Saleor 3.1. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentApprove { +type FulfillmentApprove @doc(category: "Orders") { """An approved fulfillment.""" fulfillment: Fulfillment @@ -19726,7 +22239,7 @@ Updates a fulfillment for an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentUpdateTracking { +type FulfillmentUpdateTracking @doc(category: "Orders") { """A fulfillment with updated tracking.""" fulfillment: Fulfillment @@ -19736,7 +22249,7 @@ type FulfillmentUpdateTracking { errors: [OrderError!]! } -input FulfillmentUpdateTrackingInput { +input FulfillmentUpdateTrackingInput @doc(category: "Orders") { """Fulfillment tracking number.""" trackingNumber: String @@ -19749,7 +22262,7 @@ Refund products. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentRefundProducts { +type FulfillmentRefundProducts @doc(category: "Orders") { """A refunded fulfillment.""" fulfillment: Fulfillment @@ -19759,7 +22272,7 @@ type FulfillmentRefundProducts { errors: [OrderError!]! } -input OrderRefundProductsInput { +input OrderRefundProductsInput @doc(category: "Orders") { """List of unfulfilled lines to refund.""" orderLines: [OrderRefundLineInput!] @@ -19775,7 +22288,7 @@ input OrderRefundProductsInput { includeShippingCosts: Boolean = false } -input OrderRefundLineInput { +input OrderRefundLineInput @doc(category: "Orders") { """The ID of the order line to refund.""" orderLineId: ID! @@ -19783,7 +22296,7 @@ input OrderRefundLineInput { quantity: Int! } -input OrderRefundFulfillmentLineInput { +input OrderRefundFulfillmentLineInput @doc(category: "Orders") { """The ID of the fulfillment line to refund.""" fulfillmentLineId: ID! @@ -19796,7 +22309,7 @@ Return products. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentReturnProducts { +type FulfillmentReturnProducts @doc(category: "Orders") { """A return fulfillment.""" returnFulfillment: Fulfillment @@ -19812,7 +22325,7 @@ type FulfillmentReturnProducts { errors: [OrderError!]! } -input OrderReturnProductsInput { +input OrderReturnProductsInput @doc(category: "Orders") { """List of unfulfilled lines to return.""" orderLines: [OrderReturnLineInput!] @@ -19831,7 +22344,7 @@ input OrderReturnProductsInput { refund: Boolean = false } -input OrderReturnLineInput { +input OrderReturnLineInput @doc(category: "Orders") { """The ID of the order line to return.""" orderLineId: ID! @@ -19842,7 +22355,7 @@ input OrderReturnLineInput { replace: Boolean = false } -input OrderReturnFulfillmentLineInput { +input OrderReturnFulfillmentLineInput @doc(category: "Orders") { """The ID of the fulfillment line to return.""" fulfillmentLineId: ID! @@ -19853,12 +22366,104 @@ input OrderReturnFulfillmentLineInput { replace: Boolean = false } +""" +Adds granted refund to the order. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_ORDERS. +""" +type OrderGrantRefundCreate @doc(category: "Orders") { + """Order which has assigned new grant refund.""" + order: Order + + """Created granted refund.""" + grantedRefund: OrderGrantedRefund + errors: [OrderGrantRefundCreateError!]! +} + +type OrderGrantRefundCreateError @doc(category: "Orders") { + """ + 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: OrderGrantRefundCreateErrorCode! +} + +"""An enumeration.""" +enum OrderGrantRefundCreateErrorCode @doc(category: "Orders") { + GRAPHQL_ERROR + NOT_FOUND +} + +input OrderGrantRefundCreateInput @doc(category: "Orders") { + """Amount of the granted refund.""" + amount: Decimal! + + """Reason of the granted refund.""" + reason: String +} + +""" +Updates granted refund. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_ORDERS. +""" +type OrderGrantRefundUpdate @doc(category: "Orders") { + """Order which has assigned updated grant refund.""" + order: Order + + """Created granted refund.""" + grantedRefund: OrderGrantedRefund + errors: [OrderGrantRefundUpdateError!]! + orderGrantedRefund: OrderGrantedRefund +} + +type OrderGrantRefundUpdateError @doc(category: "Orders") { + """ + 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: OrderGrantRefundUpdateErrorCode! +} + +"""An enumeration.""" +enum OrderGrantRefundUpdateErrorCode @doc(category: "Orders") { + GRAPHQL_ERROR + NOT_FOUND + REQUIRED +} + +input OrderGrantRefundUpdateInput @doc(category: "Orders") { + """Amount of the granted refund.""" + amount: Decimal + + """Reason of the granted refund.""" + reason: String +} + """ Create order lines for an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderLinesCreate { +type OrderLinesCreate @doc(category: "Orders") { """Related order.""" order: Order @@ -19873,7 +22478,7 @@ Deletes an order line from an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderLineDelete { +type OrderLineDelete @doc(category: "Orders") { """A related order.""" order: Order @@ -19888,7 +22493,7 @@ Updates an order line of an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderLineUpdate { +type OrderLineUpdate @doc(category: "Orders") { """Related order.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19896,7 +22501,7 @@ type OrderLineUpdate { orderLine: OrderLine } -input OrderLineInput { +input OrderLineInput @doc(category: "Orders") { """Number of variant items ordered.""" quantity: Int! } @@ -19906,14 +22511,14 @@ Adds discount to the order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderDiscountAdd { +type OrderDiscountAdd @doc(category: "Orders") { """Order which has been discounted.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } -input OrderDiscountCommonInput { +input OrderDiscountCommonInput @doc(category: "Orders") { """Type of the discount: fixed or percent""" valueType: DiscountValueTypeEnum! @@ -19929,7 +22534,7 @@ Update discount for the order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderDiscountUpdate { +type OrderDiscountUpdate @doc(category: "Orders") { """Order which has been discounted.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19941,7 +22546,7 @@ Remove discount from the order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderDiscountDelete { +type OrderDiscountDelete @doc(category: "Orders") { """Order which has removed discount.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19953,7 +22558,7 @@ Update discount for the order line. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderLineDiscountUpdate { +type OrderLineDiscountUpdate @doc(category: "Orders") { """Order line which has been discounted.""" orderLine: OrderLine @@ -19968,7 +22573,7 @@ Remove discount applied to the order line. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderLineDiscountRemove { +type OrderLineDiscountRemove @doc(category: "Orders") { """Order line which has removed discount.""" orderLine: OrderLine @@ -19983,7 +22588,7 @@ Mark order as manually paid. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderMarkAsPaid { +type OrderMarkAsPaid @doc(category: "Orders") { """Order marked as paid.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -19995,7 +22600,7 @@ Refund an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderRefund { +type OrderRefund @doc(category: "Orders") { """A refunded order.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -20007,13 +22612,13 @@ Updates an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderUpdate { +type OrderUpdate @doc(category: "Orders") { orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! order: Order } -input OrderUpdateInput { +input OrderUpdateInput @doc(category: "Orders") { """Billing address of the customer.""" billingAddress: AddressInput @@ -20036,14 +22641,14 @@ Updates a shipping method of the order. Requires shipping method ID to update, w Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderUpdateShipping { +type OrderUpdateShipping @doc(category: "Orders") { """Order with updated shipping method.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } -input OrderUpdateShippingInput { +input OrderUpdateShippingInput @doc(category: "Orders") { """ ID of the selected shipping method, pass null to remove currently assigned shipping method. """ @@ -20055,7 +22660,7 @@ Void an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderVoid { +type OrderVoid @doc(category: "Orders") { """A voided order.""" order: Order orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -20067,13 +22672,349 @@ Cancels orders. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderBulkCancel { +type OrderBulkCancel @doc(category: "Orders") { """Returns how many objects were affected.""" count: Int! orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } +""" +Creates multiple orders. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_ORDERS_IMPORT. +""" +type OrderBulkCreate @doc(category: "Orders") { + """Returns how many objects were created.""" + count: Int! + + """List of the created orders.""" + results: [OrderBulkCreateResult!]! + errors: [OrderBulkCreateError!]! +} + +type OrderBulkCreateResult @doc(category: "Orders") { + """Order data.""" + order: Order + + """List of errors occurred on create attempt.""" + errors: [OrderBulkCreateError!] +} + +type OrderBulkCreateError @doc(category: "Orders") { + """ + Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + path: String + + """The error message.""" + message: String + + """The error code.""" + code: OrderBulkCreateErrorCode +} + +"""An enumeration.""" +enum OrderBulkCreateErrorCode { + GRAPHQL_ERROR + REQUIRED + INVALID + NOT_FOUND + UNIQUE + BULK_LIMIT + TOO_MANY_IDENTIFIERS + FUTURE_DATE + INVALID_QUANTITY + PRICE_ERROR + NOTE_LENGTH + INSUFFICIENT_STOCK + NON_EXISTING_STOCK + NO_RELATED_ORDER_LINE + NEGATIVE_INDEX + ORDER_LINE_FULFILLMENT_LINE_MISMATCH + METADATA_KEY_REQUIRED + INCORRECT_CURRENCY +} + +input OrderBulkCreateInput @doc(category: "Orders") { + """External ID of the order.""" + externalReference: String + + """Slug of the channel associated with the order.""" + channel: String! + + """The date, when the order was inserted to Saleor database.""" + createdAt: DateTime! + + """Status of the order.""" + status: OrderStatus + + """Customer associated with the order.""" + user: OrderBulkCreateUserInput! + + """Tracking ID of the customer.""" + trackingClientId: String + + """Billing address of the customer.""" + billingAddress: AddressInput! + + """Shipping address of the customer.""" + shippingAddress: AddressInput + + """Currency code.""" + currency: String! + + """Metadata of the order.""" + metadata: [MetadataInput!] + + """Private metadata of the order.""" + privateMetadata: [MetadataInput!] + + """Note about customer.""" + customerNote: String + + """Notes related to the order.""" + notes: [OrderBulkCreateNoteInput!] + + """Order language code.""" + languageCode: LanguageCodeEnum! + + """ + Determines whether checkout prices should include taxes, when displayed in a storefront. + """ + displayGrossPrices: Boolean + + """Weight of the order in kg.""" + weight: WeightScalar + + """ + URL of a view, where users should be redirected to see the order details. + """ + redirectUrl: String + + """List of order lines.""" + lines: [OrderBulkCreateOrderLineInput!]! + + """The delivery method selected for this order.""" + deliveryMethod: OrderBulkCreateDeliveryMethodInput + + """List of gift card codes associated with the order.""" + giftCards: [String!] + + """Code of a voucher associated with the order.""" + voucher: String + + """List of discounts.""" + discounts: [OrderDiscountCommonInput!] + + """Fulfillments of the order.""" + fulfillments: [OrderBulkCreateFulfillmentInput!] + + """Transactions related to the order.""" + transactions: [TransactionCreateInput!] + + """Invoices related to the order.""" + invoices: [OrderBulkCreateInvoiceInput!] +} + +input OrderBulkCreateUserInput @doc(category: "Orders") { + """Customer ID associated with the order.""" + id: ID + + """Customer email associated with the order.""" + email: String + + """Customer external ID associated with the order.""" + externalReference: String +} + +input OrderBulkCreateNoteInput @doc(category: "Orders") { + """Note message. Max characters: 255.""" + message: String! + + """The date associated with the message.""" + date: DateTime + + """The user ID associated with the message.""" + userId: ID + + """The user email associated with the message.""" + userEmail: ID + + """The user external ID associated with the message.""" + userExternalReference: ID + + """The app ID associated with the message.""" + appId: ID +} + +input OrderBulkCreateOrderLineInput @doc(category: "Orders") { + """The ID of the product variant.""" + variantId: ID + + """The SKU of the product variant.""" + variantSku: String + + """The external ID of the product variant.""" + variantExternalReference: String + + """The name of the product variant.""" + variantName: String + + """The name of the product.""" + productName: String + + """Translation of the product variant name.""" + translatedVariantName: String + + """Translation of the product name.""" + translatedProductName: String + + """The date, when the order line was created.""" + createdAt: DateTime! + + """Determines whether shipping of the order line items is required.""" + isShippingRequired: Boolean! + + """Gift card flag.""" + isGiftCard: Boolean! + + """Number of items in the order line""" + quantity: Int! + + """Price of the order line.""" + totalPrice: TaxedMoneyInput! + + """Price of the order line excluding applied discount.""" + undiscountedTotalPrice: TaxedMoneyInput! + + """The ID of the warehouse, where the line will be allocated.""" + warehouse: ID! + + """Metadata of the order line.""" + metadata: [MetadataInput!] + + """Private metadata of the order line.""" + privateMetadata: [MetadataInput!] + + """Tax rate of the order line.""" + taxRate: PositiveDecimal + + """The ID of the tax class.""" + taxClassId: ID + + """The name of the tax class.""" + taxClassName: String + + """Metadata of the tax class.""" + taxClassMetadata: [MetadataInput!] + + """Private metadata of the tax class.""" + taxClassPrivateMetadata: [MetadataInput!] +} + +input TaxedMoneyInput @doc(category: "Orders") { + """Gross value of an item.""" + gross: PositiveDecimal! + + """Net value of an item.""" + net: PositiveDecimal! +} + +input OrderBulkCreateDeliveryMethodInput @doc(category: "Orders") { + """The ID of the warehouse.""" + warehouseId: ID + + """The name of the warehouse.""" + warehouseName: String + + """The ID of the shipping method.""" + shippingMethodId: ID + + """The name of the shipping method.""" + shippingMethodName: String + + """The price of the shipping.""" + shippingPrice: TaxedMoneyInput + + """Tax rate of the shipping.""" + shippingTaxRate: PositiveDecimal + + """The ID of the tax class.""" + shippingTaxClassId: ID + + """The name of the tax class.""" + shippingTaxClassName: String + + """Metadata of the tax class.""" + shippingTaxClassMetadata: [MetadataInput!] + + """Private metadata of the tax class.""" + shippingTaxClassPrivateMetadata: [MetadataInput!] +} + +input OrderBulkCreateFulfillmentInput @doc(category: "Orders") { + """Fulfillment's tracking code.""" + trackingCode: String + + """List of items informing how to fulfill the order.""" + lines: [OrderBulkCreateFulfillmentLineInput!] +} + +input OrderBulkCreateFulfillmentLineInput @doc(category: "Orders") { + """The ID of the product variant.""" + variantId: ID + + """The SKU of the product variant.""" + variantSku: String + + """The external ID of the product variant.""" + variantExternalReference: String + + """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! + + """0-based index of order line, which the fulfillment line refers to.""" + orderLineIndex: Int! +} + +input OrderBulkCreateInvoiceInput @doc(category: "Orders") { + """The date, when the invoice was created.""" + createdAt: DateTime! + + """Invoice number.""" + number: String + + """URL of the invoice to download.""" + url: String + + """Metadata of the invoice.""" + metadata: [MetadataInput!] + + """Private metadata of the invoice.""" + privateMetadata: [MetadataInput!] +} + +""" +Determine how stocks should be updated, while processing an order. + + SKIP - stocks are not checked and not updated. + UPDATE - only do update, if there is enough stock. + FORCE - force update, if there is not enough stock. +""" +enum StockUpdatePolicyEnum { + SKIP + UPDATE + FORCE +} + """ Delete metadata of an object. To use it, you need to have access to the modified object. """ @@ -20137,14 +23078,14 @@ Assigns storefront's navigation menus. Requires one of the following permissions: MANAGE_MENUS, MANAGE_SETTINGS. """ -type AssignNavigation { +type AssignNavigation @doc(category: "Menu") { """Assigned navigation menu.""" menu: Menu menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! } -type MenuError { +type MenuError @doc(category: "Menu") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -20183,7 +23124,7 @@ Creates a new Menu. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuCreate { +type MenuCreate @doc(category: "Menu") { menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! menu: Menu @@ -20222,7 +23163,7 @@ Deletes a menu. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuDelete { +type MenuDelete @doc(category: "Menu") { menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! menu: Menu @@ -20233,7 +23174,7 @@ Deletes menus. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuBulkDelete { +type MenuBulkDelete @doc(category: "Menu") { """Returns how many objects were affected.""" count: Int! menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -20245,7 +23186,7 @@ Updates a menu. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuUpdate { +type MenuUpdate @doc(category: "Menu") { menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! menu: Menu @@ -20264,7 +23205,7 @@ Creates a new menu item. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemCreate { +type MenuItemCreate @doc(category: "Menu") { menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! menuItem: MenuItem @@ -20298,7 +23239,7 @@ Deletes a menu item. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemDelete { +type MenuItemDelete @doc(category: "Menu") { menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! menuItem: MenuItem @@ -20309,7 +23250,7 @@ Deletes menu items. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemBulkDelete { +type MenuItemBulkDelete @doc(category: "Menu") { """Returns how many objects were affected.""" count: Int! menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -20321,7 +23262,7 @@ Updates a menu item. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemUpdate { +type MenuItemUpdate @doc(category: "Menu") { menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! menuItem: MenuItem @@ -20332,7 +23273,7 @@ Creates/updates translations for a menu item. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type MenuItemTranslate { +type MenuItemTranslate @doc(category: "Menu") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! menuItem: MenuItem @@ -20343,7 +23284,7 @@ Moves items of menus. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemMove { +type MenuItemMove @doc(category: "Menu") { """Assigned menu to move within.""" menu: Menu menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -20368,7 +23309,7 @@ Request an invoice for the order using plugin. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceRequest { +type InvoiceRequest @doc(category: "Orders") { """Order related to an invoice.""" order: Order invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -20376,7 +23317,7 @@ type InvoiceRequest { invoice: Invoice } -type InvoiceError { +type InvoiceError @doc(category: "Orders") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -20390,7 +23331,7 @@ type InvoiceError { } """An enumeration.""" -enum InvoiceErrorCode { +enum InvoiceErrorCode @doc(category: "Orders") { REQUIRED NOT_READY URL_NOT_SET @@ -20406,7 +23347,7 @@ Requests deletion of an invoice. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceRequestDelete { +type InvoiceRequestDelete @doc(category: "Orders") { invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [InvoiceError!]! invoice: Invoice @@ -20417,18 +23358,32 @@ Creates a ready to send invoice. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceCreate { +type InvoiceCreate @doc(category: "Orders") { invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [InvoiceError!]! invoice: Invoice } -input InvoiceCreateInput { +input InvoiceCreateInput @doc(category: "Orders") { """Invoice number.""" number: String! """URL of an invoice to download.""" url: String! + + """ + Fields required to update the invoice metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the invoice private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] } """ @@ -20436,7 +23391,7 @@ Deletes an invoice. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceDelete { +type InvoiceDelete @doc(category: "Orders") { invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [InvoiceError!]! invoice: Invoice @@ -20447,18 +23402,32 @@ Updates an invoice. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceUpdate { +type InvoiceUpdate @doc(category: "Orders") { invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [InvoiceError!]! invoice: Invoice } -input UpdateInvoiceInput { +input UpdateInvoiceInput @doc(category: "Orders") { """Invoice number""" number: String """URL of an invoice to download.""" url: String + + """ + Fields required to update the invoice metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the invoice private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] } """ @@ -20466,7 +23435,7 @@ Send an invoice notification to the customer. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceSendNotification { +type InvoiceSendNotification @doc(category: "Orders") { invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [InvoiceError!]! invoice: Invoice @@ -20477,14 +23446,14 @@ Activate a gift card. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardActivate { +type GiftCardActivate @doc(category: "Gift cards") { """Activated gift card.""" giftCard: GiftCard giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [GiftCardError!]! } -type GiftCardError { +type GiftCardError @doc(category: "Gift cards") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -20501,7 +23470,7 @@ type GiftCardError { } """An enumeration.""" -enum GiftCardErrorCode { +enum GiftCardErrorCode @doc(category: "Gift cards") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -20517,19 +23486,17 @@ Creates a new gift card. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardCreate { +type GiftCardCreate @doc(category: "Gift cards") { giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [GiftCardError!]! giftCard: GiftCard } -input GiftCardCreateInput { +input GiftCardCreateInput @doc(category: "Gift cards") { """ The gift card tags to add. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ addTags: [String!] @@ -20537,8 +23504,6 @@ input GiftCardCreateInput { The gift card expiry date. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ expiryDate: Date @@ -20566,8 +23531,6 @@ input GiftCardCreateInput { Slug of a channel from which the email should be sent. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ channel: String @@ -20575,8 +23538,6 @@ input GiftCardCreateInput { Determine if gift card is active. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ isActive: Boolean! @@ -20591,8 +23552,6 @@ input GiftCardCreateInput { The gift card note from the staff member. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ note: String } @@ -20608,13 +23567,11 @@ input PriceInput { """ Delete gift card. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardDelete { +type GiftCardDelete @doc(category: "Gift cards") { giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [GiftCardError!]! giftCard: GiftCard @@ -20625,7 +23582,7 @@ Deactivate a gift card. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardDeactivate { +type GiftCardDeactivate @doc(category: "Gift cards") { """Deactivated gift card.""" giftCard: GiftCard giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -20637,19 +23594,17 @@ Update a gift card. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardUpdate { +type GiftCardUpdate @doc(category: "Gift cards") { giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [GiftCardError!]! giftCard: GiftCard } -input GiftCardUpdateInput { +input GiftCardUpdateInput @doc(category: "Gift cards") { """ The gift card tags to add. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ addTags: [String!] @@ -20657,8 +23612,6 @@ input GiftCardUpdateInput { The gift card expiry date. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ expiryDate: Date @@ -20680,8 +23633,6 @@ input GiftCardUpdateInput { The gift card tags to remove. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ removeTags: [String!] @@ -20689,8 +23640,6 @@ input GiftCardUpdateInput { The gift card balance amount. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ balanceAmount: PositiveDecimal } @@ -20698,19 +23647,17 @@ input GiftCardUpdateInput { """ Resend a gift card. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardResend { +type GiftCardResend @doc(category: "Gift cards") { """Gift card which has been sent.""" giftCard: GiftCard errors: [GiftCardError!]! } -input GiftCardResendInput { +input GiftCardResendInput @doc(category: "Gift cards") { """ID of a gift card to resend.""" id: ID! @@ -20724,13 +23671,11 @@ input GiftCardResendInput { """ Adds note to the gift card. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardAddNote { +type GiftCardAddNote @doc(category: "Gift cards") { """Gift card with the note added.""" giftCard: GiftCard @@ -20739,7 +23684,7 @@ type GiftCardAddNote { errors: [GiftCardError!]! } -input GiftCardAddNoteInput { +input GiftCardAddNoteInput @doc(category: "Gift cards") { """Note message.""" message: String! } @@ -20747,13 +23692,11 @@ input GiftCardAddNoteInput { """ Create gift cards. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardBulkCreate { +type GiftCardBulkCreate @doc(category: "Gift cards") { """Returns how many objects were created.""" count: Int! @@ -20762,7 +23705,7 @@ type GiftCardBulkCreate { errors: [GiftCardError!]! } -input GiftCardBulkCreateInput { +input GiftCardBulkCreateInput @doc(category: "Gift cards") { """The number of cards to issue.""" count: Int! @@ -20782,13 +23725,11 @@ input GiftCardBulkCreateInput { """ Delete gift cards. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardBulkDelete { +type GiftCardBulkDelete @doc(category: "Gift cards") { """Returns how many objects were affected.""" count: Int! errors: [GiftCardError!]! @@ -20797,13 +23738,11 @@ type GiftCardBulkDelete { """ Activate gift cards. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardBulkActivate { +type GiftCardBulkActivate @doc(category: "Gift cards") { """Returns how many objects were affected.""" count: Int! errors: [GiftCardError!]! @@ -20812,13 +23751,11 @@ type GiftCardBulkActivate { """ Deactivate gift cards. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardBulkDeactivate { +type GiftCardBulkDeactivate @doc(category: "Gift cards") { """Returns how many objects were affected.""" count: Int! errors: [GiftCardError!]! @@ -20926,13 +23863,13 @@ Creates a new sale. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleCreate { +type SaleCreate @doc(category: "Discounts") { discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! sale: Sale } -type DiscountError { +type DiscountError @doc(category: "Discounts") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -20952,7 +23889,7 @@ type DiscountError { } """An enumeration.""" -enum DiscountErrorCode { +enum DiscountErrorCode @doc(category: "Discounts") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -20963,7 +23900,7 @@ enum DiscountErrorCode { DUPLICATED_INPUT_ITEM } -input SaleInput { +input SaleInput @doc(category: "Discounts") { """Voucher name.""" name: String @@ -20995,7 +23932,7 @@ Deletes a sale. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleDelete { +type SaleDelete @doc(category: "Discounts") { discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! sale: Sale @@ -21006,7 +23943,7 @@ Deletes sales. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleBulkDelete { +type SaleBulkDelete @doc(category: "Discounts") { """Returns how many objects were affected.""" count: Int! discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21018,7 +23955,7 @@ Updates a sale. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleUpdate { +type SaleUpdate @doc(category: "Discounts") { discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! sale: Sale @@ -21029,14 +23966,14 @@ Adds products, categories, collections to a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleAddCatalogues { +type SaleAddCatalogues @doc(category: "Discounts") { """Sale of which catalogue IDs will be modified.""" sale: Sale discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } -input CatalogueInput { +input CatalogueInput @doc(category: "Discounts") { """Products related to the discount.""" products: [ID!] @@ -21059,7 +23996,7 @@ Removes products, categories, collections from a sale. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleRemoveCatalogues { +type SaleRemoveCatalogues @doc(category: "Discounts") { """Sale of which catalogue IDs will be modified.""" sale: Sale discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21071,7 +24008,7 @@ Creates/updates translations for a sale. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type SaleTranslate { +type SaleTranslate @doc(category: "Discounts") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! sale: Sale @@ -21082,14 +24019,14 @@ Manage sale's availability in channels. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleChannelListingUpdate { +type SaleChannelListingUpdate @doc(category: "Discounts") { """An updated sale instance.""" sale: Sale discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } -input SaleChannelListingInput { +input SaleChannelListingInput @doc(category: "Discounts") { """List of channels to which the sale should be assigned.""" addChannels: [SaleChannelListingAddInput!] @@ -21097,7 +24034,7 @@ input SaleChannelListingInput { removeChannels: [ID!] } -input SaleChannelListingAddInput { +input SaleChannelListingAddInput @doc(category: "Discounts") { """ID of a channel.""" channelId: ID! @@ -21110,13 +24047,13 @@ Creates a new voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherCreate { +type VoucherCreate @doc(category: "Discounts") { discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! voucher: Voucher } -input VoucherInput { +input VoucherInput @doc(category: "Discounts") { """Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER.""" type: VoucherTypeEnum @@ -21175,7 +24112,7 @@ Deletes a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherDelete { +type VoucherDelete @doc(category: "Discounts") { discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! voucher: Voucher @@ -21186,7 +24123,7 @@ Deletes vouchers. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherBulkDelete { +type VoucherBulkDelete @doc(category: "Discounts") { """Returns how many objects were affected.""" count: Int! discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21198,7 +24135,7 @@ Updates a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherUpdate { +type VoucherUpdate @doc(category: "Discounts") { discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! voucher: Voucher @@ -21209,7 +24146,7 @@ Adds products, categories, collections to a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherAddCatalogues { +type VoucherAddCatalogues @doc(category: "Discounts") { """Voucher of which catalogue IDs will be modified.""" voucher: Voucher discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21221,7 +24158,7 @@ Removes products, categories, collections from a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherRemoveCatalogues { +type VoucherRemoveCatalogues @doc(category: "Discounts") { """Voucher of which catalogue IDs will be modified.""" voucher: Voucher discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21233,7 +24170,7 @@ Creates/updates translations for a voucher. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type VoucherTranslate { +type VoucherTranslate @doc(category: "Discounts") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! voucher: Voucher @@ -21244,14 +24181,14 @@ Manage voucher's availability in channels. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherChannelListingUpdate { +type VoucherChannelListingUpdate @doc(category: "Discounts") { """An updated voucher instance.""" voucher: Voucher discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } -input VoucherChannelListingInput { +input VoucherChannelListingInput @doc(category: "Discounts") { """List of channels to which the voucher should be assigned.""" addChannels: [VoucherChannelListingAddInput!] @@ -21259,7 +24196,7 @@ input VoucherChannelListingInput { removeChannels: [ID!] } -input VoucherChannelListingAddInput { +input VoucherChannelListingAddInput @doc(category: "Discounts") { """ID of a channel.""" channelId: ID! @@ -21275,7 +24212,7 @@ Export products to csv file. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ExportProducts { +type ExportProducts @doc(category: "Products") { """ The newly created export file job which is responsible for export data. """ @@ -21305,7 +24242,7 @@ enum ExportErrorCode { REQUIRED } -input ExportProductsInput { +input ExportProductsInput @doc(category: "Products") { """Determine which products should be exported.""" scope: ExportScope! @@ -21322,7 +24259,7 @@ input ExportProductsInput { fileType: FileTypesEnum! } -enum ExportScope { +enum ExportScope @doc(category: "Products") { """Export all products.""" ALL @@ -21333,7 +24270,7 @@ enum ExportScope { FILTER } -input ExportInfoInput { +input ExportInfoInput @doc(category: "Products") { """List of attribute ids witch should be exported.""" attributes: [ID!] @@ -21347,7 +24284,7 @@ input ExportInfoInput { fields: [ProductFieldEnum!] } -enum ProductFieldEnum { +enum ProductFieldEnum @doc(category: "Products") { NAME DESCRIPTION PRODUCT_TYPE @@ -21371,13 +24308,11 @@ enum FileTypesEnum { """ Export gift cards to csv file. -Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type ExportGiftCards { +type ExportGiftCards @doc(category: "Gift cards") { """ The newly created export file job which is responsible for export data. """ @@ -21385,7 +24320,7 @@ type ExportGiftCards { errors: [ExportError!]! } -input ExportGiftCardsInput { +input ExportGiftCardsInput @doc(category: "Gift cards") { """Determine which gift cards should be exported.""" scope: ExportScope! @@ -21429,14 +24364,14 @@ enum UploadErrorCode { } """Adds a gift card or a voucher to a checkout.""" -type CheckoutAddPromoCode { +type CheckoutAddPromoCode @doc(category: "Checkout") { """The checkout with the added gift card or voucher.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -type CheckoutError { +type CheckoutError @doc(category: "Checkout") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -21459,7 +24394,7 @@ type CheckoutError { } """An enumeration.""" -enum CheckoutErrorCode { +enum CheckoutErrorCode @doc(category: "Checkout") { BILLING_ADDRESS_NOT_SET CHECKOUT_NOT_FULLY_PAID GRAPHQL_ERROR @@ -21491,14 +24426,14 @@ enum CheckoutErrorCode { } """Update billing address in the existing checkout.""" -type CheckoutBillingAddressUpdate { +type CheckoutBillingAddressUpdate @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -input CheckoutAddressValidationRules { +input CheckoutAddressValidationRules @doc(category: "Checkout") { """ Determines if an error should be raised when the provided address doesn't have all the required fields. The list of required fields is dynamic and depends on the country code (use the `addressValidationRules` query to fetch them). Note: country code is mandatory for all addresses regardless of the rules provided in this input. """ @@ -21518,7 +24453,7 @@ input CheckoutAddressValidationRules { """ 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 { +type CheckoutComplete @doc(category: "Checkout") { """Placed order.""" order: Order @@ -21534,7 +24469,7 @@ type CheckoutComplete { } """Create a new checkout.""" -type CheckoutCreate { +type CheckoutCreate @doc(category: "Checkout") { """ 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. """ @@ -21544,7 +24479,7 @@ type CheckoutCreate { checkout: Checkout } -input CheckoutCreateInput { +input CheckoutCreateInput @doc(category: "Checkout") { """Slug of a channel in which to create a checkout.""" channel: String @@ -21571,13 +24506,11 @@ input CheckoutCreateInput { The checkout validation rules that can be changed. Added in Saleor 3.5. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ validationRules: CheckoutValidationRules } -input CheckoutLineInput { +input CheckoutLineInput @doc(category: "Checkout") { """The number of items purchased.""" quantity: Int! @@ -21588,8 +24521,6 @@ input CheckoutLineInput { Custom price of the item. Can be set only by apps with `HANDLE_CHECKOUTS` permission. When the line with the same variant will be provided multiple times, the last price will be used. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ price: PositiveDecimal @@ -21597,8 +24528,6 @@ input CheckoutLineInput { Flag that allow force splitting the same variant into multiple lines by skipping the matching logic. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ forceNewLine: Boolean = false @@ -21610,7 +24539,7 @@ input CheckoutLineInput { metadata: [MetadataInput!] } -input CheckoutValidationRules { +input CheckoutValidationRules @doc(category: "Checkout") { """ The validation rules that can be applied to provided shipping address data. """ @@ -21622,12 +24551,74 @@ input CheckoutValidationRules { billingAddress: CheckoutAddressValidationRules } +""" +Create new checkout from existing order. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type CheckoutCreateFromOrder @doc(category: "Checkout") { + """Variants that were not attached to the checkout.""" + unavailableVariants: [CheckoutCreateFromOrderUnavailableVariant!] + + """Created checkout.""" + checkout: Checkout + errors: [CheckoutCreateFromOrderError!]! +} + +type CheckoutCreateFromOrderUnavailableVariant @doc(category: "Checkout") { + """The error message.""" + message: String! + + """The error code.""" + code: CheckoutCreateFromOrderUnavailableVariantErrorCode! + + """Variant ID that is unavailable.""" + variantId: ID! + + """Order line ID that is unavailable.""" + lineId: ID! +} + +"""An enumeration.""" +enum CheckoutCreateFromOrderUnavailableVariantErrorCode @doc(category: "Checkout") { + NOT_FOUND + PRODUCT_UNAVAILABLE_FOR_PURCHASE + UNAVAILABLE_VARIANT_IN_CHANNEL + PRODUCT_NOT_PUBLISHED + QUANTITY_GREATER_THAN_LIMIT + INSUFFICIENT_STOCK +} + +type CheckoutCreateFromOrderError @doc(category: "Checkout") { + """ + 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: CheckoutCreateFromOrderErrorCode! +} + +"""An enumeration.""" +enum CheckoutCreateFromOrderErrorCode @doc(category: "Checkout") { + GRAPHQL_ERROR + INVALID + ORDER_NOT_FOUND + CHANNEL_INACTIVE + TAX_ERROR +} + """ Sets the customer as the owner of the checkout. Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER. """ -type CheckoutCustomerAttach { +type CheckoutCustomerAttach @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21639,7 +24630,7 @@ Removes the user assigned as the owner of the checkout. Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER. """ -type CheckoutCustomerDetach { +type CheckoutCustomerDetach @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21647,7 +24638,7 @@ type CheckoutCustomerDetach { } """Updates email address in the existing checkout object.""" -type CheckoutEmailUpdate { +type CheckoutEmailUpdate @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21655,7 +24646,7 @@ type CheckoutEmailUpdate { } """Deletes a CheckoutLine.""" -type CheckoutLineDelete { +type CheckoutLineDelete @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21663,7 +24654,7 @@ type CheckoutLineDelete { } """Deletes checkout lines.""" -type CheckoutLinesDelete { +type CheckoutLinesDelete @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout errors: [CheckoutError!]! @@ -21672,7 +24663,7 @@ type CheckoutLinesDelete { """ Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased. """ -type CheckoutLinesAdd { +type CheckoutLinesAdd @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21680,14 +24671,14 @@ type CheckoutLinesAdd { } """Updates checkout line in the existing checkout.""" -type CheckoutLinesUpdate { +type CheckoutLinesUpdate @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -input CheckoutLineUpdateInput { +input CheckoutLineUpdateInput @doc(category: "Checkout") { """ ID of the product variant. @@ -21704,8 +24695,6 @@ input CheckoutLineUpdateInput { Custom price of the item. Can be set only by apps with `HANDLE_CHECKOUTS` permission. When the line with the same variant will be provided multiple times, the last price will be used. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ price: PositiveDecimal @@ -21718,7 +24707,7 @@ input CheckoutLineUpdateInput { } """Remove a gift card or a voucher from a checkout.""" -type CheckoutRemovePromoCode { +type CheckoutRemovePromoCode @doc(category: "Checkout") { """The checkout with the removed gift card or voucher.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21726,7 +24715,7 @@ type CheckoutRemovePromoCode { } """Create a new payment for given checkout.""" -type CheckoutPaymentCreate { +type CheckoutPaymentCreate @doc(category: "Checkout") { """Related checkout object.""" checkout: Checkout @@ -21736,7 +24725,7 @@ type CheckoutPaymentCreate { errors: [PaymentError!]! } -input PaymentInput { +input PaymentInput @doc(category: "Payments") { """A gateway to use with that payment.""" gateway: String! @@ -21771,7 +24760,7 @@ input PaymentInput { } """Enum representing the type of a payment storage in a gateway.""" -enum StorePaymentMethodEnum { +enum StorePaymentMethodEnum @doc(category: "Payments") { """ On session storage type. The payment is stored only to be reused when the customer is present in the checkout flow. """ @@ -21787,7 +24776,7 @@ enum StorePaymentMethodEnum { } """Update shipping address in the existing checkout.""" -type CheckoutShippingAddressUpdate { +type CheckoutShippingAddressUpdate @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21795,7 +24784,7 @@ type CheckoutShippingAddressUpdate { } """Updates the shipping method of the checkout.""" -type CheckoutShippingMethodUpdate { +type CheckoutShippingMethodUpdate @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21806,17 +24795,15 @@ type CheckoutShippingMethodUpdate { Updates the delivery method (shipping method or pick up point) of the checkout. Added in Saleor 3.1. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CheckoutDeliveryMethodUpdate { +type CheckoutDeliveryMethodUpdate @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout errors: [CheckoutError!]! } """Update language code in the existing checkout.""" -type CheckoutLanguageCodeUpdate { +type CheckoutLanguageCodeUpdate @doc(category: "Checkout") { """An updated checkout.""" checkout: Checkout checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -21827,16 +24814,14 @@ type CheckoutLanguageCodeUpdate { Create new order from existing checkout. Requires the following permissions: AUTHENTICATED_APP and HANDLE_CHECKOUTS. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderCreateFromCheckout { +type OrderCreateFromCheckout @doc(category: "Checkout") { """Placed order.""" order: Order errors: [OrderCreateFromCheckoutError!]! } -type OrderCreateFromCheckoutError { +type OrderCreateFromCheckoutError @doc(category: "Checkout") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -21856,7 +24841,7 @@ type OrderCreateFromCheckoutError { } """An enumeration.""" -enum OrderCreateFromCheckoutErrorCode { +enum OrderCreateFromCheckoutErrorCode @doc(category: "Orders") { GRAPHQL_ERROR CHECKOUT_NOT_FOUND CHANNEL_INACTIVE @@ -21878,13 +24863,13 @@ Creates new channel. Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelCreate { +type ChannelCreate @doc(category: "Channels") { channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ChannelError!]! channel: Channel } -type ChannelError { +type ChannelError @doc(category: "Channels") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -21904,7 +24889,7 @@ type ChannelError { } """An enumeration.""" -enum ChannelErrorCode { +enum ChannelErrorCode @doc(category: "Channels") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -21916,7 +24901,7 @@ enum ChannelErrorCode { DUPLICATED_INPUT_ITEM } -input ChannelCreateInput { +input ChannelCreateInput @doc(category: "Channels") { """isActive flag.""" isActive: Boolean @@ -21924,8 +24909,6 @@ input ChannelCreateInput { The channel stock settings. Added in Saleor 3.7. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ stockSettings: StockSettingsInput @@ -21936,11 +24919,16 @@ input ChannelCreateInput { List of warehouses to assign to the channel. Added in Saleor 3.5. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ addWarehouses: [ID!] + """ + The channel order settings + + Added in Saleor 3.12. + """ + orderSettings: OrderSettingsInput + """Name of the channel.""" name: String! @@ -21954,31 +24942,80 @@ input ChannelCreateInput { Default country for the channel. Default country can be used in checkout to determine the stock quantities or calculate taxes when the country was not explicitly provided. Added in Saleor 3.1. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ defaultCountry: CountryCode! } -input StockSettingsInput { +input StockSettingsInput @doc(category: "Products") { """ Allocation strategy options. Strategy defines the preference of warehouses for allocations and reservations. """ allocationStrategy: AllocationStrategyEnum! } +input OrderSettingsInput @doc(category: "Orders") { + """ + When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. By default set to True + """ + automaticallyConfirmAllNewOrders: Boolean + + """ + When enabled, all non-shippable gift card orders will be fulfilled automatically. By defualt set to True. + """ + automaticallyFulfillNonShippableGiftCard: Boolean + + """ + Expiration time in minutes. Default null - means do not expire any orders. Enter 0 or null to disable. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + expireOrdersAfter: Minute + + """ + The time in days after expired orders will be deleted.Allowed range is from 1 to 120. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + deleteExpiredOrdersAfter: Day + + """ + Determine what strategy will be used to mark the order as paid. Based on the chosen option, the proper object will be created and attached to the order when it's manually marked as paid. + `PAYMENT_FLOW` - [default option] creates the `Payment` object. + `TRANSACTION_FLOW` - creates the `TransactionItem` object. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + markAsPaidStrategy: MarkAsPaidStrategyEnum + + """ + Determine the transaction flow strategy to be used. Include the selected option in the payload sent to the payment app, as a requested action for the transaction. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + defaultTransactionFlowStrategy: TransactionFlowStrategyEnum +} + """ -Update a channel. +Update a channel. Requires one of the following permissions: MANAGE_CHANNELS. +Requires one of the following permissions when updating only orderSettings field: MANAGE_CHANNELS, MANAGE_ORDERS. """ -type ChannelUpdate { +type ChannelUpdate @doc(category: "Channels") { channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ChannelError!]! channel: Channel } -input ChannelUpdateInput { +input ChannelUpdateInput @doc(category: "Channels") { """isActive flag.""" isActive: Boolean @@ -21986,8 +25023,6 @@ input ChannelUpdateInput { The channel stock settings. Added in Saleor 3.7. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ stockSettings: StockSettingsInput @@ -21998,11 +25033,16 @@ input ChannelUpdateInput { List of warehouses to assign to the channel. Added in Saleor 3.5. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ addWarehouses: [ID!] + """ + The channel order settings + + Added in Saleor 3.12. + """ + orderSettings: OrderSettingsInput + """Name of the channel.""" name: String @@ -22023,8 +25063,6 @@ input ChannelUpdateInput { List of warehouses to unassign from the channel. Added in Saleor 3.5. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ removeWarehouses: [ID!] } @@ -22034,13 +25072,13 @@ Delete a channel. Orders associated with the deleted channel will be moved to th Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelDelete { +type ChannelDelete @doc(category: "Channels") { channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ChannelError!]! channel: Channel } -input ChannelDeleteInput { +input ChannelDeleteInput @doc(category: "Channels") { """ID of channel to migrate orders from origin channel.""" channelId: ID! } @@ -22050,7 +25088,7 @@ Activate a channel. Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelActivate { +type ChannelActivate @doc(category: "Channels") { """Activated channel.""" channel: Channel channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22062,7 +25100,7 @@ Deactivate a channel. Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelDeactivate { +type ChannelDeactivate @doc(category: "Channels") { """Deactivated channel.""" channel: Channel channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22072,26 +25110,24 @@ type ChannelDeactivate { """ Reorder the warehouses of a channel. -Added in Saleor 3.7. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. +Added in Saleor 3.7. Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelReorderWarehouses { +type ChannelReorderWarehouses @doc(category: "Channels") { """Channel within the warehouses are reordered.""" channel: Channel errors: [ChannelError!]! } """Creates an attribute.""" -type AttributeCreate { +type AttributeCreate @doc(category: "Attributes") { attribute: Attribute attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! } -type AttributeError { +type AttributeError @doc(category: "Attributes") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -22105,7 +25141,7 @@ type AttributeError { } """An enumeration.""" -enum AttributeErrorCode { +enum AttributeErrorCode @doc(category: "Attributes") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -22114,7 +25150,7 @@ enum AttributeErrorCode { UNIQUE } -input AttributeCreateInput { +input AttributeCreateInput @doc(category: "Attributes") { """The input type to use for entering attribute values in the dashboard.""" inputType: AttributeInputTypeEnum @@ -22145,7 +25181,11 @@ input AttributeCreateInput { """Whether the attribute should be visible or not in storefront.""" visibleInStorefront: Boolean - """Whether the attribute can be filtered in storefront.""" + """ + Whether the attribute can be filtered in storefront. + + DEPRECATED: this field will be removed in Saleor 4.0. + """ filterableInStorefront: Boolean """Whether the attribute can be filtered in dashboard.""" @@ -22153,10 +25193,16 @@ input AttributeCreateInput { """ The position of the attribute in the storefront navigation (0 by default). + + DEPRECATED: this field will be removed in Saleor 4.0. """ storefrontSearchPosition: Int - """Whether the attribute can be displayed in the admin product list.""" + """ + Whether the attribute can be displayed in the admin product list. + + DEPRECATED: this field will be removed in Saleor 4.0. + """ availableInGrid: Boolean """ @@ -22167,7 +25213,7 @@ input AttributeCreateInput { externalReference: String } -input AttributeValueCreateInput { +input AttributeValueCreateInput @doc(category: "Attributes") { """ Represent value of the attribute value (e.g. color values for swatch attributes). """ @@ -22211,7 +25257,7 @@ Deletes an attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeDelete { +type AttributeDelete @doc(category: "Attributes") { attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! attribute: Attribute @@ -22222,13 +25268,13 @@ Updates attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeUpdate { +type AttributeUpdate @doc(category: "Attributes") { attribute: Attribute attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! } -input AttributeUpdateInput { +input AttributeUpdateInput @doc(category: "Attributes") { """Name of an attribute displayed in the interface.""" name: String @@ -22253,7 +25299,11 @@ input AttributeUpdateInput { """Whether the attribute should be visible or not in storefront.""" visibleInStorefront: Boolean - """Whether the attribute can be filtered in storefront.""" + """ + Whether the attribute can be filtered in storefront. + + DEPRECATED: this field will be removed in Saleor 4.0. + """ filterableInStorefront: Boolean """Whether the attribute can be filtered in dashboard.""" @@ -22261,10 +25311,16 @@ input AttributeUpdateInput { """ The position of the attribute in the storefront navigation (0 by default). + + DEPRECATED: this field will be removed in Saleor 4.0. """ storefrontSearchPosition: Int - """Whether the attribute can be displayed in the admin product list.""" + """ + Whether the attribute can be displayed in the admin product list. + + DEPRECATED: this field will be removed in Saleor 4.0. + """ availableInGrid: Boolean """ @@ -22275,7 +25331,7 @@ input AttributeUpdateInput { externalReference: String } -input AttributeValueUpdateInput { +input AttributeValueUpdateInput @doc(category: "Attributes") { """ Represent value of the attribute value (e.g. color values for swatch attributes). """ @@ -22319,18 +25375,79 @@ Creates/updates translations for an attribute. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type AttributeTranslate { +type AttributeTranslate @doc(category: "Attributes") { translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! attribute: Attribute } +""" +Creates/updates translations for attributes. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_TRANSLATIONS. +""" +type AttributeBulkTranslate @doc(category: "Attributes") { + """Returns how many translations were created/updated.""" + count: Int! + + """List of the translations.""" + results: [AttributeBulkTranslateResult!]! + errors: [AttributeBulkTranslateError!]! +} + +type AttributeBulkTranslateResult @doc(category: "Attributes") { + """Attribute translation data.""" + translation: AttributeTranslation + + """List of errors occurred on translation attempt.""" + errors: [AttributeBulkTranslateError!] +} + +type AttributeBulkTranslateError { + """ + Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + path: String + + """The error message.""" + message: String + + """The error code.""" + code: AttributeTranslateErrorCode! +} + +"""An enumeration.""" +enum AttributeTranslateErrorCode @doc(category: "Attributes") { + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED +} + +input AttributeBulkTranslateInput @doc(category: "Attributes") { + """Attribute ID.""" + id: ID + + """External reference of an attribute.""" + externalReference: String + + """Translation language code.""" + languageCode: LanguageCodeEnum! + + """Translation fields.""" + translationFields: NameTranslationInput! +} + """ Deletes attributes. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type AttributeBulkDelete { +type AttributeBulkDelete @doc(category: "Attributes") { """Returns how many objects were affected.""" count: Int! attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22342,7 +25459,7 @@ Deletes values of attributes. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type AttributeValueBulkDelete { +type AttributeValueBulkDelete @doc(category: "Attributes") { """Returns how many objects were affected.""" count: Int! attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22354,7 +25471,7 @@ Creates a value for an attribute. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type AttributeValueCreate { +type AttributeValueCreate @doc(category: "Attributes") { """The updated attribute.""" attribute: Attribute attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22367,7 +25484,7 @@ Deletes a value of an attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeValueDelete { +type AttributeValueDelete @doc(category: "Attributes") { """The updated attribute.""" attribute: Attribute attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22380,7 +25497,7 @@ Updates value of an attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeValueUpdate { +type AttributeValueUpdate @doc(category: "Attributes") { """The updated attribute.""" attribute: Attribute attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22389,14 +25506,64 @@ type AttributeValueUpdate { } """ -Creates/updates translations for an attribute value. +Creates/updates translations for attributes values. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type AttributeValueTranslate { - translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [TranslationError!]! - attributeValue: AttributeValue +type AttributeValueBulkTranslate @doc(category: "Attributes") { + """Returns how many translations were created/updated.""" + count: Int! + + """List of the translations.""" + results: [AttributeValueBulkTranslateResult!]! + errors: [AttributeValueBulkTranslateError!]! +} + +type AttributeValueBulkTranslateResult @doc(category: "Attributes") { + """Attribute value translation data.""" + translation: AttributeValueTranslation + + """List of errors occurred on translation attempt.""" + errors: [AttributeValueBulkTranslateError!] +} + +type AttributeValueBulkTranslateError { + """ + Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + path: String + + """The error message.""" + message: String + + """The error code.""" + code: AttributeValueTranslateErrorCode! +} + +"""An enumeration.""" +enum AttributeValueTranslateErrorCode @doc(category: "Attributes") { + GRAPHQL_ERROR + INVALID + NOT_FOUND + REQUIRED +} + +input AttributeValueBulkTranslateInput @doc(category: "Attributes") { + """Attribute value ID.""" + id: ID + + """External reference of an attribute value.""" + externalReference: String + + """Translation language code.""" + languageCode: LanguageCodeEnum! + + """Translation fields.""" + translationFields: AttributeValueTranslationInput! } input AttributeValueTranslationInput { @@ -22413,12 +25580,23 @@ input AttributeValueTranslationInput { plainText: String } +""" +Creates/updates translations for an attribute value. + +Requires one of the following permissions: MANAGE_TRANSLATIONS. +""" +type AttributeValueTranslate @doc(category: "Attributes") { + translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + errors: [TranslationError!]! + attributeValue: AttributeValue +} + """ Reorder the values of an attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeReorderValues { +type AttributeReorderValues @doc(category: "Attributes") { """Attribute from which values are reordered.""" attribute: Attribute attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22428,7 +25606,7 @@ type AttributeReorderValues { """ Creates a new app. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. """ -type AppCreate { +type AppCreate @doc(category: "Apps") { """The newly created authentication token.""" authToken: String appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22436,7 +25614,7 @@ type AppCreate { app: App } -type AppError { +type AppError @doc(category: "Apps") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -22453,7 +25631,7 @@ type AppError { } """An enumeration.""" -enum AppErrorCode { +enum AppErrorCode @doc(category: "Apps") { FORBIDDEN GRAPHQL_ERROR INVALID @@ -22461,15 +25639,17 @@ enum AppErrorCode { INVALID_PERMISSION INVALID_URL_FORMAT INVALID_MANIFEST_FORMAT + INVALID_CUSTOM_HEADERS MANIFEST_URL_CANT_CONNECT NOT_FOUND REQUIRED UNIQUE OUT_OF_SCOPE_APP OUT_OF_SCOPE_PERMISSION + UNSUPPORTED_SALEOR_VERSION } -input AppInput { +input AppInput @doc(category: "Apps") { """Name of the app.""" name: String @@ -22482,7 +25662,7 @@ Updates an existing app. Requires one of the following permissions: MANAGE_APPS. """ -type AppUpdate { +type AppUpdate @doc(category: "Apps") { appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! app: App @@ -22493,7 +25673,7 @@ Deletes an app. Requires one of the following permissions: MANAGE_APPS. """ -type AppDelete { +type AppDelete @doc(category: "Apps") { appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! app: App @@ -22504,7 +25684,7 @@ Creates a new token. Requires one of the following permissions: MANAGE_APPS. """ -type AppTokenCreate { +type AppTokenCreate @doc(category: "Apps") { """The newly created authentication token.""" authToken: String appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22512,7 +25692,7 @@ type AppTokenCreate { appToken: AppToken } -input AppTokenInput { +input AppTokenInput @doc(category: "Apps") { """Name of the token.""" name: String @@ -22525,14 +25705,14 @@ Deletes an authentication token assigned to app. Requires one of the following permissions: MANAGE_APPS. """ -type AppTokenDelete { +type AppTokenDelete @doc(category: "Apps") { appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! appToken: AppToken } """Verify provided app token.""" -type AppTokenVerify { +type AppTokenVerify @doc(category: "Apps") { """Determine if token is valid or not.""" valid: Boolean! appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22542,13 +25722,13 @@ type AppTokenVerify { """ Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. """ -type AppInstall { +type AppInstall @doc(category: "Apps") { appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! appInstallation: AppInstallation } -input AppInstallInput { +input AppInstallInput @doc(category: "Apps") { """Name of the app to install.""" appName: String @@ -22567,7 +25747,7 @@ Retry failed installation of new app. Requires one of the following permissions: MANAGE_APPS. """ -type AppRetryInstall { +type AppRetryInstall @doc(category: "Apps") { appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! appInstallation: AppInstallation @@ -22578,7 +25758,7 @@ Delete failed installation. Requires one of the following permissions: MANAGE_APPS. """ -type AppDeleteFailedInstallation { +type AppDeleteFailedInstallation @doc(category: "Apps") { appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! appInstallation: AppInstallation @@ -22589,14 +25769,14 @@ Fetch and validate manifest. Requires one of the following permissions: MANAGE_APPS. """ -type AppFetchManifest { +type AppFetchManifest @doc(category: "Apps") { manifest: Manifest appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! } """The manifest definition.""" -type Manifest { +type Manifest @doc(category: "Apps") { identifier: String! version: String! name: String! @@ -22619,8 +25799,6 @@ type Manifest { List of the app's webhooks. Added in Saleor 3.5. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ webhooks: [AppManifestWebhook!]! @@ -22628,13 +25806,38 @@ type Manifest { The audience that will be included in all JWT tokens for the app. Added in Saleor 3.8. + """ + audience: String + + """ + Determines the app's required Saleor version as semver range. + + Added in Saleor 3.13. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - audience: String + requiredSaleorVersion: AppManifestRequiredSaleorVersion + + """ + The App's author name. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + author: String + + """ + App's brand data. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + brand: AppManifestBrand } -type AppManifestExtension { +type AppManifestExtension @doc(category: "Apps") { """List of the app extension's permissions.""" permissions: [Permission!]! @@ -22651,7 +25854,7 @@ type AppManifestExtension { target: AppExtensionTargetEnum! } -type AppManifestWebhook { +type AppManifestWebhook @doc(category: "Apps") { """The name of the webhook.""" name: String! @@ -22668,12 +25871,82 @@ type AppManifestWebhook { targetUrl: String! } +type AppManifestRequiredSaleorVersion @doc(category: "Apps") { + """ + Required Saleor version as semver range. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + constraint: String! + + """ + Informs if the Saleor version matches the required one. + + Added in Saleor 3.13. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + satisfied: Boolean! +} + +""" +Represents the app's manifest brand data. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type AppManifestBrand @doc(category: "Apps") { + """ + App's logos details. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + logo: AppManifestBrandLogo! +} + +""" +Represents the app's manifest brand data. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type AppManifestBrandLogo @doc(category: "Apps") { + """ + Data URL with a base64 encoded logo image. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + default( + """ + Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). + """ + size: Int + + """ + The format of the image. When not provided, format of the original image will be used. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + format: IconThumbnailFormatEnum = ORIGINAL + ): String! +} + """ Activate the app. Requires one of the following permissions: MANAGE_APPS. """ -type AppActivate { +type AppActivate @doc(category: "Apps") { appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! app: App @@ -22684,14 +25957,14 @@ Deactivate the app. Requires one of the following permissions: MANAGE_APPS. """ -type AppDeactivate { +type AppDeactivate @doc(category: "Apps") { appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! app: App } """Create JWT token.""" -type CreateToken { +type CreateToken @doc(category: "Authentication") { """JWT token, required to authenticate.""" token: String @@ -22707,7 +25980,8 @@ type CreateToken { errors: [AccountError!]! } -type AccountError { +"""Represents errors in account mutations.""" +type AccountError @doc(category: "Users") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -22724,7 +25998,7 @@ type AccountError { } """An enumeration.""" -enum AccountErrorCode { +enum AccountErrorCode @doc(category: "Users") { ACTIVATE_OWN_ACCOUNT ACTIVATE_SUPERUSER_ACCOUNT DUPLICATED_INPUT_ITEM @@ -22748,6 +26022,7 @@ enum AccountErrorCode { PASSWORD_TOO_COMMON PASSWORD_TOO_SHORT PASSWORD_TOO_SIMILAR + PASSWORD_RESET_ALREADY_REQUESTED REQUIRED UNIQUE JWT_SIGNATURE_EXPIRED @@ -22761,9 +26036,9 @@ enum AccountErrorCode { } """ -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. +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 { +type RefreshToken @doc(category: "Authentication") { """JWT token, required to authenticate.""" token: String @@ -22774,7 +26049,7 @@ type RefreshToken { } """Verify JWT token.""" -type VerifyToken { +type VerifyToken @doc(category: "Authentication") { """User assigned to token.""" user: User @@ -22799,13 +26074,13 @@ Deactivate all JWT tokens of the currently authenticated user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type DeactivateAllUserTokens { +type DeactivateAllUserTokens @doc(category: "Authentication") { accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } -"""Prepare external authentication url for user by custom plugin.""" -type ExternalAuthenticationUrl { +"""Prepare external authentication URL for user by custom plugin.""" +type ExternalAuthenticationUrl @doc(category: "Authentication") { """The data returned by authentication plugin.""" authenticationData: JSONString accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22813,7 +26088,7 @@ type ExternalAuthenticationUrl { } """Obtain external access tokens for user by custom plugin.""" -type ExternalObtainAccessTokens { +type ExternalObtainAccessTokens @doc(category: "Authentication") { """The token, required to authenticate.""" token: String @@ -22830,7 +26105,7 @@ type ExternalObtainAccessTokens { } """Refresh user's access by custom plugin.""" -type ExternalRefresh { +type ExternalRefresh @doc(category: "Authentication") { """The token, required to authenticate.""" token: String @@ -22847,7 +26122,7 @@ type ExternalRefresh { } """Logout user by custom plugin.""" -type ExternalLogout { +type ExternalLogout @doc(category: "Authentication") { """The data returned by authentication plugin.""" logoutData: JSONString accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22855,7 +26130,7 @@ type ExternalLogout { } """Verify external authentication data by plugin.""" -type ExternalVerify { +type ExternalVerify @doc(category: "Authentication") { """User assigned to data.""" user: User @@ -22869,13 +26144,13 @@ type ExternalVerify { } """Sends an email with the account password modification link.""" -type RequestPasswordReset { +type RequestPasswordReset @doc(category: "Users") { accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """Confirm user account with token sent by email during registration.""" -type ConfirmAccount { +type ConfirmAccount @doc(category: "Users") { """An activated user account.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22885,7 +26160,7 @@ type ConfirmAccount { """ Sets the user's password from the token sent by email using the RequestPasswordReset mutation. """ -type SetPassword { +type SetPassword @doc(category: "Users") { """JWT token, required to authenticate.""" token: String @@ -22906,7 +26181,7 @@ Change the password of the logged in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type PasswordChange { +type PasswordChange @doc(category: "Users") { """A user instance with a new password.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22918,7 +26193,7 @@ Request email change of the logged in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type RequestEmailChange { +type RequestEmailChange @doc(category: "Users") { """A user instance.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22930,7 +26205,7 @@ Confirm the email change of the logged-in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type ConfirmEmailChange { +type ConfirmEmailChange @doc(category: "Users") { """A user instance with a new email.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22942,7 +26217,7 @@ Create a new address for the customer. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountAddressCreate { +type AccountAddressCreate @doc(category: "Users") { """A user instance for which the address was created.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22953,7 +26228,7 @@ type AccountAddressCreate { """ Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. """ -type AccountAddressUpdate { +type AccountAddressUpdate @doc(category: "Users") { """A user object for which the address was edited.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22964,7 +26239,7 @@ type AccountAddressUpdate { """ Delete an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. """ -type AccountAddressDelete { +type AccountAddressDelete @doc(category: "Users") { """A user instance for which the address was deleted.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22977,7 +26252,7 @@ Sets a default address for the authenticated user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountSetDefaultAddress { +type AccountSetDefaultAddress @doc(category: "Users") { """An updated user instance.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22985,7 +26260,7 @@ type AccountSetDefaultAddress { } """Register a new user.""" -type AccountRegister { +type AccountRegister @doc(category: "Users") { """Informs whether users need to confirm their email address.""" requiresConfirmation: Boolean accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -22993,7 +26268,8 @@ type AccountRegister { user: User } -input AccountRegisterInput { +"""Fields required to create a user.""" +input AccountRegisterInput @doc(category: "Users") { """Given name.""" firstName: String @@ -23026,13 +26302,14 @@ Updates the account of the logged-in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountUpdate { +type AccountUpdate @doc(category: "Users") { accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! user: User } -input AccountInput { +"""Fields required to update the user.""" +input AccountInput @doc(category: "Users") { """Given name.""" firstName: String @@ -23047,6 +26324,13 @@ input AccountInput { """Shipping address of the customer.""" defaultShippingAddress: AddressInput + + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] } """ @@ -23054,7 +26338,7 @@ Sends an email with the account removal link for the logged-in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountRequestDeletion { +type AccountRequestDeletion @doc(category: "Users") { accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } @@ -23064,7 +26348,7 @@ Remove user account. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountDelete { +type AccountDelete @doc(category: "Users") { accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! user: User @@ -23075,7 +26359,7 @@ Creates user address. Requires one of the following permissions: MANAGE_USERS. """ -type AddressCreate { +type AddressCreate @doc(category: "Users") { """A user instance for which the address was created.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -23088,7 +26372,7 @@ Updates an address. Requires one of the following permissions: MANAGE_USERS. """ -type AddressUpdate { +type AddressUpdate @doc(category: "Users") { """A user object for which the address was edited.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -23101,7 +26385,7 @@ Deletes an address. Requires one of the following permissions: MANAGE_USERS. """ -type AddressDelete { +type AddressDelete @doc(category: "Users") { """A user instance for which the address was deleted.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -23114,7 +26398,7 @@ Sets a default address for the given user. Requires one of the following permissions: MANAGE_USERS. """ -type AddressSetDefault { +type AddressSetDefault @doc(category: "Users") { """An updated user instance.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -23126,13 +26410,13 @@ Creates a new customer. Requires one of the following permissions: MANAGE_USERS. """ -type CustomerCreate { +type CustomerCreate @doc(category: "Users") { accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! user: User } -input UserCreateInput { +input UserCreateInput @doc(category: "Users") { """Billing address of the customer.""" defaultBillingAddress: AddressInput @@ -23154,6 +26438,20 @@ input UserCreateInput { """A note about the user.""" note: String + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the user private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] + """User language code.""" languageCode: LanguageCodeEnum @@ -23180,13 +26478,13 @@ Updates an existing customer. Requires one of the following permissions: MANAGE_USERS. """ -type CustomerUpdate { +type CustomerUpdate @doc(category: "Users") { accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! user: User } -input CustomerInput { +input CustomerInput @doc(category: "Users") { """Billing address of the customer.""" defaultBillingAddress: AddressInput @@ -23208,6 +26506,20 @@ input CustomerInput { """A note about the user.""" note: String + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the user private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] + """User language code.""" languageCode: LanguageCodeEnum @@ -23224,7 +26536,7 @@ Deletes a customer. Requires one of the following permissions: MANAGE_USERS. """ -type CustomerDelete { +type CustomerDelete @doc(category: "Users") { accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! user: User @@ -23235,25 +26547,87 @@ Deletes customers. Requires one of the following permissions: MANAGE_USERS. """ -type CustomerBulkDelete { +type CustomerBulkDelete @doc(category: "Users") { """Returns how many objects were affected.""" count: Int! accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } +""" +Updates customers. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. + +Requires one of the following permissions: MANAGE_USERS. +""" +type CustomerBulkUpdate @doc(category: "Users") { + """Returns how many objects were created.""" + count: Int! + + """List of the updated customers.""" + results: [CustomerBulkResult!]! + errors: [CustomerBulkUpdateError!]! +} + +type CustomerBulkResult @doc(category: "Users") { + """Customer data.""" + customer: User + + """List of errors that occurred during the update attempt.""" + errors: [CustomerBulkUpdateError!] +} + +type CustomerBulkUpdateError @doc(category: "Users") { + """ + Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + path: String + + """The error message.""" + message: String + + """The error code.""" + code: CustomerBulkUpdateErrorCode! +} + +"""An enumeration.""" +enum CustomerBulkUpdateErrorCode @doc(category: "Users") { + BLANK + DUPLICATED_INPUT_ITEM + GRAPHQL_ERROR + INVALID + REQUIRED + UNIQUE + NOT_FOUND + MAX_LENGTH +} + +input CustomerBulkUpdateInput @doc(category: "Users") { + """ID of a customer to update.""" + id: ID + + """External ID of a customer to update.""" + externalReference: String + + """Fields required to update a customer.""" + input: CustomerInput! +} + """ Creates a new staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type StaffCreate { +type StaffCreate @doc(category: "Users") { staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [StaffError!]! user: User } -type StaffError { +type StaffError @doc(category: "Users") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -23278,7 +26652,8 @@ type StaffError { users: [ID!] } -input StaffCreateInput { +"""Fields required to create a staff user.""" +input StaffCreateInput @doc(category: "Users") { """Given name.""" firstName: String @@ -23294,6 +26669,20 @@ input StaffCreateInput { """A note about the user.""" note: String + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the user private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] + """List of permission group IDs to which user should be assigned.""" addGroups: [ID!] @@ -23308,13 +26697,14 @@ Updates an existing staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type StaffUpdate { +type StaffUpdate @doc(category: "Users") { staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [StaffError!]! user: User } -input StaffUpdateInput { +"""Fields required to update a staff user.""" +input StaffUpdateInput @doc(category: "Users") { """Given name.""" firstName: String @@ -23330,6 +26720,20 @@ input StaffUpdateInput { """A note about the user.""" note: String + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the user private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] + """List of permission group IDs to which user should be assigned.""" addGroups: [ID!] @@ -23342,7 +26746,7 @@ Deletes a staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type StaffDelete { +type StaffDelete @doc(category: "Users") { staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [StaffError!]! user: User @@ -23353,7 +26757,7 @@ Deletes staff users. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type StaffBulkDelete { +type StaffBulkDelete @doc(category: "Users") { """Returns how many objects were affected.""" count: Int! staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -23365,7 +26769,7 @@ Create a user avatar. Only for staff members. This mutation must be sent as a `m Requires one of the following permissions: AUTHENTICATED_STAFF_USER. """ -type UserAvatarUpdate { +type UserAvatarUpdate @doc(category: "Users") { """An updated user instance.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -23377,7 +26781,7 @@ Deletes a user avatar. Only for staff members. Requires one of the following permissions: AUTHENTICATED_STAFF_USER. """ -type UserAvatarDelete { +type UserAvatarDelete @doc(category: "Users") { """An updated user instance.""" user: User accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -23389,7 +26793,7 @@ Activate or deactivate users. Requires one of the following permissions: MANAGE_USERS. """ -type UserBulkSetActive { +type UserBulkSetActive @doc(category: "Users") { """Returns how many objects were affected.""" count: Int! accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") @@ -23401,13 +26805,13 @@ Create new permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type PermissionGroupCreate { +type PermissionGroupCreate @doc(category: "Users") { permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PermissionGroupError!]! group: Group } -type PermissionGroupError { +type PermissionGroupError @doc(category: "Users") { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. """ @@ -23424,29 +26828,51 @@ type PermissionGroupError { """List of user IDs which causes the error.""" users: [ID!] + + """List of chnnels IDs which causes the error.""" + channels: [ID!] } """An enumeration.""" -enum PermissionGroupErrorCode { +enum PermissionGroupErrorCode @doc(category: "Users") { + REQUIRED + UNIQUE 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 + OUT_OF_SCOPE_CHANNEL } -input PermissionGroupCreateInput { +input PermissionGroupCreateInput @doc(category: "Users") { """List of permission code names to assign to this group.""" addPermissions: [PermissionEnum!] """List of users to assign to this group.""" addUsers: [ID!] + """ + List of channels to assign to this group. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + addChannels: [ID!] + """Group name.""" name: String! + + """ + Determine if the group has restricted access to channels. DEFAULT: False + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + restrictedAccessToChannels: Boolean = false } """ @@ -23454,19 +26880,28 @@ Update permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type PermissionGroupUpdate { +type PermissionGroupUpdate @doc(category: "Users") { permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PermissionGroupError!]! group: Group } -input PermissionGroupUpdateInput { +input PermissionGroupUpdateInput @doc(category: "Users") { """List of permission code names to assign to this group.""" addPermissions: [PermissionEnum!] """List of users to assign to this group.""" addUsers: [ID!] + """ + List of channels to assign to this group. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + addChannels: [ID!] + """Group name.""" name: String @@ -23475,6 +26910,24 @@ input PermissionGroupUpdateInput { """List of users to unassign from this group.""" removeUsers: [ID!] + + """ + List of channels to unassign from this group. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + removeChannels: [ID!] + + """ + Determine if the group has restricted access to channels. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + restrictedAccessToChannels: Boolean } """ @@ -23482,7 +26935,7 @@ Delete permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type PermissionGroupDelete { +type PermissionGroupDelete @doc(category: "Users") { permissionGroupErrors: [PermissionGroupError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PermissionGroupError!]! group: Group @@ -23493,8 +26946,6 @@ type Subscription { Look up subscription event. Added in Saleor 3.2. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ event: Event } @@ -23510,7 +26961,7 @@ interface Event { issuingPrincipal: IssuingPrincipal """The application receiving the webhook.""" - recipient: App + recipient: App @doc(category: "Apps") } union IssuingPrincipal = App | User @@ -23556,10 +27007,8 @@ enum VolumeUnitsEnum { Event sent when new address is created. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AddressCreated implements Event { +type AddressCreated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -23580,10 +27029,8 @@ type AddressCreated implements Event { Event sent when address is updated. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AddressUpdated implements Event { +type AddressUpdated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -23604,10 +27051,8 @@ type AddressUpdated implements Event { Event sent when address is deleted. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AddressDeleted implements Event { +type AddressDeleted implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -23628,10 +27073,8 @@ type AddressDeleted implements Event { Event sent when new app is installed. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AppInstalled implements Event { +type AppInstalled implements Event @doc(category: "Apps") { """Time of the event.""" issuedAt: DateTime @@ -23652,10 +27095,8 @@ type AppInstalled implements Event { Event sent when app is updated. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AppUpdated implements Event { +type AppUpdated implements Event @doc(category: "Apps") { """Time of the event.""" issuedAt: DateTime @@ -23676,10 +27117,8 @@ type AppUpdated implements Event { Event sent when app is deleted. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AppDeleted implements Event { +type AppDeleted implements Event @doc(category: "Apps") { """Time of the event.""" issuedAt: DateTime @@ -23700,10 +27139,8 @@ type AppDeleted implements Event { Event sent when app status has changed. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AppStatusChanged implements Event { +type AppStatusChanged implements Event @doc(category: "Apps") { """Time of the event.""" issuedAt: DateTime @@ -23724,10 +27161,8 @@ type AppStatusChanged implements Event { Event sent when new attribute is created. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AttributeCreated implements Event { +type AttributeCreated implements Event @doc(category: "Attributes") { """Time of the event.""" issuedAt: DateTime @@ -23748,10 +27183,8 @@ type AttributeCreated implements Event { Event sent when attribute is updated. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AttributeUpdated implements Event { +type AttributeUpdated implements Event @doc(category: "Attributes") { """Time of the event.""" issuedAt: DateTime @@ -23772,10 +27205,8 @@ type AttributeUpdated implements Event { Event sent when attribute is deleted. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AttributeDeleted implements Event { +type AttributeDeleted implements Event @doc(category: "Attributes") { """Time of the event.""" issuedAt: DateTime @@ -23796,10 +27227,8 @@ type AttributeDeleted implements Event { Event sent when new attribute value is created. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AttributeValueCreated implements Event { +type AttributeValueCreated implements Event @doc(category: "Attributes") { """Time of the event.""" issuedAt: DateTime @@ -23820,10 +27249,8 @@ type AttributeValueCreated implements Event { Event sent when attribute value is updated. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AttributeValueUpdated implements Event { +type AttributeValueUpdated implements Event @doc(category: "Attributes") { """Time of the event.""" issuedAt: DateTime @@ -23844,10 +27271,8 @@ type AttributeValueUpdated implements Event { Event sent when attribute value is deleted. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type AttributeValueDeleted implements Event { +type AttributeValueDeleted implements Event @doc(category: "Attributes") { """Time of the event.""" issuedAt: DateTime @@ -23868,10 +27293,8 @@ type AttributeValueDeleted implements Event { Event sent when new category is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CategoryCreated implements Event { +type CategoryCreated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -23892,10 +27315,8 @@ type CategoryCreated implements Event { Event sent when category is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CategoryUpdated implements Event { +type CategoryUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -23916,10 +27337,8 @@ type CategoryUpdated implements Event { Event sent when category is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CategoryDeleted implements Event { +type CategoryDeleted implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -23940,10 +27359,8 @@ type CategoryDeleted implements Event { Event sent when new channel is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ChannelCreated implements Event { +type ChannelCreated implements Event @doc(category: "Channels") { """Time of the event.""" issuedAt: DateTime @@ -23964,10 +27381,8 @@ type ChannelCreated implements Event { Event sent when channel is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ChannelUpdated implements Event { +type ChannelUpdated implements Event @doc(category: "Channels") { """Time of the event.""" issuedAt: DateTime @@ -23988,10 +27403,8 @@ type ChannelUpdated implements Event { Event sent when channel is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ChannelDeleted implements Event { +type ChannelDeleted implements Event @doc(category: "Channels") { """Time of the event.""" issuedAt: DateTime @@ -24012,10 +27425,8 @@ type ChannelDeleted implements Event { Event sent when channel status has changed. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ChannelStatusChanged implements Event { +type ChannelStatusChanged implements Event @doc(category: "Channels") { """Time of the event.""" issuedAt: DateTime @@ -24036,10 +27447,8 @@ type ChannelStatusChanged implements Event { Event sent when new gift card is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardCreated implements Event { +type GiftCardCreated implements Event @doc(category: "Gift cards") { """Time of the event.""" issuedAt: DateTime @@ -24060,10 +27469,8 @@ type GiftCardCreated implements Event { Event sent when gift card is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardUpdated implements Event { +type GiftCardUpdated implements Event @doc(category: "Gift cards") { """Time of the event.""" issuedAt: DateTime @@ -24084,10 +27491,8 @@ type GiftCardUpdated implements Event { Event sent when gift card is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardDeleted implements Event { +type GiftCardDeleted implements Event @doc(category: "Gift cards") { """Time of the event.""" issuedAt: DateTime @@ -24105,13 +27510,41 @@ type GiftCardDeleted implements Event { } """ -Event sent when gift card status has changed. +Event sent when gift card is e-mailed. -Added in Saleor 3.2. +Added in Saleor 3.13. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardStatusChanged implements Event { +type GiftCardSent implements Event @doc(category: "Gift cards") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The gift card the event relates to.""" + giftCard: GiftCard + + """Slug of a channel for which this gift card email was sent.""" + channel: String + + """E-mail address to which gift card was sent.""" + sentToEmail: String +} + +""" +Event sent when gift card status has changed. + +Added in Saleor 3.2. +""" +type GiftCardStatusChanged implements Event @doc(category: "Gift cards") { """Time of the event.""" issuedAt: DateTime @@ -24132,10 +27565,8 @@ type GiftCardStatusChanged implements Event { Event sent when gift card metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardMetadataUpdated implements Event { +type GiftCardMetadataUpdated implements Event @doc(category: "Gift cards") { """Time of the event.""" issuedAt: DateTime @@ -24156,10 +27587,8 @@ type GiftCardMetadataUpdated implements Event { Event sent when new menu is created. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type MenuCreated implements Event { +type MenuCreated implements Event @doc(category: "Menu") { """Time of the event.""" issuedAt: DateTime @@ -24183,10 +27612,8 @@ type MenuCreated implements Event { Event sent when menu is updated. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type MenuUpdated implements Event { +type MenuUpdated implements Event @doc(category: "Menu") { """Time of the event.""" issuedAt: DateTime @@ -24210,10 +27637,8 @@ type MenuUpdated implements Event { Event sent when menu is deleted. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type MenuDeleted implements Event { +type MenuDeleted implements Event @doc(category: "Menu") { """Time of the event.""" issuedAt: DateTime @@ -24237,10 +27662,8 @@ type MenuDeleted implements Event { Event sent when new menu item is created. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type MenuItemCreated implements Event { +type MenuItemCreated implements Event @doc(category: "Menu") { """Time of the event.""" issuedAt: DateTime @@ -24264,10 +27687,8 @@ type MenuItemCreated implements Event { Event sent when menu item is updated. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type MenuItemUpdated implements Event { +type MenuItemUpdated implements Event @doc(category: "Menu") { """Time of the event.""" issuedAt: DateTime @@ -24291,10 +27712,8 @@ type MenuItemUpdated implements Event { Event sent when menu item is deleted. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type MenuItemDeleted implements Event { +type MenuItemDeleted implements Event @doc(category: "Menu") { """Time of the event.""" issuedAt: DateTime @@ -24318,10 +27737,8 @@ type MenuItemDeleted implements Event { Event sent when new order is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderCreated implements Event { +type OrderCreated implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24342,10 +27759,8 @@ type OrderCreated implements Event { Event sent when order is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderUpdated implements Event { +type OrderUpdated implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24366,10 +27781,8 @@ type OrderUpdated implements Event { Event sent when order is confirmed. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderConfirmed implements Event { +type OrderConfirmed implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24390,10 +27803,80 @@ type OrderConfirmed implements Event { Event sent when order is fully paid. Added in Saleor 3.2. +""" +type OrderFullyPaid implements Event @doc(category: "Orders") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + +""" +Payment has been made. The order may be partially or fully paid. + +Added in Saleor 3.14. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderFullyPaid implements Event { +type OrderPaid implements Event @doc(category: "Orders") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + +""" +The order received a refund. The order may be partially or fully refunded. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type OrderRefunded implements Event @doc(category: "Orders") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + +""" +The order is fully refunded. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type OrderFullyRefunded implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24414,10 +27897,8 @@ type OrderFullyPaid implements Event { Event sent when order is fulfilled. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderFulfilled implements Event { +type OrderFulfilled implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24438,10 +27919,32 @@ type OrderFulfilled implements Event { Event sent when order is canceled. Added in Saleor 3.2. +""" +type OrderCancelled implements Event @doc(category: "Orders") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + +""" +Event sent when order becomes expired. + +Added in Saleor 3.13. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderCancelled implements Event { +type OrderExpired implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24462,10 +27965,8 @@ type OrderCancelled implements Event { Event sent when order metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderMetadataUpdated implements Event { +type OrderMetadataUpdated implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24483,13 +27984,35 @@ type OrderMetadataUpdated implements Event { } """ -Event sent when new draft order is created. +Event sent when orders are imported. -Added in Saleor 3.2. +Added in Saleor 3.14. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type DraftOrderCreated implements Event { +type OrderBulkCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The orders the event relates to.""" + orders: [Order!] +} + +""" +Event sent when new draft order is created. + +Added in Saleor 3.2. +""" +type DraftOrderCreated implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24510,10 +28033,8 @@ type DraftOrderCreated implements Event { Event sent when draft order is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type DraftOrderUpdated implements Event { +type DraftOrderUpdated implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24534,10 +28055,8 @@ type DraftOrderUpdated implements Event { Event sent when draft order is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type DraftOrderDeleted implements Event { +type DraftOrderDeleted implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24558,10 +28077,8 @@ type DraftOrderDeleted implements Event { Event sent when new product is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductCreated implements Event { +type ProductCreated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24588,10 +28105,8 @@ type ProductCreated implements Event { Event sent when product is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductUpdated implements Event { +type ProductUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24618,10 +28133,8 @@ type ProductUpdated implements Event { Event sent when product is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductDeleted implements Event { +type ProductDeleted implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24648,10 +28161,8 @@ type ProductDeleted implements Event { Event sent when product metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductMetadataUpdated implements Event { +type ProductMetadataUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24674,14 +28185,78 @@ type ProductMetadataUpdated implements Event { category: Category } +""" +Event sent when new product media is created. + +Added in Saleor 3.12. +""" +type ProductMediaCreated implements Event @doc(category: "Products") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The product media the event relates to.""" + productMedia: ProductMedia +} + +""" +Event sent when product media is updated. + +Added in Saleor 3.12. +""" +type ProductMediaUpdated implements Event @doc(category: "Products") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The product media the event relates to.""" + productMedia: ProductMedia +} + +""" +Event sent when product media is deleted. + +Added in Saleor 3.12. +""" +type ProductMediaDeleted implements Event @doc(category: "Products") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The product media the event relates to.""" + productMedia: ProductMedia +} + """ Event sent when new product variant is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductVariantCreated implements Event { +type ProductVariantCreated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24705,10 +28280,8 @@ type ProductVariantCreated implements Event { Event sent when product variant is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductVariantUpdated implements Event { +type ProductVariantUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24732,10 +28305,8 @@ type ProductVariantUpdated implements Event { Event sent when product variant is out of stock. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductVariantOutOfStock implements Event { +type ProductVariantOutOfStock implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24762,10 +28333,38 @@ type ProductVariantOutOfStock implements Event { Event sent when product variant is back in stock. Added in Saleor 3.2. +""" +type ProductVariantBackInStock implements Event @doc(category: "Products") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The product variant the event relates to.""" + productVariant( + """Slug of a channel for which the data should be returned.""" + channel: String + ): ProductVariant + + """Look up a warehouse.""" + warehouse: Warehouse +} + +""" +Event sent when product variant stock is updated. + +Added in Saleor 3.11. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductVariantBackInStock implements Event { +type ProductVariantStockUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24792,10 +28391,8 @@ type ProductVariantBackInStock implements Event { Event sent when product variant is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductVariantDeleted implements Event { +type ProductVariantDeleted implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24819,10 +28416,8 @@ type ProductVariantDeleted implements Event { Event sent when product variant metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductVariantMetadataUpdated implements Event { +type ProductVariantMetadataUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -24846,10 +28441,8 @@ type ProductVariantMetadataUpdated implements Event { Event sent when new sale is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type SaleCreated implements Event { +type SaleCreated implements Event @doc(category: "Discounts") { """Time of the event.""" issuedAt: DateTime @@ -24873,10 +28466,8 @@ type SaleCreated implements Event { Event sent when sale is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type SaleUpdated implements Event { +type SaleUpdated implements Event @doc(category: "Discounts") { """Time of the event.""" issuedAt: DateTime @@ -24900,10 +28491,8 @@ type SaleUpdated implements Event { Event sent when sale is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type SaleDeleted implements Event { +type SaleDeleted implements Event @doc(category: "Discounts") { """Time of the event.""" issuedAt: DateTime @@ -24927,10 +28516,8 @@ type SaleDeleted implements Event { The event informs about the start or end of the sale. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type SaleToggle implements Event { +type SaleToggle implements Event @doc(category: "Discounts") { """Time of the event.""" issuedAt: DateTime @@ -24947,8 +28534,6 @@ type SaleToggle implements Event { The sale the event relates to. Added in Saleor 3.5. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ sale( """Slug of a channel for which the data should be returned.""" @@ -24960,10 +28545,8 @@ type SaleToggle implements Event { Event sent when invoice is requested. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type InvoiceRequested implements Event { +type InvoiceRequested implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -24991,10 +28574,8 @@ type InvoiceRequested implements Event { Event sent when invoice is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type InvoiceDeleted implements Event { +type InvoiceDeleted implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -25022,10 +28603,8 @@ type InvoiceDeleted implements Event { Event sent when invoice is sent. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type InvoiceSent implements Event { +type InvoiceSent implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -25053,10 +28632,8 @@ type InvoiceSent implements Event { Event sent when new fulfillment is created. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type FulfillmentCreated implements Event { +type FulfillmentCreated implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -25080,10 +28657,8 @@ type FulfillmentCreated implements Event { Event sent when fulfillment is canceled. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type FulfillmentCanceled implements Event { +type FulfillmentCanceled implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -25107,10 +28682,8 @@ type FulfillmentCanceled implements Event { Event sent when fulfillment is approved. Added in Saleor 3.7. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type FulfillmentApproved implements Event { +type FulfillmentApproved implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -25134,10 +28707,8 @@ type FulfillmentApproved implements Event { Event sent when fulfillment metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type FulfillmentMetadataUpdated implements Event { +type FulfillmentMetadataUpdated implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -25161,10 +28732,8 @@ type FulfillmentMetadataUpdated implements Event { Event sent when new customer user is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CustomerCreated implements Event { +type CustomerCreated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25185,10 +28754,8 @@ type CustomerCreated implements Event { Event sent when customer user is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CustomerUpdated implements Event { +type CustomerUpdated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25209,10 +28776,8 @@ type CustomerUpdated implements Event { Event sent when customer user metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CustomerMetadataUpdated implements Event { +type CustomerMetadataUpdated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25233,10 +28798,8 @@ type CustomerMetadataUpdated implements Event { Event sent when new collection is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CollectionCreated implements Event { +type CollectionCreated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -25260,10 +28823,8 @@ type CollectionCreated implements Event { Event sent when collection is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CollectionUpdated implements Event { +type CollectionUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -25287,10 +28848,8 @@ type CollectionUpdated implements Event { Event sent when collection is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CollectionDeleted implements Event { +type CollectionDeleted implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -25314,10 +28873,8 @@ type CollectionDeleted implements Event { Event sent when collection metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CollectionMetadataUpdated implements Event { +type CollectionMetadataUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -25341,10 +28898,8 @@ type CollectionMetadataUpdated implements Event { Event sent when new checkout is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CheckoutCreated implements Event { +type CheckoutCreated implements Event @doc(category: "Checkout") { """Time of the event.""" issuedAt: DateTime @@ -25365,10 +28920,32 @@ type CheckoutCreated implements Event { Event sent when checkout is updated. Added in Saleor 3.2. +""" +type CheckoutUpdated implements Event @doc(category: "Checkout") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The checkout the event relates to.""" + checkout: Checkout +} + +""" +Event sent when checkout is fully paid with transactions. + +Added in Saleor 3.13. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CheckoutUpdated implements Event { +type CheckoutFullyPaid implements Event @doc(category: "Checkout") { """Time of the event.""" issuedAt: DateTime @@ -25389,10 +28966,8 @@ type CheckoutUpdated implements Event { Event sent when checkout metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CheckoutMetadataUpdated implements Event { +type CheckoutMetadataUpdated implements Event @doc(category: "Checkout") { """Time of the event.""" issuedAt: DateTime @@ -25413,10 +28988,8 @@ type CheckoutMetadataUpdated implements Event { Event sent when new page is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PageCreated implements Event { +type PageCreated implements Event @doc(category: "Pages") { """Time of the event.""" issuedAt: DateTime @@ -25437,10 +29010,8 @@ type PageCreated implements Event { Event sent when page is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PageUpdated implements Event { +type PageUpdated implements Event @doc(category: "Pages") { """Time of the event.""" issuedAt: DateTime @@ -25461,10 +29032,8 @@ type PageUpdated implements Event { Event sent when page is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PageDeleted implements Event { +type PageDeleted implements Event @doc(category: "Pages") { """Time of the event.""" issuedAt: DateTime @@ -25485,10 +29054,8 @@ type PageDeleted implements Event { Event sent when new page type is created. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PageTypeCreated implements Event { +type PageTypeCreated implements Event @doc(category: "Pages") { """Time of the event.""" issuedAt: DateTime @@ -25509,10 +29076,8 @@ type PageTypeCreated implements Event { Event sent when page type is updated. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PageTypeUpdated implements Event { +type PageTypeUpdated implements Event @doc(category: "Pages") { """Time of the event.""" issuedAt: DateTime @@ -25533,10 +29098,8 @@ type PageTypeUpdated implements Event { Event sent when page type is deleted. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PageTypeDeleted implements Event { +type PageTypeDeleted implements Event @doc(category: "Pages") { """Time of the event.""" issuedAt: DateTime @@ -25557,10 +29120,8 @@ type PageTypeDeleted implements Event { Event sent when new permission group is created. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PermissionGroupCreated implements Event { +type PermissionGroupCreated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25581,10 +29142,8 @@ type PermissionGroupCreated implements Event { Event sent when permission group is updated. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PermissionGroupUpdated implements Event { +type PermissionGroupUpdated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25605,10 +29164,8 @@ type PermissionGroupUpdated implements Event { Event sent when permission group is deleted. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PermissionGroupDeleted implements Event { +type PermissionGroupDeleted implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25629,10 +29186,8 @@ type PermissionGroupDeleted implements Event { Event sent when new shipping price is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingPriceCreated implements Event { +type ShippingPriceCreated implements Event @doc(category: "Shipping") { """Time of the event.""" issuedAt: DateTime @@ -25662,10 +29217,8 @@ type ShippingPriceCreated implements Event { Event sent when shipping price is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingPriceUpdated implements Event { +type ShippingPriceUpdated implements Event @doc(category: "Shipping") { """Time of the event.""" issuedAt: DateTime @@ -25695,10 +29248,8 @@ type ShippingPriceUpdated implements Event { Event sent when shipping price is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingPriceDeleted implements Event { +type ShippingPriceDeleted implements Event @doc(category: "Shipping") { """Time of the event.""" issuedAt: DateTime @@ -25728,10 +29279,8 @@ type ShippingPriceDeleted implements Event { Event sent when new shipping zone is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingZoneCreated implements Event { +type ShippingZoneCreated implements Event @doc(category: "Shipping") { """Time of the event.""" issuedAt: DateTime @@ -25755,10 +29304,8 @@ type ShippingZoneCreated implements Event { Event sent when shipping zone is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingZoneUpdated implements Event { +type ShippingZoneUpdated implements Event @doc(category: "Shipping") { """Time of the event.""" issuedAt: DateTime @@ -25782,10 +29329,8 @@ type ShippingZoneUpdated implements Event { Event sent when shipping zone is deleted. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingZoneDeleted implements Event { +type ShippingZoneDeleted implements Event @doc(category: "Shipping") { """Time of the event.""" issuedAt: DateTime @@ -25809,10 +29354,8 @@ type ShippingZoneDeleted implements Event { Event sent when shipping zone metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingZoneMetadataUpdated implements Event { +type ShippingZoneMetadataUpdated implements Event @doc(category: "Shipping") { """Time of the event.""" issuedAt: DateTime @@ -25836,10 +29379,8 @@ type ShippingZoneMetadataUpdated implements Event { Event sent when new staff user is created. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type StaffCreated implements Event { +type StaffCreated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25860,10 +29401,8 @@ type StaffCreated implements Event { Event sent when staff user is updated. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type StaffUpdated implements Event { +type StaffUpdated implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25884,10 +29423,8 @@ type StaffUpdated implements Event { Event sent when staff user is deleted. Added in Saleor 3.5. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type StaffDeleted implements Event { +type StaffDeleted implements Event @doc(category: "Users") { """Time of the event.""" issuedAt: DateTime @@ -25909,9 +29446,9 @@ Event sent when transaction action is requested. Added in Saleor 3.4. -Note: this API is currently in Feature Preview and can be subject to changes at later point. +DEPRECATED: this subscription will be removed in Saleor 3.14 (Preview Feature). Use `TransactionChargeRequested`, `TransactionRefundRequested`, `TransactionCancelationRequested` instead. """ -type TransactionActionRequest implements Event { +type TransactionActionRequest implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -25924,26 +29461,14 @@ type TransactionActionRequest implements Event { """The application receiving the webhook.""" recipient: App - """ - Look up a transaction. - - Added in Saleor 3.4. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - """ + """Look up a transaction.""" transaction: TransactionItem - """ - Requested action data. - - Added in Saleor 3.4. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - """ + """Requested action data.""" action: TransactionAction! } -type TransactionAction { +type TransactionAction @doc(category: "Payments") { """Determines the action type.""" actionType: TransactionActionEnum! @@ -25955,10 +29480,8 @@ type TransactionAction { Event sent when transaction item metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type TransactionItemMetadataUpdated implements Event { +type TransactionItemMetadataUpdated implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -25971,11 +29494,7 @@ type TransactionItemMetadataUpdated implements Event { """The application receiving the webhook.""" recipient: App - """ - Look up a transaction. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - """ + """Look up a transaction.""" transaction: TransactionItem } @@ -25983,8 +29502,6 @@ type TransactionItemMetadataUpdated implements Event { Event sent when new translation is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ type TranslationCreated implements Event { """Time of the event.""" @@ -26009,8 +29526,6 @@ union TranslationTypes = ProductTranslation | CollectionTranslation | CategoryTr Event sent when translation is updated. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ type TranslationUpdated implements Event { """Time of the event.""" @@ -26033,10 +29548,8 @@ type TranslationUpdated implements Event { Event sent when new voucher is created. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type VoucherCreated implements Event { +type VoucherCreated implements Event @doc(category: "Discounts") { """Time of the event.""" issuedAt: DateTime @@ -26060,10 +29573,8 @@ type VoucherCreated implements Event { Event sent when voucher is updated. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type VoucherUpdated implements Event { +type VoucherUpdated implements Event @doc(category: "Discounts") { """Time of the event.""" issuedAt: DateTime @@ -26087,10 +29598,8 @@ type VoucherUpdated implements Event { Event sent when voucher is deleted. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type VoucherDeleted implements Event { +type VoucherDeleted implements Event @doc(category: "Discounts") { """Time of the event.""" issuedAt: DateTime @@ -26114,10 +29623,8 @@ type VoucherDeleted implements Event { Event sent when voucher metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type VoucherMetadataUpdated implements Event { +type VoucherMetadataUpdated implements Event @doc(category: "Discounts") { """Time of the event.""" issuedAt: DateTime @@ -26141,10 +29648,8 @@ type VoucherMetadataUpdated implements Event { Event sent when new warehouse is created. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type WarehouseCreated implements Event { +type WarehouseCreated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -26165,10 +29670,8 @@ type WarehouseCreated implements Event { Event sent when warehouse is updated. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type WarehouseUpdated implements Event { +type WarehouseUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -26189,10 +29692,8 @@ type WarehouseUpdated implements Event { Event sent when warehouse is deleted. Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type WarehouseDeleted implements Event { +type WarehouseDeleted implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -26213,10 +29714,8 @@ type WarehouseDeleted implements Event { Event sent when warehouse metadata is updated. Added in Saleor 3.8. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type WarehouseMetadataUpdated implements Event { +type WarehouseMetadataUpdated implements Event @doc(category: "Products") { """Time of the event.""" issuedAt: DateTime @@ -26233,14 +29732,59 @@ type WarehouseMetadataUpdated implements Event { warehouse: Warehouse } +""" +Event sent when thumbnail is created. + +Added in Saleor 3.12. +""" +type ThumbnailCreated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """ + Thumbnail id. + + Added in Saleor 3.12. + """ + id: ID + + """ + Thumbnail url. + + Added in Saleor 3.12. + """ + url: String + + """ + Object the thumbnail refers to. + + Added in Saleor 3.12. + """ + objectId: ID + + """ + Original media url. + + Added in Saleor 3.12. + """ + mediaUrl: String +} + """ Authorize payment. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PaymentAuthorize implements Event { +type PaymentAuthorize implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -26261,10 +29805,8 @@ type PaymentAuthorize implements Event { Capture payment. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PaymentCaptureEvent implements Event { +type PaymentCaptureEvent implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -26285,10 +29827,8 @@ type PaymentCaptureEvent implements Event { Refund payment. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PaymentRefundEvent implements Event { +type PaymentRefundEvent implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -26309,10 +29849,8 @@ type PaymentRefundEvent implements Event { Void payment. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PaymentVoidEvent implements Event { +type PaymentVoidEvent implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -26333,10 +29871,8 @@ type PaymentVoidEvent implements Event { Confirm payment. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PaymentConfirmEvent implements Event { +type PaymentConfirmEvent implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -26357,10 +29893,8 @@ type PaymentConfirmEvent implements Event { Process payment. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PaymentProcessEvent implements Event { +type PaymentProcessEvent implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -26381,10 +29915,8 @@ type PaymentProcessEvent implements Event { List payment gateways. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type PaymentListGateways implements Event { +type PaymentListGateways implements Event @doc(category: "Payments") { """Time of the event.""" issuedAt: DateTime @@ -26402,13 +29934,92 @@ type PaymentListGateways implements Event { } """ -Filter shipping methods for order. +Event sent when transaction cancelation is requested. -Added in Saleor 3.6. +Added in Saleor 3.13. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderFilterShippingMethods implements Event { +type TransactionCancelationRequested implements Event @doc(category: "Payments") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """Look up a transaction.""" + transaction: TransactionItem + + """Requested action data.""" + action: TransactionAction! +} + +""" +Event sent when transaction charge is requested. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TransactionChargeRequested implements Event @doc(category: "Payments") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """Look up a transaction.""" + transaction: TransactionItem + + """Requested action data.""" + action: TransactionAction! +} + +""" +Event sent when transaction refund is requested. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TransactionRefundRequested implements Event @doc(category: "Payments") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """Look up a transaction.""" + transaction: TransactionItem + + """Requested action data.""" + action: TransactionAction! +} + +""" +Filter shipping methods for order. + +Added in Saleor 3.6. +""" +type OrderFilterShippingMethods implements Event @doc(category: "Orders") { """Time of the event.""" issuedAt: DateTime @@ -26428,8 +30039,6 @@ type OrderFilterShippingMethods implements Event { Shipping methods that can be used with this checkout. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingMethods: [ShippingMethod!] } @@ -26438,10 +30047,8 @@ type OrderFilterShippingMethods implements Event { Filter shipping methods for checkout. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CheckoutFilterShippingMethods implements Event { +type CheckoutFilterShippingMethods implements Event @doc(category: "Checkout") { """Time of the event.""" issuedAt: DateTime @@ -26461,8 +30068,6 @@ type CheckoutFilterShippingMethods implements Event { Shipping methods that can be used with this checkout. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingMethods: [ShippingMethod!] } @@ -26471,10 +30076,8 @@ type CheckoutFilterShippingMethods implements Event { List shipping methods for checkout. Added in Saleor 3.6. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ShippingListMethodsForCheckout implements Event { +type ShippingListMethodsForCheckout implements Event @doc(category: "Checkout") { """Time of the event.""" issuedAt: DateTime @@ -26494,8 +30097,6 @@ type ShippingListMethodsForCheckout implements Event { Shipping methods that can be used with this checkout. Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingMethods: [ShippingMethod!] } @@ -26504,10 +30105,8 @@ type ShippingListMethodsForCheckout implements Event { Synchronous webhook for calculating checkout/order taxes. Added in Saleor 3.7. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type CalculateTaxes implements Event { +type CalculateTaxes implements Event @doc(category: "Taxes") { """Time of the event.""" issuedAt: DateTime @@ -26523,7 +30122,7 @@ type CalculateTaxes implements Event { } """Taxable object.""" -type TaxableObject { +type TaxableObject @doc(category: "Taxes") { """The source object related to this tax object.""" sourceObject: TaxSourceObject! @@ -26548,7 +30147,7 @@ type TaxableObject { } """Taxable object discount.""" -type TaxableObjectDiscount { +type TaxableObjectDiscount @doc(category: "Taxes") { """The name of the discount.""" name: String @@ -26556,7 +30155,7 @@ type TaxableObjectDiscount { amount: Money! } -type TaxableObjectLine { +type TaxableObjectLine @doc(category: "Taxes") { """The source line related to this tax line.""" sourceLine: TaxSourceLine! @@ -26584,11 +30183,124 @@ type TaxableObjectLine { union TaxSourceLine = CheckoutLine | OrderLine +""" +Event sent when user wants to initialize the payment gateway. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type PaymentGatewayInitializeSession implements Event @doc(category: "Payments") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """Checkout or order""" + sourceObject: OrderOrCheckout! + + """Payment gateway data in JSON format, recieved from storefront.""" + data: JSON + + """Amount requested for initializing the payment gateway.""" + amount: PositiveDecimal +} + +union OrderOrCheckout = Checkout | Order + +""" +Event sent when user starts processing the payment. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TransactionInitializeSession implements Event @doc(category: "Payments") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """Look up a transaction.""" + transaction: TransactionItem! + + """Checkout or order""" + sourceObject: OrderOrCheckout! + + """Payment gateway data in JSON format, recieved from storefront.""" + data: JSON + + """Merchant reference assigned to this payment.""" + merchantReference: String! + + """Action to proceed for the transaction""" + action: TransactionProcessAction! +} + +type TransactionProcessAction @doc(category: "Payments") { + """Transaction amount to process.""" + amount: PositiveDecimal! + + """Currency of the amount.""" + currency: String! + actionType: TransactionFlowStrategyEnum! +} + +""" +Event sent when user has additional payment action to process. + +Added in Saleor 3.13. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TransactionProcessSession implements Event @doc(category: "Payments") { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """Look up a transaction.""" + transaction: TransactionItem! + + """Checkout or order""" + sourceObject: OrderOrCheckout! + + """Payment gateway data in JSON format, recieved from storefront.""" + data: JSON + + """Merchant reference assigned to this payment.""" + merchantReference: String! + + """Action to proceed for the transaction""" + action: TransactionProcessAction! +} + """_Any value scalar as defined by Federation spec.""" scalar _Any """_Entity union as defined by Federation spec.""" -union _Entity = App | Address | User | Group | ProductVariant | Product | ProductType | ProductMedia | Category | Collection | PageType +union _Entity = App | Address | User | Group | ProductVariant | Product | ProductType | ProductMedia | Category | Collection | Order | PageType """_Service manifest as defined by Federation spec.""" type _Service { diff --git a/apps/taxes/package.json b/apps/taxes/package.json index b975ebc..48e722e 100644 --- a/apps/taxes/package.json +++ b/apps/taxes/package.json @@ -65,6 +65,6 @@ }, "private": true, "saleor": { - "schemaVersion": "3.10" + "schemaVersion": "3.14" } }