diff --git a/.changeset/real-years-return.md b/.changeset/real-years-return.md new file mode 100644 index 0000000..d1249fa --- /dev/null +++ b/.changeset/real-years-return.md @@ -0,0 +1,6 @@ +--- +"saleor-app-emails-and-messages": patch +--- + +Added support for new event - Gift Card Sent. The event is available for Saleor version 3.13 and above. + diff --git a/apps/emails-and-messages/graphql/schema.graphql b/apps/emails-and-messages/graphql/schema.graphql index 3b704aa..df3369e 100644 --- a/apps/emails-and-messages/graphql/schema.graphql +++ b/apps/emails-and-messages/graphql/schema.graphql @@ -4,2291 +4,1750 @@ 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. """ webhook( - """ - ID of the 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. """ webhookSamplePayload( - """ - Name of the requested event type. - """ + """Name of the requested event type.""" eventType: WebhookSampleEventTypeEnum! - ): JSONString + ): JSONString @doc(category: "Webhooks") """ Look up a warehouse by ID. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS, MANAGE_SHIPPING. """ warehouse( - """ - ID of a warehouse. - """ + """ID of a warehouse.""" id: ID """ - External ID of a warehouse. - + External ID of a warehouse. + Added in Saleor 3.10. """ externalReference: String - ): Warehouse + ): Warehouse @doc(category: "Products") """ List of warehouses. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS, MANAGE_SHIPPING. """ warehouses( filter: WarehouseFilterInput sortBy: WarehouseSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ translations( - """ - Kind of objects to retrieve. - """ + """Kind of objects to retrieve.""" kind: TranslatableKinds! - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ Lookup a translatable item by ID. - + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ translation( - """ - ID of the object to retrieve. - """ + """ID of the object to retrieve.""" id: ID! - """ - Kind of the object to retrieve. - """ + """Kind of the object to retrieve.""" kind: TranslatableKinds! ): TranslatableItem """ Look up a tax configuration. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxConfiguration( - """ - ID of a tax configuration. - """ + """ID 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( - """ - Filtering options for tax configurations. - """ + """Filtering options for tax configurations.""" filter: TaxConfigurationFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 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( - """ - Sort tax classes. - """ + """Sort tax classes.""" sortBy: TaxClassSortingInput - """ - Filtering options for tax classes. - """ + """Filtering options for tax classes.""" filter: TaxClassFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxCountryConfiguration( - """ - Country for which to return tax class rates. - """ + """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 - + Requires one of the following permissions: MANAGE_PRODUCTS. """ stock( - """ - ID of an warehouse - """ + """ID of an warehouse""" id: ID! - ): Stock + ): Stock @doc(category: "Products") """ List of stocks. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ stocks( filter: StockFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """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. - + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingZone( - """ - ID of the shipping zone. - """ + """ID of the shipping zone.""" id: ID! - """ - Slug of a channel for which the data should be returned. - """ + """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. - + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingZones( - """ - Filtering options for shipping zones. - """ + """Filtering options for shipping zones.""" filter: ShippingZoneFilterInput - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ digitalContent( - """ - ID of the digital content. - """ + """ID of the digital content.""" id: ID! - ): DigitalContent + ): DigitalContent @doc(category: "Products") """ List of digital content. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ digitalContents( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """List of the shop's categories.""" categories( - """ - Filtering options for categories. - """ + """Filtering options for categories.""" filter: CategoryFilterInput - """ - Sort categories. - """ + """Sort categories.""" sortBy: CategorySortingInput - """ - Filter categories by the nesting level in the category tree. - """ + """Filter categories by the nesting level in the category tree.""" level: Int - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Look up a category by ID or slug.""" category( - """ - ID of the category. - """ + """ID of the category.""" id: ID - """ - Slug of the category - """ + """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. """ collection( - """ - ID of the collection. - """ + """ID of the collection.""" id: ID - """ - Slug of the category - """ + """Slug of the category""" slug: String - """ - Slug of a channel for which the data should be returned. - """ + """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. """ collections( - """ - Filtering options for collections. - """ + """Filtering options for collections.""" filter: CollectionFilterInput - """ - Sort collections. - """ + """Sort collections.""" sortBy: CollectionSortingInput - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. """ product( - """ - ID of the product. - """ + """ID of the product.""" id: ID - """ - Slug of the product. - """ + """Slug of the product.""" slug: String """ - External ID of the product. - + External ID of the product. + Added in Saleor 3.10. """ externalReference: String - """ - Slug of a channel for which the data should be returned. - """ + """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. """ products( - """ - Filtering options for products. - """ + """Filtering options for products.""" filter: ProductFilterInput - """ - Sort products. - """ + """Sort products.""" sortBy: ProductOrder - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Look up a product type by ID.""" productType( - """ - ID of the product type. - """ + """ID of the product type.""" id: ID! - ): ProductType + ): ProductType @doc(category: "Products") - """ - List of the shop's product types. - """ + """List of the shop's product types.""" productTypes( - """ - Filtering options for product types. - """ + """Filtering options for product types.""" filter: ProductTypeFilterInput - """ - Sort product types. - """ + """Sort product types.""" sortBy: ProductTypeSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. """ productVariant( - """ - ID of the product variant. - """ + """ID of the product variant.""" id: ID - """ - Sku of the product variant. - """ + """SKU of the product variant.""" sku: String """ - External ID of the product. - + External ID of the product. + Added in Saleor 3.10. """ externalReference: String - """ - Slug of a channel for which the data should be returned. - """ + """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. """ productVariants( - """ - Filter product variants by given IDs. - """ + """Filter product variants by given IDs.""" ids: [ID!] - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Filtering options for product variant. - """ + """Filtering options for product variant.""" filter: ProductVariantFilterInput - """ - Sort products variants. - """ + """Sort products variants.""" sortBy: ProductVariantSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ reportProductSales( - """ - Span of time. - """ + """Span of time.""" period: ReportingPeriod! - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String! - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_ORDERS. """ payment( - """ - ID of the payment. - """ + """ID of the payment.""" id: ID! - ): Payment + ): Payment @doc(category: "Payments") """ List of payments. - + Requires one of the following permissions: MANAGE_ORDERS. """ payments( - """ - Filtering options for payments. - """ + """Filtering options for payments.""" filter: PaymentFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Added in Saleor 3.6. - + 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. """ transaction( - """ - ID of a transaction. - """ + """ID of a transaction.""" id: ID! - ): TransactionItem + ): TransactionItem @doc(category: "Payments") - """ - Look up a page by ID or slug. - """ + """Look up a page by ID or slug.""" page( - """ - ID of the page. - """ + """ID of the page.""" id: ID - """ - The slug of the page. - """ + """The slug of the page.""" slug: String - ): Page + ): Page @doc(category: "Pages") - """ - List of the shop's pages. - """ + """List of the shop's pages.""" pages( - """ - Sort pages. - """ + """Sort pages.""" sortBy: PageSortingInput - """ - Filtering options for pages. - """ + """Filtering options for pages.""" filter: PageFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Look up a page type by ID.""" pageType( - """ - ID of the page type. - """ + """ID of the page type.""" id: ID! - ): PageType + ): PageType @doc(category: "Pages") - """ - List of the page types. - """ + """List of the page types.""" pageTypes( - """ - Sort page types. - """ + """Sort page types.""" sortBy: PageTypeSortingInput - """ - Filtering options for page types. - """ + """Filtering options for page types.""" filter: PageTypeFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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). - + Requires one of the following permissions: MANAGE_ORDERS. """ homepageEvents( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Look up an order by ID or external reference.""" order( - """ - ID of an order. - """ + """ID of an order.""" id: ID """ - External ID of an order. - + External ID of an order. + Added in Saleor 3.10. """ externalReference: String - ): Order + ): Order @doc(category: "Orders") """ List of orders. - + Requires one of the following permissions: MANAGE_ORDERS. """ orders( - """ - Sort orders. - """ + """Sort orders.""" sortBy: OrderSortingInput - """ - Filtering options for orders. - """ + """Filtering options for orders.""" filter: OrderFilterInput - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_ORDERS. """ draftOrders( - """ - Sort draft orders. - """ + """Sort draft orders.""" sortBy: OrderSortingInput - """ - Filtering options for draft orders. - """ + """Filtering options for draft orders.""" filter: OrderDraftFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_ORDERS. """ ordersTotal( - """ - A period of time. - """ + """A period of time.""" period: ReportingPeriod - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - ): TaxedMoney + ): TaxedMoney @doc(category: "Orders") - """ - Look up an order by token. - """ + """Look up an order by token.""" orderByToken( - """ - The order's token. - """ + """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. - """ + """Look up a navigation menu by ID or name.""" menu( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - ID of the menu. - """ + """ID of the menu.""" id: ID - """ - The menu's name. - """ + """The menu's name.""" name: String - """ - The menu's slug. - """ + """The menu's slug.""" slug: String - ): Menu + ): Menu @doc(category: "Menu") - """ - List of the storefront's menus. - """ + """List of the storefront's menus.""" menus( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Sort menus. - """ + """Sort menus.""" sortBy: MenuSortingInput """ - Filtering options for menus. - + Filtering options for menus. + `slug`: This field will be removed in Saleor 4.0. Use `slugs` instead. """ filter: MenuFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Look up a menu item by ID.""" menuItem( - """ - ID of the menu item. - """ + """ID of the menu item.""" id: ID! - """ - Slug of a channel for which the data should be returned. - """ + """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. - """ + """List of the storefronts's menu items.""" menuItems( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Sort menus items. - """ + """Sort menus items.""" sortBy: MenuItemSortingInput - """ - Filtering options for menu items. - """ + """Filtering options for menu items.""" filter: MenuItemFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCard( - """ - ID of the gift card. - """ + """ID of the gift card.""" id: ID! - ): GiftCard + ): GiftCard @doc(category: "Gift cards") """ List of gift cards. - + Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCards( """ 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 """ 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 - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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( - """ - Filtering options for gift card tags. - """ + """Filtering options for gift card tags.""" filter: GiftCardTagFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_PLUGINS. """ plugin( - """ - ID of the plugin. - """ + """ID of the plugin.""" id: ID! ): Plugin """ List of plugins. - + Requires one of the following permissions: MANAGE_PLUGINS. """ plugins( - """ - Filtering options for plugins. - """ + """Filtering options for plugins.""" filter: PluginFilterInput - """ - Sort plugins. - """ + """Sort plugins.""" sortBy: PluginSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ Look up a sale by ID. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ sale( - """ - ID of the sale. - """ + """ID of the sale.""" id: ID! - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - ): Sale + ): Sale @doc(category: "Discounts") """ List of the shop's sales. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ sales( - """ - Filtering options for sales. - """ + """Filtering options for sales.""" filter: SaleFilterInput - """ - Sort sales. - """ + """Sort sales.""" sortBy: SaleSortingInput """ - Search sales by name, value or type. - + Search sales by name, value or type. + DEPRECATED: this field will be removed in Saleor 4.0. Use `filter.search` input instead. """ query: String - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ voucher( - """ - ID of the voucher. - """ + """ID of the voucher.""" id: ID! - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - ): Voucher + ): Voucher @doc(category: "Discounts") """ List of the shop's vouchers. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ vouchers( - """ - Filtering options for vouchers. - """ + """Filtering options for vouchers.""" filter: VoucherFilterInput - """ - Sort voucher. - """ + """Sort voucher.""" sortBy: VoucherSortingInput """ - Search vouchers by name or code. - + Search vouchers by name or code. + DEPRECATED: this field will be removed in Saleor 4.0. Use `filter.search` input instead. """ query: String - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ exportFile( - """ - ID of the export file job. - """ + """ID of the export file job.""" id: ID! ): ExportFile """ List of export files. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ exportFiles( - """ - Filtering options for export files. - """ + """Filtering options for export files.""" filter: ExportFileFilterInput - """ - Sort export files. - """ + """Sort export files.""" sortBy: ExportFileSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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!] + """List of all tax rates available from tax gateway.""" + taxTypes: [TaxType!] @doc(category: "Taxes") - """ - Look up a checkout by token and slug of channel. - """ + """Look up a checkout by token and slug of channel.""" checkout( """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID """ The checkout's token. - + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): Checkout + ): Checkout @doc(category: "Checkout") """ List of checkouts. - + Requires one of the following permissions: MANAGE_CHECKOUTS. """ checkouts( """ Sort checkouts. - + Added in Saleor 3.1. """ sortBy: CheckoutSortingInput """ Filtering options for checkouts. - + Added in Saleor 3.1. """ filter: CheckoutFilterInput - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_CHECKOUTS. """ checkoutLines( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Look up a channel by ID or slug.""" channel( - """ - ID of the channel. - """ + """ID of the channel.""" id: ID """ 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. - """ + """List of the shop's attributes.""" attributes( - """ - Filtering options for attributes. - """ + """Filtering options for attributes.""" filter: AttributeFilterInput """ Filtering options for attributes. - + Added in Saleor 3.11. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ 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. - """ + """Sorting options for attributes.""" sortBy: AttributeSortingInput - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Look up an attribute by ID, slug or external reference.""" attribute( - """ - ID of the attribute. - """ + """ID of the attribute.""" id: ID - """ - Slug of the attribute. - """ + """Slug of the attribute.""" slug: String """ - External ID of the attribute. - + External ID of the attribute. + 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. - + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, MANAGE_APPS. """ apps( - """ - Filtering options for apps. - """ + """Filtering options for apps.""" filter: AppFilterInput - """ - Sort apps. - """ + """Sort apps.""" sortBy: AppSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: AUTHENTICATED_STAFF_USER AUTHENTICATED_APP. The authenticated app has access to its resources. Fetching different apps requires MANAGE_APPS permission. """ app( - """ - ID of the 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( - """ - Filtering options for apps extensions. - """ + """Filtering options for apps extensions.""" filter: AppExtensionFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 of the app extension.""" id: ID! - ): AppExtension + ): AppExtension @doc(category: "Apps") - """ - Returns address validation rules. - """ + """Returns address validation rules.""" addressValidationRules( - """ - Two-letter ISO 3166-1 country code. - """ + """Two-letter ISO 3166-1 country code.""" countryCode: CountryCode! - """ - Designation of a region, province or state. - """ + """Designation of a region, province or state.""" countryArea: String - """ - City or a town name. - """ + """City or a town name.""" city: String - """ - Sublocality like a district. - """ + """Sublocality like a district.""" cityArea: String - ): AddressValidationData + ): AddressValidationData @doc(category: "Users") - """ - Look up an address by ID. - """ + """Look up an address by ID.""" address( - """ - ID of an address. - """ + """ID of an address.""" id: ID! - ): Address + ): Address @doc(category: "Users") """ List of the shop's customers. - + Requires one of the following permissions: MANAGE_ORDERS, MANAGE_USERS. """ customers( - """ - Filtering options for customers. - """ + """Filtering options for customers.""" filter: CustomerFilterInput - """ - Sort customers. - """ + """Sort customers.""" sortBy: UserSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_STAFF. """ permissionGroups( - """ - Filtering options for permission groups. - """ + """Filtering options for permission groups.""" filter: PermissionGroupFilterInput - """ - Sort permission groups. - """ + """Sort permission groups.""" sortBy: PermissionGroupSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_STAFF. """ permissionGroup( - """ - ID of the group. - """ + """ID of the group.""" id: ID! - ): Group + ): Group @doc(category: "Users") - """ - Return the currently authenticated user. - """ - me: User + """Return the currently authenticated user.""" + me: User @doc(category: "Users") """ List of the shop's staff users. - + Requires one of the following permissions: MANAGE_STAFF. """ staffUsers( - """ - Filtering options for staff users. - """ + """Filtering options for staff users.""" filter: StaffUserInput - """ - Sort staff users. - """ + """Sort staff users.""" sortBy: UserSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - + Requires one of the following permissions: MANAGE_STAFF, MANAGE_USERS, MANAGE_ORDERS. """ user( - """ - ID of the user. - """ + """ID of the user.""" id: ID - """ - Email address of the user. - """ + """Email address of the user.""" email: String """ - External ID of the user. - + External ID of the user. + Added in Saleor 3.10. """ externalReference: String - ): User + ): User @doc(category: "Users") _entities(representations: [_Any]): [_Entity] _service: _Service } -""" -Webhook. -""" -type Webhook implements Node { +"""Webhook.""" +type Webhook implements Node @doc(category: "Webhooks") { id: ID! name: String! - """ - List of webhook events. - """ - events: [WebhookEvent!]! - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead." - ) + """List of webhook events.""" + events: [WebhookEvent!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead.") - """ - List of synchronous webhook events. - """ + """List of synchronous webhook events.""" syncEvents: [WebhookEventSync!]! - """ - List of asynchronous webhook events. - """ + """List of asynchronous webhook events.""" asyncEvents: [WebhookEventAsync!]! app: App! - """ - Event deliveries. - """ + """Event deliveries.""" eventDeliveries( - """ - Event delivery sorter. - """ + """Event delivery sorter.""" sortBy: EventDeliverySortingInput - """ - Event delivery filter options. - """ + """Event delivery filter options.""" filter: EventDeliveryFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 - """ - Target URL for webhook. - """ + """Target URL for webhook.""" targetUrl: String! - """ - Informs if webhook is activated. - """ + """Informs if webhook is activated.""" isActive: Boolean! - """ - Used to create a hash signature for each payload. - """ - secretKey: String - @deprecated( - reason: "This field will be removed in Saleor 4.0. As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS." - ) + """Used to create a hash signature for each payload.""" + secretKey: String @deprecated(reason: "This field will be removed in Saleor 4.0. As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS.") + + """Used to define payloads for specific events.""" + subscriptionQuery: String """ - Used to define payloads for specific events. + 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. """ - subscriptionQuery: String + customHeaders: JSONString } -""" -An object with an ID -""" +"""An object with an ID""" interface Node { - """ - The ID of the object. - """ + """The ID of the object.""" id: ID! } -""" -Webhook event. -""" -type WebhookEvent { - """ - Display name of the event. - """ +"""Webhook event.""" +type WebhookEvent @doc(category: "Webhooks") { + """Display name of the event.""" name: String! - """ - Internal name of the event type. - """ + """Internal name of the event type.""" eventType: WebhookEventTypeEnum! } -""" -Enum determining type of webhook. -""" -enum WebhookEventTypeEnum { - """ - All the events. - """ +"""Enum determining type of webhook.""" +enum WebhookEventTypeEnum @doc(category: "Webhooks") { + """All the events.""" ANY_EVENTS - """ - A new address created. - """ + """A new address created.""" ADDRESS_CREATED - """ - An address updated. - """ + """An address updated.""" ADDRESS_UPDATED - """ - An address deleted. - """ + """An address deleted.""" ADDRESS_DELETED - """ - A new app installed. - """ + """A new app installed.""" APP_INSTALLED - """ - An app updated. - """ + """An app updated.""" APP_UPDATED - """ - An app deleted. - """ + """An app deleted.""" APP_DELETED - """ - An app status is changed. - """ + """An app status is changed.""" APP_STATUS_CHANGED - """ - A new attribute is created. - """ + """A new attribute is created.""" ATTRIBUTE_CREATED - """ - An attribute is updated. - """ + """An attribute is updated.""" ATTRIBUTE_UPDATED - """ - An attribute is deleted. - """ + """An attribute is deleted.""" ATTRIBUTE_DELETED - """ - A new attribute value is created. - """ + """A new attribute value is created.""" ATTRIBUTE_VALUE_CREATED - """ - An attribute value is updated. - """ + """An attribute value is updated.""" ATTRIBUTE_VALUE_UPDATED - """ - An attribute value is deleted. - """ + """An attribute value is deleted.""" ATTRIBUTE_VALUE_DELETED - """ - A new category created. - """ + """A new category created.""" CATEGORY_CREATED - """ - A category is updated. - """ + """A category is updated.""" CATEGORY_UPDATED - """ - A category is deleted. - """ + """A category is deleted.""" CATEGORY_DELETED - """ - A new channel created. - """ + """A new channel created.""" CHANNEL_CREATED - """ - A channel is updated. - """ + """A channel is updated.""" CHANNEL_UPDATED - """ - A channel is deleted. - """ + """A channel is deleted.""" CHANNEL_DELETED - """ - A channel status is changed. - """ + """A channel status is changed.""" CHANNEL_STATUS_CHANGED - """ - A new gift card created. - """ + """A new gift card created.""" GIFT_CARD_CREATED - """ - A gift card is updated. - """ + """A gift card is updated.""" GIFT_CARD_UPDATED - """ - A gift card is deleted. - """ + """A gift card is deleted.""" GIFT_CARD_DELETED """ - A gift card status is changed. + 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 """ 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 - """ - A new menu created. - """ + """A new menu created.""" MENU_CREATED - """ - A menu is updated. - """ + """A menu is updated.""" MENU_UPDATED - """ - A menu is deleted. - """ + """A menu is deleted.""" MENU_DELETED - """ - A new menu item created. - """ + """A new menu item created.""" MENU_ITEM_CREATED - """ - A menu item is updated. - """ + """A menu item is updated.""" MENU_ITEM_UPDATED - """ - A menu item is deleted. - """ + """A menu item is deleted.""" MENU_ITEM_DELETED - """ - A new order is placed. - """ + """A new order is placed.""" ORDER_CREATED """ @@ -2296,9 +1755,7 @@ enum WebhookEventTypeEnum { """ ORDER_CONFIRMED - """ - Payment is made and an order is fully paid. - """ + """Payment is made and an order is fully paid.""" ORDER_FULLY_PAID """ @@ -2306,753 +1763,586 @@ enum WebhookEventTypeEnum { """ ORDER_UPDATED - """ - An order is cancelled. - """ + """An order is cancelled.""" ORDER_CANCELLED - """ - An order is fulfilled. - """ + """An order is expired.""" + ORDER_EXPIRED + + """An order is fulfilled.""" ORDER_FULFILLED """ An 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. """ ORDER_METADATA_UPDATED - """ - A draft order is created. - """ + """A draft order is created.""" DRAFT_ORDER_CREATED - """ - A draft order is updated. - """ + """A draft order is updated.""" DRAFT_ORDER_UPDATED - """ - A draft order is deleted. - """ + """A draft order is deleted.""" DRAFT_ORDER_DELETED - """ - A sale is created. - """ + """A sale is created.""" SALE_CREATED - """ - A sale is updated. - """ + """A sale is updated.""" SALE_UPDATED - """ - A sale is deleted. - """ + """A sale is deleted.""" SALE_DELETED - """ - A sale is activated or deactivated. - """ + """A sale is activated or deactivated.""" SALE_TOGGLE - """ - An invoice for order requested. - """ + """An invoice for order requested.""" INVOICE_REQUESTED - """ - An invoice is deleted. - """ + """An invoice is deleted.""" INVOICE_DELETED - """ - Invoice has been sent. - """ + """Invoice has been sent.""" INVOICE_SENT - """ - A new customer account is created. - """ + """A new customer account is created.""" CUSTOMER_CREATED - """ - A customer account is updated. - """ + """A customer account is updated.""" CUSTOMER_UPDATED - """ - A customer account is deleted. - """ + """A customer account is deleted.""" CUSTOMER_DELETED """ 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 - """ - A new collection is created. - """ + """A new collection is created.""" COLLECTION_CREATED - """ - A collection is updated. - """ + """A collection is updated.""" COLLECTION_UPDATED - """ - A collection is deleted. - """ + """A collection is deleted.""" COLLECTION_DELETED """ 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 - """ - A new product is created. - """ + """A new product is created.""" PRODUCT_CREATED - """ - A product is updated. - """ + """A product is updated.""" PRODUCT_UPDATED - """ - A product is deleted. - """ + """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 - """ - A new product variant is created. - """ + """A new product variant is created.""" PRODUCT_VARIANT_CREATED - """ - A product variant is updated. - """ + """A product variant is updated.""" PRODUCT_VARIANT_UPDATED - """ - A product variant is deleted. - """ + """A product variant is deleted.""" PRODUCT_VARIANT_DELETED - """ - A product variant is out of stock. - """ + """A product variant is out of stock.""" PRODUCT_VARIANT_OUT_OF_STOCK - """ - A product variant is back in stock. - """ + """A product variant is back in stock.""" PRODUCT_VARIANT_BACK_IN_STOCK - """ - A product variant stock is updated - """ + """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 - """ - A new checkout is created. - """ + """A new checkout is created.""" CHECKOUT_CREATED """ 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 - """ - A new fulfillment is created. - """ + """A new fulfillment is created.""" FULFILLMENT_CREATED - """ - A fulfillment is cancelled. - """ + """A fulfillment is cancelled.""" FULFILLMENT_CANCELED - """ - A fulfillment is approved. - """ + """A fulfillment is approved.""" FULFILLMENT_APPROVED """ 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 - """ - User notification triggered. - """ + """User notification triggered.""" NOTIFY_USER - """ - A new page is created. - """ + """A new page is created.""" PAGE_CREATED - """ - A page is updated. - """ + """A page is updated.""" PAGE_UPDATED - """ - A page is deleted. - """ + """A page is deleted.""" PAGE_DELETED - """ - A new page type is created. - """ + """A new page type is created.""" PAGE_TYPE_CREATED - """ - A page type is updated. - """ + """A page type is updated.""" PAGE_TYPE_UPDATED - """ - A page type is deleted. - """ + """A page type is deleted.""" PAGE_TYPE_DELETED - """ - A new permission group is created. - """ + """A new permission group is created.""" PERMISSION_GROUP_CREATED - """ - A permission group is updated. - """ + """A permission group is updated.""" PERMISSION_GROUP_UPDATED - """ - A permission group is deleted. - """ + """A permission group is deleted.""" PERMISSION_GROUP_DELETED - """ - A new shipping price is created. - """ + """A new shipping price is created.""" SHIPPING_PRICE_CREATED - """ - A shipping price is updated. - """ + """A shipping price is updated.""" SHIPPING_PRICE_UPDATED - """ - A shipping price is deleted. - """ + """A shipping price is deleted.""" SHIPPING_PRICE_DELETED - """ - A new shipping zone is created. - """ + """A new shipping zone is created.""" SHIPPING_ZONE_CREATED - """ - A shipping zone is updated. - """ + """A shipping zone is updated.""" SHIPPING_ZONE_UPDATED - """ - A shipping zone is deleted. - """ + """A shipping zone is deleted.""" SHIPPING_ZONE_DELETED """ 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 - """ - A new staff user is created. - """ + """A new staff user is created.""" STAFF_CREATED - """ - A staff user is updated. - """ + """A staff user is updated.""" STAFF_UPDATED - """ - A staff user is deleted. - """ + """A staff user is deleted.""" STAFF_DELETED """ 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 - """ - A new translation is created. - """ + """A new translation is created.""" TRANSLATION_CREATED - """ - A translation is updated. - """ + """A translation is updated.""" TRANSLATION_UPDATED - """ - A new warehouse created. - """ + """A new warehouse created.""" WAREHOUSE_CREATED - """ - A warehouse is updated. - """ + """A warehouse is updated.""" WAREHOUSE_UPDATED - """ - A warehouse is deleted. - """ + """A warehouse is deleted.""" WAREHOUSE_DELETED """ 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 - """ - A new voucher created. - """ + """A new voucher created.""" VOUCHER_CREATED - """ - A voucher is updated. - """ + """A voucher is updated.""" VOUCHER_UPDATED - """ - A voucher is deleted. - """ + """A voucher is deleted.""" VOUCHER_DELETED """ 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. - """ + """An observability event is created.""" OBSERVABILITY """ - Authorize payment. + A thumbnail is created. + + Added in Saleor 3.12. """ + THUMBNAIL_CREATED + + """Authorize payment.""" PAYMENT_AUTHORIZE - """ - Capture payment. - """ + """Capture payment.""" PAYMENT_CAPTURE - """ - Confirm payment. - """ + """Confirm payment.""" PAYMENT_CONFIRM - """ - Listing available payment gateways. - """ + """Listing available payment gateways.""" PAYMENT_LIST_GATEWAYS - """ - Process payment. - """ + """Process payment.""" PAYMENT_PROCESS - """ - Refund payment. - """ + """Refund payment.""" PAYMENT_REFUND - """ - Void payment. - """ + """Void payment.""" PAYMENT_VOID """ - Event called for checkout tax calculation. - - Added in Saleor 3.6. - + 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. + """ CHECKOUT_CALCULATE_TAXES """ 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 - """ - Fetch external shipping methods for checkout. - """ + """Fetch external shipping methods for checkout.""" SHIPPING_LIST_METHODS_FOR_CHECKOUT - """ - Filter shipping methods for order. - """ + """Filter shipping methods for order.""" ORDER_FILTER_SHIPPING_METHODS - """ - Filter shipping methods for checkout. - """ + """Filter shipping methods for checkout.""" CHECKOUT_FILTER_SHIPPING_METHODS + PAYMENT_GATEWAY_INITIALIZE_SESSION + TRANSACTION_INITIALIZE_SESSION + TRANSACTION_PROCESS_SESSION } -""" -Synchronous webhook event. -""" -type WebhookEventSync { - """ - Display name of the event. - """ +"""Synchronous webhook event.""" +type WebhookEventSync @doc(category: "Webhooks") { + """Display name of the event.""" name: String! - """ - Internal name of the event type. - """ + """Internal name of the event type.""" eventType: WebhookEventTypeSyncEnum! } -""" -Enum determining type of webhook. -""" -enum WebhookEventTypeSyncEnum { - """ - Authorize payment. - """ +"""Enum determining type of webhook.""" +enum WebhookEventTypeSyncEnum @doc(category: "Webhooks") { + """Authorize payment.""" PAYMENT_AUTHORIZE - """ - Capture payment. - """ + """Capture payment.""" PAYMENT_CAPTURE - """ - Confirm payment. - """ + """Confirm payment.""" PAYMENT_CONFIRM - """ - Listing available payment gateways. - """ + """Listing available payment gateways.""" PAYMENT_LIST_GATEWAYS - """ - Process payment. - """ + """Process payment.""" PAYMENT_PROCESS - """ - Refund payment. - """ + """Refund payment.""" PAYMENT_REFUND - """ - Void payment. - """ + """Void payment.""" PAYMENT_VOID """ - Event called for checkout tax calculation. - - Added in Saleor 3.6. - + 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. + """ CHECKOUT_CALCULATE_TAXES """ 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 - """ - Fetch external shipping methods for checkout. - """ + """Fetch external shipping methods for checkout.""" SHIPPING_LIST_METHODS_FOR_CHECKOUT - """ - Filter shipping methods for order. - """ + """Filter shipping methods for order.""" ORDER_FILTER_SHIPPING_METHODS - """ - Filter shipping methods for checkout. - """ + """Filter shipping methods for checkout.""" CHECKOUT_FILTER_SHIPPING_METHODS + PAYMENT_GATEWAY_INITIALIZE_SESSION + TRANSACTION_INITIALIZE_SESSION + TRANSACTION_PROCESS_SESSION } -""" -Asynchronous webhook event. -""" -type WebhookEventAsync { - """ - Display name of the event. - """ +"""Asynchronous webhook event.""" +type WebhookEventAsync @doc(category: "Webhooks") { + """Display name of the event.""" name: String! - """ - Internal name of the event type. - """ + """Internal name of the event type.""" eventType: WebhookEventTypeAsyncEnum! } -""" -Enum determining type of webhook. -""" -enum WebhookEventTypeAsyncEnum { - """ - All the events. - """ +"""Enum determining type of webhook.""" +enum WebhookEventTypeAsyncEnum @doc(category: "Webhooks") { + """All the events.""" ANY_EVENTS - """ - A new address created. - """ + """A new address created.""" ADDRESS_CREATED - """ - An address updated. - """ + """An address updated.""" ADDRESS_UPDATED - """ - An address deleted. - """ + """An address deleted.""" ADDRESS_DELETED - """ - A new app installed. - """ + """A new app installed.""" APP_INSTALLED - """ - An app updated. - """ + """An app updated.""" APP_UPDATED - """ - An app deleted. - """ + """An app deleted.""" APP_DELETED - """ - An app status is changed. - """ + """An app status is changed.""" APP_STATUS_CHANGED - """ - A new attribute is created. - """ + """A new attribute is created.""" ATTRIBUTE_CREATED - """ - An attribute is updated. - """ + """An attribute is updated.""" ATTRIBUTE_UPDATED - """ - An attribute is deleted. - """ + """An attribute is deleted.""" ATTRIBUTE_DELETED - """ - A new attribute value is created. - """ + """A new attribute value is created.""" ATTRIBUTE_VALUE_CREATED - """ - An attribute value is updated. - """ + """An attribute value is updated.""" ATTRIBUTE_VALUE_UPDATED - """ - An attribute value is deleted. - """ + """An attribute value is deleted.""" ATTRIBUTE_VALUE_DELETED - """ - A new category created. - """ + """A new category created.""" CATEGORY_CREATED - """ - A category is updated. - """ + """A category is updated.""" CATEGORY_UPDATED - """ - A category is deleted. - """ + """A category is deleted.""" CATEGORY_DELETED - """ - A new channel created. - """ + """A new channel created.""" CHANNEL_CREATED - """ - A channel is updated. - """ + """A channel is updated.""" CHANNEL_UPDATED - """ - A channel is deleted. - """ + """A channel is deleted.""" CHANNEL_DELETED - """ - A channel status is changed. - """ + """A channel status is changed.""" CHANNEL_STATUS_CHANGED - """ - A new gift card created. - """ + """A new gift card created.""" GIFT_CARD_CREATED - """ - A gift card is updated. - """ + """A gift card is updated.""" GIFT_CARD_UPDATED - """ - A gift card is deleted. - """ + """A gift card is deleted.""" GIFT_CARD_DELETED """ - A gift card status is changed. + 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 """ 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 - """ - A new menu created. - """ + """A new menu created.""" MENU_CREATED - """ - A menu is updated. - """ + """A menu is updated.""" MENU_UPDATED - """ - A menu is deleted. - """ + """A menu is deleted.""" MENU_DELETED - """ - A new menu item created. - """ + """A new menu item created.""" MENU_ITEM_CREATED - """ - A menu item is updated. - """ + """A menu item is updated.""" MENU_ITEM_UPDATED - """ - A menu item is deleted. - """ + """A menu item is deleted.""" MENU_ITEM_DELETED - """ - A new order is placed. - """ + """A new order is placed.""" ORDER_CREATED """ @@ -3060,9 +2350,7 @@ enum WebhookEventTypeAsyncEnum { """ ORDER_CONFIRMED - """ - Payment is made and an order is fully paid. - """ + """Payment is made and an order is fully paid.""" ORDER_FULLY_PAID """ @@ -3070,579 +2358,442 @@ enum WebhookEventTypeAsyncEnum { """ ORDER_UPDATED - """ - An order is cancelled. - """ + """An order is cancelled.""" ORDER_CANCELLED - """ - An order is fulfilled. - """ + """An order is expired.""" + ORDER_EXPIRED + + """An order is fulfilled.""" ORDER_FULFILLED """ An 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. """ ORDER_METADATA_UPDATED - """ - A draft order is created. - """ + """A draft order is created.""" DRAFT_ORDER_CREATED - """ - A draft order is updated. - """ + """A draft order is updated.""" DRAFT_ORDER_UPDATED - """ - A draft order is deleted. - """ + """A draft order is deleted.""" DRAFT_ORDER_DELETED - """ - A sale is created. - """ + """A sale is created.""" SALE_CREATED - """ - A sale is updated. - """ + """A sale is updated.""" SALE_UPDATED - """ - A sale is deleted. - """ + """A sale is deleted.""" SALE_DELETED - """ - A sale is activated or deactivated. - """ + """A sale is activated or deactivated.""" SALE_TOGGLE - """ - An invoice for order requested. - """ + """An invoice for order requested.""" INVOICE_REQUESTED - """ - An invoice is deleted. - """ + """An invoice is deleted.""" INVOICE_DELETED - """ - Invoice has been sent. - """ + """Invoice has been sent.""" INVOICE_SENT - """ - A new customer account is created. - """ + """A new customer account is created.""" CUSTOMER_CREATED - """ - A customer account is updated. - """ + """A customer account is updated.""" CUSTOMER_UPDATED - """ - A customer account is deleted. - """ + """A customer account is deleted.""" CUSTOMER_DELETED """ 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 - """ - A new collection is created. - """ + """A new collection is created.""" COLLECTION_CREATED - """ - A collection is updated. - """ + """A collection is updated.""" COLLECTION_UPDATED - """ - A collection is deleted. - """ + """A collection is deleted.""" COLLECTION_DELETED """ 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 - """ - A new product is created. - """ + """A new product is created.""" PRODUCT_CREATED - """ - A product is updated. - """ + """A product is updated.""" PRODUCT_UPDATED - """ - A product is deleted. - """ + """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 - """ - A new product variant is created. - """ + """A new product variant is created.""" PRODUCT_VARIANT_CREATED - """ - A product variant is updated. - """ + """A product variant is updated.""" PRODUCT_VARIANT_UPDATED - """ - A product variant is deleted. - """ + """A product variant is deleted.""" PRODUCT_VARIANT_DELETED - """ - A product variant is out of stock. - """ + """A product variant is out of stock.""" PRODUCT_VARIANT_OUT_OF_STOCK - """ - A product variant is back in stock. - """ + """A product variant is back in stock.""" PRODUCT_VARIANT_BACK_IN_STOCK - """ - A product variant stock is updated - """ + """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 - """ - A new checkout is created. - """ + """A new checkout is created.""" CHECKOUT_CREATED """ 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 - """ - A new fulfillment is created. - """ + """A new fulfillment is created.""" FULFILLMENT_CREATED - """ - A fulfillment is cancelled. - """ + """A fulfillment is cancelled.""" FULFILLMENT_CANCELED - """ - A fulfillment is approved. - """ + """A fulfillment is approved.""" FULFILLMENT_APPROVED """ 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 - """ - User notification triggered. - """ + """User notification triggered.""" NOTIFY_USER - """ - A new page is created. - """ + """A new page is created.""" PAGE_CREATED - """ - A page is updated. - """ + """A page is updated.""" PAGE_UPDATED - """ - A page is deleted. - """ + """A page is deleted.""" PAGE_DELETED - """ - A new page type is created. - """ + """A new page type is created.""" PAGE_TYPE_CREATED - """ - A page type is updated. - """ + """A page type is updated.""" PAGE_TYPE_UPDATED - """ - A page type is deleted. - """ + """A page type is deleted.""" PAGE_TYPE_DELETED - """ - A new permission group is created. - """ + """A new permission group is created.""" PERMISSION_GROUP_CREATED - """ - A permission group is updated. - """ + """A permission group is updated.""" PERMISSION_GROUP_UPDATED - """ - A permission group is deleted. - """ + """A permission group is deleted.""" PERMISSION_GROUP_DELETED - """ - A new shipping price is created. - """ + """A new shipping price is created.""" SHIPPING_PRICE_CREATED - """ - A shipping price is updated. - """ + """A shipping price is updated.""" SHIPPING_PRICE_UPDATED - """ - A shipping price is deleted. - """ + """A shipping price is deleted.""" SHIPPING_PRICE_DELETED - """ - A new shipping zone is created. - """ + """A new shipping zone is created.""" SHIPPING_ZONE_CREATED - """ - A shipping zone is updated. - """ + """A shipping zone is updated.""" SHIPPING_ZONE_UPDATED - """ - A shipping zone is deleted. - """ + """A shipping zone is deleted.""" SHIPPING_ZONE_DELETED """ 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 - """ - A new staff user is created. - """ + """A new staff user is created.""" STAFF_CREATED - """ - A staff user is updated. - """ + """A staff user is updated.""" STAFF_UPDATED - """ - A staff user is deleted. - """ + """A staff user is deleted.""" STAFF_DELETED """ 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 - """ - A new translation is created. - """ + """A new translation is created.""" TRANSLATION_CREATED - """ - A translation is updated. - """ + """A translation is updated.""" TRANSLATION_UPDATED - """ - A new warehouse created. - """ + """A new warehouse created.""" WAREHOUSE_CREATED - """ - A warehouse is updated. - """ + """A warehouse is updated.""" WAREHOUSE_UPDATED - """ - A warehouse is deleted. - """ + """A warehouse is deleted.""" WAREHOUSE_DELETED """ 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 - """ - A new voucher created. - """ + """A new voucher created.""" VOUCHER_CREATED - """ - A voucher is updated. - """ + """A voucher is updated.""" VOUCHER_UPDATED - """ - A voucher is deleted. - """ + """A voucher is deleted.""" VOUCHER_DELETED """ 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. - """ + """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 { +"""Represents app data.""" +type App implements Node & ObjectWithMetadata @doc(category: "Apps") { id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata - """ - List of the app's permissions. - """ + """List of the app's permissions.""" permissions: [Permission!] - """ - The date and time when the app was created. - """ + """The date and time when the app was created.""" created: DateTime - """ - Determine if app will be set active or not. - """ + """Determine if app will be set active or not.""" isActive: Boolean - """ - Name of the app. - """ + """Name of the app.""" name: String - """ - Type of the app. - """ + """Type of the app.""" type: AppTypeEnum """ Last 4 characters of the tokens. - + Requires one of the following permissions: MANAGE_APPS, OWNER. """ tokens: [AppToken!] """ List of webhooks assigned to this app. - + Requires one of the following permissions: MANAGE_APPS, OWNER. """ webhooks: [Webhook!] - """ - Description of this app. - """ + """Description of this app.""" aboutApp: String - """ - Description of the data privacy defined for this app. - """ - dataPrivacy: String - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.") + """Description of the data privacy defined for this app.""" + dataPrivacy: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.") - """ - URL to details about the privacy policy on the app owner page. - """ + """URL to details about the privacy policy on the app owner page.""" dataPrivacyUrl: String - """ - Homepage of the app. - """ + """Homepage of the app.""" homepageUrl: String - """ - Support page for the app. - """ + """Support page for the app.""" supportUrl: String - """ - URL to iframe with the configuration for the app. - """ - configurationUrl: String - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.") + """URL to iframe with the configuration for the app.""" + configurationUrl: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.") - """ - URL to iframe with the app. - """ + """URL to iframe with the app.""" appUrl: String """ URL to manifest used during app's installation. - + Added in Saleor 3.5. """ manifestUrl: String - """ - Version number of the app. - """ + """Version number of the app.""" version: String - """ - JWT token used to authenticate by thridparty app. - """ + """JWT token used to authenticate by thridparty app.""" accessToken: String """ - App's dashboard extensions. - - Added in Saleor 3.1. - + 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 dashboard extensions. + + Added in Saleor 3.1. + """ extensions: [AppExtension!]! } interface ObjectWithMetadata { - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. """ privateMetafield(key: String!): String @@ -3652,14 +2803,12 @@ interface ObjectWithMetadata { """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. """ metafield(key: String!): String @@ -3671,14 +2820,10 @@ interface ObjectWithMetadata { } type MetadataItem { - """ - Key of a metadata item. - """ + """Key of a metadata item.""" key: String! - """ - Value of a metadata item. - """ + """Value of a metadata item.""" value: String! } @@ -3695,25 +2840,17 @@ Example: """ scalar Metadata -""" -Represents a permission object in a friendly form. -""" -type Permission { - """ - Internal code for permission. - """ +"""Represents a permission object in a friendly form.""" +type Permission @doc(category: "Authentication") { + """Internal code for permission.""" code: PermissionEnum! - """ - Describe action(s) allowed to do by permission. - """ + """Describe action(s) allowed to do by permission.""" name: String! } -""" -An enumeration. -""" -enum PermissionEnum { +"""An enumeration.""" +enum PermissionEnum @doc(category: "Users") { MANAGE_USERS MANAGE_STAFF IMPERSONATE_USER @@ -3746,10 +2883,8 @@ value as specified by """ scalar DateTime -""" -Enum determining type of your App. -""" -enum AppTypeEnum { +"""Enum determining type of your App.""" +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 """ @@ -3761,65 +2896,43 @@ enum AppTypeEnum { THIRDPARTY } -""" -Represents token data. -""" -type AppToken implements Node { +"""Represents token data.""" +type AppToken implements Node @doc(category: "Apps") { id: ID! - """ - Name of the authenticated token. - """ + """Name of the authenticated token.""" name: String - """ - Last 4 characters of the token. - """ + """Last 4 characters of the token.""" authToken: String } -""" -Represents app data. -""" -type AppExtension implements Node { +"""Represents app data.""" +type AppExtension implements Node @doc(category: "Apps") { id: ID! - """ - List of the app extension's permissions. - """ + """List of the app extension's permissions.""" permissions: [Permission!]! - """ - Label of the extension to show in the dashboard. - """ + """Label of the extension to show in the dashboard.""" label: String! - """ - URL of a view where extension's iframe is placed. - """ + """URL of a view where extension's iframe is placed.""" url: String! - """ - Place where given extension will be mounted. - """ + """Place where given extension will be mounted.""" mount: AppExtensionMountEnum! - """ - Type of way how app extension will be opened. - """ + """Type of way how app extension will be opened.""" target: AppExtensionTargetEnum! app: App! - """ - JWT token used to authenticate by thridparty app extension. - """ + """JWT token used to authenticate by thridparty app extension.""" accessToken: String } -""" -All places where app extension can be mounted. -""" -enum AppExtensionMountEnum { +"""All places where app extension can be mounted.""" +enum AppExtensionMountEnum @doc(category: "Apps") { CUSTOMER_OVERVIEW_CREATE CUSTOMER_OVERVIEW_MORE_ACTIONS CUSTOMER_DETAILS_MORE_ACTIONS @@ -3843,21 +2956,17 @@ 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 } type EventDeliveryCountableConnection { - """ - Pagination data for this connection. - """ + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [EventDeliveryCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } @@ -3865,217 +2974,147 @@ type EventDeliveryCountableConnection { The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. """ type PageInfo { - """ - When paginating forwards, are there more items? - """ + """When paginating forwards, are there more items?""" hasNextPage: Boolean! - """ - When paginating backwards, are there more items? - """ + """When paginating backwards, are there more items?""" hasPreviousPage: Boolean! - """ - When paginating backwards, the cursor to continue. - """ + """When paginating backwards, the cursor to continue.""" startCursor: String - """ - When paginating forwards, the cursor to continue. - """ + """When paginating forwards, the cursor to continue.""" endCursor: String } type EventDeliveryCountableEdge { - """ - The item at the end of the edge. - """ + """The item at the end of the edge.""" node: EventDelivery! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -""" -Event delivery. -""" +"""Event delivery.""" type EventDelivery implements Node { id: ID! createdAt: DateTime! - """ - Event delivery status. - """ + """Event delivery status.""" status: EventDeliveryStatusEnum! - """ - Webhook event type. - """ + """Webhook event type.""" eventType: WebhookEventTypeEnum! - """ - Event delivery attempts. - """ + """Event delivery attempts.""" attempts( - """ - Event delivery sorter - """ + """Event delivery sorter""" sortBy: EventDeliveryAttemptSortingInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 - """ - Event payload. - """ + """Event payload.""" payload: String } -enum EventDeliveryStatusEnum { +enum EventDeliveryStatusEnum @doc(category: "Webhooks") { PENDING SUCCESS FAILED } type EventDeliveryAttemptCountableConnection { - """ - Pagination data for this connection. - """ + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [EventDeliveryAttemptCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } type EventDeliveryAttemptCountableEdge { - """ - The item at the end of the edge. - """ + """The item at the end of the edge.""" node: EventDeliveryAttempt! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -""" -Event delivery attempts. -""" -type EventDeliveryAttempt implements Node { +"""Event delivery attempts.""" +type EventDeliveryAttempt implements Node @doc(category: "Webhooks") { id: ID! - """ - Event delivery creation date and time. - """ + """Event delivery creation date and time.""" createdAt: DateTime! - """ - Task id for delivery attempt. - """ + """Task id for delivery attempt.""" taskId: String - """ - Delivery attempt duration. - """ + """Delivery attempt duration.""" duration: Float - """ - Delivery attempt response content. - """ + """Delivery attempt response content.""" response: String - """ - Response headers for delivery attempt. - """ + """Response headers for delivery attempt.""" responseHeaders: String - """ - Delivery attempt response status code. - """ + """Delivery attempt response status code.""" responseStatusCode: Int - """ - Request headers for delivery attempt. - """ + """Request headers for delivery attempt.""" requestHeaders: String - """ - Event delivery status. - """ + """Event delivery status.""" 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. - """ + """Sort attempts by the selected field.""" field: EventDeliveryAttemptSortField! } enum OrderDirection { - """ - Specifies an ascending sort order. - """ + """Specifies an ascending sort order.""" ASC - """ - Specifies a descending sort order. - """ + """Specifies a descending sort order.""" DESC } -enum EventDeliveryAttemptSortField { - """ - Sort event delivery attempts by created at. - """ +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. - """ + """Sort deliveries by the selected field.""" field: EventDeliverySortField! } -enum EventDeliverySortField { - """ - Sort event deliveries by created at. - """ +enum EventDeliverySortField @doc(category: "Webhooks") { + """Sort event deliveries by created at.""" CREATED_AT } @@ -4086,10 +3125,8 @@ input EventDeliveryFilterInput { scalar JSONString -""" -An enumeration. -""" -enum WebhookSampleEventTypeEnum { +"""An enumeration.""" +enum WebhookSampleEventTypeEnum @doc(category: "Webhooks") { ADDRESS_CREATED ADDRESS_UPDATED ADDRESS_DELETED @@ -4113,6 +3150,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 @@ -4126,6 +3164,7 @@ enum WebhookSampleEventTypeEnum { ORDER_FULLY_PAID ORDER_UPDATED ORDER_CANCELLED + ORDER_EXPIRED ORDER_FULFILLED ORDER_METADATA_UPDATED DRAFT_ORDER_CREATED @@ -4149,6 +3188,9 @@ 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 @@ -4159,6 +3201,7 @@ enum WebhookSampleEventTypeEnum { PRODUCT_VARIANT_METADATA_UPDATED CHECKOUT_CREATED CHECKOUT_UPDATED + CHECKOUT_FULLY_PAID CHECKOUT_METADATA_UPDATED FULFILLMENT_CREATED FULFILLMENT_CANCELED @@ -4197,60 +3240,55 @@ enum WebhookSampleEventTypeEnum { VOUCHER_DELETED VOUCHER_METADATA_UPDATED OBSERVABILITY + THUMBNAIL_CREATED } -""" -Represents warehouse. -""" -type Warehouse implements Node & ObjectWithMetadata { +"""Represents warehouse.""" +type Warehouse implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -4260,112 +3298,99 @@ type Warehouse implements Node & ObjectWithMetadata { isPrivate: Boolean! address: Address! - """ - Warehouse company name. - """ - companyName: String! - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use `Address.companyName` instead." - ) + """Warehouse company name.""" + companyName: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Address.companyName` instead.") """ 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( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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! """ - External ID of this warehouse. - + External ID of this warehouse. + Added in Saleor 3.10. """ externalReference: String } -""" -Represents user address data. -""" -type Address implements Node & ObjectWithMetadata { +"""Represents user address data.""" +type Address implements Node & ObjectWithMetadata @doc(category: "Users") { id: ID! """ List of private metadata items. Requires staff permissions to access. - + Added in Saleor 3.10. - + 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.10. - + 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.10. - + 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.10. - + 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.10. - + 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.10. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -4378,179 +3403,132 @@ type Address implements Node & ObjectWithMetadata { cityArea: String! postalCode: String! - """ - Shop's default country. - """ + """Shop's default country.""" country: CountryDisplay! countryArea: String! phone: String - """ - Address is user's default shipping address. - """ + """Address is user's default shipping address.""" isDefaultShippingAddress: Boolean - """ - Address is user's default billing address. - """ + """Address is user's default billing address.""" isDefaultBillingAddress: Boolean } type CountryDisplay { - """ - Country code. - """ + """Country code.""" code: String! - """ - Country name. - """ + """Country name.""" country: String! - """ - Country tax. - """ - vat: VAT - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use `TaxClassCountryRate` type to manage tax rates per country." - ) + """Country tax.""" + vat: VAT @deprecated(reason: "This field will be removed in Saleor 4.0. Use `TaxClassCountryRate` type to manage tax rates per country.") } -""" -Represents a VAT rate for a country. -""" -type VAT { - """ - Country code. - """ +"""Represents a VAT rate for a country.""" +type VAT @doc(category: "Taxes") { + """Country code.""" countryCode: String! - """ - Standard VAT rate in percent. - """ + """Standard VAT rate in percent.""" standardRate: Float - """ - Country's VAT rate exceptions for specific types of goods. - """ + """Country's VAT rate exceptions for specific types of goods.""" reducedRates: [ReducedRate!]! } -""" -Represents a reduced VAT rate for a particular type of goods. -""" -type ReducedRate { - """ - Reduced VAT rate in percent. - """ +"""Represents a reduced VAT rate for a particular type of goods.""" +type ReducedRate @doc(category: "Taxes") { + """Reduced VAT rate in percent.""" rate: Float! - """ - A type of goods. - """ + """A type of goods.""" rateType: String! } -""" -An enumeration. -""" -enum WarehouseClickAndCollectOptionEnum { +"""An enumeration.""" +enum WarehouseClickAndCollectOptionEnum @doc(category: "Products") { DISABLED LOCAL ALL } -type ShippingZoneCountableConnection { - """ - Pagination data for this connection. - """ +type ShippingZoneCountableConnection @doc(category: "Shipping") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ShippingZoneCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type ShippingZoneCountableEdge { - """ - The item at the end of the edge. - """ +type ShippingZoneCountableEdge @doc(category: "Shipping") { + """The item at the end of the edge.""" node: ShippingZone! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } """ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata name: String! default: Boolean! - """ - Lowest and highest prices for the shipping. - """ + """Lowest and highest prices for the shipping.""" priceRange: MoneyRange - """ - List of countries available for the method. - """ + """List of countries available for the method.""" countries: [CountryDisplay!]! """ @@ -4558,153 +3536,117 @@ type ShippingZone implements Node & ObjectWithMetadata { """ shippingMethods: [ShippingMethodType!] - """ - List of warehouses for shipping zone. - """ + """List of warehouses for shipping zone.""" warehouses: [Warehouse!]! - """ - List of channels for shipping zone. - """ + """List of channels for shipping zone.""" channels: [Channel!]! - """ - Description of a shipping zone. - """ + """Description of a shipping zone.""" description: String } -""" -Represents a range of amounts of money. -""" +"""Represents a range of amounts of money.""" type MoneyRange { - """ - Lower bound of a price range. - """ + """Lower bound of a price range.""" start: Money - """ - Upper bound of a price range. - """ + """Upper bound of a price range.""" stop: Money } -""" -Represents amount of money in specific currency. -""" +"""Represents amount of money in specific currency.""" type Money { - """ - Currency code. - """ + """Currency code.""" currency: String! - """ - Amount of money. - """ + """Amount of money.""" amount: Float! } """ 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 { - """ - Shipping method ID. - """ +type ShippingMethodType implements Node & ObjectWithMetadata @doc(category: "Shipping") { + """Shipping method ID.""" id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata - """ - Shipping method name. - """ + """Shipping method name.""" name: String! """ Shipping method description. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString - """ - Type of the shipping method. - """ + """Type of the shipping method.""" type: ShippingMethodTypeEnum - """ - Returns translated shipping method fields for the given language code. - """ + """Returns translated shipping method fields for the given language code.""" translation( - """ - A language code to return the translation for shipping method. - """ + """A language code to return the translation for shipping method.""" languageCode: LanguageCodeEnum! ): ShippingMethodTranslation """ List of channels available for the method. - + Requires one of the following permissions: MANAGE_SHIPPING. """ channelListings: [ShippingMethodChannelListing!] - """ - The price of the cheapest variant (including discounts). - """ + """The price of the cheapest variant (including discounts).""" maximumOrderPrice: Money - """ - The price of the cheapest variant (including discounts). - """ + """The price of the cheapest variant (including discounts).""" minimumOrderPrice: Money """ @@ -4714,99 +3656,77 @@ type ShippingMethodType implements Node & ObjectWithMetadata { """ List of excluded products for the shipping method. - + Requires one of the following permissions: MANAGE_SHIPPING. """ excludedProducts( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 - """ - Minimum order weight to use this shipping method. - """ + """Minimum order weight to use this shipping method.""" minimumOrderWeight: Weight - """ - Maximum order weight to use this shipping method. - """ + """Maximum order weight to use this shipping method.""" maximumOrderWeight: Weight - """ - Maximum number of days for delivery. - """ + """Maximum number of days for delivery.""" maximumDeliveryDays: Int - """ - Minimal number of days for delivery. - """ + """Minimal number of days for delivery.""" minimumDeliveryDays: Int """ Tax class assigned to this shipping method. - - Requires one of the following permissions: MANAGE_TAXES, MANAGE_SHIPPING. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass: TaxClass } -""" -An enumeration. -""" -enum ShippingMethodTypeEnum { +"""An enumeration.""" +enum ShippingMethodTypeEnum @doc(category: "Shipping") { PRICE WEIGHT } -type ShippingMethodTranslation implements Node { +type ShippingMethodTranslation implements Node @doc(category: "Shipping") { id: ID! - """ - Translation language. - """ + """Translation language.""" language: LanguageDisplay! name: String """ Translated description of the shipping method. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString } type LanguageDisplay { - """ - ISO 639 representation of the language name. - """ + """ISO 639 representation of the language name.""" code: LanguageCodeEnum! - """ - Full name of the language. - """ + """Full name of the language.""" language: String! } -""" -An enumeration. -""" +"""An enumeration.""" enum LanguageCodeEnum { AF AF_NA @@ -5589,10 +4509,8 @@ enum LanguageCodeEnum { ZU_ZA } -""" -Represents shipping method channel listing. -""" -type ShippingMethodChannelListing implements Node { +"""Represents shipping method channel listing.""" +type ShippingMethodChannelListing implements Node @doc(category: "Shipping") { id: ID! channel: Channel! maximumOrderPrice: Money @@ -5600,117 +4518,106 @@ type ShippingMethodChannelListing implements Node { price: Money } -""" -Represents channel. -""" -type Channel implements Node { +"""Represents channel.""" +type Channel implements Node @doc(category: "Channels") { id: ID! - """ - Slug of the channel. - """ + """Slug of the channel.""" slug: String! """ Name of the channel. - + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ name: String! """ Whether the channel is active. - + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ isActive: Boolean! """ A currency that is assigned to the channel. - + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ currencyCode: String! """ Whether a channel has associated orders. - + Requires one of the following permissions: MANAGE_CHANNELS. """ hasOrders: Boolean! """ 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. - + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ defaultCountry: CountryDisplay! """ List of warehouses assigned to this channel. - + 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!]! """ 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!] """ 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!] """ Define the stock setting for this channel. - + 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 { - """ - The country code. - """ +type ShippingMethodsPerCountry @doc(category: "Shipping") { + """The country code.""" countryCode: CountryCode! - """ - List of available shipping methods. - """ + """List of available shipping methods.""" shippingMethods: [ShippingMethod!] } -""" -An enumeration. -""" +"""An enumeration.""" enum CountryCode { AF AX @@ -5967,20 +4874,16 @@ enum CountryCode { """ Shipping methods that can be used as means of shipping for orders and checkouts. """ -type ShippingMethod implements Node & ObjectWithMetadata { - """ - Unique ID of ShippingMethod available for Order. - """ +type ShippingMethod implements Node & ObjectWithMetadata @doc(category: "Shipping") { + """Unique ID of ShippingMethod available for Order.""" id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. """ privateMetafield(key: String!): String @@ -5990,14 +4893,12 @@ type ShippingMethod implements Node & ObjectWithMetadata { """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. """ metafield(key: String!): String @@ -6007,97 +4908,63 @@ type ShippingMethod implements Node & ObjectWithMetadata { """ metafields(keys: [String!]): Metadata - """ - Type of the shipping method. - """ + """Type of the shipping method.""" type: ShippingMethodTypeEnum @deprecated(reason: "This field will be removed in Saleor 4.0.") - """ - Shipping method name. - """ + """Shipping method name.""" name: String! """ Shipping method description. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString - """ - Maximum delivery days for this shipping method. - """ + """Maximum delivery days for this shipping method.""" maximumDeliveryDays: Int - """ - Minimum delivery days for this shipping method. - """ + """Minimum delivery days for this shipping method.""" minimumDeliveryDays: Int - """ - Maximum order weight for this shipping method. - """ + """Maximum order weight for this shipping method.""" maximumOrderWeight: Weight @deprecated(reason: "This field will be removed in Saleor 4.0.") - """ - Minimum order weight for this shipping method. - """ + """Minimum order weight for this shipping method.""" minimumOrderWeight: Weight @deprecated(reason: "This field will be removed in Saleor 4.0.") - """ - Returns translated shipping method fields for the given language code. - """ + """Returns translated shipping method fields for the given language code.""" translation( - """ - A language code to return the translation for shipping method. - """ + """A language code to return the translation for shipping method.""" languageCode: LanguageCodeEnum! ): ShippingMethodTranslation - """ - The price of selected shipping method. - """ + """The price of selected shipping method.""" price: Money! - """ - Maximum order price for this shipping method. - """ + """Maximum order price for this shipping method.""" maximumOrderPrice: Money - """ - Minimal order price for this shipping method. - """ + """Minimal order price for this shipping method.""" minimumOrderPrice: Money - """ - Describes if this shipping method is active and can be selected. - """ + """Describes if this shipping method is active and can be selected.""" active: Boolean! - """ - Message connected to this shipping method. - """ + """Message connected to this shipping method.""" message: String } -""" -Represents weight value in a specific weight unit. -""" +"""Represents weight value in a specific weight unit.""" type Weight { - """ - Weight unit. - """ + """Weight unit.""" unit: WeightUnitsEnum! - """ - Weight value. - """ + """Weight value.""" value: Float! } -""" -An enumeration. -""" +"""An enumeration.""" enum WeightUnitsEnum { G LB @@ -6110,10 +4977,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. """ @@ -6128,121 +4993,167 @@ 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 shipping method postal code rule. -""" -type ShippingMethodPostalCodeRule implements Node { +"""Represents the channel-specific order settings.""" +type OrderSettings { """ - The ID of the object. + When disabled, all new orders from checkout will be marked as unconfirmed. When enabled orders from checkout will become unfulfilled immediately. """ - id: ID! + automaticallyConfirmAllNewOrders: Boolean! """ - Start address range. + When enabled, all non-shippable gift card orders will be fulfilled automatically. """ - start: String + automaticallyFulfillNonShippableGiftCard: Boolean! """ - End address range. + 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. """ - end: String + expireOrdersAfter: Minute """ - Inclusion type of the postal code rule. + 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. """ - inclusionType: PostalCodeRuleInclusionTypeEnum + 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! } """ -An enumeration. +The `Minute` scalar type represents number of minutes by integer value. """ -enum PostalCodeRuleInclusionTypeEnum { +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 +} + +"""Represents shipping method postal code rule.""" +type ShippingMethodPostalCodeRule implements Node @doc(category: "Shipping") { + """The ID of the object.""" + id: ID! + + """Start address range.""" + start: String + + """End address range.""" + end: String + + """Inclusion type of the postal code rule.""" + inclusionType: PostalCodeRuleInclusionTypeEnum +} + +"""An enumeration.""" +enum PostalCodeRuleInclusionTypeEnum @doc(category: "Shipping") { INCLUDE EXCLUDE } -type ProductCountableConnection { - """ - Pagination data for this connection. - """ +type ProductCountableConnection @doc(category: "Products") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ProductCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type ProductCountableEdge { - """ - The item at the end of the edge. - """ +type ProductCountableEdge @doc(category: "Products") { + """The item at the end of the edge.""" node: Product! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -""" -Represents an individual item for sale in the storefront. -""" -type Product implements Node & ObjectWithMetadata { +"""Represents an individual item for sale in the storefront.""" +type Product implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -6252,7 +5163,7 @@ type Product implements Node & ObjectWithMetadata { """ Description of the product. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString @@ -6261,10 +5172,7 @@ type Product implements Node & ObjectWithMetadata { category: Category created: DateTime! updatedAt: DateTime! - chargeTaxes: Boolean! - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` field to determine whether tax collection is enabled." - ) + chargeTaxes: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` field to determine whether tax collection is enabled.") weight: Weight defaultVariant: ProductVariant rating: Float @@ -6276,27 +5184,22 @@ type Product implements Node & ObjectWithMetadata { """ Description of the product. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + 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 """ @@ -6309,9 +5212,7 @@ type Product implements Node & ObjectWithMetadata { address: AddressInput ): ProductPricingInfo - """ - Whether the product is in stock and visible or not. - """ + """Whether the product is in stock and visible or not.""" isAvailable( """ Destination address used to find warehouses where stock availability for this product is checked. If address is empty, uses `Shop.companyAddress` or fallbacks to server's `settings.DEFAULT_COUNTRY` configuration. @@ -6319,143 +5220,102 @@ type Product implements Node & ObjectWithMetadata { address: AddressInput ): Boolean - """ - A type of tax. Assigned by enabled tax gateway - """ - taxType: TaxType - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClass` field instead.") + """A type of tax. Assigned by enabled tax gateway""" + taxType: TaxType @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClass` field instead.") """ Get a single attribute attached to product by attribute slug. - + Added in Saleor 3.9. """ attribute( - """ - Slug of the attribute - """ + """Slug of the attribute""" slug: String! ): SelectedAttribute - """ - List of attributes assigned to this product. - """ + """List of attributes assigned to this product.""" attributes: [SelectedAttribute!]! """ List of availability in channels for the product. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ channelListings: [ProductChannelListing!] - """ - Get a single product media by ID. - """ + """Get a single product media by ID.""" mediaById( - """ - ID of a product media. - """ + """ID of a product media.""" id: ID ): ProductMedia - """ - Get a single product image by ID. - """ + """Get a single product image by ID.""" imageById( - """ - ID of a product image. - """ + """ID of a product image.""" id: ID - ): ProductImage - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `mediaById` field instead." - ) + ): ProductImage @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `mediaById` field instead.") """ - Get a single variant by SKU or ID. - + Get a single variant by SKU or ID. + Added in Saleor 3.9. """ variant( - """ - ID of the variant. - """ + """ID of the variant.""" id: ID - """ - SKU of the variant. - """ + """SKU of the variant.""" sku: String - ): ProductVariant - @deprecated(reason: "This field will be removed in Saleor 4.0. Use top-level `variant` query.") + ): 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. """ variants: [ProductVariant!] - """ - List of media for the product. - """ + """List of media for the product.""" media( """ - Sort media. - + Sort media. + Added in Saleor 3.9. """ sortBy: MediaSortingInput ): [ProductMedia!] - """ - List of images for the product. - """ - images: [ProductImage!] - @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `media` field instead.") + """List of images for the product.""" + images: [ProductImage!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `media` field instead.") """ List of collections for the product. Requires the following permissions to include the unpublished items: MANAGE_ORDERS, MANAGE_DISCOUNTS, MANAGE_PRODUCTS. """ collections: [Collection!] - """ - Returns translated product fields for the given language code. - """ + """Returns translated product fields for the given language code.""" translation( - """ - A language code to return the translation for product. - """ + """A language code to return the translation for product.""" languageCode: LanguageCodeEnum! ): ProductTranslation - """ - Date when product is available for purchase. - """ - availableForPurchase: Date - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `availableForPurchaseAt` field to fetch the available for purchase date." - ) + """Date when product is available for purchase.""" + availableForPurchase: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `availableForPurchaseAt` field to fetch the available for purchase date.") - """ - Date when product is available for purchase. - """ + """Date when product is available for purchase.""" availableForPurchaseAt: DateTime - """ - Whether the product is available for purchase. - """ + """Whether the product is available for purchase.""" isAvailableForPurchase: Boolean """ Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type. - - Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass: TaxClass """ - External ID of this product. - + External ID of this product. + Added in Saleor 3.10. """ externalReference: String @@ -6464,55 +5324,51 @@ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -6523,138 +5379,99 @@ type ProductType implements Node & ObjectWithMetadata { isDigital: Boolean! weight: Weight - """ - The product type kind. - """ + """The product type kind.""" kind: ProductTypeKindEnum! - """ - List of products of this type. - """ + """List of products of this type.""" products( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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." - ) + ): ProductCountableConnection @deprecated(reason: "This field will be removed in Saleor 4.0. Use the top-level `products` query with the `productTypes` filter.") - """ - A type of tax. Assigned by enabled tax gateway - """ - taxType: TaxType - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClass` field instead.") + """A type of tax. Assigned by enabled tax gateway""" + taxType: TaxType @deprecated(reason: "This field will be removed in Saleor 4.0. Use `taxClass` field instead.") """ Tax class assigned to this product type. All products of this product type use this tax class, unless it's overridden in the `Product` type. - - Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass: TaxClass - """ - Variant attributes of that product type. - """ + """Variant attributes of that product type.""" variantAttributes( - """ - Define scope of returned attributes. - """ + """Define scope of returned attributes.""" variantSelection: VariantAttributeScope - ): [Attribute!] - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use `assignedVariantAttributes` instead." - ) + ): [Attribute!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `assignedVariantAttributes` instead.") """ Variant attributes of that product type with attached variant selection. - + Added in Saleor 3.1. """ assignedVariantAttributes( - """ - Define scope of returned attributes. - """ + """Define scope of returned attributes.""" variantSelection: VariantAttributeScope ): [AssignedVariantAttribute!] - """ - Product attributes of that product type. - """ + """Product attributes of that product type.""" productAttributes: [Attribute!] """ List of attributes which can be assigned to this product type. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ availableAttributes( filter: AttributeFilterInput where: AttributeWhereInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 { +"""An enumeration.""" +enum ProductTypeKindEnum @doc(category: "Products") { NORMAL GIFT_CARD } -""" -Representation of tax types fetched from tax gateway. -""" -type TaxType { - """ - Description of the tax type. - """ +"""Representation of tax types fetched from tax gateway.""" +type TaxType @doc(category: "Taxes") { + """Description of the tax type.""" description: String - """ - External tax code used to identify given tax group. - """ + """External tax code used to identify given tax group.""" taxCode: String } @@ -6662,73 +5479,61 @@ 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 { - """ - The ID of the object. - """ +type TaxClass implements Node & ObjectWithMetadata @doc(category: "Taxes") { + """The ID of the object.""" id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata - """ - Name of the tax class. - """ + """Name of the tax class.""" name: String! - """ - Country-specific tax rates for this tax class. - """ + """Country-specific tax rates for this tax class.""" countries: [TaxClassCountryRate!]! } @@ -6736,143 +5541,109 @@ 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 { - """ - Country in which this tax rate applies. - """ +type TaxClassCountryRate @doc(category: "Taxes") { + """Country in which this tax rate applies.""" country: CountryDisplay! - """ - Tax rate value. - """ + """Tax rate value.""" rate: Float! - """ - Related tax class. - """ + """Related tax class.""" taxClass: TaxClass } """ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata - """ - The input type to use for entering attribute values in the dashboard. - """ + """The input type to use for entering attribute values in the dashboard.""" inputType: AttributeInputTypeEnum - """ - The entity type which can be used as a reference. - """ + """The entity type which can be used as a reference.""" entityType: AttributeEntityTypeEnum - """ - Name of an attribute displayed in the interface. - """ + """Name of an attribute displayed in the interface.""" name: String - """ - Internal representation of an attribute name. - """ + """Internal representation of an attribute name.""" slug: String - """ - The attribute type. - """ + """The attribute type.""" type: AttributeTypeEnum - """ - The unit of attribute values. - """ + """The unit of attribute values.""" unit: MeasurementUnitsEnum - """ - List of attribute's values. - """ + """List of attribute's values.""" choices( - """ - Sort attribute choices. - """ + """Sort attribute choices.""" sortBy: AttributeChoicesSortingInput - """ - Filtering options for attribute choices. - """ + """Filtering options for attribute choices.""" filter: AttributeValueFilterInput - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 @@ -6907,75 +5678,59 @@ type Attribute implements Node & ObjectWithMetadata { """ storefrontSearchPosition: Int! @deprecated(reason: "This field will be removed in Saleor 4.0.") - """ - Returns translated attribute fields for the given language code. - """ + """Returns translated attribute fields for the given language code.""" translation( - """ - A language code to return the translation for attribute. - """ + """A language code to return the translation for attribute.""" languageCode: LanguageCodeEnum! ): AttributeTranslation - """ - Flag indicating that attribute has predefined choices. - """ + """Flag indicating that attribute has predefined choices.""" withChoices: Boolean! productTypes( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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! """ - External ID of this attribute. - + External ID of this attribute. + Added in Saleor 3.10. """ externalReference: String } -""" -An enumeration. -""" -enum AttributeInputTypeEnum { +"""An enumeration.""" +enum AttributeInputTypeEnum @doc(category: "Attributes") { DROPDOWN MULTISELECT FILE @@ -6989,26 +5744,20 @@ enum AttributeInputTypeEnum { DATE_TIME } -""" -An enumeration. -""" -enum AttributeEntityTypeEnum { +"""An enumeration.""" +enum AttributeEntityTypeEnum @doc(category: "Attributes") { PAGE PRODUCT PRODUCT_VARIANT } -""" -An enumeration. -""" -enum AttributeTypeEnum { +"""An enumeration.""" +enum AttributeTypeEnum @doc(category: "Attributes") { PRODUCT_TYPE PAGE_TYPE } -""" -An enumeration. -""" +"""An enumeration.""" enum MeasurementUnitsEnum { CM M @@ -7042,45 +5791,31 @@ enum MeasurementUnitsEnum { TONNE } -type AttributeValueCountableConnection { - """ - Pagination data for this connection. - """ +type AttributeValueCountableConnection @doc(category: "Attributes") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [AttributeValueCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type AttributeValueCountableEdge { - """ - The item at the end of the edge. - """ +type AttributeValueCountableEdge @doc(category: "Attributes") { + """The item at the end of the edge.""" node: AttributeValue! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -""" -Represents a value of an attribute. -""" -type AttributeValue implements Node { +"""Represents a value of an attribute.""" +type AttributeValue implements Node @doc(category: "Attributes") { id: ID! - """ - Name of a value displayed in the interface. - """ + """Name of a value displayed in the interface.""" name: String - """ - Internal representation of a value (unique per attribute). - """ + """Internal representation of a value (unique per attribute).""" slug: String """ @@ -7088,34 +5823,24 @@ type AttributeValue implements Node { """ value: String - """ - Returns translated attribute value fields for the given language code. - """ + """Returns translated attribute value fields for the given language code.""" translation( - """ - A language code to return the translation for attribute value. - """ + """A language code to return the translation for attribute value.""" languageCode: LanguageCodeEnum! ): AttributeValueTranslation - """ - The input type to use for entering attribute values in the dashboard. - """ + """The input type to use for entering attribute values in the dashboard.""" inputType: AttributeInputTypeEnum - """ - The ID of the attribute reference. - """ + """The ID of the attribute reference.""" reference: ID - """ - Represents file URL and content type (if attribute value is a file). - """ + """Represents file URL and content type (if attribute value is a file).""" file: File """ Represents the text of the attribute value, includes formatting. - + Rich text format. For reference see https://editorjs.io/ """ richText: JSONString @@ -7125,60 +5850,46 @@ type AttributeValue implements Node { """ plainText: String - """ - Represents the boolean value of the attribute value. - """ + """Represents the boolean value of the attribute value.""" boolean: Boolean - """ - Represents the date value of the attribute value. - """ + """Represents the date value of the attribute value.""" date: Date - """ - Represents the date/time value of the attribute value. - """ + """Represents the date/time value of the attribute value.""" dateTime: DateTime """ - External ID of this attribute value. - + External ID of this attribute value. + Added in Saleor 3.10. """ externalReference: String } -type AttributeValueTranslation implements Node { +type AttributeValueTranslation implements Node @doc(category: "Attributes") { id: ID! - """ - Translation language. - """ + """Translation language.""" language: LanguageDisplay! name: String! """ Attribute value. - + Rich text format. For reference see https://editorjs.io/ """ richText: JSONString - """ - Attribute plain text value. - """ + """Attribute plain text value.""" plainText: String } type File { - """ - The URL of the file. - """ + """The URL of the file.""" url: String! - """ - Content type of the file. - """ + """Content type of the file.""" contentType: String } @@ -7189,71 +5900,53 @@ 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. - """ + """Sort attribute choices by the selected field.""" field: AttributeChoicesSortField! } -enum AttributeChoicesSortField { - """ - Sort attribute choice by name. - """ +enum AttributeChoicesSortField @doc(category: "Attributes") { + """Sort attribute choice by name.""" NAME - """ - Sort attribute choice by slug. - """ + """Sort attribute choice by slug.""" 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. - """ + """Translation language.""" language: LanguageDisplay! name: String! } -type ProductTypeCountableConnection { - """ - Pagination data for this connection. - """ +type ProductTypeCountableConnection @doc(category: "Products") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ProductTypeCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type ProductTypeCountableEdge { - """ - The item at the end of the edge. - """ +type ProductTypeCountableEdge @doc(category: "Products") { + """The item at the end of the edge.""" node: ProductType! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -enum VariantAttributeScope { +enum VariantAttributeScope @doc(category: "Products") { ALL VARIANT_SELECTION NOT_VARIANT_SELECTION @@ -7264,10 +5957,8 @@ Represents assigned attribute to variant with variant selection attached. Added in Saleor 3.1. """ -type AssignedVariantAttribute { - """ - Attribute assigned to variant. - """ +type AssignedVariantAttribute @doc(category: "Attributes") { + """Attribute assigned to variant.""" attribute: Attribute! """ @@ -7276,32 +5967,24 @@ type AssignedVariantAttribute { variantSelection: Boolean! } -type AttributeCountableConnection { - """ - Pagination data for this connection. - """ +type AttributeCountableConnection @doc(category: "Attributes") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [AttributeCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type AttributeCountableEdge { - """ - The item at the end of the edge. - """ +type AttributeCountableEdge @doc(category: "Attributes") { + """The item at the end of the edge.""" node: Attribute! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input AttributeFilterInput { +input AttributeFilterInput @doc(category: "Attributes") { valueRequired: Boolean isVariantOnly: Boolean visibleInStorefront: Boolean @@ -7317,22 +6000,18 @@ input AttributeFilterInput { slugs: [String!] """ - Specifies the channel by which the data should be filtered. - + Specifies the channel by which the data should be filtered. + DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. """ channel: String } input MetadataFilter { - """ - Key of a metadata item. - """ + """Key of a metadata item.""" key: String! - """ - Value of a metadata item. - """ + """Value of a metadata item.""" value: String } @@ -7343,7 +6022,7 @@ Added in Saleor 3.11. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -input AttributeWhereInput { +input AttributeWhereInput @doc(category: "Attributes") { valueRequired: Boolean visibleInStorefront: Boolean filterableInDashboard: Boolean @@ -7359,14 +6038,10 @@ input AttributeWhereInput { inCollection: ID inCategory: ID - """ - List of conditions that must be met. - """ + """List of conditions that must be met.""" AND: [AttributeWhereInput!] - """ - A list of conditions of which at least one must be met. - """ + """A list of conditions of which at least one must be met.""" OR: [AttributeWhereInput!] } @@ -7378,117 +6053,93 @@ 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. - """ + """The value equal to.""" eq: String - """ - The value included in. - """ + """The value included in.""" oneOf: [String!] } -input AttributeInputTypeEnumFilterInput { - """ - The value equal to. - """ +input AttributeInputTypeEnumFilterInput @doc(category: "Attributes") { + """The value equal to.""" eq: AttributeInputTypeEnum - """ - The value included in. - """ + """The value included in.""" oneOf: [AttributeInputTypeEnum!] } -input AttributeEntityTypeEnumFilterInput { - """ - The value equal to. - """ +input AttributeEntityTypeEnumFilterInput @doc(category: "Attributes") { + """The value equal to.""" eq: AttributeEntityTypeEnum - """ - The value included in. - """ + """The value included in.""" oneOf: [AttributeEntityTypeEnum!] } -input AttributeTypeEnumFilterInput { - """ - The value equal to. - """ +input AttributeTypeEnumFilterInput @doc(category: "Attributes") { + """The value equal to.""" eq: AttributeTypeEnum - """ - The value included in. - """ + """The value included in.""" oneOf: [AttributeTypeEnum!] } -input MeasurementUnitsEnumFilterInput { - """ - The value equal to. - """ +input MeasurementUnitsEnumFilterInput @doc(category: "Attributes") { + """The value equal to.""" eq: MeasurementUnitsEnum - """ - The value included in. - """ + """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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -7498,7 +6149,7 @@ type Category implements Node & ObjectWithMetadata { """ Description of the category. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString @@ -7508,35 +6159,26 @@ type Category implements Node & ObjectWithMetadata { """ Description of the category. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - """ - List of ancestors of the category. - """ + """List of ancestors of the category.""" ancestors( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 @@ -7547,210 +6189,168 @@ type Category implements Node & ObjectWithMetadata { products( """ Filtering options for products. - + Added in Saleor 3.10. """ filter: ProductFilterInput """ Sort products. - + Added in Saleor 3.10. """ sortBy: ProductOrder - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 - """ - List of children of the category. - """ + """List of children of the category.""" children( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Returns translated category fields for the given language code.""" translation( - """ - A language code to return the translation for category. - """ + """A language code to return the translation for category.""" languageCode: LanguageCodeEnum! ): CategoryTranslation } -type CategoryCountableConnection { - """ - Pagination data for this connection. - """ +type CategoryCountableConnection @doc(category: "Products") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [CategoryCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type CategoryCountableEdge { - """ - The item at the end of the edge. - """ +type CategoryCountableEdge @doc(category: "Products") { + """The item at the end of the edge.""" node: Category! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input ProductFilterInput { +input ProductFilterInput @doc(category: "Products") { isPublished: Boolean collections: [ID!] categories: [ID!] hasCategory: Boolean attributes: [AttributeInput!] - """ - Filter by variants having specific stock status. - """ + """Filter by variants having specific stock status.""" stockAvailability: StockAvailability stocks: ProductStockFilterInput search: String metadata: [MetadataFilter!] """ - Filter by the publication date. - + Filter by the publication date. + Added in Saleor 3.8. """ publishedFrom: DateTime """ - Filter by availability for purchase. - + Filter by availability for purchase. + Added in Saleor 3.8. """ isAvailable: Boolean """ - Filter by the date of availability for purchase. - + Filter by the date of availability for purchase. + Added in Saleor 3.8. """ availableFrom: DateTime """ - Filter by visibility in product listings. - + Filter by visibility in product listings. + Added in Saleor 3.8. """ isVisibleInListing: Boolean price: PriceRangeInput - """ - Filter by the lowest variant price after discounts. - """ + """Filter by the lowest variant price after discounts.""" minimalPrice: PriceRangeInput - """ - Filter by when was the most recent update. - """ + """Filter by when was the most recent update.""" updatedAt: DateTimeRangeInput productTypes: [ID!] - """ - Filter on whether product is a gift card or not. - """ + """Filter on whether product is a gift card or not.""" giftCard: Boolean ids: [ID!] hasPreorderedVariants: Boolean slugs: [String!] """ - Specifies the channel by which the data should be filtered. - + Specifies the channel by which the data should be filtered. + DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. """ channel: String } -input AttributeInput { - """ - Internal representation of an attribute name. - """ +input AttributeInput @doc(category: "Attributes") { + """Internal representation of an attribute name.""" slug: String! - """ - Internal representation of a value (unique per attribute). - """ + """Internal representation of a value (unique per attribute).""" values: [String!] - """ - The range that the returned values should be in. - """ + """The range that the returned values should be in.""" valuesRange: IntRangeInput - """ - The date/time range that the returned values should be in. - """ + """The date/time range that the returned values should be in.""" dateTime: DateTimeRangeInput """ @@ -7758,79 +6358,59 @@ input AttributeInput { """ date: DateRangeInput - """ - The boolean value of the attribute. - """ + """The boolean value of the attribute.""" boolean: Boolean } input IntRangeInput { - """ - Value greater than or equal to. - """ + """Value greater than or equal to.""" gte: Int - """ - Value less than or equal to. - """ + """Value less than or equal to.""" lte: Int } input DateTimeRangeInput { - """ - Start date. - """ + """Start date.""" gte: DateTime - """ - End date. - """ + """End date.""" lte: DateTime } input DateRangeInput { - """ - Start date. - """ + """Start date.""" gte: Date - """ - End date. - """ + """End date.""" 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 } input PriceRangeInput { - """ - Price greater than or equal to. - """ + """Price greater than or equal to.""" gte: Float - """ - Price less than or equal to. - """ + """Price less than or equal to.""" lte: Float } -input ProductOrder { - """ - Specifies the direction in which to sort products. - """ +input ProductOrder @doc(category: "Products") { + """Specifies the direction in which to sort products.""" direction: OrderDirection! """ Specifies the channel in which to sort the data. - + DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. """ channel: String @@ -7841,16 +6421,12 @@ input ProductOrder { """ attributeId: ID - """ - Sort products by the selected field. - """ + """Sort products by the selected field.""" field: ProductOrderField } -enum ProductOrderField { - """ - Sort products by name. - """ +enum ProductOrderField @doc(category: "Products") { + """Sort products by name.""" NAME """ @@ -7860,107 +6436,89 @@ enum ProductOrderField { """ Sort products by price. - + This option requires a channel filter to work as the values can vary between channels. """ PRICE """ Sort products by a minimal price of a product's variant. - + This option requires a channel filter to work as the values can vary between channels. """ MINIMAL_PRICE - """ - Sort products by update date. - """ + """Sort products by update date.""" LAST_MODIFIED - """ - Sort products by update date. - """ + """Sort products by update date.""" DATE - """ - Sort products by type. - """ + """Sort products by type.""" TYPE """ Sort products by publication status. - + This option requires a channel filter to work as the values can vary between channels. """ PUBLISHED """ Sort products by publication date. - + This option requires a channel filter to work as the values can vary between channels. """ PUBLICATION_DATE """ Sort products by publication date. - + This option requires a channel filter to work as the values can vary between channels. """ PUBLISHED_AT - """ - Sort products by update date. - """ + """Sort products by update date.""" LAST_MODIFIED_AT """ Sort products by collection. Note: This option is available only for the `Collection.products` query. - + This option requires a channel filter to work as the values can vary between channels. """ COLLECTION - """ - Sort products by rating. - """ + """Sort products by rating.""" RATING """ Sort products by creation date. - + Added in Saleor 3.8. """ CREATED_AT } -""" -Represents an image. -""" +"""Represents an image.""" type Image { - """ - The URL of the image. - """ + """The URL of the image.""" url: String! - """ - Alt text for an image. - """ + """Alt text for an image.""" alt: String } -""" -An enumeration. -""" +"""An enumeration.""" enum ThumbnailFormatEnum { + ORIGINAL + AVIF WEBP } -type CategoryTranslation implements Node { +type CategoryTranslation implements Node @doc(category: "Products") { id: ID! - """ - Translation language. - """ + """Translation language.""" language: LanguageDisplay! seoTitle: String seoDescription: String @@ -7968,74 +6526,65 @@ type CategoryTranslation implements Node { """ Translated description of the category. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString """ Translated description of the category. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") } -""" -Represents a version of a product such as different size or color. -""" -type ProductVariant implements Node & ObjectWithMetadata { +"""Represents a version of a product such as different size or color.""" +type ProductVariant implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -8053,7 +6602,7 @@ type ProductVariant implements Node & ObjectWithMetadata { """ List of price information in channels for the product. - + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ channelListings: [ProductVariantChannelListing!] @@ -8068,66 +6617,51 @@ type ProductVariant implements Node & ObjectWithMetadata { address: AddressInput ): VariantPricingInfo - """ - List of attributes assigned to this variant. - """ + """List of attributes assigned to this variant.""" attributes( - """ - Define scope of returned attributes. - """ + """Define scope of returned attributes.""" variantSelection: VariantAttributeScope ): [SelectedAttribute!]! - """ - Gross margin percentage value. - """ + """Gross margin percentage value.""" margin: Int """ Total quantity ordered. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ quantityOrdered: Int """ Total revenue generated by a variant in given period of time. Note: this field should be queried using `reportProductSales` query as it uses optimizations suitable for such calculations. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ revenue(period: ReportingPeriod): TaxedMoney - """ - List of images for the product variant. - """ - images: [ProductImage!] - @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `media` field instead.") + """List of images for the product variant.""" + images: [ProductImage!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `media` field instead.") - """ - List of media for the product variant. - """ + """List of media for the product variant.""" media: [ProductMedia!] - """ - Returns translated product variant fields for the given language code. - """ + """Returns translated product variant fields for the given language code.""" translation( - """ - A language code to return the translation for product variant. - """ + """A language code to return the translation for product variant.""" languageCode: LanguageCodeEnum! ): ProductVariantTranslation """ Digital content for the product variant. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ digitalContent: DigitalContent """ Stocks for the product variant. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. """ stocks( @@ -8137,8 +6671,8 @@ type ProductVariant implements Node & ObjectWithMetadata { address: AddressInput """ - Two-letter ISO 3166-1 country code. - + Two-letter ISO 3166-1 country code. + DEPRECATED: this field will be removed in Saleor 4.0. Use `address` argument instead. """ countryCode: CountryCode @@ -8154,8 +6688,8 @@ type ProductVariant implements Node & ObjectWithMetadata { address: AddressInput """ - Two-letter ISO 3166-1 country code. When provided, the exact quantity from a warehouse operating in shipping zones that contain this country will be returned. Otherwise, it will return the maximum quantity from all shipping zones. - + Two-letter ISO 3166-1 country code. When provided, the exact quantity from a warehouse operating in shipping zones that contain this country will be returned. Otherwise, it will return the maximum quantity from all shipping zones. + DEPRECATED: this field will be removed in Saleor 4.0. Use `address` argument instead. """ countryCode: CountryCode @@ -8163,100 +6697,72 @@ 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! updatedAt: DateTime! """ - External ID of this product. - + External ID of this product. + Added in Saleor 3.10. """ externalReference: String } -""" -Represents product varaint channel listing. -""" -type ProductVariantChannelListing implements Node { +"""Represents product varaint channel listing.""" +type ProductVariantChannelListing implements Node @doc(category: "Products") { id: ID! channel: Channel! price: Money - """ - Cost price of the variant. - """ + """Cost price of the variant.""" costPrice: Money """ Gross margin percentage value. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ margin: Int """ 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 { - """ - Preorder threshold for product variant in this channel. - """ +"""Represents preorder variant data for channel.""" +type PreorderThreshold @doc(category: "Products") { + """Preorder threshold for product variant in this channel.""" quantity: Int - """ - Number of sold product variant in this channel. - """ + """Number of sold product variant in this channel.""" soldUnits: Int! } -""" -Represents availability of a variant in the storefront. -""" -type VariantPricingInfo { - """ - Whether it is in sale or not. - """ +"""Represents availability of a variant in the storefront.""" +type VariantPricingInfo @doc(category: "Products") { + """Whether it is in sale or not.""" onSale: Boolean - """ - The discount amount if in sale (null otherwise). - """ + """The discount amount if in sale (null otherwise).""" discount: TaxedMoney - """ - The discount amount in the local currency. - """ + """The discount amount in the local currency.""" discountLocalCurrency: TaxedMoney - """ - The price, with any discount subtracted. - """ + """The price, with any discount subtracted.""" price: TaxedMoney - """ - The price without any discount. - """ + """The price without any discount.""" priceUndiscounted: TaxedMoney - """ - The discounted price in the local currency. - """ + """The discounted price in the local currency.""" priceLocalCurrency: TaxedMoney } @@ -8264,96 +6770,60 @@ type VariantPricingInfo { Represents a monetary value with taxes. In cases where taxes were not applied, net and gross values will be equal. """ type TaxedMoney { - """ - Currency code. - """ + """Currency code.""" currency: String! - """ - Amount of money including taxes. - """ + """Amount of money including taxes.""" gross: Money! - """ - Amount of money without taxes. - """ + """Amount of money without taxes.""" net: Money! - """ - Amount of taxes. - """ + """Amount of taxes.""" tax: Money! } input AddressInput { - """ - Given name. - """ + """Given name.""" firstName: String - """ - Family name. - """ + """Family name.""" lastName: String - """ - Company or organization. - """ + """Company or organization.""" companyName: String - """ - Address. - """ + """Address.""" streetAddress1: String - """ - Address. - """ + """Address.""" streetAddress2: String - """ - City. - """ + """City.""" city: String - """ - District. - """ + """District.""" cityArea: String - """ - Postal code. - """ + """Postal code.""" postalCode: String - """ - Country. - """ + """Country.""" country: CountryCode - """ - State or province. - """ + """State or province.""" countryArea: String - """ - Phone number. - """ + """Phone number.""" phone: String } -""" -Represents a custom attribute. -""" -type SelectedAttribute { - """ - Name of an attribute displayed in the interface. - """ +"""Represents a custom attribute.""" +type SelectedAttribute @doc(category: "Attributes") { + """Name of an attribute displayed in the interface.""" attribute: Attribute! - """ - Values of an attribute. - """ + """Values of an attribute.""" values: [AttributeValue!]! } @@ -8362,18 +6832,12 @@ enum ReportingPeriod { THIS_MONTH } -""" -Represents a product image. -""" -type ProductImage { - """ - The ID of the image. - """ +"""Represents a product image.""" +type ProductImage @doc(category: "Products") { + """The ID of the image.""" id: ID! - """ - The alt text of the image. - """ + """The alt text of the image.""" alt: String """ @@ -8382,114 +6846,165 @@ 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 { - id: ID! - sortOrder: Int - alt: String! - type: ProductMediaType! - oembedData: JSONString! - url( - """ - Size of the image. If not provided, the original image will be returned. - """ - 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. - - Added in Saleor 3.6. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - """ - format: ThumbnailFormatEnum - ): String! -} - -""" -An enumeration. -""" -enum ProductMediaType { - IMAGE - VIDEO -} - -type ProductVariantTranslation implements Node { - id: ID! - - """ - Translation language. - """ - language: LanguageDisplay! - name: String! -} - -type DigitalContent implements Node & ObjectWithMetadata { +"""Represents a product media.""" +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.3. - + + 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.3. - + + 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.3. - + + 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( + """ + 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.6. + """ + format: ThumbnailFormatEnum = ORIGINAL + ): String! + + """ + Product id the media refers to. + + Added in Saleor 3.12. + """ + productId: ID +} + +"""An enumeration.""" +enum ProductMediaType @doc(category: "Products") { + IMAGE + VIDEO +} + +type ProductVariantTranslation implements Node @doc(category: "Products") { + id: ID! + + """Translation language.""" + language: LanguageDisplay! + name: String! +} + +type DigitalContent implements Node & ObjectWithMetadata @doc(category: "Products") { + id: ID! + + """List of private metadata items. Requires staff permissions to access.""" + privateMetadata: [MetadataItem!]! + + """ + A single key from private metadata. Requires staff permissions to access. + + Tip: Use GraphQL aliases to fetch multiple keys. + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetafield(key: String!): String + """ + Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + privateMetafields(keys: [String!]): Metadata + + """List of public metadata items. Can be accessed without permissions.""" + metadata: [MetadataItem!]! + + """ + A single key from public metadata. + + Tip: Use GraphQL aliases to fetch multiple keys. + + Added in Saleor 3.3. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + metafield(key: String!): String + + """ + Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. + + Added in Saleor 3.3. + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -8499,117 +7014,91 @@ type DigitalContent implements Node & ObjectWithMetadata { maxDownloads: Int urlValidDays: Int - """ - List of URLs for the digital variant. - """ + """List of URLs for the digital variant.""" urls: [DigitalContentUrl!] - """ - Product variant assigned to digital content. - """ + """Product variant assigned to digital content.""" productVariant: ProductVariant! } -type DigitalContentUrl implements Node { +type DigitalContentUrl implements Node @doc(category: "Products") { id: ID! content: DigitalContent! created: DateTime! downloadNum: Int! - """ - URL for digital content. - """ + """URL for digital content.""" url: String - """ - UUID of digital content. - """ + """UUID of digital content.""" token: UUID! } scalar UUID -""" -Represents stock. -""" -type Stock implements Node { +"""Represents stock.""" +type Stock implements Node @doc(category: "Products") { id: ID! warehouse: Warehouse! productVariant: ProductVariant! """ Quantity of a product in the warehouse's possession, including the allocated stock that is waiting for shipment. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. """ quantity: Int! """ Quantity allocated for orders. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. """ quantityAllocated: Int! """ Quantity reserved for checkouts. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. """ quantityReserved: Int! } -""" -Represents preorder settings for product variant. -""" -type PreorderData { +"""Represents preorder settings for product variant.""" +type PreorderData @doc(category: "Products") { """ The global preorder threshold for product variant. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ globalThreshold: Int """ Total number of sold product variant during preorder. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ globalSoldUnits: Int! - """ - Preorder end date. - """ + """Preorder end date.""" endDate: DateTime } -""" -Represents availability of a product in the storefront. -""" -type ProductPricingInfo { - """ - Whether it is in sale or not. - """ +"""Represents availability of a product in the storefront.""" +type ProductPricingInfo @doc(category: "Products") { + """Whether it is in sale or not.""" onSale: Boolean - """ - The discount amount if in sale (null otherwise). - """ + """The discount amount if in sale (null otherwise).""" discount: TaxedMoney - """ - The discount amount in the local currency. - """ + """The discount amount in the local currency.""" discountLocalCurrency: TaxedMoney - """ - The discounted price range of the product variants. - """ + """The discounted price range of the product variants.""" priceRange: TaxedMoneyRange - """ - The undiscounted price range of the product variants. - """ + """The undiscounted price range of the product variants.""" priceRangeUndiscounted: TaxedMoneyRange """ @@ -8619,82 +7108,62 @@ 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! } -""" -Represents a range of monetary values. -""" +"""Represents a range of monetary values.""" type TaxedMoneyRange { - """ - Lower bound of a price range. - """ + """Lower bound of a price range.""" start: TaxedMoney - """ - Upper bound of a price range. - """ + """Upper bound of a price range.""" stop: TaxedMoney } -""" -Represents product channel listing. -""" -type ProductChannelListing implements Node { +"""Represents product channel listing.""" +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." - ) + publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.") """ The product publication date time. - + Added in Saleor 3.3. """ publishedAt: DateTime isPublished: Boolean! channel: Channel! visibleInListings: Boolean! - availableForPurchase: Date - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `availableForPurchaseAt` field to fetch the available for purchase date." - ) + availableForPurchase: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `availableForPurchaseAt` field to fetch the available for purchase date.") """ The product available for purchase date time. - + Added in Saleor 3.3. """ availableForPurchaseAt: DateTime - """ - The price of the cheapest variant (including discounts). - """ + """The price of the cheapest variant (including discounts).""" discountedPrice: Money """ Purchase cost of product. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ purchaseCost: MoneyRange """ Range of margin percentage value. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ margin: Margin - """ - Whether the product is available for purchase. - """ + """Whether the product is available for purchase.""" isAvailableForPurchase: Boolean """ @@ -8708,82 +7177,70 @@ 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. - """ + """Sort media by the selected field.""" field: MediaChoicesSortField! } -enum MediaChoicesSortField { - """ - Sort media by ID. - """ +enum MediaChoicesSortField @doc(category: "Products") { + """Sort media by ID.""" ID } -""" -Represents a collection of products. -""" -type Collection implements Node & ObjectWithMetadata { +"""Represents a collection of products.""" +type Collection implements Node & ObjectWithMetadata @doc(category: "Products") { id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -8793,7 +7250,7 @@ type Collection implements Node & ObjectWithMetadata { """ Description of the collection. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString @@ -8806,88 +7263,67 @@ type Collection implements Node & ObjectWithMetadata { """ Description of the collection. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - """ - List of products in this collection. - """ + """List of products in this collection.""" products( - """ - Filtering options for products. - """ + """Filtering options for products.""" filter: ProductFilterInput - """ - Sort products. - """ + """Sort products.""" sortBy: ProductOrder - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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. - """ + """Returns translated collection fields for the given language code.""" translation( - """ - A language code to return the translation for collection. - """ + """A language code to return the translation for collection.""" languageCode: LanguageCodeEnum! ): CollectionTranslation """ List of channels in which the collection is available. - + Requires one of the following permissions: MANAGE_PRODUCTS. """ channelListings: [CollectionChannelListing!] } -type CollectionTranslation implements Node { +type CollectionTranslation implements Node @doc(category: "Products") { id: ID! - """ - Translation language. - """ + """Translation language.""" language: LanguageDisplay! seoTitle: String seoDescription: String @@ -8895,35 +7331,27 @@ type CollectionTranslation implements Node { """ Translated description of the collection. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString """ Translated description of the collection. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") } -""" -Represents collection channel listing. -""" -type CollectionChannelListing implements Node { +"""Represents collection channel listing.""" +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." - ) + publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.") """ The collection publication date. - + Added in Saleor 3.3. """ publishedAt: DateTime @@ -8931,12 +7359,10 @@ type CollectionChannelListing implements Node { channel: Channel! } -type ProductTranslation implements Node { +type ProductTranslation implements Node @doc(category: "Products") { id: ID! - """ - Translation language. - """ + """Translation language.""" language: LanguageDisplay! seoTitle: String seoDescription: String @@ -8944,48 +7370,37 @@ type ProductTranslation implements Node { """ Translated description of the product. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString """ Translated description of the product. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") } -type WarehouseCountableConnection { - """ - Pagination data for this connection. - """ +type WarehouseCountableConnection @doc(category: "Products") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [WarehouseCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type WarehouseCountableEdge { - """ - The item at the end of the edge. - """ +type WarehouseCountableEdge @doc(category: "Products") { + """The item at the end of the edge.""" node: Warehouse! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input WarehouseFilterInput { +input WarehouseFilterInput @doc(category: "Products") { clickAndCollectOption: WarehouseClickAndCollectOptionEnum search: String ids: [ID!] @@ -8994,64 +7409,39 @@ 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. - """ + """Sort warehouses by the selected field.""" field: WarehouseSortField! } -enum WarehouseSortField { - """ - Sort warehouses by name. - """ +enum WarehouseSortField @doc(category: "Products") { + """Sort warehouses by name.""" NAME } type TranslatableItemConnection { - """ - Pagination data for this connection. - """ + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [TranslatableItemEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } type TranslatableItemEdge { - """ - The item at the end of the edge. - """ + """The item at the end of the edge.""" node: TranslatableItem! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -union TranslatableItem = - ProductTranslatableContent - | CollectionTranslatableContent - | CategoryTranslatableContent - | AttributeTranslatableContent - | AttributeValueTranslatableContent - | ProductVariantTranslatableContent - | PageTranslatableContent - | ShippingMethodTranslatableContent - | SaleTranslatableContent - | VoucherTranslatableContent - | MenuItemTranslatableContent +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 @@ -9059,111 +7449,77 @@ type ProductTranslatableContent implements Node { """ Description of the product. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString """ Description of the product. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - """ - Returns translated product fields for the given language code. - """ + """Returns translated product fields for the given language code.""" translation( - """ - A language code to return the translation for product. - """ + """A language code to return the translation for product.""" languageCode: LanguageCodeEnum! ): ProductTranslation - """ - Represents an individual item for sale in the storefront. - """ - product: Product - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + """Represents an individual item for sale in the storefront.""" + product: Product @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") - """ - List of product attribute values that can be translated. - """ + """List of product attribute values that can be translated.""" attributeValues: [AttributeValueTranslatableContent!]! } -type AttributeValueTranslatableContent implements Node { +type AttributeValueTranslatableContent implements Node @doc(category: "Attributes") { id: ID! name: String! """ Attribute value. - + Rich text format. For reference see https://editorjs.io/ """ richText: JSONString - """ - Attribute plain text value. - """ + """Attribute plain text value.""" plainText: String - """ - Returns translated attribute value fields for the given language code. - """ + """Returns translated attribute value fields for the given language code.""" translation( - """ - A language code to return the translation for attribute value. - """ + """A language code to return the translation for attribute value.""" languageCode: LanguageCodeEnum! ): AttributeValueTranslation - """ - Represents a value of an attribute. - """ - attributeValue: AttributeValue - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + """Represents a value of an attribute.""" + attributeValue: AttributeValue @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") """ Associated attribute that can be translated. - + Added in Saleor 3.9. """ attribute: AttributeTranslatableContent } -type AttributeTranslatableContent implements Node { +type AttributeTranslatableContent implements Node @doc(category: "Attributes") { id: ID! name: String! - """ - Returns translated attribute fields for the given language code. - """ + """Returns translated attribute fields for the given language code.""" translation( - """ - A language code to return the translation for attribute. - """ + """A language code to return the translation for attribute.""" languageCode: LanguageCodeEnum! ): AttributeTranslation - """ - Custom attribute of a product. - """ - attribute: Attribute - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + """Custom attribute of a product.""" + 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 @@ -9171,41 +7527,29 @@ type CollectionTranslatableContent implements Node { """ Description of the collection. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString """ Description of the collection. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - """ - Returns translated collection fields for the given language code. - """ + """Returns translated collection fields for the given language code.""" translation( - """ - A language code to return the translation for collection. - """ + """A language code to return the translation for collection.""" languageCode: LanguageCodeEnum! ): CollectionTranslation - """ - Represents a collection of products. - """ - collection: Collection - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + """Represents a collection of products.""" + 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 @@ -9213,69 +7557,46 @@ type CategoryTranslatableContent implements Node { """ Description of the category. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString """ Description of the category. - + Rich text format. For reference see https://editorjs.io/ """ - descriptionJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `description` field instead." - ) + descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") - """ - Returns translated category fields for the given language code. - """ + """Returns translated category fields for the given language code.""" translation( - """ - A language code to return the translation for category. - """ + """A language code to return the translation for category.""" languageCode: LanguageCodeEnum! ): CategoryTranslation - """ - Represents a single category of products. - """ - category: Category - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + """Represents a single category of products.""" + 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! - """ - Returns translated product variant fields for the given language code. - """ + """Returns translated product variant fields for the given language code.""" translation( - """ - A language code to return the translation for product variant. - """ + """A language code to return the translation for product variant.""" languageCode: LanguageCodeEnum! ): ProductVariantTranslation - """ - Represents a version of a product such as different size or color. - """ - productVariant: ProductVariant - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + """Represents a version of a product such as different size or color.""" + productVariant: ProductVariant @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") - """ - List of product variant attribute values that can be translated. - """ + """List of product variant attribute values that can be translated.""" attributeValues: [AttributeValueTranslatableContent!]! } -type PageTranslatableContent implements Node { +type PageTranslatableContent implements Node @doc(category: "Pages") { id: ID! seoTitle: String seoDescription: String @@ -9283,51 +7604,37 @@ type PageTranslatableContent implements Node { """ Content of the page. - + Rich text format. For reference see https://editorjs.io/ """ content: JSONString """ Content of the page. - + Rich text format. For reference see https://editorjs.io/ """ - contentJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `content` field instead." - ) + contentJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.") - """ - Returns translated page fields for the given language code. - """ + """Returns translated page fields for the given language code.""" translation( - """ - A language code to return the translation for page. - """ + """A language code to return the translation for page.""" languageCode: LanguageCodeEnum! ): PageTranslation """ A static page that can be manually added by a shop operator through the dashboard. """ - page: Page - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + page: Page @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") - """ - List of page content attribute values that can be translated. - """ + """List of page content attribute values that can be translated.""" attributeValues: [AttributeValueTranslatableContent!]! } -type PageTranslation implements Node { +type PageTranslation implements Node @doc(category: "Pages") { id: ID! - """ - Translation language. - """ + """Translation language.""" language: LanguageDisplay! seoTitle: String seoDescription: String @@ -9335,74 +7642,67 @@ type PageTranslation implements Node { """ Translated content of the page. - + Rich text format. For reference see https://editorjs.io/ """ content: JSONString """ Translated description of the page. - + Rich text format. For reference see https://editorjs.io/ """ - contentJson: JSONString - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `content` field instead." - ) + contentJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.") } """ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -9412,18 +7712,15 @@ type Page implements Node & ObjectWithMetadata { """ Content of the page. - + Rich text format. For reference see https://editorjs.io/ """ content: JSONString - publicationDate: Date - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date." - ) + publicationDate: Date @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `publishedAt` field to fetch the publication date.") """ The page publication date. - + Added in Saleor 3.3. """ publishedAt: DateTime @@ -9434,194 +7731,159 @@ type Page implements Node & ObjectWithMetadata { """ Content of the page. - + Rich text format. For reference see https://editorjs.io/ """ - contentJson: JSONString! - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `content` field instead." - ) + contentJson: JSONString! @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `content` field instead.") - """ - Returns translated page fields for the given language code. - """ + """Returns translated page fields for the given language code.""" translation( - """ - A language code to return the translation for page. - """ + """A language code to return the translation for page.""" languageCode: LanguageCodeEnum! ): PageTranslation - """ - List of attributes assigned to this product. - """ + """List of attributes assigned to this product.""" attributes: [SelectedAttribute!]! } """ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata name: String! slug: String! - """ - Page attributes of that page type. - """ + """Page attributes of that page type.""" attributes: [Attribute!] """ 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. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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! """ Description of the shipping method. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString - """ - Returns translated shipping method fields for the given language code. - """ + """Returns translated shipping method fields for the given language code.""" translation( - """ - A language code to return the translation for shipping method. - """ + """A language code to return the translation for shipping method.""" languageCode: LanguageCodeEnum! ): ShippingMethodTranslation """ Shipping method are the methods you'll use to get customer's orders to them. They are directly exposed to the customers. - + Requires one of the following permissions: MANAGE_SHIPPING. """ - shippingMethod: ShippingMethodType - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + 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! - """ - Returns translated sale fields for the given language code. - """ + """Returns translated sale fields for the given language code.""" translation( - """ - A language code to return the translation for sale. - """ + """A language code to return the translation for sale.""" languageCode: LanguageCodeEnum! ): SaleTranslation """ Sales allow creating discounts for categories, collections or products and are visible to all the customers. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ - sale: Sale - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + 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. - """ + """Translation language.""" language: LanguageDisplay! name: String } @@ -9629,55 +7891,51 @@ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -9688,238 +7946,185 @@ type Sale implements Node & ObjectWithMetadata { created: DateTime! updatedAt: DateTime! - """ - List of categories this sale applies to. - """ + """List of categories this sale applies to.""" categories( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ List of collections this sale applies to. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ collections( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ List of products this sale applies to. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ products( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ List of product variants this sale applies to. - + Added in Saleor 3.1. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ variants( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 - """ - Returns translated sale fields for the given language code. - """ + """Returns translated sale fields for the given language code.""" translation( - """ - A language code to return the translation for sale. - """ + """A language code to return the translation for sale.""" languageCode: LanguageCodeEnum! ): SaleTranslation """ List of channels available for the sale. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ channelListings: [SaleChannelListing!] - """ - Sale value. - """ + """Sale value.""" discountValue: Float - """ - Currency code for sale. - """ + """Currency code for sale.""" currency: String } -enum SaleType { +enum SaleType @doc(category: "Discounts") { FIXED PERCENTAGE } -type CollectionCountableConnection { - """ - Pagination data for this connection. - """ +type CollectionCountableConnection @doc(category: "Products") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [CollectionCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type CollectionCountableEdge { - """ - The item at the end of the edge. - """ +type CollectionCountableEdge @doc(category: "Products") { + """The item at the end of the edge.""" node: Collection! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -type ProductVariantCountableConnection { - """ - Pagination data for this connection. - """ +type ProductVariantCountableConnection @doc(category: "Products") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ProductVariantCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type ProductVariantCountableEdge { - """ - The item at the end of the edge. - """ +type ProductVariantCountableEdge @doc(category: "Products") { + """The item at the end of the edge.""" node: ProductVariant! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -""" -Represents sale channel listing. -""" -type SaleChannelListing implements Node { +"""Represents sale channel listing.""" +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 - """ - Returns translated voucher fields for the given language code. - """ + """Returns translated voucher fields for the given language code.""" translation( - """ - A language code to return the translation for voucher. - """ + """A language code to return the translation for voucher.""" languageCode: LanguageCodeEnum! ): VoucherTranslation """ Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ - voucher: Voucher - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + 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. - """ + """Translation language.""" language: LanguageDisplay! name: String } @@ -9927,55 +8132,51 @@ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -9990,177 +8191,141 @@ type Voucher implements Node & ObjectWithMetadata { onlyForStaff: Boolean! minCheckoutItemsQuantity: Int - """ - List of categories this voucher applies to. - """ + """List of categories this voucher applies to.""" categories( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ List of collections this voucher applies to. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ collections( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ List of products this voucher applies to. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ products( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ List of product variants this voucher applies to. - + Added in Saleor 3.1. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ variants( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 - """ - List of countries available for the shipping voucher. - """ + """List of countries available for the shipping voucher.""" countries: [CountryDisplay!] - """ - Returns translated voucher fields for the given language code. - """ + """Returns translated voucher fields for the given language code.""" translation( - """ - A language code to return the translation for voucher. - """ + """A language code to return the translation for voucher.""" languageCode: LanguageCodeEnum! ): VoucherTranslation - """ - Determines a type of discount for voucher - value or percentage - """ + """Determines a type of discount for voucher - value or percentage""" discountValueType: DiscountValueTypeEnum! - """ - Voucher value. - """ + """Voucher value.""" discountValue: Float - """ - Currency code for voucher. - """ + """Currency code for voucher.""" currency: String - """ - Minimum order value to apply voucher. - """ + """Minimum order value to apply voucher.""" minSpent: Money - """ - Determines a type of voucher. - """ + """Determines a type of voucher.""" type: VoucherTypeEnum! """ List of availability in channels for the voucher. - + Requires one of the following permissions: MANAGE_DISCOUNTS. """ 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 { +"""Represents voucher channel listing.""" +type VoucherChannelListing implements Node @doc(category: "Discounts") { id: ID! channel: Channel! discountValue: Float! @@ -10168,35 +8333,26 @@ type VoucherChannelListing implements Node { minSpent: Money } -type MenuItemTranslatableContent implements Node { +type MenuItemTranslatableContent implements Node @doc(category: "Menu") { id: ID! name: String! - """ - Returns translated menu item fields for the given language code. - """ + """Returns translated menu item fields for the given language code.""" translation( - """ - A language code to return the translation for menu item. - """ + """A language code to return the translation for menu item.""" languageCode: LanguageCodeEnum! ): MenuItemTranslation """ Represents a single item of the related menu. Can store categories, collection or pages. """ - menuItem: MenuItem - @deprecated( - reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries." - ) + 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. - """ + """Translation language.""" language: LanguageDisplay! name: String! } @@ -10204,55 +8360,51 @@ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -10273,18 +8425,12 @@ type MenuItem implements Node & ObjectWithMetadata { level: Int! children: [MenuItem!] - """ - URL to the menu item. - """ + """URL to the menu item.""" url: String - """ - Returns translated menu item fields for the given language code. - """ + """Returns translated menu item fields for the given language code.""" translation( - """ - A language code to return the translation for menu item. - """ + """A language code to return the translation for menu item.""" languageCode: LanguageCodeEnum! ): MenuItemTranslation } @@ -10292,55 +8438,51 @@ 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -10367,73 +8509,61 @@ 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 { - """ - The ID of the object. - """ +type TaxConfiguration implements Node & ObjectWithMetadata @doc(category: "Taxes") { + """The ID of the object.""" id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata - """ - A channel to which the tax configuration applies to. - """ + """A channel to which the tax configuration applies to.""" channel: Channel! - """ - Determines whether taxes are charged in the given channel. - """ + """Determines whether taxes are charged in the given channel.""" chargeTaxes: Boolean! """ @@ -10446,18 +8576,14 @@ type TaxConfiguration implements Node & ObjectWithMetadata { """ displayGrossPrices: Boolean! - """ - Determines whether prices are entered with the tax included. - """ + """Determines whether prices are entered with the tax included.""" pricesEnteredWithTax: Boolean! - """ - List of country-specific exceptions in tax configuration. - """ + """List of country-specific exceptions in tax configuration.""" countries: [TaxConfigurationPerCountry!]! } -enum TaxCalculationStrategy { +enum TaxCalculationStrategy @doc(category: "Taxes") { FLAT_RATES TAX_APP } @@ -10466,18 +8592,12 @@ 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 { - """ - Country in which this configuration applies. - """ +type TaxConfigurationPerCountry @doc(category: "Taxes") { + """Country in which this configuration applies.""" country: CountryDisplay! - """ - Determines whether taxes are charged in this country. - """ + """Determines whether taxes are charged in this country.""" chargeTaxes: Boolean! """ @@ -10491,81 +8611,59 @@ type TaxConfigurationPerCountry { displayGrossPrices: Boolean! } -type TaxConfigurationCountableConnection { - """ - Pagination data for this connection. - """ +type TaxConfigurationCountableConnection @doc(category: "Taxes") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [TaxConfigurationCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type TaxConfigurationCountableEdge { - """ - The item at the end of the edge. - """ +type TaxConfigurationCountableEdge @doc(category: "Taxes") { + """The item at the end of the edge.""" node: TaxConfiguration! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input TaxConfigurationFilterInput { +input TaxConfigurationFilterInput @doc(category: "Taxes") { metadata: [MetadataFilter!] ids: [ID!] } -type TaxClassCountableConnection { - """ - Pagination data for this connection. - """ +type TaxClassCountableConnection @doc(category: "Taxes") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [TaxClassCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type TaxClassCountableEdge { - """ - The item at the end of the edge. - """ +type TaxClassCountableEdge @doc(category: "Taxes") { + """The item at the end of the edge.""" node: TaxClass! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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. - """ + """Sort tax classes by the selected field.""" field: TaxClassSortField! } -enum TaxClassSortField { - """ - Sort tax classes by name. - """ +enum TaxClassSortField @doc(category: "Taxes") { + """Sort tax classes by name.""" NAME } -input TaxClassFilterInput { +input TaxClassFilterInput @doc(category: "Taxes") { metadata: [MetadataFilter!] ids: [ID!] countries: [CountryCode!] @@ -10575,47 +8673,33 @@ 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 { - """ - A country for which tax class rates are grouped. - """ +type TaxCountryConfiguration @doc(category: "Taxes") { + """A country for which tax class rates are grouped.""" country: CountryDisplay! - """ - List of tax class rates. - """ + """List of tax class rates.""" taxClassCountryRates: [TaxClassCountryRate!]! } -type StockCountableConnection { - """ - Pagination data for this connection. - """ +type StockCountableConnection @doc(category: "Products") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [StockCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type StockCountableEdge { - """ - The item at the end of the edge. - """ +type StockCountableEdge @doc(category: "Products") { + """The item at the end of the edge.""" node: Stock! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input StockFilterInput { +input StockFilterInput @doc(category: "Products") { quantity: Float search: String } @@ -10624,319 +8708,240 @@ input StockFilterInput { Represents a shop resource containing general shop data and configuration. """ type Shop { - """ - List of available payment gateways. - """ + """List of available payment gateways.""" availablePaymentGateways( """ - A currency for which gateways will be returned. - + A currency for which gateways will be returned. + DEPRECATED: this field will be removed in Saleor 4.0. Use `channel` argument instead. """ currency: String - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): [PaymentGateway!]! - """ - List of available external authentications. - """ + """List of available external authentications.""" availableExternalAuthentications: [ExternalAuthentication!]! - """ - Shipping methods that are available for the shop. - """ + """Shipping methods that are available for the shop.""" availableShippingMethods( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String! - """ - Address for which available shipping methods should be returned. - """ + """Address for which available shipping methods should be returned.""" address: AddressInput ): [ShippingMethod!] """ List of all currencies supported by shop's channels. - + Added in Saleor 3.1. - + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ channelCurrencies: [String!]! - """ - List of countries available in the shop. - """ + """List of countries available in the shop.""" countries( """ - A language code to return the translation for. - + A language code to return the translation for. + DEPRECATED: this field will be removed in Saleor 4.0. """ languageCode: LanguageCodeEnum - """ - Filtering options for countries - """ + """Filtering options for countries""" filter: CountryFilterInput ): [CountryDisplay!]! - """ - Shop's default country. - """ + """Shop's default country.""" defaultCountry: CountryDisplay """ Default shop's email sender's name. - + Requires one of the following permissions: MANAGE_SETTINGS. """ defaultMailSenderName: String """ Default shop's email sender's address. - + Requires one of the following permissions: MANAGE_SETTINGS. """ defaultMailSenderAddress: String - """ - Shop's description. - """ + """Shop's description.""" description: String - """ - Shop's domain data. - """ + """Shop's domain data.""" domain: Domain! - """ - List of the shops's supported languages. - """ + """List of the shops's supported languages.""" languages: [LanguageDisplay!]! - """ - Shop's name. - """ + """Shop's name.""" name: String! - """ - List of available permissions. - """ + """List of available permissions.""" permissions: [Permission!]! - """ - List of possible phone prefixes. - """ + """List of possible phone prefixes.""" phonePrefixes: [String!]! - """ - Header text. - """ + """Header text.""" headerText: String """ Automatically approve all new fulfillments. - + Added in Saleor 3.1. """ fulfillmentAutoApprove: Boolean! """ Allow to approve fulfillments which are unpaid. - + Added in Saleor 3.1. """ fulfillmentAllowUnpaid: Boolean! - """ - Enable inventory tracking. - """ + """Enable inventory tracking.""" trackInventoryByDefault: Boolean - """ - Default weight unit. - """ + """Default weight unit.""" defaultWeightUnit: WeightUnitsEnum - """ - Returns translated shop fields for the given language code. - """ + """Returns translated shop fields for the given language code.""" translation( - """ - A language code to return the translation for shop. - """ + """A language code to return the translation for shop.""" languageCode: LanguageCodeEnum! ): ShopTranslation """ Enable automatic fulfillment for all digital products. - + Requires one of the following permissions: MANAGE_SETTINGS. """ automaticFulfillmentDigitalProducts: Boolean """ Default number of minutes stock will be reserved for anonymous checkout or null when stock reservation is disabled. - + Added in Saleor 3.1. - + Requires one of the following permissions: MANAGE_SETTINGS. """ reserveStockDurationAnonymousUser: Int """ Default number of minutes stock will be reserved for authenticated checkout or null when stock reservation is disabled. - + Added in Saleor 3.1. - + Requires one of the following permissions: MANAGE_SETTINGS. """ reserveStockDurationAuthenticatedUser: Int """ Default number of maximum line quantity in single checkout (per single checkout line). - + 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 """ Default number of max downloads per digital content URL. - + Requires one of the following permissions: MANAGE_SETTINGS. """ defaultDigitalMaxDownloads: Int """ Default number of days which digital content URL will be valid. - + Requires one of the following permissions: MANAGE_SETTINGS. """ defaultDigitalUrlValidDays: Int - """ - Company address. - """ + """Company address.""" companyAddress: Address - """ - URL of a view where customers can set their password. - """ + """URL of a view where customers can set their password.""" customerSetPasswordUrl: String """ List of staff notification recipients. - + Requires one of the following permissions: MANAGE_SETTINGS. """ staffNotificationRecipients: [StaffNotificationRecipient!] """ Resource limitations and current usage if any set for a shop - + Requires one of the following permissions: AUTHENTICATED_STAFF_USER. """ limits: LimitInfo! """ Saleor API version. - + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ version: String! """ Minor Saleor API version. - + Added in Saleor 3.5. """ schemaVersion: String! - """ - Include taxes in prices. - """ - includeTaxesInPrices: Boolean! - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration.pricesEnteredWithTax` to determine whether prices are entered with tax." - ) + """Include taxes in prices.""" + includeTaxesInPrices: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration.pricesEnteredWithTax` to determine whether prices are entered with tax.") - """ - Display prices with tax in store. - """ - displayGrossPrices: Boolean! - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to determine whether to display gross or net prices." - ) + """Display prices with tax in store.""" + displayGrossPrices: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to determine whether to display gross or net prices.") - """ - Charge taxes on shipping. - """ - chargeTaxesOnShipping: Boolean! - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use `ShippingMethodType.taxClass` to determine whether taxes are calculated for shipping methods; if a tax class is set, the taxes will be calculated, otherwise no tax rate will be applied." - ) + """Charge taxes on shipping.""" + chargeTaxesOnShipping: Boolean! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `ShippingMethodType.taxClass` to determine whether taxes are calculated for shipping methods; if a tax class is set, the taxes will be calculated, otherwise no tax rate will be applied.") } """ Available payment gateway backend with configuration necessary to setup client. """ -type PaymentGateway { - """ - Payment gateway name. - """ +type PaymentGateway @doc(category: "Payments") { + """Payment gateway name.""" name: String! - """ - Payment gateway ID. - """ + """Payment gateway ID.""" id: ID! - """ - Payment gateway client configuration. - """ + """Payment gateway client configuration.""" config: [GatewayConfigLine!]! - """ - Payment gateway supported currencies. - """ + """Payment gateway supported currencies.""" currencies: [String!]! } -""" -Payment gateway client configuration key and value pair. -""" -type GatewayConfigLine { - """ - Gateway config key. - """ +"""Payment gateway client configuration key and value pair.""" +type GatewayConfigLine @doc(category: "Payments") { + """Gateway config key.""" field: String! - """ - Gateway config value for key. - """ + """Gateway config value for key.""" value: String } -type ExternalAuthentication { - """ - ID of external authentication plugin. - """ +type ExternalAuthentication @doc(category: "Authentication") { + """ID of external authentication plugin.""" id: String! - """ - Name of external authentication plugin. - """ + """Name of external authentication plugin.""" name: String } @@ -10947,32 +8952,22 @@ input CountryFilterInput { attachedToShippingZones: Boolean } -""" -Represents shop's domain. -""" +"""Represents shop's domain.""" type Domain { - """ - The host name of the domain. - """ + """The host name of the domain.""" host: String! - """ - Inform if SSL is enabled. - """ + """Inform if SSL is enabled.""" sslEnabled: Boolean! - """ - Shop's absolute URL. - """ + """Shop's absolute URL.""" url: String! } -type ShopTranslation implements Node { +type ShopTranslation implements Node @doc(category: "Shop") { id: ID! - """ - Translation language. - """ + """Translation language.""" language: LanguageDisplay! headerText: String! description: String! @@ -10984,74 +8979,62 @@ Represents a recipient of email notifications send by Saleor, such as notificati type StaffNotificationRecipient implements Node { id: ID! - """ - Returns a user subscribed to email notifications. - """ + """Returns a user subscribed to email notifications.""" user: User - """ - Returns email address of a user subscribed to email notifications. - """ + """Returns email address of a user subscribed to email notifications.""" email: String - """ - Determines if a notification active. - """ + """Determines if a notification active.""" active: Boolean } -""" -Represents user data. -""" -type User implements Node & ObjectWithMetadata { +"""Represents user data.""" +type User implements Node & ObjectWithMetadata @doc(category: "Users") { id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -11061,100 +9044,72 @@ type User implements Node & ObjectWithMetadata { isStaff: Boolean! isActive: Boolean! - """ - List of all user's addresses. - """ + """List of all user's addresses.""" addresses: [Address!]! - """ - Returns the last open checkout of this user. - """ - checkout: Checkout - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `checkoutTokens` field to fetch the user checkouts." - ) + """Returns the last open checkout of this user.""" + checkout: Checkout @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `checkoutTokens` field to fetch the user checkouts.") - """ - Returns the checkout UUID's assigned to this user. - """ + """Returns the checkout UUID's assigned to this user.""" checkoutTokens( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - ): [UUID!] - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutIds` instead.") + ): [UUID!] @deprecated(reason: "This field will be removed in Saleor 4.0. Use `checkoutIds` instead.") - """ - Returns the checkout ID's assigned to this user. - """ + """Returns the checkout ID's assigned to this user.""" checkoutIds( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): [ID!] """ Returns checkouts assigned to this user. - + Added in Saleor 3.8. """ checkouts( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 - """ - List of the user gift cards. - """ + """List of the user gift cards.""" giftCards( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 """ A note about the customer. - + Requires one of the following permissions: MANAGE_USERS, MANAGE_STAFF. """ note: String @@ -11163,84 +9118,66 @@ type User implements Node & ObjectWithMetadata { List of user's orders. Requires one of the following permissions: MANAGE_STAFF, OWNER. """ orders( - """ - Return the elements in the list that come before the specified cursor. - """ + """Return the elements in the list that come before the specified cursor.""" before: String - """ - Return the elements in the list that come after the specified cursor. - """ + """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 - """ - List of user's permissions. - """ + """List of user's permissions.""" userPermissions: [UserPermission!] - """ - List of user's permission groups. - """ + """List of user's permission groups.""" permissionGroups: [Group!] - """ - List of user's permission groups which user can manage. - """ + """List of user's permission groups which user can manage.""" editableGroups: [Group!] 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 """ List of events associated with the user. - + Requires one of the following permissions: MANAGE_USERS, MANAGE_STAFF. """ events: [CustomerEvent!] - """ - List of stored payment sources. - """ + """List of stored payment sources.""" storedPaymentSources( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): [PaymentSource!] - """ - User language code. - """ + """User language code.""" languageCode: LanguageCodeEnum! defaultShippingAddress: Address defaultBillingAddress: Address """ - External ID of this user. - + External ID of this user. + Added in Saleor 3.10. """ externalReference: String @@ -11249,63 +9186,64 @@ type User implements Node & ObjectWithMetadata { updatedAt: DateTime! } -""" -Checkout object. -""" -type Checkout implements Node & ObjectWithMetadata { +"""Checkout object.""" +type Checkout 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.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata 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 @@ -11316,54 +9254,37 @@ type Checkout implements Node & ObjectWithMetadata { translatedDiscountName: String voucherCode: String - """ - Shipping methods that can be used with this checkout. - """ - availableShippingMethods: [ShippingMethod!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `shippingMethods` instead.") + """Shipping methods that can be used with this checkout.""" + availableShippingMethods: [ShippingMethod!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `shippingMethods` instead.") - """ - Shipping methods that can be used with this checkout. - """ + """Shipping methods that can be used with this checkout.""" shippingMethods: [ShippingMethod!]! """ 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!]! - """ - List of available payment gateways. - """ + """List of available payment gateways.""" availablePaymentGateways: [PaymentGateway!]! - """ - Email of a customer. - """ + """Email of a customer.""" email: String - """ - List of gift cards associated with this checkout. - """ + """List of gift cards associated with this checkout.""" giftCards: [GiftCard!]! - """ - Returns True, if checkout requires shipping. - """ + """Returns True, if checkout requires shipping.""" isShippingRequired: Boolean! - """ - The number of items purchased. - """ + """The number of items purchased.""" quantity: Int! """ Date when oldest stock reservation for this checkout expires or null if no stock is reserved. - + Added in Saleor 3.1. """ stockReservationExpires: DateTime @@ -11373,43 +9294,30 @@ type Checkout implements Node & ObjectWithMetadata { """ lines: [CheckoutLine!]! - """ - The price of the shipping, with all the taxes included. - """ + """The price of the shipping, with all the taxes included.""" shippingPrice: TaxedMoney! - """ - The shipping method related with checkout. - """ - shippingMethod: ShippingMethod - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead.") + """The shipping method related with checkout.""" + shippingMethod: ShippingMethod @deprecated(reason: "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead.") """ 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 - """ - The price of the checkout before shipping, with taxes included. - """ + """The price of the checkout before shipping, with taxes included.""" subtotalPrice: TaxedMoney! """ 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! - """ - The checkout's token. - """ + """The checkout's token.""" token: UUID! """ @@ -11418,93 +9326,108 @@ type Checkout implements Node & ObjectWithMetadata { totalPrice: TaxedMoney! """ - Checkout language code. + 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! """ List of transactions for the checkout. Requires one of the following permissions: MANAGE_CHECKOUTS, 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!] """ 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! + + """ + 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. + """ + 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. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata - """ - Code in format which allows displaying in a user interface. - """ + """Code in format which allows displaying in a user interface.""" displayCode: String! - """ - Last 4 characters of gift card code. - """ + """Last 4 characters of gift card code.""" last4CodeChars: String! """ @@ -11515,39 +9438,31 @@ 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 """ 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 """ 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 """ 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 lastUsedOn: DateTime @@ -11555,78 +9470,58 @@ type GiftCard implements Node & ObjectWithMetadata { """ App which created 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. - + Requires one of the following permissions: MANAGE_APPS, OWNER. """ app: App """ 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 """ List of events associated with 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. - + Requires one of the following permissions: MANAGE_GIFT_CARD. """ events( - """ - Filtering options for gift card events. - """ + """Filtering options for gift card events.""" filter: GiftCardEventFilterInput ): [GiftCardEvent!]! """ 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. - + Requires one of the following permissions: MANAGE_GIFT_CARD. """ tags: [GiftCardTag!]! """ 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! initialBalance: Money! currentBalance: Money! - """ - The customer who bought a gift card. - """ - user: User - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `createdBy` field instead.") + """The customer who bought a gift card.""" + user: User @deprecated(reason: "This field will be removed in Saleor 4.0. Use `createdBy` field instead.") - """ - End date of gift card. - """ - endDate: DateTime - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `expiryDate` field instead.") + """End date of gift card.""" + endDate: DateTime @deprecated(reason: "This field will be removed in Saleor 4.0. Use `expiryDate` field instead.") - """ - Start date of gift card. - """ + """Start date of gift card.""" startDate: DateTime @deprecated(reason: "This field will be removed in Saleor 4.0.") } @@ -11634,20 +9529,14 @@ 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. - """ + """Date when event happened at in ISO 8601 format.""" date: DateTime - """ - Gift card event type. - """ + """Gift card event type.""" type: GiftCardEventsEnum """ @@ -11660,56 +9549,36 @@ type GiftCardEvent implements Node { """ app: App - """ - Content of the event. - """ + """Content of the event.""" message: String - """ - Email of the customer. - """ + """Email of the customer.""" email: String - """ - The order ID where gift card was used or bought. - """ + """The order ID where gift card was used or bought.""" orderId: ID - """ - User-friendly number of an order where gift card was used or bought. - """ + """User-friendly number of an order where gift card was used or bought.""" orderNumber: String - """ - The list of gift card tags. - """ + """The list of gift card tags.""" tags: [String!] - """ - The list of old gift card tags. - """ + """The list of old gift card tags.""" oldTags: [String!] - """ - The gift card balance. - """ + """The gift card balance.""" balance: GiftCardEventBalance - """ - The gift card expiry date. - """ + """The gift card expiry date.""" expiryDate: Date - """ - Previous gift card expiry date. - """ + """Previous gift card expiry date.""" oldExpiryDate: Date } -""" -An enumeration. -""" -enum GiftCardEventsEnum { +"""An enumeration.""" +enum GiftCardEventsEnum @doc(category: "Gift cards") { ISSUED BOUGHT UPDATED @@ -11724,29 +9593,21 @@ enum GiftCardEventsEnum { USED_IN_ORDER } -type GiftCardEventBalance { - """ - Initial balance of the gift card. - """ +type GiftCardEventBalance @doc(category: "Gift cards") { + """Initial balance of the gift card.""" initialBalance: Money - """ - Current balance of the gift card. - """ + """Current balance of the gift card.""" currentBalance: Money! - """ - Previous initial balance of the gift card. - """ + """Previous initial balance of the gift card.""" oldInitialBalance: Money - """ - Previous current balance of the gift card. - """ + """Previous current balance of the gift card.""" oldCurrentBalance: Money } -input GiftCardEventFilterInput { +input GiftCardEventFilterInput @doc(category: "Gift cards") { type: GiftCardEventsEnum orders: [ID!] } @@ -11755,103 +9616,89 @@ 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 { +"""Represents an item in the checkout.""" +type CheckoutLine implements Node & ObjectWithMetadata @doc(category: "Checkout") { id: ID! """ 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!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.5. - + 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.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. - + Added in Saleor 3.5. - + 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.5. - + 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.5. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata variant: ProductVariant! quantity: Int! - """ - The unit price of the checkout line, with taxes and discounts. - """ + """The unit price of the checkout line, with taxes and discounts.""" unitPrice: TaxedMoney! - """ - The unit price of the checkout line, without discounts. - """ + """The unit price of the checkout line, without discounts.""" undiscountedUnitPrice: Money! - """ - The sum of the checkout line price, taxes and discounts. - """ + """The sum of the checkout line price, taxes and discounts.""" totalPrice: TaxedMoney! - """ - The sum of the checkout line price, without discounts. - """ + """The sum of the checkout line price, without discounts.""" undiscountedTotalPrice: Money! - """ - Indicates whether the item need to be delivered. - """ + """Indicates whether the item need to be delivered.""" requiresShipping: Boolean! } @@ -11859,8 +9706,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 @@ -11871,58 +9716,52 @@ 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 { - """ - The ID of the object. - """ +type TransactionItem implements Node & ObjectWithMetadata @doc(category: "Payments") { + """The ID of the object.""" id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -11934,52 +9773,106 @@ type TransactionItem implements Node & ObjectWithMetadata { """ actions: [TransactionActionEnum!]! - """ - Total amount authorized for this payment. - """ + """Total amount authorized for this payment.""" authorizedAmount: Money! """ - Total amount refunded for this payment. + 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 voided for this payment. + Total amount of ongoing refund requests for the transaction. + + Added in Saleor 3.13. """ - voidedAmount: Money! + refundPendingAmount: Money! + + """Total amount voided for this payment.""" + voidedAmount: Money! @deprecated(reason: "This field will be removed in Saleor 3.14 (Preview Feature).Use `canceledAmount` instead.") """ - Total amount charged for this payment. + 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! """ - Status of transaction. + Total amount of ongoing charge requests for the transaction. + + Added in Saleor 3.13. """ - status: String! + chargePendingAmount: Money! + + """Status of transaction.""" + status: String! @deprecated(reason: "This field will be removed in Saleor 3.14 (Preview Feature). The `status` is not needed. The amounts can be used to define the current status of transactions.") + + """Type of transaction.""" + type: String! @deprecated(reason: "This field will be removed in Saleor 3.14 (Preview Feature). Use `name` or `message` instead.") """ - Type of transaction. + Name of the transaction. + + Added in Saleor 3.13. """ - type: String! + name: String! """ - Reference of transaction. + Message related to the transaction. + + Added in Saleor 3.13. """ - reference: String! + message: String! + + """Reference of transaction.""" + reference: String! @deprecated(reason: "This field will be removed in Saleor 3.14 (Preview Feature).Use `pspReference` instead.") + + """ + PSP reference of transaction. + + Added in Saleor 3.13. + """ + pspReference: String! """ The related order. - + Added in Saleor 3.6. """ order: Order - """ - List of all transaction's events. - """ + """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! } """ @@ -11988,66 +9881,63 @@ 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 { +"""Represents an order in the shop.""" +type Order 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.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -12074,14 +9964,10 @@ type Order implements Node & ObjectWithMetadata { collectionPointName: String channel: Channel! - """ - List of shipments for the order. - """ + """List of shipments for the order.""" fulfillments: [Fulfillment!]! - """ - List of order lines. - """ + """List of order lines.""" lines: [OrderLine!]! """ @@ -12089,23 +9975,16 @@ type Order implements Node & ObjectWithMetadata { """ actions: [OrderAction!]! - """ - Shipping methods that can be used with this order. - """ - availableShippingMethods: [ShippingMethod!] - @deprecated(reason: "Use `shippingMethods`, this field will be removed in 4.0") + """Shipping methods that can be used with this order.""" + availableShippingMethods: [ShippingMethod!] @deprecated(reason: "Use `shippingMethods`, this field will be removed in 4.0") - """ - Shipping methods related to this order. - """ + """Shipping methods related to this order.""" shippingMethods: [ShippingMethod!]! """ 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!]! @@ -12114,159 +9993,112 @@ type Order implements Node & ObjectWithMetadata { """ invoices: [Invoice!]! - """ - User-friendly number of an order. - """ + """User-friendly number of an order.""" number: String! - """ - The ID of the order that was the base for this order. - """ + """The ID of the order that was the base for this order.""" original: ID - """ - The order origin. - """ + """The order origin.""" origin: OrderOriginEnum! - """ - Informs if an order is fully paid. - """ + """Informs if an order is fully paid.""" isPaid: Boolean! - """ - Internal payment status. - """ + """Internal payment status.""" paymentStatus: PaymentChargeStatusEnum! - """ - User-friendly payment status. - """ + """User-friendly payment status.""" paymentStatusDisplay: String! """ 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! """ 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! """ 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! """ 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!]! - """ - List of payments for the order. - """ + """List of payments for the order.""" payments: [Payment!]! - """ - Total amount of the order. - """ + """Total amount of the order.""" total: TaxedMoney! - """ - Undiscounted total amount of the order. - """ + """Undiscounted total amount of the order.""" undiscountedTotal: TaxedMoney! - """ - Shipping method for this order. - """ - shippingMethod: ShippingMethod - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead.") + """Shipping method for this order.""" + shippingMethod: ShippingMethod @deprecated(reason: "This field will be removed in Saleor 4.0. Use `deliveryMethod` instead.") - """ - Total price of shipping. - """ + """Total price of shipping.""" shippingPrice: TaxedMoney! - """ - The shipping tax rate value. - """ + """The shipping tax rate value.""" shippingTaxRate: Float! """ Denormalized tax class assigned to the shipping method. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - - Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ shippingTaxClass: TaxClass """ Denormalized name of the tax class assigned to the shipping method. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingTaxClassName: String """ Denormalized public metadata of the shipping method's tax class. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingTaxClassMetadata: [MetadataItem!]! """ Denormalized private metadata of the shipping method's tax class. Requires staff permissions to access. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ shippingTaxClassPrivateMetadata: [MetadataItem!]! token: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `id` instead.") voucher: Voucher - """ - List of user gift cards. - """ + """List of user gift cards.""" giftCards: [GiftCard!]! customerNote: String! weight: Weight! redirectUrl: String - """ - The sum of line prices not including shipping. - """ + """The sum of line prices not including shipping.""" subtotal: TaxedMoney! - """ - User-friendly order status. - """ + """User-friendly order status.""" statusDisplay: String! """ @@ -12274,26 +10106,34 @@ type Order implements Node & ObjectWithMetadata { """ canFinalize: Boolean! - """ - Amount authorized for the order. - """ + """Amount authorized for the order.""" totalAuthorized: Money! + """Amount captured for the order.""" + totalCaptured: Money! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `totalCharged` instead.") + """ - Amount captured by payment. + Amount charged for the order. + + Added in Saleor 3.13. """ - totalCaptured: Money! + totalCharged: Money! + + """ + Amount canceled for the order. + + Added in Saleor 3.13. + """ + totalCanceled: Money! """ List of events associated with the order. - + Requires one of the following permissions: MANAGE_ORDERS. """ events: [OrderEvent!]! - """ - The difference between the paid and the order total amount. - """ + """The difference between the paid and the order total amount.""" totalBalance: Money! """ @@ -12301,91 +10141,145 @@ type Order implements Node & ObjectWithMetadata { """ userEmail: String - """ - Returns True, if order requires shipping. - """ + """Returns True, if order requires shipping.""" isShippingRequired: Boolean! """ 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. " - ) + languageCode: String! @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `languageCodeEnum` field to fetch the language code. ") - """ - Order language code. - """ + """Order language code.""" languageCodeEnum: LanguageCodeEnum! - """ - Returns applied discount. - """ - discount: Money - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead." - ) + """Returns applied discount.""" + discount: Money @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead.") - """ - Discount name. - """ - discountName: String - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead." - ) + """Discount name.""" + discountName: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead.") - """ - Translated discount name. - """ - translatedDiscountName: String - @deprecated( - reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead. " - ) + """Translated discount name.""" + translatedDiscountName: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `discounts` field instead. ") - """ - List of all discounts assigned to the order. - """ + """List of all discounts assigned to the order.""" discounts: [OrderDiscount!]! - """ - List of errors that occurred during order validation. - """ + """List of errors that occurred during order validation.""" errors: [OrderError!]! """ Determines whether checkout prices should include taxes when displayed in a storefront. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ displayGrossPrices: Boolean! """ - External ID of this order. - + External ID of this order. + Added in Saleor 3.10. """ externalReference: String """ - ID of the checkout that the order was created from. - + 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 { +"""An enumeration.""" +enum OrderStatus @doc(category: "Orders") { DRAFT UNCONFIRMED UNFULFILLED @@ -12394,60 +10288,55 @@ enum OrderStatus { RETURNED FULFILLED CANCELED + EXPIRED } -""" -Represents order fulfillment. -""" -type Fulfillment implements Node & ObjectWithMetadata { +"""Represents order fulfillment.""" +type Fulfillment 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.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -12456,26 +10345,18 @@ type Fulfillment implements Node & ObjectWithMetadata { trackingNumber: String! created: DateTime! - """ - List of lines for the fulfillment. - """ + """List of lines for the fulfillment.""" lines: [FulfillmentLine!] - """ - User-friendly fulfillment status. - """ + """User-friendly fulfillment status.""" statusDisplay: String - """ - Warehouse from fulfillment was fulfilled. - """ + """Warehouse from fulfillment was fulfilled.""" warehouse: Warehouse } -""" -An enumeration. -""" -enum FulfillmentStatus { +"""An enumeration.""" +enum FulfillmentStatus @doc(category: "Orders") { FULFILLED REFUNDED RETURNED @@ -12485,75 +10366,71 @@ enum FulfillmentStatus { WAITING_FOR_APPROVAL } -""" -Represents line of the fulfillment. -""" -type FulfillmentLine implements Node { +"""Represents line of the fulfillment.""" +type FulfillmentLine implements Node @doc(category: "Orders") { id: ID! quantity: Int! orderLine: OrderLine } -""" -Represents order line of particular order. -""" -type OrderLine implements Node & ObjectWithMetadata { +"""Represents order line of particular order.""" +type OrderLine implements Node & ObjectWithMetadata @doc(category: "Orders") { id: ID! """ 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!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.5. - + 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.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. - + Added in Saleor 3.5. - + 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.5. - + 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.5. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -12569,23 +10446,19 @@ 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. - """ + """Price of the single item in the order line.""" unitPrice: TaxedMoney! """ @@ -12593,19 +10466,13 @@ type OrderLine implements Node & ObjectWithMetadata { """ undiscountedUnitPrice: TaxedMoney! - """ - The discount applied to the single order line. - """ + """The discount applied to the single order line.""" unitDiscount: Money! - """ - Value of the discount. Can store fixed value or percent value - """ + """Value of the discount. Can store fixed value or percent value""" unitDiscountValue: PositiveDecimal! - """ - Price of the order line. - """ + """Price of the order line.""" totalPrice: TaxedMoney! """ @@ -12613,231 +10480,185 @@ type OrderLine implements Node & ObjectWithMetadata { """ variant: ProductVariant - """ - Product name in the customer's language - """ + """Product name in the customer's language""" translatedProductName: String! - """ - Variant name in the customer's language - """ + """Variant name in the customer's language""" translatedVariantName: String! """ List of allocations across warehouses. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. """ allocations: [Allocation!] """ A quantity of items remaining to be fulfilled. - + Added in Saleor 3.1. """ quantityToFulfill: Int! - """ - Type of the discount: fixed or percent - """ + """Type of the discount: fixed or percent""" unitDiscountType: DiscountValueTypeEnum """ Denormalized tax class of the product in this order line. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - - Requires one of the following permissions: AUTHENTICATED_STAFF_USER. + + Requires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP. """ taxClass: TaxClass """ Denormalized name of the tax class. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ taxClassName: String """ Denormalized public metadata of the tax class. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ taxClassMetadata: [MetadataItem!]! """ Denormalized private metadata of the tax class. Requires staff permissions to access. - + Added in Saleor 3.9. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ taxClassPrivateMetadata: [MetadataItem!]! } """ -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 { +"""Represents allocation.""" +type Allocation implements Node @doc(category: "Products") { id: ID! """ Quantity allocated for orders. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. """ quantity: Int! """ The warehouse were items were allocated. - + Requires one of the following permissions: MANAGE_PRODUCTS, MANAGE_ORDERS. """ warehouse: Warehouse! } -enum OrderAction { - """ - Represents the capture action. - """ +enum OrderAction @doc(category: "Payments") { + """Represents the capture action.""" CAPTURE - """ - Represents a mark-as-paid action. - """ + """Represents a mark-as-paid action.""" MARK_AS_PAID - """ - Represents a refund action. - """ + """Represents a refund action.""" REFUND - """ - Represents a void action. - """ + """Represents a void action.""" VOID } -""" -Represents an Invoice. -""" -type Invoice implements ObjectWithMetadata & Job & Node { - """ - List of private metadata items. Requires staff permissions to access. - """ +"""Represents an Invoice.""" +type Invoice implements ObjectWithMetadata & Job & Node @doc(category: "Orders") { + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata - """ - Job status. - """ + """Job status.""" status: JobStatusEnum! createdAt: DateTime! updatedAt: DateTime! message: String - """ - The ID of the object. - """ + """The ID of the object.""" id: ID! number: String externalUrl: String - """ - URL to download an invoice. - """ + """URL to download an invoice.""" url: String """ Order related to the invoice. - + Added in Saleor 3.10. """ order: Order } interface Job { - """ - Job status. - """ + """Job status.""" status: JobStatusEnum! - """ - Created date time of job in ISO 8601 format. - """ + """Created date time of job in ISO 8601 format.""" createdAt: DateTime! - """ - Date time of job last update in ISO 8601 format. - """ + """Date time of job last update in ISO 8601 format.""" updatedAt: DateTime! - """ - Job message. - """ + """Job message.""" message: String } -""" -An enumeration. -""" +"""An enumeration.""" enum JobStatusEnum { PENDING SUCCESS @@ -12845,19 +10666,15 @@ enum JobStatusEnum { DELETED } -""" -An enumeration. -""" -enum OrderOriginEnum { +"""An enumeration.""" +enum OrderOriginEnum @doc(category: "Orders") { CHECKOUT DRAFT REISSUE } -""" -An enumeration. -""" -enum PaymentChargeStatusEnum { +"""An enumeration.""" +enum PaymentChargeStatusEnum @doc(category: "Payments") { NOT_CHARGED PENDING PARTIALLY_CHARGED @@ -12872,18 +10689,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 @@ -12892,75 +10710,76 @@ 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 OVERCHARGED } -""" -Represents a payment of a given type. -""" -type Payment implements Node & ObjectWithMetadata { +"""Represents a payment of a given type.""" +type Payment implements Node & ObjectWithMetadata @doc(category: "Payments") { id: ID! - """ - List of private metadata items. Requires staff permissions to access. - """ + """List of private metadata items. Requires staff permissions to access.""" privateMetadata: [MetadataItem!]! """ A single key from private metadata. Requires staff permissions to access. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafield(key: String!): String """ Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ privateMetafields(keys: [String!]): Metadata - """ - List of public metadata items. Can be accessed without permissions. - """ + """List of public metadata items. Can be accessed without permissions.""" metadata: [MetadataItem!]! """ A single key from public metadata. - + Tip: Use GraphQL aliases to fetch multiple keys. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafield(key: String!): String """ Public metadata. Use `keys` to control which fields you want to include. The default is to include everything. - + Added in Saleor 3.3. - + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ metafields(keys: [String!]): Metadata @@ -12975,64 +10794,54 @@ type Payment implements Node & ObjectWithMetadata { """ IP address of the user who created the payment. - + Requires one of the following permissions: MANAGE_ORDERS. """ customerIpAddress: String - """ - Internal payment status. - """ + """Internal payment status.""" chargeStatus: PaymentChargeStatusEnum! """ List of actions that can be performed in the current state of a payment. - + Requires one of the following permissions: MANAGE_ORDERS. """ actions: [OrderAction!]! - """ - Total amount of the payment. - """ + """Total amount of the payment.""" total: Money - """ - Total amount captured for this payment. - """ + """Total amount captured for this payment.""" capturedAmount: Money """ List of all transactions within this payment. - + Requires one of the following permissions: MANAGE_ORDERS. """ transactions: [Transaction!] """ Maximum amount of money that can be captured. - + Requires one of the following permissions: MANAGE_ORDERS. """ availableCaptureAmount: Money """ Maximum amount of money that can be refunded. - + Requires one of the following permissions: MANAGE_ORDERS. """ availableRefundAmount: Money - """ - The details of the card used for this payment. - """ + """The details of the card used for this payment.""" creditCard: CreditCard } -""" -An object representing a single payment. -""" -type Transaction implements Node { +"""An object representing a single payment.""" +type Transaction implements Node @doc(category: "Payments") { id: ID! created: DateTime! payment: Payment! @@ -13042,16 +10851,12 @@ type Transaction implements Node { error: String gatewayResponse: JSONString! - """ - Total amount of the transaction. - """ + """Total amount of the transaction.""" amount: Money } -""" -An enumeration. -""" -enum TransactionKind { +"""An enumeration.""" +enum TransactionKind @doc(category: "Payments") { EXTERNAL AUTH PENDING @@ -13064,52 +10869,34 @@ enum TransactionKind { CANCEL } -type CreditCard { - """ - Card brand. - """ +type CreditCard @doc(category: "Payments") { + """Card brand.""" brand: String! - """ - First 4 digits of the card number. - """ + """First 4 digits of the card number.""" firstDigits: String - """ - Last 4 digits of the card number. - """ + """Last 4 digits of the card number.""" lastDigits: String! - """ - Two-digit number representing the card’s expiration month. - """ + """Two-digit number representing the card’s expiration month.""" expMonth: Int - """ - Four-digit number representing the card’s expiration year. - """ + """Four-digit number representing the card’s expiration year.""" expYear: Int } -""" -History log of the order. -""" -type OrderEvent implements Node { +"""History log of the order.""" +type OrderEvent implements Node @doc(category: "Orders") { id: ID! - """ - Date when event happened at in ISO 8601 format. - """ + """Date when event happened at in ISO 8601 format.""" date: DateTime - """ - Order event type. - """ + """Order event type.""" type: OrderEventsEnum - """ - User who performed the action. - """ + """User who performed the action.""" user: User """ @@ -13117,111 +10904,69 @@ type OrderEvent implements Node { """ app: App - """ - Content of the event. - """ + """Content of the event.""" message: String - """ - Email of the customer. - """ + """Email of the customer.""" email: String - """ - Type of an email sent to the customer. - """ + """Type of an email sent to the customer.""" emailType: OrderEventsEmailsEnum - """ - Amount of money. - """ + """Amount of money.""" amount: Float - """ - The payment reference from the payment provider. - """ + """The payment reference from the payment provider.""" paymentId: String - """ - The payment gateway of the payment. - """ + """The payment gateway of the payment.""" paymentGateway: String - """ - Number of items. - """ + """Number of items.""" quantity: Int - """ - Composed ID of the Fulfillment. - """ + """Composed ID of the Fulfillment.""" composedId: String - """ - User-friendly number of an order. - """ + """User-friendly number of an order.""" orderNumber: String - """ - Number of an invoice related to the order. - """ + """Number of an invoice related to the order.""" invoiceNumber: String - """ - List of oversold lines names. - """ + """List of oversold lines names.""" oversoldItems: [String!] - """ - The concerned lines. - """ + """The concerned lines.""" lines: [OrderEventOrderLineObject!] - """ - The lines fulfilled. - """ + """The lines fulfilled.""" fulfilledItems: [FulfillmentLine!] - """ - The warehouse were items were restocked. - """ + """The warehouse were items were restocked.""" warehouse: Warehouse - """ - The transaction reference of captured payment. - """ + """The transaction reference of captured payment.""" transactionReference: String - """ - Define if shipping costs were included to the refund. - """ + """Define if shipping costs were included to the refund.""" shippingCostsIncluded: Boolean - """ - The order which is related to this order. - """ + """The order which is related to this order.""" relatedOrder: Order - """ - The discount applied to the order. - """ + """The discount applied to the order.""" discount: OrderEventDiscountObject - """ - The status of payment's transaction. - """ - status: TransactionStatus + """The status of payment's transaction.""" + status: TransactionStatus @deprecated(reason: "This field will be removed in Saleor 3.14 (Preview Feature).Use `TransactionEvent` to track the status of `TransactionItem`.") - """ - The reference of payment's transaction. - """ + """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 @@ -13230,6 +10975,7 @@ enum OrderEventsEnum { PLACED_FROM_DRAFT OVERSOLD_ITEMS CANCELED + EXPIRED ORDER_MARKED_AS_PAID ORDER_FULLY_PAID ORDER_REPLACEMENT_CREATED @@ -13251,9 +10997,20 @@ enum OrderEventsEnum { PAYMENT_VOIDED PAYMENT_FAILED TRANSACTION_EVENT + TRANSACTION_CHARGE_REQUESTED + + """ + This field will be removed in Saleor 3.14 (Preview Feature). Use `TRANSACTION_CHARGE_REQUESTED` instead. + """ TRANSACTION_CAPTURE_REQUESTED TRANSACTION_REFUND_REQUESTED + + """ + This field will be removed in Saleor 3.14 (Preview Feature). Use `TRANSACTION_CANCEL_REQUESTED` instead. + """ TRANSACTION_VOID_REQUESTED + TRANSACTION_CANCEL_REQUESTED + TRANSACTION_MARK_AS_PAID_FAILED INVOICE_REQUESTED INVOICE_GENERATED INVOICE_UPDATED @@ -13270,10 +11027,8 @@ enum OrderEventsEnum { OTHER } -""" -An enumeration. -""" -enum OrderEventsEmailsEnum { +"""An enumeration.""" +enum OrderEventsEmailsEnum @doc(category: "Orders") { PAYMENT_CONFIRMATION CONFIRMED SHIPPING_CONFIRMATION @@ -13285,155 +11040,114 @@ enum OrderEventsEmailsEnum { DIGITAL_LINKS } -type OrderEventOrderLineObject { - """ - The variant quantity. - """ +type OrderEventOrderLineObject @doc(category: "Orders") { + """The variant quantity.""" quantity: Int - """ - The order line. - """ + """The order line.""" orderLine: OrderLine - """ - The variant name. - """ + """The variant name.""" itemName: String - """ - The discount applied to the order line. - """ + """The discount applied to the order line.""" discount: OrderEventDiscountObject } -type OrderEventDiscountObject { - """ - Type of the discount: fixed or percent. - """ +type OrderEventDiscountObject @doc(category: "Orders") { + """Type of the discount: fixed or percent.""" valueType: DiscountValueTypeEnum! - """ - Value of the discount. Can store fixed value or percent value. - """ + """Value of the discount. Can store fixed value or percent value.""" value: PositiveDecimal! - """ - Explanation for the applied discount. - """ + """Explanation for the applied discount.""" reason: String - """ - Returns amount of discount. - """ + """Returns amount of discount.""" amount: Money - """ - Type of the discount: fixed or percent. - """ + """Type of the discount: fixed or percent.""" oldValueType: DiscountValueTypeEnum - """ - Value of the discount. Can store fixed value or percent value. - """ + """Value of the discount. Can store fixed value or percent value.""" oldValue: PositiveDecimal - """ - Returns amount of discount. - """ + """Returns amount of discount.""" oldAmount: Money } """ -An enumeration. +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 { +enum TransactionStatus @doc(category: "Payments") { PENDING SUCCESS FAILURE } -""" -Contains all details related to the applied discount to the order. -""" -type OrderDiscount implements Node { +"""Contains all details related to the applied discount to the order.""" +type OrderDiscount implements Node @doc(category: "Discounts") { id: ID! type: OrderDiscountType! name: String translatedName: String - """ - Type of the discount: fixed or percent - """ + """Type of the discount: fixed or percent""" valueType: DiscountValueTypeEnum! - """ - Value of the discount. Can store fixed value or percent value - """ + """Value of the discount. Can store fixed value or percent value""" value: PositiveDecimal! """ Explanation for the applied discount. - + Requires one of the following permissions: MANAGE_ORDERS. """ reason: String - """ - Returns amount of discount. - """ + """Returns amount of discount.""" amount: Money! } -""" -An enumeration. -""" -enum OrderDiscountType { +"""An enumeration.""" +enum OrderDiscountType @doc(category: "Discounts") { 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: OrderErrorCode! - """ - Warehouse ID which causes the error. - """ + """Warehouse ID which causes the error.""" warehouse: ID - """ - List of order line IDs that cause the error. - """ + """List of order line IDs that cause the error.""" orderLines: [ID!] - """ - List of product variants that are associated with the error - """ + """List of product variants that are associated with the error""" variants: [ID!] - """ - A type of address that causes the error. - """ + """A type of address that causes the error.""" addressType: AddressTypeEnum } -""" -An enumeration. -""" -enum OrderErrorCode { +"""An enumeration.""" +enum OrderErrorCode @doc(category: "Orders") { BILLING_ADDRESS_NOT_SET CANNOT_CANCEL_FULFILLMENT CANNOT_CANCEL_ORDER @@ -13453,6 +11167,7 @@ enum OrderErrorCode { ORDER_NO_SHIPPING_ADDRESS PAYMENT_ERROR PAYMENT_MISSING + TRANSACTION_ERROR REQUIRED SHIPPING_METHOD_NOT_APPLICABLE SHIPPING_METHOD_REQUIRED @@ -13465,157 +11180,275 @@ enum OrderErrorCode { DUPLICATED_INPUT_ITEM NOT_AVAILABLE_IN_CHANNEL CHANNEL_INACTIVE - MISSING_TRANSACTION_ACTION_REQUEST_WEBHOOK } -""" -An enumeration. -""" +"""An enumeration.""" enum AddressTypeEnum { BILLING SHIPPING } """ -Represents transaction's event. +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 TransactionEvent implements Node { +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 + """ - The ID of the object. + 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 @doc(category: "Payments") { + """The ID of the object.""" id: ID! createdAt: DateTime! - """ - Status of transaction's event. - """ - status: TransactionStatus! + """Status of transaction's event.""" + status: TransactionStatus @deprecated(reason: "This field will be removed in Saleor 3.14 (Preview Feature). Use `type` instead.") + + """Reference of transaction's event.""" + reference: String! @deprecated(reason: "This field will be removed in Saleor 3.14 (Preview Feature).Use `pspReference` instead.") """ - Reference of transaction's event. + PSP reference of transaction. + + Added in Saleor 3.13. """ - reference: String! + pspReference: String! + + """Name of the transaction's event.""" + name: String @deprecated(reason: "This field will be removed in Saleor 3.14 (Preview Feature). Use `message` instead.") """ - Name of the transaction's event. + Message related to the transaction's event. + + Added in Saleor 3.13. """ - name: String + 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 { - """ - Pagination data for this connection. - """ +""" +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!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type CheckoutCountableEdge { - """ - The item at the end of the edge. - """ +type CheckoutCountableEdge @doc(category: "Checkout") { + """The item at the end of the edge.""" node: Checkout! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -type GiftCardCountableConnection { - """ - Pagination data for this connection. - """ +type GiftCardCountableConnection @doc(category: "Gift cards") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [GiftCardCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type GiftCardCountableEdge { - """ - The item at the end of the edge. - """ +type GiftCardCountableEdge @doc(category: "Gift cards") { + """The item at the end of the edge.""" node: GiftCard! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -type OrderCountableConnection { - """ - Pagination data for this connection. - """ +type OrderCountableConnection @doc(category: "Orders") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [OrderCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type OrderCountableEdge { - """ - The item at the end of the edge. - """ +type OrderCountableEdge @doc(category: "Orders") { + """The item at the end of the edge.""" node: Order! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -type UserPermission { - """ - Internal code for permission. - """ +"""Represents user's permissions.""" +type UserPermission @doc(category: "Users") { + """Internal code for permission.""" code: PermissionEnum! - """ - Describe action(s) allowed to do by permission. - """ + """Describe action(s) allowed to do by permission.""" name: String! - """ - List of user permission groups which contains this permission. - """ + """List of user permission groups which contains this permission.""" sourcePermissionGroups( - """ - ID of user whose groups should be returned. - """ + """ID of user whose groups should be returned.""" userId: ID! ): [Group!] } -""" -Represents permission group data. -""" -type Group implements Node { +"""Represents permission group data.""" +type Group implements Node @doc(category: "Users") { id: ID! name: String! """ List of group users - + Requires one of the following permissions: MANAGE_STAFF. """ users: [User!] - """ - List of group permissions - """ + """List of group permissions""" permissions: [Permission!] """ @@ -13624,57 +11457,37 @@ type Group implements Node { userCanManage: Boolean! } -""" -History log of the customer. -""" -type CustomerEvent implements Node { +"""History log of the customer.""" +type CustomerEvent implements Node @doc(category: "Users") { id: ID! - """ - Date when event happened at in ISO 8601 format. - """ + """Date when event happened at in ISO 8601 format.""" date: DateTime - """ - Customer event type. - """ + """Customer event type.""" type: CustomerEventsEnum - """ - User who performed the action. - """ + """User who performed the action.""" user: User - """ - App that performed the action. - """ + """App that performed the action.""" app: App - """ - Content of the event. - """ + """Content of the event.""" message: String - """ - Number of objects concerned by the event. - """ + """Number of objects concerned by the event.""" count: Int - """ - The concerned order. - """ + """The concerned order.""" order: Order - """ - The concerned order line. - """ + """The concerned order line.""" orderLine: OrderLine } -""" -An enumeration. -""" -enum CustomerEventsEnum { +"""An enumeration.""" +enum CustomerEventsEnum @doc(category: "Users") { ACCOUNT_CREATED ACCOUNT_ACTIVATED ACCOUNT_DEACTIVATED @@ -13695,41 +11508,31 @@ enum CustomerEventsEnum { """ Represents a payment source stored for user in payment gateway, such as credit card. """ -type PaymentSource { - """ - Payment gateway name. - """ +type PaymentSource @doc(category: "Payments") { + """Payment gateway name.""" gateway: String! - """ - ID of stored payment method. - """ + """ID of stored payment method.""" paymentMethodId: String - """ - Stored credit card details if available. - """ + """Stored credit card details if available.""" creditCardInfo: CreditCard """ List of public metadata items. - + Added in Saleor 3.1. - + Can be accessed without permissions. """ metadata: [MetadataItem!]! } type LimitInfo { - """ - Defines the current resource usage. - """ + """Defines the current resource usage.""" currentUsage: Limits! - """ - Defines the allowed maximum resource usage, null means unlimited. - """ + """Defines the allowed maximum resource usage, null means unlimited.""" allowedUsage: Limits! } @@ -13741,52 +11544,30 @@ 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 { - """ - The gift card expiry type settings. - """ +"""Gift card related settings from site settings.""" +type GiftCardSettings @doc(category: "Gift cards") { + """The gift card expiry type settings.""" expiryType: GiftCardSettingsExpiryTypeEnum! - """ - The gift card expiry period settings. - """ + """The gift card expiry period settings.""" expiryPeriod: TimePeriod } -""" -An enumeration. -""" -enum GiftCardSettingsExpiryTypeEnum { +"""An enumeration.""" +enum GiftCardSettingsExpiryTypeEnum @doc(category: "Gift cards") { NEVER_EXPIRE EXPIRY_PERIOD } type TimePeriod { - """ - The length of the period. - """ + """The length of the period.""" amount: Int! - """ - The type of the period. - """ + """The type of the period.""" type: TimePeriodTypeEnum! } -""" -An enumeration. -""" +"""An enumeration.""" enum TimePeriodTypeEnum { DAY WEEK @@ -13794,80 +11575,62 @@ enum TimePeriodTypeEnum { YEAR } -input ShippingZoneFilterInput { +input ShippingZoneFilterInput @doc(category: "Shipping") { search: String channels: [ID!] } -type DigitalContentCountableConnection { - """ - Pagination data for this connection. - """ +type DigitalContentCountableConnection @doc(category: "Products") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [DigitalContentCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type DigitalContentCountableEdge { - """ - The item at the end of the edge. - """ +type DigitalContentCountableEdge @doc(category: "Products") { + """The item at the end of the edge.""" node: DigitalContent! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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! """ Specifies the channel in which to sort the data. - + DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. """ channel: String - """ - Sort categories by the selected field. - """ + """Sort categories by the selected field.""" field: CategorySortField! } -enum CategorySortField { - """ - Sort categories by name. - """ +enum CategorySortField @doc(category: "Products") { + """Sort categories by name.""" NAME - """ - Sort categories by product count. - """ + """Sort categories by product count.""" PRODUCT_COUNT - """ - Sort categories by subcategory count. - """ + """Sort categories by subcategory count.""" SUBCATEGORY_COUNT } -input CollectionFilterInput { +input CollectionFilterInput @doc(category: "Products") { published: CollectionPublished search: String metadata: [MetadataFilter!] @@ -13875,71 +11638,63 @@ input CollectionFilterInput { slugs: [String!] """ - Specifies the channel by which the data should be filtered. - + Specifies the channel by which the data should be filtered. + DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. """ 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! """ Specifies the channel in which to sort the data. - + DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. """ channel: String - """ - Sort collections by the selected field. - """ + """Sort collections by the selected field.""" field: CollectionSortField! } -enum CollectionSortField { - """ - Sort collections by name. - """ +enum CollectionSortField @doc(category: "Products") { + """Sort collections by name.""" NAME """ Sort collections by availability. - + This option requires a channel filter to work as the values can vary between channels. """ AVAILABILITY - """ - Sort collections by product count. - """ + """Sort collections by product count.""" PRODUCT_COUNT """ Sort collections by publication date. - + This option requires a channel filter to work as the values can vary between channels. """ PUBLICATION_DATE """ Sort collections by publication date. - + This option requires a channel filter to work as the values can vary between channels. """ PUBLISHED_AT } -input ProductTypeFilterInput { +input ProductTypeFilterInput @doc(category: "Products") { search: String configurable: ProductTypeConfigurable productType: ProductTypeEnum @@ -13949,46 +11704,36 @@ 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. - """ + """Sort product types by the selected field.""" field: ProductTypeSortField! } -enum ProductTypeSortField { - """ - Sort products by name. - """ +enum ProductTypeSortField @doc(category: "Products") { + """Sort products by name.""" NAME - """ - Sort products by type. - """ + """Sort products by type.""" DIGITAL - """ - Sort products by shipping. - """ + """Sort products by shipping.""" SHIPPING_REQUIRED } -input ProductVariantFilterInput { +input ProductVariantFilterInput @doc(category: "Products") { search: String sku: [String!] metadata: [MetadataFilter!] @@ -13996,143 +11741,111 @@ 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. - """ + """Sort productVariants by the selected field.""" field: ProductVariantSortField! } -enum ProductVariantSortField { - """ - Sort products variants by last modified at. - """ +enum ProductVariantSortField @doc(category: "Products") { + """Sort products variants by last modified at.""" LAST_MODIFIED_AT } -type PaymentCountableConnection { - """ - Pagination data for this connection. - """ +type PaymentCountableConnection @doc(category: "Payments") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [PaymentCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type PaymentCountableEdge { - """ - The item at the end of the edge. - """ +type PaymentCountableEdge @doc(category: "Payments") { + """The item at the end of the edge.""" node: Payment! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input PaymentFilterInput { +input PaymentFilterInput @doc(category: "Payments") { """ - Filter by ids. - + Filter by ids. + Added in Saleor 3.8. """ ids: [ID!] checkouts: [ID!] } -type PageCountableConnection { - """ - Pagination data for this connection. - """ +type PageCountableConnection @doc(category: "Pages") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [PageCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type PageCountableEdge { - """ - The item at the end of the edge. - """ +type PageCountableEdge @doc(category: "Pages") { + """The item at the end of the edge.""" node: Page! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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. - """ + """Sort pages by the selected field.""" field: PageSortField! } -enum PageSortField { - """ - Sort pages by title. - """ +enum PageSortField @doc(category: "Pages") { + """Sort pages by title.""" TITLE - """ - Sort pages by slug. - """ + """Sort pages by slug.""" SLUG - """ - Sort pages by visibility. - """ + """Sort pages by visibility.""" VISIBILITY """ Sort pages by creation date. - + DEPRECATED: this field will be removed in Saleor 4.0. """ CREATION_DATE """ Sort pages by publication date. - + DEPRECATED: this field will be removed in Saleor 4.0. """ PUBLICATION_DATE """ Sort pages by publication date. - + DEPRECATED: this field will be removed in Saleor 4.0. """ PUBLISHED_AT """ Sort pages by creation date. - + DEPRECATED: this field will be removed in Saleor 4.0. """ CREATED_AT } -input PageFilterInput { +input PageFilterInput @doc(category: "Pages") { search: String metadata: [MetadataFilter!] pageTypes: [ID!] @@ -14140,101 +11853,71 @@ input PageFilterInput { slugs: [String!] } -type PageTypeCountableConnection { - """ - Pagination data for this connection. - """ +type PageTypeCountableConnection @doc(category: "Pages") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [PageTypeCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type PageTypeCountableEdge { - """ - The item at the end of the edge. - """ +type PageTypeCountableEdge @doc(category: "Pages") { + """The item at the end of the edge.""" node: PageType! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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. - """ + """Sort page types by the selected field.""" field: PageTypeSortField! } -enum PageTypeSortField { - """ - Sort page types by name. - """ +enum PageTypeSortField @doc(category: "Pages") { + """Sort page types by name.""" NAME - """ - Sort page types by slug. - """ + """Sort page types by slug.""" SLUG } -input PageTypeFilterInput { +input PageTypeFilterInput @doc(category: "Pages") { search: String slugs: [String!] } -type OrderEventCountableConnection { - """ - Pagination data for this connection. - """ +type OrderEventCountableConnection @doc(category: "Orders") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [OrderEventCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type OrderEventCountableEdge { - """ - The item at the end of the edge. - """ +type OrderEventCountableEdge @doc(category: "Orders") { + """The item at the end of the edge.""" node: OrderEvent! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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. - """ + """Sort orders by the selected field.""" field: OrderSortField! } -enum OrderSortField { - """ - Sort orders by number. - """ +enum OrderSortField @doc(category: "Orders") { + """Sort orders by number.""" NUMBER """ @@ -14243,41 +11926,33 @@ enum OrderSortField { RANK """ - Sort orders by creation date. - + Sort orders by creation date. + DEPRECATED: this field will be removed in Saleor 4.0. """ CREATION_DATE """ - Sort orders by creation date. - + Sort orders by creation date. + DEPRECATED: this field will be removed in Saleor 4.0. """ CREATED_AT - """ - Sort orders by last modified at. - """ + """Sort orders by last modified at.""" LAST_MODIFIED_AT - """ - Sort orders by customer. - """ + """Sort orders by customer.""" CUSTOMER - """ - Sort orders by payment. - """ + """Sort orders by payment.""" PAYMENT - """ - Sort orders by fulfillment status. - """ + """Sort orders by fulfillment status.""" FULFILLMENT_STATUS } -input OrderFilterInput { +input OrderFilterInput @doc(category: "Orders") { paymentStatus: [PaymentChargeStatusEnum!] status: [OrderStatusFilter!] customer: String @@ -14297,7 +11972,7 @@ input OrderFilterInput { checkoutIds: [ID!] } -enum OrderStatusFilter { +enum OrderStatusFilter @doc(category: "Orders") { READY_TO_FULFILL READY_TO_CAPTURE UNFULFILLED @@ -14307,7 +11982,7 @@ enum OrderStatusFilter { CANCELED } -input OrderDraftFilterInput { +input OrderDraftFilterInput @doc(category: "Orders") { customer: String created: DateRangeInput search: String @@ -14315,52 +11990,36 @@ input OrderDraftFilterInput { channels: [ID!] } -type MenuCountableConnection { - """ - Pagination data for this connection. - """ +type MenuCountableConnection @doc(category: "Menu") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [MenuCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type MenuCountableEdge { - """ - The item at the end of the edge. - """ +type MenuCountableEdge @doc(category: "Menu") { + """The item at the end of the edge.""" node: Menu! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } 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. - """ + """Sort menus by the selected field.""" field: MenuSortField! } enum MenuSortField { - """ - Sort menus by name. - """ + """Sort menus by name.""" NAME - """ - Sort menus by items count. - """ + """Sort menus by items count.""" ITEMS_COUNT } @@ -14371,47 +12030,33 @@ input MenuFilterInput { slugs: [String!] } -type MenuItemCountableConnection { - """ - Pagination data for this connection. - """ +type MenuItemCountableConnection @doc(category: "Menu") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [MenuItemCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type MenuItemCountableEdge { - """ - The item at the end of the edge. - """ +type MenuItemCountableEdge @doc(category: "Menu") { + """The item at the end of the edge.""" node: MenuItem! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } 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. - """ + """Sort menu items by the selected field.""" field: MenuItemsSortField! } enum MenuItemsSortField { - """ - Sort menu items by name. - """ + """Sort menu items by name.""" NAME } @@ -14420,43 +12065,33 @@ 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. - """ + """Sort gift cards by the selected field.""" field: GiftCardSortField! } -enum GiftCardSortField { - """ - Sort gift cards by product. - """ +enum GiftCardSortField @doc(category: "Gift cards") { + """Sort gift cards by product.""" PRODUCT - """ - Sort gift cards by used by. - """ + """Sort gift cards by used by.""" USED_BY - """ - Sort gift cards by current balance. - """ + """Sort gift cards by current balance.""" CURRENT_BALANCE """ Sort gift cards by created at. - + Added in Saleor 3.8. """ CREATED_AT } -input GiftCardFilterInput { +input GiftCardFilterInput @doc(category: "Gift cards") { isActive: Boolean metadata: [MetadataFilter!] tags: [String!] @@ -14469,118 +12104,76 @@ input GiftCardFilterInput { code: String } -type GiftCardTagCountableConnection { - """ - Pagination data for this connection. - """ +type GiftCardTagCountableConnection @doc(category: "Gift cards") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [GiftCardTagCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type GiftCardTagCountableEdge { - """ - The item at the end of the edge. - """ +type GiftCardTagCountableEdge @doc(category: "Gift cards") { + """The item at the end of the edge.""" node: GiftCardTag! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input GiftCardTagFilterInput { +input GiftCardTagFilterInput @doc(category: "Gift cards") { search: String } -""" -Plugin. -""" +"""Plugin.""" type Plugin { - """ - Identifier of the plugin. - """ + """Identifier of the plugin.""" id: ID! - """ - Name of the plugin. - """ + """Name of the plugin.""" name: String! - """ - Description of the plugin. - """ + """Description of the plugin.""" description: String! - """ - Global configuration of the plugin (not channel-specific). - """ + """Global configuration of the plugin (not channel-specific).""" globalConfiguration: PluginConfiguration - """ - Channel-specific plugin configuration. - """ + """Channel-specific plugin configuration.""" channelConfigurations: [PluginConfiguration!]! } -""" -Stores information about a configuration of plugin. -""" +"""Stores information about a configuration of plugin.""" type PluginConfiguration { - """ - Determines if plugin is active or not. - """ + """Determines if plugin is active or not.""" active: Boolean! - """ - The channel to which the plugin configuration is assigned to. - """ + """The channel to which the plugin configuration is assigned to.""" channel: Channel - """ - Configuration of the plugin. - """ + """Configuration of the plugin.""" configuration: [ConfigurationItem!] } -""" -Stores information about a single configuration field. -""" +"""Stores information about a single configuration field.""" type ConfigurationItem { - """ - Name of the field. - """ + """Name of the field.""" name: String! - """ - Current value of the field. - """ + """Current value of the field.""" value: String - """ - Type of the field. - """ + """Type of the field.""" type: ConfigurationTypeFieldEnum - """ - Help text for the field. - """ + """Help text for the field.""" helpText: String - """ - Label for the field. - """ + """Label for the field.""" label: String } -""" -An enumeration. -""" +"""An enumeration.""" enum ConfigurationTypeFieldEnum { STRING MULTILINE @@ -14592,27 +12185,19 @@ enum ConfigurationTypeFieldEnum { } type PluginCountableConnection { - """ - Pagination data for this connection. - """ + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [PluginCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } type PluginCountableEdge { - """ - The item at the end of the edge. - """ + """The item at the end of the edge.""" node: Plugin! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } @@ -14633,14 +12218,10 @@ 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. - """ + """Sort plugins by the selected field.""" field: PluginSortField! } @@ -14649,32 +12230,24 @@ enum PluginSortField { IS_ACTIVE } -type SaleCountableConnection { - """ - Pagination data for this connection. - """ +type SaleCountableConnection @doc(category: "Discounts") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [SaleCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type SaleCountableEdge { - """ - The item at the end of the edge. - """ +type SaleCountableEdge @doc(category: "Discounts") { + """The item at the end of the edge.""" node: Sale! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input SaleFilterInput { +input SaleFilterInput @doc(category: "Discounts") { status: [DiscountStatusEnum!] saleType: DiscountValueTypeEnum started: DateTimeRangeInput @@ -14683,96 +12256,72 @@ 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! """ Specifies the channel in which to sort the data. - + DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. """ channel: String - """ - Sort sales by the selected field. - """ + """Sort sales by the selected field.""" field: SaleSortField! } -enum SaleSortField { - """ - Sort sales by name. - """ +enum SaleSortField @doc(category: "Discounts") { + """Sort sales by name.""" NAME - """ - Sort sales by start date. - """ + """Sort sales by start date.""" START_DATE - """ - Sort sales by end date. - """ + """Sort sales by end date.""" END_DATE """ Sort sales by value. - + This option requires a channel filter to work as the values can vary between channels. """ VALUE - """ - Sort sales by type. - """ + """Sort sales by type.""" TYPE - """ - Sort sales by created at. - """ + """Sort sales by created at.""" CREATED_AT - """ - Sort sales by last modified at. - """ + """Sort sales by last modified at.""" LAST_MODIFIED_AT } -type VoucherCountableConnection { - """ - Pagination data for this connection. - """ +type VoucherCountableConnection @doc(category: "Discounts") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [VoucherCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type VoucherCountableEdge { - """ - The item at the end of the edge. - """ +type VoucherCountableEdge @doc(category: "Discounts") { + """The item at the end of the edge.""" node: Voucher! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input VoucherFilterInput { +input VoucherFilterInput @doc(category: "Discounts") { status: [DiscountStatusEnum!] timesUsed: IntRangeInput discountType: [VoucherDiscountType!] @@ -14782,128 +12331,92 @@ 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! """ Specifies the channel in which to sort the data. - + DEPRECATED: this field will be removed in Saleor 4.0. Use root-level channel argument instead. """ channel: String - """ - Sort vouchers by the selected field. - """ + """Sort vouchers by the selected field.""" field: VoucherSortField! } enum VoucherSortField { - """ - Sort vouchers by code. - """ + """Sort vouchers by code.""" CODE - """ - Sort vouchers by start date. - """ + """Sort vouchers by start date.""" START_DATE - """ - Sort vouchers by end date. - """ + """Sort vouchers by end date.""" END_DATE """ Sort vouchers by value. - + This option requires a channel filter to work as the values can vary between channels. """ VALUE - """ - Sort vouchers by type. - """ + """Sort vouchers by type.""" TYPE - """ - Sort vouchers by usage limit. - """ + """Sort vouchers by usage limit.""" USAGE_LIMIT """ Sort vouchers by minimum spent amount. - + This option requires a channel filter to work as the values can vary between channels. """ MINIMUM_SPENT_AMOUNT } -""" -Represents a job data of exported file. -""" +"""Represents a job data of exported file.""" type ExportFile implements Node & Job { id: ID! - """ - Job status. - """ + """Job status.""" status: JobStatusEnum! - """ - Created date time of job in ISO 8601 format. - """ + """Created date time of job in ISO 8601 format.""" createdAt: DateTime! - """ - Date time of job last update in ISO 8601 format. - """ + """Date time of job last update in ISO 8601 format.""" updatedAt: DateTime! - """ - Job message. - """ + """Job message.""" message: String - """ - The URL of field to download. - """ + """The URL of field to download.""" url: String - """ - List of events associated with the export. - """ + """List of events associated with the export.""" events: [ExportEvent!] user: User app: App } -""" -History log of export file. -""" +"""History log of export file.""" type ExportEvent implements Node { - """ - The ID of the object. - """ + """The ID of the object.""" id: ID! - """ - Date when event happened at in ISO 8601 format. - """ + """Date when event happened at in ISO 8601 format.""" date: DateTime! - """ - Export event type. - """ + """Export event type.""" type: ExportEventsEnum! """ @@ -14916,15 +12429,11 @@ type ExportEvent implements Node { """ app: App - """ - Content of the event. - """ + """Content of the event.""" message: String! } -""" -An enumeration. -""" +"""An enumeration.""" enum ExportEventsEnum { EXPORT_PENDING EXPORT_SUCCESS @@ -14935,27 +12444,19 @@ enum ExportEventsEnum { } type ExportFileCountableConnection { - """ - Pagination data for this connection. - """ + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [ExportFileCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } type ExportFileCountableEdge { - """ - The item at the end of the edge. - """ + """The item at the end of the edge.""" node: ExportFile! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } @@ -14968,14 +12469,10 @@ 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. - """ + """Sort export file by the selected field.""" field: ExportFileSortField! } @@ -14986,119 +12483,84 @@ 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. - """ + """Sort checkouts by the selected field.""" field: CheckoutSortField! } -enum CheckoutSortField { - """ - Sort checkouts by creation date. - """ +enum CheckoutSortField @doc(category: "Checkout") { + """Sort checkouts by creation date.""" CREATION_DATE - """ - Sort checkouts by customer. - """ + """Sort checkouts by customer.""" CUSTOMER - """ - Sort checkouts by payment. - """ + """Sort checkouts by payment.""" 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 { - """ - Pagination data for this connection. - """ +type CheckoutLineCountableConnection @doc(category: "Checkout") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [CheckoutLineCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type CheckoutLineCountableEdge { - """ - The item at the end of the edge. - """ +type CheckoutLineCountableEdge @doc(category: "Checkout") { + """The item at the end of the edge.""" node: CheckoutLine! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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. - """ + """Sort attributes by the selected field.""" field: AttributeSortField! } -enum AttributeSortField { - """ - Sort attributes by name - """ +enum AttributeSortField @doc(category: "Attributes") { + """Sort attributes by name""" NAME - """ - Sort attributes by slug - """ + """Sort attributes by slug""" SLUG - """ - Sort attributes by the value required flag - """ + """Sort attributes by the value required flag""" VALUE_REQUIRED - """ - Sort attributes by the variant only flag - """ + """Sort attributes by the variant only flag""" IS_VARIANT_ONLY - """ - Sort attributes by visibility in the storefront - """ + """Sort attributes by visibility in the storefront""" VISIBLE_IN_STOREFRONT - """ - Sort attributes by the filterable in storefront flag - """ + """Sort attributes by the filterable in storefront flag""" FILTERABLE_IN_STOREFRONT - """ - Sort attributes by the filterable in dashboard flag - """ + """Sort attributes by the filterable in dashboard flag""" FILTERABLE_IN_DASHBOARD - """ - Sort attributes by their position in storefront - """ + """Sort attributes by their position in storefront""" STOREFRONT_SEARCH_POSITION """ @@ -15107,121 +12569,88 @@ enum AttributeSortField { AVAILABLE_IN_GRID } -""" -Represents ongoing installation of app. -""" -type AppInstallation implements Node & Job { +"""Represents ongoing installation of app.""" +type AppInstallation implements Node & Job @doc(category: "Apps") { id: ID! - """ - Job status. - """ + """Job status.""" status: JobStatusEnum! - """ - Created date time of job in ISO 8601 format. - """ + """Created date time of job in ISO 8601 format.""" createdAt: DateTime! - """ - Date time of job last update in ISO 8601 format. - """ + """Date time of job last update in ISO 8601 format.""" updatedAt: DateTime! - """ - Job message. - """ + """Job message.""" message: String appName: String! manifestUrl: String! } -type AppCountableConnection { - """ - Pagination data for this connection. - """ +type AppCountableConnection @doc(category: "Apps") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [AppCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type AppCountableEdge { - """ - The item at the end of the edge. - """ +type AppCountableEdge @doc(category: "Apps") { + """The item at the end of the edge.""" node: App! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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. - """ + """Sort apps by the selected field.""" field: AppSortField! } -enum AppSortField { - """ - Sort apps by name. - """ +enum AppSortField @doc(category: "Apps") { + """Sort apps by name.""" NAME - """ - Sort apps by creation date. - """ + """Sort apps by creation date.""" CREATION_DATE } -type AppExtensionCountableConnection { - """ - Pagination data for this connection. - """ +type AppExtensionCountableConnection @doc(category: "Apps") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [AppExtensionCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type AppExtensionCountableEdge { - """ - The item at the end of the edge. - """ +type AppExtensionCountableEdge @doc(category: "Apps") { + """The item at the end of the edge.""" node: AppExtension! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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! @@ -15246,32 +12675,24 @@ type ChoiceValue { verbose: String } -type UserCountableConnection { - """ - Pagination data for this connection. - """ +type UserCountableConnection @doc(category: "Users") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [UserCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type UserCountableEdge { - """ - The item at the end of the edge. - """ +type UserCountableEdge @doc(category: "Users") { + """The item at the end of the edge.""" node: User! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" cursor: String! } -input CustomerFilterInput { +input CustomerFilterInput @doc(category: "Users") { dateJoined: DateRangeInput numberOfOrders: IntRangeInput placedOrders: DateRangeInput @@ -15279,1586 +12700,1289 @@ input CustomerFilterInput { metadata: [MetadataFilter!] """ - Filter by ids. - + Filter by ids. + Added in Saleor 3.8. """ ids: [ID!] 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. - """ + """Sort users by the selected field.""" field: UserSortField! } -enum UserSortField { - """ - Sort users by first name. - """ +enum UserSortField @doc(category: "Users") { + """Sort users by first name.""" FIRST_NAME - """ - Sort users by last name. - """ + """Sort users by last name.""" LAST_NAME - """ - Sort users by email. - """ + """Sort users by email.""" EMAIL - """ - Sort users by order count. - """ + """Sort users by order count.""" ORDER_COUNT - """ - Sort users by created at. - """ + """Sort users by created at.""" CREATED_AT - """ - Sort users by last modified at. - """ + """Sort users by last modified at.""" LAST_MODIFIED_AT } -type GroupCountableConnection { - """ - Pagination data for this connection. - """ +type GroupCountableConnection @doc(category: "Users") { + """Pagination data for this connection.""" pageInfo: PageInfo! edges: [GroupCountableEdge!]! - """ - A total count of items in the collection. - """ + """A total count of items in the collection.""" totalCount: Int } -type GroupCountableEdge { - """ - The item at the end of the edge. - """ +type GroupCountableEdge @doc(category: "Users") { + """The item at the end of the edge.""" node: Group! - """ - A cursor for use in pagination. - """ + """A cursor for use in pagination.""" 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. - """ + """Sort permission group by the selected field.""" field: PermissionGroupSortField! } -enum PermissionGroupSortField { - """ - Sort permission group accounts by name. - """ +"""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 { - """ - User account has been activated. - """ +"""Represents status of a staff account.""" +enum StaffMemberStatus @doc(category: "Users") { + """User account has been activated.""" ACTIVE - """ - User account has not been activated yet. - """ + """User account has not been activated yet.""" DEACTIVATED } type Mutation { """ - Creates a new webhook subscription. - + Creates a new webhook subscription. + Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ webhookCreate( - """ - Fields required to create a webhook. - """ + """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. - + 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. + Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ webhookDelete( - """ - ID of a webhook to delete. - """ + """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. + Updates a webhook subscription. + + Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ webhookUpdate( - """ - ID of a webhook to update. - """ + """ID of a webhook to update.""" id: ID! - """ - Fields required to update a webhook. - """ + """Fields required to update a webhook.""" input: WebhookUpdateInput! - ): WebhookUpdate + ): WebhookUpdate @doc(category: "Webhooks") """ - Retries event delivery. - + Retries event delivery. + Requires one of the following permissions: MANAGE_APPS. """ eventDeliveryRetry( - """ - ID of the event delivery to retry. - """ + """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. - + + 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. - """ + """The ID of an object to serialize.""" objectId: ID! - """ - The subscription query that defines the webhook event and its payload. - """ + """The subscription query that defines the webhook event and its payload.""" query: String! - ): WebhookDryRun + ): 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. - + + 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. - """ + """The ID of an object to serialize.""" objectId: ID! - """ - The ID of the webhook. - """ + """The ID of the webhook.""" webhookId: ID! - ): WebhookTrigger + ): WebhookTrigger @doc(category: "Webhooks") """ - Creates new warehouse. - + Creates new warehouse. + Requires one of the following permissions: MANAGE_PRODUCTS. """ createWarehouse( - """ - Fields required to create warehouse. - """ + """Fields required to create warehouse.""" input: WarehouseCreateInput! - ): WarehouseCreate + ): WarehouseCreate @doc(category: "Products") """ - Updates given warehouse. - + Updates given warehouse. + Requires one of the following permissions: MANAGE_PRODUCTS. """ updateWarehouse( - """ - ID of a warehouse to update. - """ + """ID of a warehouse to update.""" id: ID! - """ - Fields required to update warehouse. - """ + """Fields required to update warehouse.""" input: WarehouseUpdateInput! - ): WarehouseUpdate + ): WarehouseUpdate @doc(category: "Products") """ - Deletes selected warehouse. - + Deletes selected warehouse. + Requires one of the following permissions: MANAGE_PRODUCTS. """ deleteWarehouse( - """ - ID of a warehouse to delete. - """ + """ID of a warehouse to delete.""" id: ID! - ): WarehouseDelete + ): WarehouseDelete @doc(category: "Products") """ - Add shipping zone to given warehouse. - + Add shipping zone to given warehouse. + Requires one of the following permissions: MANAGE_PRODUCTS. """ assignWarehouseShippingZone( - """ - ID of a warehouse to update. - """ + """ID of a warehouse to update.""" id: ID! - """ - List of shipping zone IDs. - """ + """List of shipping zone IDs.""" shippingZoneIds: [ID!]! - ): WarehouseShippingZoneAssign + ): WarehouseShippingZoneAssign @doc(category: "Products") """ - Remove shipping zone from given warehouse. - + Remove shipping zone from given warehouse. + Requires one of the following permissions: MANAGE_PRODUCTS. """ unassignWarehouseShippingZone( - """ - ID of a warehouse to update. - """ + """ID of a warehouse to update.""" id: ID! - """ - List of shipping zone IDs. - """ + """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. - """ + """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 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. """ taxClassUpdate( - """ - ID of the tax class. - """ + """ID of the tax class.""" id: ID! - """ - Fields required to update a tax class. - """ + """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. """ taxConfigurationUpdate( - """ - ID of the tax configuration. - """ + """ID of the tax configuration.""" id: ID! - """ - Fields required to update the tax configuration. - """ + """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. """ taxCountryConfigurationUpdate( - """ - Country in which to update the tax class rates. - """ + """Country in which to update the tax class rates.""" countryCode: CountryCode! """ List of tax rates per tax class to update. When `{taxClass: id, rate: null`} is passed, it deletes the rate object for given taxClass ID. When `{rate: Int}` is passed without a tax class, it updates the default tax class for this country. """ updateTaxClassRates: [TaxClassRateInput!]! - ): TaxCountryConfigurationUpdate + ): 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. - """ + """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. """ taxExemptionManage( - """ - ID of the Checkout or Order object. - """ + """ID of the Checkout or Order object.""" id: ID! - """ - Determines if a taxes should be exempt. - """ + """Determines if a taxes should be exempt.""" taxExemption: Boolean! - ): TaxExemptionManage + ): TaxExemptionManage @doc(category: "Taxes") """ - Creates a new staff notification recipient. + 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 = reject_everything + """Input list of stocks to update.""" + stocks: [StockBulkUpdateInput!]! + ): StockBulkUpdate @doc(category: "Products") + + """ + Creates a new staff notification recipient. + Requires one of the following permissions: MANAGE_SETTINGS. """ staffNotificationRecipientCreate( - """ - Fields required to create a staff notification recipient. - """ + """Fields required to create a staff notification recipient.""" input: StaffNotificationRecipientInput! - ): StaffNotificationRecipientCreate + ): StaffNotificationRecipientCreate @doc(category: "Users") """ - Updates a staff notification recipient. - + Updates a staff notification recipient. + Requires one of the following permissions: MANAGE_SETTINGS. """ staffNotificationRecipientUpdate( - """ - ID of a staff notification recipient to update. - """ + """ID of a staff notification recipient to update.""" id: ID! - """ - Fields required to update a staff notification recipient. - """ + """Fields required to update a staff notification recipient.""" input: StaffNotificationRecipientInput! - ): StaffNotificationRecipientUpdate + ): StaffNotificationRecipientUpdate @doc(category: "Users") """ - Delete staff notification recipient. - + Delete staff notification recipient. + Requires one of the following permissions: MANAGE_SETTINGS. """ staffNotificationRecipientDelete( - """ - ID of a staff notification recipient to delete. - """ + """ID of a staff notification recipient to delete.""" id: ID! - ): StaffNotificationRecipientDelete + ): StaffNotificationRecipientDelete @doc(category: "Users") """ - Updates site domain of the shop. - + Updates site domain of the shop. + Requires one of the following permissions: MANAGE_SETTINGS. """ shopDomainUpdate( - """ - Fields required to update site. - """ + """Fields required to update site.""" input: SiteDomainInput - ): ShopDomainUpdate + ): ShopDomainUpdate @doc(category: "Shop") """ - Updates shop settings. - + Updates shop settings. + Requires one of the following permissions: MANAGE_SETTINGS. """ shopSettingsUpdate( - """ - Fields required to update shop settings. - """ + """Fields required to update shop settings.""" input: ShopSettingsInput! - ): ShopSettingsUpdate + ): ShopSettingsUpdate @doc(category: "Shop") """ - Fetch tax rates. - + 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. - + Creates/updates translations for shop settings. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ shopSettingsTranslate( - """ - Fields required to update shop settings translations. - """ + """Fields required to update shop settings translations.""" input: ShopSettingsTranslationInput! - """ - Translation language code. - """ + """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. - + Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. + Requires one of the following permissions: MANAGE_SETTINGS. """ shopAddressUpdate( - """ - Fields required to update shop address. - """ + """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. - """ + """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. - + Update gift card settings. + Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardSettingsUpdate( - """ - Fields required to update gift card settings. - """ + """Fields required to update gift card settings.""" input: GiftCardSettingsUpdateInput! - ): GiftCardSettingsUpdate + ): GiftCardSettingsUpdate @doc(category: "Gift cards") """ - Manage shipping method's availability in channels. - + Manage shipping method's availability in channels. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingMethodChannelListingUpdate( - """ - ID of a shipping method to update. - """ + """ID of a shipping method to update.""" id: ID! - """ - Fields required to update shipping method channel listings. - """ + """Fields required to update shipping method channel listings.""" input: ShippingMethodChannelListingInput! - ): ShippingMethodChannelListingUpdate + ): ShippingMethodChannelListingUpdate @doc(category: "Shipping") """ - Creates a new shipping price. - + Creates a new shipping price. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingPriceCreate( - """ - Fields required to create a shipping price. - """ + """Fields required to create a shipping price.""" input: ShippingPriceInput! - ): ShippingPriceCreate + ): ShippingPriceCreate @doc(category: "Shipping") """ - Deletes a shipping price. - + Deletes a shipping price. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingPriceDelete( - """ - ID of a shipping price to delete. - """ + """ID of a shipping price to delete.""" id: ID! - ): ShippingPriceDelete + ): ShippingPriceDelete @doc(category: "Shipping") """ - Deletes shipping prices. - + Deletes shipping prices. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingPriceBulkDelete( - """ - List of shipping price IDs to delete. - """ + """List of shipping price IDs to delete.""" ids: [ID!]! - ): ShippingPriceBulkDelete + ): ShippingPriceBulkDelete @doc(category: "Shipping") """ - Updates a new shipping price. - + Updates a new shipping price. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingPriceUpdate( - """ - ID of a shipping price to update. - """ + """ID of a shipping price to update.""" id: ID! - """ - Fields required to update a shipping price. - """ + """Fields required to update a shipping price.""" input: ShippingPriceInput! - ): ShippingPriceUpdate + ): ShippingPriceUpdate @doc(category: "Shipping") """ - Creates/updates translations for a shipping method. - + Creates/updates translations for a shipping method. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ shippingPriceTranslate( - """ - ShippingMethodType ID or ShippingMethodTranslatableContent ID. - """ + """ShippingMethodType ID or ShippingMethodTranslatableContent ID.""" id: ID! input: ShippingPriceTranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): ShippingPriceTranslate + ): ShippingPriceTranslate @doc(category: "Shipping") """ - Exclude products from shipping price. - + Exclude products from shipping price. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingPriceExcludeProducts( - """ - ID of a shipping price. - """ + """ID of a shipping price.""" id: ID! - """ - Exclude products input. - """ + """Exclude products input.""" input: ShippingPriceExcludeProductsInput! - ): ShippingPriceExcludeProducts + ): ShippingPriceExcludeProducts @doc(category: "Shipping") """ - Remove product from excluded list for shipping price. - + Remove product from excluded list for shipping price. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingPriceRemoveProductFromExclude( - """ - ID of a shipping price. - """ + """ID of a shipping price.""" id: ID! - """ - List of products which will be removed from excluded list. - """ + """List of products which will be removed from excluded list.""" products: [ID!]! - ): ShippingPriceRemoveProductFromExclude + ): ShippingPriceRemoveProductFromExclude @doc(category: "Shipping") """ - Creates a new shipping zone. - + Creates a new shipping zone. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingZoneCreate( - """ - Fields required to create a shipping zone. - """ + """Fields required to create a shipping zone.""" input: ShippingZoneCreateInput! - ): ShippingZoneCreate + ): ShippingZoneCreate @doc(category: "Shipping") """ - Deletes a shipping zone. - + Deletes a shipping zone. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingZoneDelete( - """ - ID of a shipping zone to delete. - """ + """ID of a shipping zone to delete.""" id: ID! - ): ShippingZoneDelete + ): ShippingZoneDelete @doc(category: "Shipping") """ - Deletes shipping zones. - + Deletes shipping zones. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingZoneBulkDelete( - """ - List of shipping zone IDs to delete. - """ + """List of shipping zone IDs to delete.""" ids: [ID!]! - ): ShippingZoneBulkDelete + ): ShippingZoneBulkDelete @doc(category: "Shipping") """ - Updates a new shipping zone. - + Updates a new shipping zone. + Requires one of the following permissions: MANAGE_SHIPPING. """ shippingZoneUpdate( - """ - ID of a shipping zone to update. - """ + """ID of a shipping zone to update.""" id: ID! - """ - Fields required to update a shipping zone. - """ + """Fields required to update a shipping zone.""" input: ShippingZoneUpdateInput! - ): ShippingZoneUpdate + ): ShippingZoneUpdate @doc(category: "Shipping") """ - Assign attributes to a given product type. - + Assign attributes to a given product type. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ productAttributeAssign( - """ - The operations to perform. - """ + """The operations to perform.""" operations: [ProductAttributeAssignInput!]! - """ - ID of the product type to assign the attributes into. - """ + """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. - - Added in Saleor 3.1. - + + Added in Saleor 3.1. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ productAttributeAssignmentUpdate( - """ - The operations to perform. - """ + """The operations to perform.""" operations: [ProductAttributeAssignmentUpdateInput!]! - """ - ID of the product type to assign the attributes into. - """ + """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. - + Un-assign attributes from a given product type. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ productAttributeUnassign( - """ - The IDs of the attributes to unassign. - """ + """The IDs of the attributes to unassign.""" attributeIds: [ID!]! - """ - ID of the product type from which the attributes should be unassigned. - """ + """ID of the product type from which the attributes should be unassigned.""" productTypeId: ID! - ): ProductAttributeUnassign + ): ProductAttributeUnassign @doc(category: "Products") """ - Creates a new category. - + Creates a new category. + Requires one of the following permissions: MANAGE_PRODUCTS. """ categoryCreate( - """ - Fields required to create a category. - """ + """Fields required to create a category.""" input: CategoryInput! """ ID of the parent category. If empty, category will be top level category. """ parent: ID - ): CategoryCreate + ): CategoryCreate @doc(category: "Products") """ - Deletes a category. - + Deletes a category. + Requires one of the following permissions: MANAGE_PRODUCTS. """ categoryDelete( - """ - ID of a category to delete. - """ + """ID of a category to delete.""" id: ID! - ): CategoryDelete + ): CategoryDelete @doc(category: "Products") """ - Deletes categories. - + Deletes categories. + Requires one of the following permissions: MANAGE_PRODUCTS. """ categoryBulkDelete( - """ - List of category IDs to delete. - """ + """List of category IDs to delete.""" ids: [ID!]! - ): CategoryBulkDelete + ): CategoryBulkDelete @doc(category: "Products") """ - Updates a category. - + Updates a category. + Requires one of the following permissions: MANAGE_PRODUCTS. """ categoryUpdate( - """ - ID of a category to update. - """ + """ID of a category to update.""" id: ID! - """ - Fields required to update a category. - """ + """Fields required to update a category.""" input: CategoryInput! - ): CategoryUpdate + ): CategoryUpdate @doc(category: "Products") """ - Creates/updates translations for a category. - + Creates/updates translations for a category. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ categoryTranslate( - """ - Category ID or CategoryTranslatableContent ID. - """ + """Category ID or CategoryTranslatableContent ID.""" id: ID! input: TranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): CategoryTranslate + ): CategoryTranslate @doc(category: "Products") """ - Adds products to a collection. - + Adds products to a collection. + Requires one of the following permissions: MANAGE_PRODUCTS. """ collectionAddProducts( - """ - ID of a collection. - """ + """ID of a collection.""" collectionId: ID! - """ - List of product IDs. - """ + """List of product IDs.""" products: [ID!]! - ): CollectionAddProducts + ): CollectionAddProducts @doc(category: "Products") """ - Creates a new collection. - + Creates a new collection. + Requires one of the following permissions: MANAGE_PRODUCTS. """ collectionCreate( - """ - Fields required to create a collection. - """ + """Fields required to create a collection.""" input: CollectionCreateInput! - ): CollectionCreate + ): CollectionCreate @doc(category: "Products") """ - Deletes a collection. - + Deletes a collection. + Requires one of the following permissions: MANAGE_PRODUCTS. """ collectionDelete( - """ - ID of a collection to delete. - """ + """ID of a collection to delete.""" id: ID! - ): CollectionDelete + ): CollectionDelete @doc(category: "Products") """ - Reorder the products of a collection. - + Reorder the products of a collection. + Requires one of the following permissions: MANAGE_PRODUCTS. """ collectionReorderProducts( - """ - ID of a collection. - """ + """ID of a collection.""" collectionId: ID! - """ - The collection products position operations. - """ + """The collection products position operations.""" moves: [MoveProductInput!]! - ): CollectionReorderProducts + ): CollectionReorderProducts @doc(category: "Products") """ - Deletes collections. - + Deletes collections. + Requires one of the following permissions: MANAGE_PRODUCTS. """ collectionBulkDelete( - """ - List of collection IDs to delete. - """ + """List of collection IDs to delete.""" ids: [ID!]! - ): CollectionBulkDelete + ): CollectionBulkDelete @doc(category: "Products") """ - Remove products from a collection. - + Remove products from a collection. + Requires one of the following permissions: MANAGE_PRODUCTS. """ collectionRemoveProducts( - """ - ID of a collection. - """ + """ID of a collection.""" collectionId: ID! - """ - List of product IDs. - """ + """List of product IDs.""" products: [ID!]! - ): CollectionRemoveProducts + ): CollectionRemoveProducts @doc(category: "Products") """ - Updates a collection. - + Updates a collection. + Requires one of the following permissions: MANAGE_PRODUCTS. """ collectionUpdate( - """ - ID of a collection to update. - """ + """ID of a collection to update.""" id: ID! - """ - Fields required to update a collection. - """ + """Fields required to update a collection.""" input: CollectionInput! - ): CollectionUpdate + ): CollectionUpdate @doc(category: "Products") """ - Creates/updates translations for a collection. - + Creates/updates translations for a collection. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ collectionTranslate( - """ - Collection ID or CollectionTranslatableContent ID. - """ + """Collection ID or CollectionTranslatableContent ID.""" id: ID! input: TranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): CollectionTranslate + ): CollectionTranslate @doc(category: "Products") """ - Manage collection's availability in channels. - + Manage collection's availability in channels. + Requires one of the following permissions: MANAGE_PRODUCTS. """ collectionChannelListingUpdate( - """ - ID of a collection to update. - """ + """ID of a collection to update.""" id: ID! - """ - Fields required to create or update collection channel listings. - """ + """Fields required to create or update collection channel listings.""" input: CollectionChannelListingUpdateInput! - ): CollectionChannelListingUpdate + ): CollectionChannelListingUpdate @doc(category: "Products") """ - Creates a new product. - + Creates a new product. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productCreate( - """ - Fields required to create a product. - """ + """Fields required to create a product.""" input: ProductCreateInput! - ): ProductCreate + ): ProductCreate @doc(category: "Products") """ - Deletes a product. - + Deletes a product. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productDelete( """ - External ID of a product to delete. - + External ID of a product to delete. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a product to delete. - """ + """ID of a product to delete.""" id: ID - ): ProductDelete + ): ProductDelete @doc(category: "Products") """ - 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. + """ + productBulkCreate( + """Policies of error handling.""" + errorPolicy: ErrorPolicyEnum = reject_everything + """Input list of products to create.""" + products: [ProductBulkCreateInput!]! + ): ProductBulkCreate @doc(category: "Products") + + """ + Deletes products. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productBulkDelete( - """ - List of product IDs to delete. - """ + """List of product IDs to delete.""" ids: [ID!]! - ): ProductBulkDelete + ): ProductBulkDelete @doc(category: "Products") """ - Updates an existing product. - + Updates an existing product. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productUpdate( """ - External ID of a product to update. - + External ID of a product to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a product to update. - """ + """ID of a product to update.""" id: ID - """ - Fields required to update a product. - """ + """Fields required to update a product.""" input: ProductInput! - ): ProductUpdate + ): ProductUpdate @doc(category: "Products") """ - Creates/updates translations for a product. - + Creates/updates translations for a product. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ productTranslate( - """ - Product ID or ProductTranslatableContent ID. - """ + """Product ID or ProductTranslatableContent ID.""" id: ID! input: TranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): ProductTranslate + ): ProductTranslate @doc(category: "Products") """ - Manage product's availability in channels. - + Manage product's availability in channels. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productChannelListingUpdate( - """ - ID of a product to update. - """ + """ID of a product to update.""" id: ID! - """ - Fields required to create or update product channel listings. - """ + """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 - + 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 + Requires one of the following permissions: MANAGE_PRODUCTS. """ productMediaCreate( - """ - Fields required to create a product media. - """ + """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. - + Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantReorder( - """ - The list of variant reordering operations. - """ + """The list of variant reordering operations.""" moves: [ReorderInput!]! - """ - Id of product that variants order will be altered. - """ + """Id of product that variants order will be altered.""" productId: ID! - ): ProductVariantReorder + ): ProductVariantReorder @doc(category: "Products") """ - Deletes a product media. - + Deletes a product media. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productMediaDelete( - """ - ID of a product media to delete. - """ + """ID of a product media to delete.""" id: ID! - ): ProductMediaDelete + ): ProductMediaDelete @doc(category: "Products") """ - Deletes product media. - + Deletes product media. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productMediaBulkDelete( - """ - List of product media IDs to delete. - """ + """List of product media IDs to delete.""" ids: [ID!]! - ): ProductMediaBulkDelete + ): ProductMediaBulkDelete @doc(category: "Products") """ - Changes ordering of the product media. - + Changes ordering of the product media. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productMediaReorder( - """ - IDs of a product media in the desired order. - """ + """IDs of a product media in the desired order.""" mediaIds: [ID!]! - """ - ID of product that media order will be altered. - """ + """ID of product that media order will be altered.""" productId: ID! - ): ProductMediaReorder + ): ProductMediaReorder @doc(category: "Products") """ - Updates a product media. - + Updates a product media. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productMediaUpdate( - """ - ID of a product media to update. - """ + """ID of a product media to update.""" id: ID! - """ - Fields required to update a product media. - """ + """Fields required to update a product media.""" input: ProductMediaUpdateInput! - ): ProductMediaUpdate + ): ProductMediaUpdate @doc(category: "Products") """ - Creates a new product type. - + Creates a new product type. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ productTypeCreate( - """ - Fields required to create a product type. - """ + """Fields required to create a product type.""" input: ProductTypeInput! - ): ProductTypeCreate + ): ProductTypeCreate @doc(category: "Products") """ - Deletes a product type. - + Deletes a product type. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ productTypeDelete( - """ - ID of a product type to delete. - """ + """ID of a product type to delete.""" id: ID! - ): ProductTypeDelete + ): ProductTypeDelete @doc(category: "Products") """ - Deletes product types. - + Deletes product types. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ productTypeBulkDelete( - """ - List of product type IDs to delete. - """ + """List of product type IDs to delete.""" ids: [ID!]! - ): ProductTypeBulkDelete + ): ProductTypeBulkDelete @doc(category: "Products") """ - Updates an existing product type. - + Updates an existing product type. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ productTypeUpdate( - """ - ID of a product type to update. - """ + """ID of a product type to update.""" id: ID! - """ - Fields required to update a product type. - """ + """Fields required to update a product type.""" input: ProductTypeInput! - ): ProductTypeUpdate + ): ProductTypeUpdate @doc(category: "Products") """ - Reorder the attributes of a product type. - + Reorder the attributes of a product type. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ productTypeReorderAttributes( - """ - The list of attribute reordering operations. - """ + """The list of attribute reordering operations.""" moves: [ReorderInput!]! - """ - ID of a product type. - """ + """ID of a product type.""" productTypeId: ID! - """ - The attribute type to reorder. - """ + """The attribute type to reorder.""" type: ProductAttributeType! - ): ProductTypeReorderAttributes + ): ProductTypeReorderAttributes @doc(category: "Products") """ - Reorder product attribute values. - + Reorder product attribute values. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productReorderAttributeValues( - """ - ID of an attribute. - """ + """ID of an attribute.""" attributeId: ID! - """ - The list of reordering operations for given attribute values. - """ + """The list of reordering operations for given attribute values.""" moves: [ReorderInput!]! - """ - ID of a product. - """ + """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 - + 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 + Requires one of the following permissions: MANAGE_PRODUCTS. """ digitalContentCreate( - """ - Fields required to create a digital content. - """ + """Fields required to create a digital content.""" input: DigitalContentUploadInput! - """ - ID of a product variant to upload digital content. - """ + """ID of a product variant to upload digital content.""" variantId: ID! - ): DigitalContentCreate + ): DigitalContentCreate @doc(category: "Products") """ - Remove digital content assigned to given variant. - + Remove digital content assigned to given variant. + Requires one of the following permissions: MANAGE_PRODUCTS. """ digitalContentDelete( - """ - ID of a product variant with digital content to remove. - """ + """ID of a product variant with digital content to remove.""" variantId: ID! - ): DigitalContentDelete + ): DigitalContentDelete @doc(category: "Products") """ - Update digital content. - + Update digital content. + Requires one of the following permissions: MANAGE_PRODUCTS. """ digitalContentUpdate( - """ - Fields required to update a digital content. - """ + """Fields required to update a digital content.""" input: DigitalContentInput! - """ - ID of a product variant with digital content to update. - """ + """ID of a product variant with digital content to update.""" variantId: ID! - ): DigitalContentUpdate + ): DigitalContentUpdate @doc(category: "Products") """ - Generate new URL to digital content. - + Generate new URL to digital content. + Requires one of the following permissions: MANAGE_PRODUCTS. """ digitalContentUrlCreate( - """ - Fields required to create a new url. - """ + """Fields required to create a new url.""" input: DigitalContentUrlCreateInput! - ): DigitalContentUrlCreate + ): DigitalContentUrlCreate @doc(category: "Products") """ - Creates a new variant for a product. - + Creates a new variant for a product. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantCreate( - """ - Fields required to create a product variant. - """ + """Fields required to create a product variant.""" input: ProductVariantCreateInput! - ): ProductVariantCreate + ): ProductVariantCreate @doc(category: "Products") """ - Deletes a product variant. - + Deletes a product variant. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantDelete( """ - External ID of a product variant to update. - + External ID of a product variant to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a product variant to delete. - """ + """ID of a product variant to delete.""" id: ID """ SKU of a product variant to delete. - + Added in Saleor 3.8. """ sku: String - ): ProductVariantDelete + ): ProductVariantDelete @doc(category: "Products") """ - Creates product variants for a given product. - + Creates product variants for a given product. + 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 = reject_everything - """ - ID of the product to create the variants for. - """ + """ID of the product to create the variants for.""" product: ID! - """ - Input list of product variants to create. - """ + """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. - + + 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 - """ + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" errorPolicy: ErrorPolicyEnum = reject_everything - """ - ID of the product to update the variants for. - """ + """ID of the product to update the variants for.""" product: ID! - """ - Input list of product variants to update. - """ + """Input list of product variants to update.""" variants: [ProductVariantBulkUpdateInput!]! - ): ProductVariantBulkUpdate + ): ProductVariantBulkUpdate @doc(category: "Products") """ - Deletes product variants. - + Deletes product variants. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantBulkDelete( - """ - List of product variant IDs to delete. - """ + """List of product variant IDs to delete.""" ids: [ID!] """ List of product variant SKUs to delete. - + Added in Saleor 3.8. """ skus: [String!] - ): ProductVariantBulkDelete + ): ProductVariantBulkDelete @doc(category: "Products") """ - Creates stocks for product variant. - + Creates stocks for product variant. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantStocksCreate( - """ - Input list of stocks to create. - """ + """Input list of stocks to create.""" stocks: [StockInput!]! - """ - ID of a product variant for which stocks will be created. - """ + """ID of a product variant for which stocks will be created.""" variantId: ID! - ): ProductVariantStocksCreate + ): ProductVariantStocksCreate @doc(category: "Products") """ - Delete stocks from product variant. - + Delete stocks from product variant. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantStocksDelete( - """ - SKU of product variant for which stocks will be deleted. - """ + """SKU of product variant for which stocks will be deleted.""" sku: String - """ - ID of product variant for which stocks will be deleted. - """ + """ID of product variant for which stocks will be deleted.""" variantId: ID - """ - Input list of warehouse IDs. - """ + """Input list of warehouse IDs.""" warehouseIds: [ID!] - ): ProductVariantStocksDelete + ): ProductVariantStocksDelete @doc(category: "Products") """ - Update stocks for product variant. - + Update stocks for product variant. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantStocksUpdate( - """ - SKU of product variant for which stocks will be updated. - """ + """SKU of product variant for which stocks will be updated.""" sku: String - """ - Input list of stocks to create or update. - """ + """Input list of stocks to create or update.""" stocks: [StockInput!]! - """ - ID of a product variant for which stocks will be updated. - """ + """ID of a product variant for which stocks will be updated.""" variantId: ID - ): ProductVariantStocksUpdate + ): ProductVariantStocksUpdate @doc(category: "Products") """ - Updates an existing variant for product. - + Updates an existing variant for product. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantUpdate( """ - External ID of a product variant to update. - + External ID of a product variant to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a product to update. - """ + """ID of a product to update.""" id: ID - """ - Fields required to update a product variant. - """ + """Fields required to update a product variant.""" input: ProductVariantInput! """ SKU of a product variant to update. - + Added in Saleor 3.8. """ sku: String - ): ProductVariantUpdate + ): ProductVariantUpdate @doc(category: "Products") """ - Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. - + Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantSetDefault( - """ - Id of a product that will have the default variant set. - """ + """Id of a product that will have the default variant set.""" productId: ID! - """ - Id of a variant that will be set as default. - """ + """Id of a variant that will be set as default.""" variantId: ID! - ): ProductVariantSetDefault + ): ProductVariantSetDefault @doc(category: "Products") """ - Creates/updates translations for a product variant. - + Creates/updates translations for a product variant. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ productVariantTranslate( - """ - ProductVariant ID or ProductVariantTranslatableContent ID. - """ + """ProductVariant ID or ProductVariantTranslatableContent ID.""" id: ID! input: NameTranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): ProductVariantTranslate + ): ProductVariantTranslate @doc(category: "Products") """ - Manage product variant prices in channels. - + Manage product variant prices in channels. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantChannelListingUpdate( - """ - ID of a product variant to update. - """ + """ID of a product variant to update.""" id: ID """ @@ -16868,221 +13992,171 @@ type Mutation { """ SKU of a product variant to update. - + Added in Saleor 3.8. """ sku: String - ): ProductVariantChannelListingUpdate + ): ProductVariantChannelListingUpdate @doc(category: "Products") """ - Reorder product variant attribute values. - + Reorder product variant attribute values. + Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantReorderAttributeValues( - """ - ID of an attribute. - """ + """ID of an attribute.""" attributeId: ID! - """ - The list of reordering operations for given attribute values. - """ + """The list of reordering operations for given attribute values.""" moves: [ReorderInput!]! - """ - ID of a product variant. - """ + """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 of a variant which preorder should be deactivated.""" id: ID! - ): ProductVariantPreorderDeactivate + ): ProductVariantPreorderDeactivate @doc(category: "Products") """ - Assign an media to a product variant. - + Assign an media to a product variant. + Requires one of the following permissions: MANAGE_PRODUCTS. """ variantMediaAssign( - """ - ID of a product media to assign to a variant. - """ + """ID of a product media to assign to a variant.""" mediaId: ID! - """ - ID of a product variant. - """ + """ID of a product variant.""" variantId: ID! - ): VariantMediaAssign + ): VariantMediaAssign @doc(category: "Products") """ - Unassign an media from a product variant. - + Unassign an media from a product variant. + Requires one of the following permissions: MANAGE_PRODUCTS. """ variantMediaUnassign( - """ - ID of a product media to unassign from a variant. - """ + """ID of a product media to unassign from a variant.""" mediaId: ID! - """ - ID of a product variant. - """ + """ID of a product variant.""" variantId: ID! - ): VariantMediaUnassign + ): VariantMediaUnassign @doc(category: "Products") """ - Captures the authorized payment amount. - + Captures the authorized payment amount. + Requires one of the following permissions: MANAGE_ORDERS. """ paymentCapture( - """ - Transaction amount. - """ + """Transaction amount.""" amount: PositiveDecimal - """ - Payment ID. - """ + """Payment ID.""" paymentId: ID! - ): PaymentCapture + ): PaymentCapture @doc(category: "Payments") """ - Refunds the captured payment amount. - + Refunds the captured payment amount. + Requires one of the following permissions: MANAGE_ORDERS. """ paymentRefund( - """ - Transaction amount. - """ + """Transaction amount.""" amount: PositiveDecimal - """ - Payment ID. - """ + """Payment ID.""" paymentId: ID! - ): PaymentRefund + ): PaymentRefund @doc(category: "Payments") """ - Voids the authorized payment. - + Voids the authorized payment. + Requires one of the following permissions: MANAGE_ORDERS. """ paymentVoid( - """ - Payment ID. - """ + """Payment ID.""" paymentId: ID! - ): PaymentVoid + ): PaymentVoid @doc(category: "Payments") - """ - Initializes payment process when it is required by gateway. - """ + """Initializes payment process when it is required by gateway.""" paymentInitialize( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String - """ - A gateway name used to initialize the payment. - """ + """A gateway name used to initialize the payment.""" gateway: String! - """ - Client-side generated data required to initialize the payment. - """ + """Client-side generated data required to initialize the payment.""" paymentData: JSONString - ): PaymentInitialize + ): PaymentInitialize @doc(category: "Payments") - """ - Check payment balance. - """ + """Check payment balance.""" paymentCheckBalance( - """ - Fields required to check payment balance. - """ + """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. - """ + """The ID of the checkout or order.""" id: ID! - """ - Input data required to create a new transaction object. - """ + """Input data required to create a new transaction object.""" transaction: TransactionCreateInput! - """ - Data that defines a transaction event. - """ + """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. - """ + """The ID of the transaction.""" id: ID! - """ - Input data required to create a new transaction object. - """ + """Input data required to create a new transaction object.""" transaction: TransactionUpdateInput - """ - Data that defines a transaction transaction. - """ + """Data that defines a transaction transaction.""" transactionEvent: TransactionEventInput - ): TransactionUpdate + ): TransactionUpdate @doc(category: "Payments") """ Request an action for payment transaction. - + 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. + + 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. """ transactionRequestAction( - """ - Determines the action type. - """ + """Determines the action type.""" actionType: TransactionActionEnum! """ @@ -17090,716 +14164,699 @@ type Mutation { """ amount: PositiveDecimal - """ - The ID of the transaction. - """ + """The ID of the transaction.""" id: ID! - ): TransactionRequestAction + ): TransactionRequestAction @doc(category: "Payments") """ - Creates a new page. + 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. + Requires one of the following permissions: MANAGE_PAGES. """ pageCreate( - """ - Fields required to create a page. - """ + """Fields required to create a page.""" input: PageCreateInput! - ): PageCreate + ): PageCreate @doc(category: "Pages") """ - Deletes a page. - + Deletes a page. + Requires one of the following permissions: MANAGE_PAGES. """ pageDelete( - """ - ID of a page to delete. - """ + """ID of a page to delete.""" id: ID! - ): PageDelete + ): PageDelete @doc(category: "Pages") """ - Deletes pages. - + Deletes pages. + Requires one of the following permissions: MANAGE_PAGES. """ pageBulkDelete( - """ - List of page IDs to delete. - """ + """List of page IDs to delete.""" ids: [ID!]! - ): PageBulkDelete + ): PageBulkDelete @doc(category: "Pages") """ - Publish pages. - + Publish pages. + Requires one of the following permissions: MANAGE_PAGES. """ pageBulkPublish( - """ - List of page IDs to (un)publish. - """ + """List of page IDs to (un)publish.""" ids: [ID!]! - """ - Determine if pages will be published or not. - """ + """Determine if pages will be published or not.""" isPublished: Boolean! - ): PageBulkPublish + ): PageBulkPublish @doc(category: "Pages") """ - Updates an existing page. - + Updates an existing page. + Requires one of the following permissions: MANAGE_PAGES. """ pageUpdate( - """ - ID of a page to update. - """ + """ID of a page to update.""" id: ID! - """ - Fields required to update a page. - """ + """Fields required to update a page.""" input: PageInput! - ): PageUpdate + ): PageUpdate @doc(category: "Pages") """ - Creates/updates translations for a page. - + Creates/updates translations for a page. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ pageTranslate( - """ - Page ID or PageTranslatableContent ID. - """ + """Page ID or PageTranslatableContent ID.""" id: ID! input: PageTranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): PageTranslate + ): PageTranslate @doc(category: "Pages") """ - Create a new page type. - + Create a new page type. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ pageTypeCreate( - """ - Fields required to create page type. - """ + """Fields required to create page type.""" input: PageTypeCreateInput! - ): PageTypeCreate + ): PageTypeCreate @doc(category: "Pages") """ - Update page type. - + Update page type. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ pageTypeUpdate( - """ - ID of the page type to update. - """ + """ID of the page type to update.""" id: ID - """ - Fields required to update page type. - """ + """Fields required to update page type.""" input: PageTypeUpdateInput! - ): PageTypeUpdate + ): PageTypeUpdate @doc(category: "Pages") """ - Delete a page type. - + Delete a page type. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ pageTypeDelete( - """ - ID of the page type to delete. - """ + """ID of the page type to delete.""" id: ID! - ): PageTypeDelete + ): PageTypeDelete @doc(category: "Pages") """ - Delete page types. - + Delete page types. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ pageTypeBulkDelete( - """ - List of page type IDs to delete - """ + """List of page type IDs to delete""" ids: [ID!]! - ): PageTypeBulkDelete + ): PageTypeBulkDelete @doc(category: "Pages") """ - Assign attributes to a given page type. - + Assign attributes to a given page type. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ pageAttributeAssign( - """ - The IDs of the attributes to assign. - """ + """The IDs of the attributes to assign.""" attributeIds: [ID!]! - """ - ID of the page type to assign the attributes into. - """ + """ID of the page type to assign the attributes into.""" pageTypeId: ID! - ): PageAttributeAssign + ): PageAttributeAssign @doc(category: "Pages") """ - Unassign attributes from a given page type. - + Unassign attributes from a given page type. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ pageAttributeUnassign( - """ - The IDs of the attributes to unassign. - """ + """The IDs of the attributes to unassign.""" attributeIds: [ID!]! - """ - ID of the page type from which the attributes should be unassign. - """ + """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. - + Reorder the attributes of a page type. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ pageTypeReorderAttributes( - """ - The list of attribute reordering operations. - """ + """The list of attribute reordering operations.""" moves: [ReorderInput!]! - """ - ID of a page type. - """ + """ID of a page type.""" pageTypeId: ID! - ): PageTypeReorderAttributes + ): PageTypeReorderAttributes @doc(category: "Pages") """ - Reorder page attribute values. - + Reorder page attribute values. + Requires one of the following permissions: MANAGE_PAGES. """ pageReorderAttributeValues( - """ - ID of an attribute. - """ + """ID of an attribute.""" attributeId: ID! - """ - The list of reordering operations for given attribute values. - """ + """The list of reordering operations for given attribute values.""" moves: [ReorderInput!]! - """ - ID of a page. - """ + """ID of a page.""" pageId: ID! - ): PageReorderAttributeValues + ): PageReorderAttributeValues @doc(category: "Pages") """ - Completes creating an order. - + Completes creating an order. + Requires one of the following permissions: MANAGE_ORDERS. """ draftOrderComplete( - """ - ID of the order that will be completed. - """ + """ID of the order that will be completed.""" id: ID! - ): DraftOrderComplete + ): DraftOrderComplete @doc(category: "Orders") """ - Creates a new draft order. - + Creates a new draft order. + Requires one of the following permissions: MANAGE_ORDERS. """ draftOrderCreate( - """ - Fields required to create an order. - """ + """Fields required to create an order.""" input: DraftOrderCreateInput! - ): DraftOrderCreate + ): DraftOrderCreate @doc(category: "Orders") """ - Deletes a draft order. - + Deletes a draft order. + Requires one of the following permissions: MANAGE_ORDERS. """ draftOrderDelete( """ - External ID of a product to delete. - + External ID of a product to delete. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a product to delete. - """ + """ID of a product to delete.""" id: ID - ): DraftOrderDelete + ): DraftOrderDelete @doc(category: "Orders") """ - Deletes draft orders. - + Deletes draft orders. + Requires one of the following permissions: MANAGE_ORDERS. """ draftOrderBulkDelete( - """ - List of draft order IDs to delete. - """ + """List of draft order IDs to delete.""" ids: [ID!]! - ): DraftOrderBulkDelete + ): DraftOrderBulkDelete @doc(category: "Orders") """ - Deletes order lines. - + Deletes order lines. + Requires one of the following permissions: MANAGE_ORDERS. """ draftOrderLinesBulkDelete( - """ - List of order lines IDs to delete. - """ + """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. - + Updates a draft order. + Requires one of the following permissions: MANAGE_ORDERS. """ draftOrderUpdate( """ - External ID of a draft order to update. - + External ID of a draft order to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a draft order to update. - """ + """ID of a draft order to update.""" id: ID - """ - Fields required to update an order. - """ + """Fields required to update an order.""" input: DraftOrderInput! - ): DraftOrderUpdate + ): DraftOrderUpdate @doc(category: "Orders") """ - Adds note to the order. - + Adds note to the order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderAddNote( - """ - ID of the order to add a note for. - """ + """ID of the order to add a note for.""" order: ID! - """ - Fields required to create a note for the order. - """ + """Fields required to create a note for the order.""" input: OrderAddNoteInput! - ): OrderAddNote + ): OrderAddNote @doc(category: "Orders") """ - Cancel an order. - + Cancel an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderCancel( - """ - ID of the order to cancel. - """ + """ID of the order to cancel.""" id: ID! - ): OrderCancel + ): OrderCancel @doc(category: "Orders") """ - Capture an order. - + Capture an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderCapture( - """ - Amount of money to capture. - """ + """Amount of money to capture.""" amount: PositiveDecimal! - """ - ID of the order to capture. - """ + """ID of the order to capture.""" id: ID! - ): OrderCapture + ): OrderCapture @doc(category: "Orders") """ - Confirms an unconfirmed order by changing status to unfulfilled. - + Confirms an unconfirmed order by changing status to unfulfilled. + Requires one of the following permissions: MANAGE_ORDERS. """ orderConfirm( - """ - ID of an order to confirm. - """ + """ID of an order to confirm.""" id: ID! - ): OrderConfirm + ): OrderConfirm @doc(category: "Orders") """ - Creates new fulfillments for an order. - + Creates new fulfillments for an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderFulfill( - """ - Fields required to create a fulfillment. - """ + """Fields required to create a fulfillment.""" input: OrderFulfillInput! - """ - ID of the order to be fulfilled. - """ + """ID of the order to be fulfilled.""" order: ID - ): OrderFulfill + ): OrderFulfill @doc(category: "Orders") """ - Cancels existing fulfillment and optionally restocks items. - + Cancels existing fulfillment and optionally restocks items. + Requires one of the following permissions: MANAGE_ORDERS. """ orderFulfillmentCancel( - """ - ID of a fulfillment to cancel. - """ + """ID of a fulfillment to cancel.""" id: ID! - """ - Fields required to cancel a fulfillment. - """ + """Fields required to cancel a fulfillment.""" input: FulfillmentCancelInput - ): FulfillmentCancel + ): FulfillmentCancel @doc(category: "Orders") """ Approve existing fulfillment. - - Added in Saleor 3.1. - + + Added in Saleor 3.1. + Requires one of the following permissions: MANAGE_ORDERS. """ orderFulfillmentApprove( - """ - True if stock could be exceeded. - """ + """True if stock could be exceeded.""" allowStockToBeExceeded: Boolean = false - """ - ID of a fulfillment to approve. - """ + """ID of a fulfillment to approve.""" id: ID! - """ - True if confirmation email should be send. - """ + """True if confirmation email should be send.""" notifyCustomer: Boolean! - ): FulfillmentApprove + ): FulfillmentApprove @doc(category: "Orders") """ - Updates a fulfillment for an order. - + Updates a fulfillment for an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderFulfillmentUpdateTracking( - """ - ID of a fulfillment to update. - """ + """ID of a fulfillment to update.""" id: ID! - """ - Fields required to update a fulfillment. - """ + """Fields required to update a fulfillment.""" input: FulfillmentUpdateTrackingInput! - ): FulfillmentUpdateTracking + ): FulfillmentUpdateTracking @doc(category: "Orders") """ - Refund products. - + Refund products. + Requires one of the following permissions: MANAGE_ORDERS. """ orderFulfillmentRefundProducts( - """ - Fields required to create an refund fulfillment. - """ + """Fields required to create an refund fulfillment.""" input: OrderRefundProductsInput! - """ - ID of the order to be refunded. - """ + """ID of the order to be refunded.""" order: ID! - ): FulfillmentRefundProducts + ): FulfillmentRefundProducts @doc(category: "Orders") """ - Return products. - + Return products. + Requires one of the following permissions: MANAGE_ORDERS. """ orderFulfillmentReturnProducts( - """ - Fields required to return products. - """ + """Fields required to return products.""" input: OrderReturnProductsInput! - """ - ID of the order to be returned. - """ + """ID of the order to be returned.""" order: ID! - ): FulfillmentReturnProducts + ): FulfillmentReturnProducts @doc(category: "Orders") """ - Create order lines for an order. + 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. + Requires one of the following permissions: MANAGE_ORDERS. """ orderLinesCreate( - """ - ID of the order to add the lines to. - """ + """ID of the order to add the lines to.""" id: ID! - """ - Fields required to add order lines. - """ + """Fields required to add order lines.""" input: [OrderLineCreateInput!]! - ): OrderLinesCreate + ): OrderLinesCreate @doc(category: "Orders") """ - Deletes an order line from an order. - + Deletes an order line from an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderLineDelete( - """ - ID of the order line to delete. - """ + """ID of the order line to delete.""" id: ID! - ): OrderLineDelete + ): OrderLineDelete @doc(category: "Orders") """ - Updates an order line of an order. - + Updates an order line of an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderLineUpdate( - """ - ID of the order line to update. - """ + """ID of the order line to update.""" id: ID! - """ - Fields required to update an order line. - """ + """Fields required to update an order line.""" input: OrderLineInput! - ): OrderLineUpdate + ): OrderLineUpdate @doc(category: "Orders") """ - Adds discount to the order. - + Adds discount to the order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderDiscountAdd( - """ - Fields required to create a discount for the order. - """ + """Fields required to create a discount for the order.""" input: OrderDiscountCommonInput! - """ - ID of an order to discount. - """ + """ID of an order to discount.""" orderId: ID! - ): OrderDiscountAdd + ): OrderDiscountAdd @doc(category: "Orders") """ - Update discount for the order. - + Update discount for the order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderDiscountUpdate( - """ - ID of a discount to update. - """ + """ID of a discount to update.""" discountId: ID! - """ - Fields required to update a discount for the order. - """ + """Fields required to update a discount for the order.""" input: OrderDiscountCommonInput! - ): OrderDiscountUpdate + ): OrderDiscountUpdate @doc(category: "Orders") """ - Remove discount from the order. - + Remove discount from the order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderDiscountDelete( - """ - ID of a discount to remove. - """ + """ID of a discount to remove.""" discountId: ID! - ): OrderDiscountDelete + ): OrderDiscountDelete @doc(category: "Orders") """ - Update discount for the order line. - + Update discount for the order line. + Requires one of the following permissions: MANAGE_ORDERS. """ orderLineDiscountUpdate( - """ - Fields required to update price for the order line. - """ + """Fields required to update price for the order line.""" input: OrderDiscountCommonInput! - """ - ID of a order line to update price - """ + """ID of a order line to update price""" orderLineId: ID! - ): OrderLineDiscountUpdate + ): OrderLineDiscountUpdate @doc(category: "Orders") """ - Remove discount applied to the order line. - + Remove discount applied to the order line. + Requires one of the following permissions: MANAGE_ORDERS. """ orderLineDiscountRemove( - """ - ID of a order line to remove its discount - """ + """ID of a order line to remove its discount""" orderLineId: ID! - ): OrderLineDiscountRemove + ): OrderLineDiscountRemove @doc(category: "Orders") """ - Mark order as manually paid. - + Mark order as manually paid. + Requires one of the following permissions: MANAGE_ORDERS. """ orderMarkAsPaid( - """ - ID of the order to mark paid. - """ + """ID of the order to mark paid.""" id: ID! - """ - The external transaction reference. - """ + """The external transaction reference.""" transactionReference: String - ): OrderMarkAsPaid + ): OrderMarkAsPaid @doc(category: "Orders") """ - Refund an order. - + Refund an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderRefund( - """ - Amount of money to refund. - """ + """Amount of money to refund.""" amount: PositiveDecimal! - """ - ID of the order to refund. - """ + """ID of the order to refund.""" id: ID! - ): OrderRefund + ): OrderRefund @doc(category: "Orders") """ - Updates an order. - + Updates an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderUpdate( """ - External ID of an order to update. - + External ID of an order to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of an order to update. - """ + """ID of an order to update.""" id: ID - """ - Fields required to update an order. - """ + """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. - + Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed. + Requires one of the following permissions: MANAGE_ORDERS. """ orderUpdateShipping( - """ - ID of the order to update a shipping method. - """ + """ID of the order to update a shipping method.""" order: ID! - """ - Fields required to change shipping method of the order. - """ + """Fields required to change shipping method of the order.""" input: OrderUpdateShippingInput! - ): OrderUpdateShipping + ): OrderUpdateShipping @doc(category: "Orders") """ - Void an order. - + Void an order. + Requires one of the following permissions: MANAGE_ORDERS. """ orderVoid( - """ - ID of the order to void. - """ + """ID of the order to void.""" id: ID! - ): OrderVoid + ): OrderVoid @doc(category: "Orders") """ - Cancels orders. - + Cancels orders. + Requires one of the following permissions: MANAGE_ORDERS. """ orderBulkCancel( - """ - List of orders IDs to cancel. - """ + """List of orders IDs to cancel.""" ids: [ID!]! - ): OrderBulkCancel + ): OrderBulkCancel @doc(category: "Orders") """ Delete metadata of an object. To use it, you need to have access to the modified object. """ deleteMetadata( - """ - ID or token (for Order and Checkout) of an object to update. - """ + """ID or token (for Order and Checkout) of an object to update.""" id: ID! - """ - Metadata keys to delete. - """ + """Metadata keys to delete.""" keys: [String!]! ): DeleteMetadata @@ -17807,14 +14864,10 @@ type Mutation { Delete object's private metadata. To use it, you need to be an authenticated staff user or an app and have access to the modified object. """ deletePrivateMetadata( - """ - ID or token (for Order and Checkout) of an object to update. - """ + """ID or token (for Order and Checkout) of an object to update.""" id: ID! - """ - Metadata keys to delete. - """ + """Metadata keys to delete.""" keys: [String!]! ): DeletePrivateMetadata @@ -17822,14 +14875,10 @@ type Mutation { Updates metadata of an object. To use it, you need to have access to the modified object. """ updateMetadata( - """ - ID or token (for Order and Checkout) of an object to update. - """ + """ID or token (for Order and Checkout) of an object to update.""" id: ID! - """ - Fields required to update the object's metadata. - """ + """Fields required to update the object's metadata.""" input: [MetadataInput!]! ): UpdateMetadata @@ -17837,90 +14886,72 @@ type Mutation { Updates private metadata of an object. To use it, you need to be an authenticated staff user or an app and have access to the modified object. """ updatePrivateMetadata( - """ - ID or token (for Order and Checkout) of an object to update. - """ + """ID or token (for Order and Checkout) of an object to update.""" id: ID! - """ - Fields required to update the object's metadata. - """ + """Fields required to update the object's metadata.""" input: [MetadataInput!]! ): UpdatePrivateMetadata """ - Assigns storefront's navigation menus. - + Assigns storefront's navigation menus. + Requires one of the following permissions: MANAGE_MENUS, MANAGE_SETTINGS. """ assignNavigation( - """ - ID of the menu. - """ + """ID of the menu.""" menu: ID - """ - Type of the navigation bar to assign the menu to. - """ + """Type of the navigation bar to assign the menu to.""" navigationType: NavigationType! - ): AssignNavigation + ): AssignNavigation @doc(category: "Menu") """ - Creates a new Menu. - + Creates a new Menu. + Requires one of the following permissions: MANAGE_MENUS. """ menuCreate( - """ - Fields required to create a menu. - """ + """Fields required to create a menu.""" input: MenuCreateInput! - ): MenuCreate + ): MenuCreate @doc(category: "Menu") """ - Deletes a menu. - + Deletes a menu. + Requires one of the following permissions: MANAGE_MENUS. """ menuDelete( - """ - ID of a menu to delete. - """ + """ID of a menu to delete.""" id: ID! - ): MenuDelete + ): MenuDelete @doc(category: "Menu") """ - Deletes menus. - + Deletes menus. + Requires one of the following permissions: MANAGE_MENUS. """ menuBulkDelete( - """ - List of menu IDs to delete. - """ + """List of menu IDs to delete.""" ids: [ID!]! - ): MenuBulkDelete + ): MenuBulkDelete @doc(category: "Menu") """ - Updates a menu. - + Updates a menu. + Requires one of the following permissions: MANAGE_MENUS. """ menuUpdate( - """ - ID of a menu to update. - """ + """ID of a menu to update.""" id: ID! - """ - Fields required to update a menu. - """ + """Fields required to update a menu.""" input: MenuInput! - ): MenuUpdate + ): MenuUpdate @doc(category: "Menu") """ - Creates a new menu item. - + Creates a new menu item. + Requires one of the following permissions: MANAGE_MENUS. """ menuItemCreate( @@ -17928,366 +14959,288 @@ 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. - + Deletes a menu item. + Requires one of the following permissions: MANAGE_MENUS. """ menuItemDelete( - """ - ID of a menu item to delete. - """ + """ID of a menu item to delete.""" id: ID! - ): MenuItemDelete + ): MenuItemDelete @doc(category: "Menu") """ - Deletes menu items. - + Deletes menu items. + Requires one of the following permissions: MANAGE_MENUS. """ menuItemBulkDelete( - """ - List of menu item IDs to delete. - """ + """List of menu item IDs to delete.""" ids: [ID!]! - ): MenuItemBulkDelete + ): MenuItemBulkDelete @doc(category: "Menu") """ - Updates a menu item. - + Updates a menu item. + Requires one of the following permissions: MANAGE_MENUS. """ menuItemUpdate( - """ - ID of a menu item to update. - """ + """ID of a menu item to update.""" id: ID! """ Fields required to update a menu item. Only one of `url`, `category`, `page`, `collection` is allowed per item. """ input: MenuItemInput! - ): MenuItemUpdate + ): MenuItemUpdate @doc(category: "Menu") """ - Creates/updates translations for a menu item. - + Creates/updates translations for a menu item. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ menuItemTranslate( - """ - MenuItem ID or MenuItemTranslatableContent ID. - """ + """MenuItem ID or MenuItemTranslatableContent ID.""" id: ID! input: NameTranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): MenuItemTranslate + ): MenuItemTranslate @doc(category: "Menu") """ - Moves items of menus. - + Moves items of menus. + Requires one of the following permissions: MANAGE_MENUS. """ menuItemMove( - """ - ID of the menu. - """ + """ID of the menu.""" menu: ID! - """ - The menu position data. - """ + """The menu position data.""" moves: [MenuItemMoveInput!]! - ): MenuItemMove + ): MenuItemMove @doc(category: "Menu") """ - Request an invoice for the order using plugin. - + Request an invoice for the order using plugin. + Requires one of the following permissions: MANAGE_ORDERS. """ invoiceRequest( - """ - Invoice number, if not provided it will be generated. - """ + """Invoice number, if not provided it will be generated.""" number: String - """ - ID of the order related to invoice. - """ + """ID of the order related to invoice.""" orderId: ID! - ): InvoiceRequest + ): InvoiceRequest @doc(category: "Orders") """ - Requests deletion of an invoice. - + Requests deletion of an invoice. + Requires one of the following permissions: MANAGE_ORDERS. """ invoiceRequestDelete( - """ - ID of an invoice to request the deletion. - """ + """ID of an invoice to request the deletion.""" id: ID! - ): InvoiceRequestDelete + ): InvoiceRequestDelete @doc(category: "Orders") """ - Creates a ready to send invoice. - + Creates a ready to send invoice. + Requires one of the following permissions: MANAGE_ORDERS. """ invoiceCreate( - """ - Fields required when creating an invoice. - """ + """Fields required when creating an invoice.""" input: InvoiceCreateInput! - """ - ID of the order related to invoice. - """ + """ID of the order related to invoice.""" orderId: ID! - ): InvoiceCreate + ): InvoiceCreate @doc(category: "Orders") """ - Deletes an invoice. - + Deletes an invoice. + Requires one of the following permissions: MANAGE_ORDERS. """ invoiceDelete( - """ - ID of an invoice to delete. - """ + """ID of an invoice to delete.""" id: ID! - ): InvoiceDelete + ): InvoiceDelete @doc(category: "Orders") """ - Updates an invoice. - + Updates an invoice. + Requires one of the following permissions: MANAGE_ORDERS. """ invoiceUpdate( - """ - ID of an invoice to update. - """ + """ID of an invoice to update.""" id: ID! - """ - Fields to use when updating an invoice. - """ + """Fields to use when updating an invoice.""" input: UpdateInvoiceInput! - ): InvoiceUpdate + ): InvoiceUpdate @doc(category: "Orders") """ - Send an invoice notification to the customer. - + Send an invoice notification to the customer. + Requires one of the following permissions: MANAGE_ORDERS. """ invoiceSendNotification( - """ - ID of an invoice to be sent. - """ + """ID of an invoice to be sent.""" id: ID! - ): InvoiceSendNotification + ): InvoiceSendNotification @doc(category: "Orders") """ - Activate a gift card. - + Activate a gift card. + Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardActivate( - """ - ID of a gift card to activate. - """ + """ID of a gift card to activate.""" id: ID! - ): GiftCardActivate + ): GiftCardActivate @doc(category: "Gift cards") """ - Creates a new gift card. - + Creates a new gift card. + Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardCreate( - """ - Fields required to create a gift card. - """ + """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 of the gift card to delete.""" id: ID! - ): GiftCardDelete + ): GiftCardDelete @doc(category: "Gift cards") """ - Deactivate a gift card. - + Deactivate a gift card. + Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardDeactivate( - """ - ID of a gift card to deactivate. - """ + """ID of a gift card to deactivate.""" id: ID! - ): GiftCardDeactivate + ): GiftCardDeactivate @doc(category: "Gift cards") """ - Update a gift card. - + Update a gift card. + Requires one of the following permissions: MANAGE_GIFT_CARD. """ giftCardUpdate( - """ - ID of a gift card to update. - """ + """ID of a gift card to update.""" id: ID! - """ - Fields required to update a gift card. - """ + """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. - """ + """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. """ giftCardAddNote( - """ - ID of the gift card to add a note for. - """ + """ID of the gift card to add a note for.""" id: ID! - """ - Fields required to create a note for the gift card. - """ + """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. - """ + """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. - """ + """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. - """ + """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. - """ + """List of gift card IDs to deactivate.""" ids: [ID!]! - ): GiftCardBulkDeactivate + ): GiftCardBulkDeactivate @doc(category: "Gift cards") """ - Update plugin configuration. - + Update plugin configuration. + Requires one of the following permissions: MANAGE_PLUGINS. """ pluginUpdate( - """ - ID of a channel for which the data should be modified. - """ + """ID of a channel for which the data should be modified.""" channelId: ID - """ - ID of plugin to update. - """ + """ID of plugin to update.""" id: ID! - """ - Fields required to update a plugin configuration. - """ + """Fields required to update a plugin configuration.""" input: PluginUpdateInput! ): PluginUpdate """ Trigger sending a notification with the notify plugin method. Serializes nodes provided as ids parameter and includes this data in the notification payload. - + Added in Saleor 3.1. """ externalNotificationTrigger( @@ -18296,400 +15249,324 @@ type Mutation { """ channel: String! - """ - Input for External Notification Trigger. - """ + """Input for External Notification Trigger.""" input: ExternalNotificationTriggerInput! - """ - The ID of notification plugin. - """ + """The ID of notification plugin.""" pluginId: String ): ExternalNotificationTrigger """ - Creates a new sale. - + Creates a new sale. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ saleCreate( - """ - Fields required to create a sale. - """ + """Fields required to create a sale.""" input: SaleInput! - ): SaleCreate + ): SaleCreate @doc(category: "Discounts") """ - Deletes a sale. - + Deletes a sale. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ saleDelete( - """ - ID of a sale to delete. - """ + """ID of a sale to delete.""" id: ID! - ): SaleDelete + ): SaleDelete @doc(category: "Discounts") """ - Deletes sales. - + Deletes sales. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ saleBulkDelete( - """ - List of sale IDs to delete. - """ + """List of sale IDs to delete.""" ids: [ID!]! - ): SaleBulkDelete + ): SaleBulkDelete @doc(category: "Discounts") """ - Updates a sale. - + Updates a sale. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ saleUpdate( - """ - ID of a sale to update. - """ + """ID of a sale to update.""" id: ID! - """ - Fields required to update a sale. - """ + """Fields required to update a sale.""" input: SaleInput! - ): SaleUpdate + ): SaleUpdate @doc(category: "Discounts") """ - Adds products, categories, collections to a voucher. - + Adds products, categories, collections to a voucher. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ saleCataloguesAdd( - """ - ID of a sale. - """ + """ID of a sale.""" id: ID! - """ - Fields required to modify catalogue IDs of sale. - """ + """Fields required to modify catalogue IDs of sale.""" input: CatalogueInput! - ): SaleAddCatalogues + ): SaleAddCatalogues @doc(category: "Discounts") """ - Removes products, categories, collections from a sale. - + Removes products, categories, collections from a sale. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ saleCataloguesRemove( - """ - ID of a sale. - """ + """ID of a sale.""" id: ID! - """ - Fields required to modify catalogue IDs of sale. - """ + """Fields required to modify catalogue IDs of sale.""" input: CatalogueInput! - ): SaleRemoveCatalogues + ): SaleRemoveCatalogues @doc(category: "Discounts") """ - Creates/updates translations for a sale. - + Creates/updates translations for a sale. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ saleTranslate( - """ - Sale ID or SaleTranslatableContent ID. - """ + """Sale ID or SaleTranslatableContent ID.""" id: ID! input: NameTranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): SaleTranslate + ): SaleTranslate @doc(category: "Discounts") """ - Manage sale's availability in channels. - + Manage sale's availability in channels. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ saleChannelListingUpdate( - """ - ID of a sale to update. - """ + """ID of a sale to update.""" id: ID! - """ - Fields required to update sale channel listings. - """ + """Fields required to update sale channel listings.""" input: SaleChannelListingInput! - ): SaleChannelListingUpdate + ): SaleChannelListingUpdate @doc(category: "Discounts") """ - Creates a new voucher. - + Creates a new voucher. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ voucherCreate( - """ - Fields required to create a voucher. - """ + """Fields required to create a voucher.""" input: VoucherInput! - ): VoucherCreate + ): VoucherCreate @doc(category: "Discounts") """ - Deletes a voucher. - + Deletes a voucher. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ voucherDelete( - """ - ID of a voucher to delete. - """ + """ID of a voucher to delete.""" id: ID! - ): VoucherDelete + ): VoucherDelete @doc(category: "Discounts") """ - Deletes vouchers. - + Deletes vouchers. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ voucherBulkDelete( - """ - List of voucher IDs to delete. - """ + """List of voucher IDs to delete.""" ids: [ID!]! - ): VoucherBulkDelete + ): VoucherBulkDelete @doc(category: "Discounts") """ - Updates a voucher. - + Updates a voucher. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ voucherUpdate( - """ - ID of a voucher to update. - """ + """ID of a voucher to update.""" id: ID! - """ - Fields required to update a voucher. - """ + """Fields required to update a voucher.""" input: VoucherInput! - ): VoucherUpdate + ): VoucherUpdate @doc(category: "Discounts") """ - Adds products, categories, collections to a voucher. - + Adds products, categories, collections to a voucher. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ voucherCataloguesAdd( - """ - ID of a voucher. - """ + """ID of a voucher.""" id: ID! - """ - Fields required to modify catalogue IDs of voucher. - """ + """Fields required to modify catalogue IDs of voucher.""" input: CatalogueInput! - ): VoucherAddCatalogues + ): VoucherAddCatalogues @doc(category: "Discounts") """ - Removes products, categories, collections from a voucher. - + Removes products, categories, collections from a voucher. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ voucherCataloguesRemove( - """ - ID of a voucher. - """ + """ID of a voucher.""" id: ID! - """ - Fields required to modify catalogue IDs of voucher. - """ + """Fields required to modify catalogue IDs of voucher.""" input: CatalogueInput! - ): VoucherRemoveCatalogues + ): VoucherRemoveCatalogues @doc(category: "Discounts") """ - Creates/updates translations for a voucher. - + Creates/updates translations for a voucher. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ voucherTranslate( - """ - Voucher ID or VoucherTranslatableContent ID. - """ + """Voucher ID or VoucherTranslatableContent ID.""" id: ID! input: NameTranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): VoucherTranslate + ): VoucherTranslate @doc(category: "Discounts") """ - Manage voucher's availability in channels. - + Manage voucher's availability in channels. + Requires one of the following permissions: MANAGE_DISCOUNTS. """ voucherChannelListingUpdate( - """ - ID of a voucher to update. - """ + """ID of a voucher to update.""" id: ID! - """ - Fields required to update voucher channel listings. - """ + """Fields required to update voucher channel listings.""" input: VoucherChannelListingInput! - ): VoucherChannelListingUpdate + ): VoucherChannelListingUpdate @doc(category: "Discounts") """ - Export products to csv file. - + Export products to csv file. + Requires one of the following permissions: MANAGE_PRODUCTS. """ exportProducts( - """ - Fields required to export product data. - """ + """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. - """ + """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 - + 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 + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ fileUpload( - """ - Represents a file in a multipart request. - """ + """Represents a file in a multipart request.""" file: Upload! ): FileUpload - """ - Adds a gift card or a voucher to a checkout. - """ + """Adds a gift card or a voucher to a checkout.""" checkoutAddPromoCode( """ The ID of the checkout. - + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID - """ - Gift card code or voucher code. - """ + """Gift card code or voucher code.""" promoCode: String! """ Checkout token. - + 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. - """ + """Update billing address in the existing checkout.""" checkoutBillingAddressUpdate( - """ - The billing address of the checkout. - """ + """The billing address of the checkout.""" billingAddress: AddressInput! """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID """ Checkout token. - + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID """ 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. """ checkoutComplete( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID """ Fields required to update the checkout metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] - """ - Client-side generated data required to finalize the payment. - """ + """Client-side generated data required to finalize the payment.""" paymentData: JSONString """ @@ -18698,39 +15575,35 @@ type Mutation { redirectUrl: String """ - Determines whether to store the payment source for future usage. - + Determines whether to store the payment source for future usage. + DEPRECATED: this field will be removed in Saleor 4.0. Use checkoutPaymentCreate for this action. """ storeSource: Boolean = false """ Checkout token. - + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutComplete + ): CheckoutComplete @doc(category: "Checkout") - """ - Create a new checkout. - """ + """Create a new checkout.""" checkoutCreate( - """ - Fields required to create checkout. - """ + """Fields required to create checkout.""" input: CheckoutCreateInput! - ): CheckoutCreate + ): CheckoutCreate @doc(category: "Checkout") """ - Sets the customer as the owner of the checkout. - + Sets the customer as the owner of the checkout. + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER. """ checkoutCustomerAttach( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID @@ -18742,150 +15615,135 @@ type Mutation { """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID """ Checkout token. - + 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. - + Removes the user assigned as the owner of the checkout. + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER. """ checkoutCustomerDetach( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID """ Checkout token. - + 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. - """ + """Updates email address in the existing checkout object.""" checkoutEmailUpdate( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID - """ - email. - """ + """email.""" email: String! """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID """ Checkout token. - + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID - ): CheckoutEmailUpdate + ): CheckoutEmailUpdate @doc(category: "Checkout") - """ - Deletes a CheckoutLine. - """ + """Deletes a CheckoutLine.""" checkoutLineDelete( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID - """ - ID of the checkout line to delete. - """ + """ID of the checkout line to delete.""" lineId: ID """ Checkout token. - + 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. - """ + """Deletes checkout lines.""" checkoutLinesDelete( """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID - """ - A list of checkout lines. - """ + """A list of checkout lines.""" linesIds: [ID!]! """ Checkout token. - + 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. """ checkoutLinesAdd( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID @@ -18897,26 +15755,24 @@ type Mutation { """ Checkout token. - + 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. - """ + """Updates checkout line in the existing checkout.""" checkoutLinesUpdate( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID @@ -18928,235 +15784,200 @@ type Mutation { """ Checkout token. - + 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. - """ + """Remove a gift card or a voucher from a checkout.""" checkoutRemovePromoCode( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID - """ - Gift card code or voucher code. - """ + """Gift card code or voucher code.""" promoCode: String - """ - Gift card or voucher ID. - """ + """Gift card or voucher ID.""" promoCodeId: ID """ Checkout token. - + 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. - """ + """Create a new payment for given checkout.""" checkoutPaymentCreate( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID - """ - Data required to create a new payment. - """ + """Data required to create a new payment.""" input: PaymentInput! """ Checkout token. - + 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. - """ + """Update shipping address in the existing checkout.""" checkoutShippingAddressUpdate( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID - """ - The mailing address to where the checkout will be shipped. - """ + """The mailing address to where the checkout will be shipped.""" shippingAddress: AddressInput! """ Checkout token. - + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ token: UUID """ 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. - """ + """Updates the shipping method of the checkout.""" checkoutShippingMethodUpdate( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID - """ - Shipping method. - """ + """Shipping method.""" shippingMethodId: ID! """ Checkout token. - + 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). - """ + """Delivery Method ID (`Warehouse` ID or `ShippingMethod` ID).""" deliveryMethodId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID """ Checkout token. - + 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. - """ + """Update language code in the existing checkout.""" checkoutLanguageCodeUpdate( """ - The ID of the checkout. - + The ID of the checkout. + DEPRECATED: this field will be removed in Saleor 4.0. Use `id` instead. """ checkoutId: ID """ The checkout's ID. - + Added in Saleor 3.4. """ id: ID - """ - New language code. - """ + """New language code.""" languageCode: LanguageCodeEnum! """ Checkout token. - + 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. - """ + """ID of a checkout that will be converted to an order.""" id: ID! """ Fields required to update the checkout metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] """ Fields required to update the checkout private metadata. - + Added in Saleor 3.8. """ privateMetadata: [MetadataInput!] @@ -19165,455 +15986,364 @@ 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. - + Creates new channel. + Requires one of the following permissions: MANAGE_CHANNELS. """ channelCreate( - """ - Fields required to create channel. - """ + """Fields required to create channel.""" input: ChannelCreateInput! - ): ChannelCreate + ): ChannelCreate @doc(category: "Channels") """ 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. - """ + """ID of a channel to update.""" id: ID! - """ - Fields required to update a channel. - """ + """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. - + Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. + Requires one of the following permissions: MANAGE_CHANNELS. """ channelDelete( - """ - ID of a channel to delete. - """ + """ID of a channel to delete.""" id: ID! - """ - Fields required to delete a channel. - """ + """Fields required to delete a channel.""" input: ChannelDeleteInput - ): ChannelDelete + ): ChannelDelete @doc(category: "Channels") """ - Activate a channel. - + Activate a channel. + Requires one of the following permissions: MANAGE_CHANNELS. """ channelActivate( - """ - ID of the channel to activate. - """ + """ID of the channel to activate.""" id: ID! - ): ChannelActivate + ): ChannelActivate @doc(category: "Channels") """ - Deactivate a channel. - + Deactivate a channel. + Requires one of the following permissions: MANAGE_CHANNELS. """ channelDeactivate( - """ - ID of the channel to deactivate. - """ + """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. """ channelReorderWarehouses( - """ - ID of a channel. - """ + """ID of a channel.""" channelId: ID! - """ - The list of reordering operations for the given channel warehouses. - """ + """The list of reordering operations for the given channel warehouses.""" moves: [ReorderInput!]! - ): ChannelReorderWarehouses + ): ChannelReorderWarehouses @doc(category: "Channels") - """ - Creates an attribute. - """ + """Creates an attribute.""" attributeCreate( - """ - Fields required to create an attribute. - """ + """Fields required to create an attribute.""" input: AttributeCreateInput! - ): AttributeCreate + ): AttributeCreate @doc(category: "Attributes") """ - Deletes an attribute. - + Deletes an attribute. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ attributeDelete( """ - External ID of an attribute to delete. - + External ID of an attribute to delete. + Added in Saleor 3.10. """ externalReference: String - """ - ID of an attribute to delete. - """ + """ID of an attribute to delete.""" id: ID - ): AttributeDelete + ): AttributeDelete @doc(category: "Attributes") """ - Updates attribute. - + Updates attribute. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ attributeUpdate( """ - External ID of an attribute to update. - + External ID of an attribute to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of an attribute to update. - """ + """ID of an attribute to update.""" id: ID - """ - Fields required to update an attribute. - """ + """Fields required to update an attribute.""" input: AttributeUpdateInput! - ): AttributeUpdate + ): AttributeUpdate @doc(category: "Attributes") """ - Creates/updates translations for an attribute. - + Creates/updates translations for an attribute. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ attributeTranslate( - """ - Attribute ID or AttributeTranslatableContent ID. - """ + """Attribute ID or AttributeTranslatableContent ID.""" id: ID! input: NameTranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): AttributeTranslate + ): AttributeTranslate @doc(category: "Attributes") """ - Deletes attributes. - + Deletes attributes. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ attributeBulkDelete( - """ - List of attribute IDs to delete. - """ + """List of attribute IDs to delete.""" ids: [ID!]! - ): AttributeBulkDelete + ): AttributeBulkDelete @doc(category: "Attributes") """ - Deletes values of attributes. - + Deletes values of attributes. + Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ attributeValueBulkDelete( - """ - List of attribute value IDs to delete. - """ + """List of attribute value IDs to delete.""" ids: [ID!]! - ): AttributeValueBulkDelete + ): AttributeValueBulkDelete @doc(category: "Attributes") """ - Creates a value for an attribute. - + Creates a value for an attribute. + Requires one of the following permissions: MANAGE_PRODUCTS. """ attributeValueCreate( - """ - Attribute to which value will be assigned. - """ + """Attribute to which value will be assigned.""" attribute: ID! - """ - Fields required to create an AttributeValue. - """ + """Fields required to create an AttributeValue.""" input: AttributeValueCreateInput! - ): AttributeValueCreate + ): AttributeValueCreate @doc(category: "Attributes") """ - Deletes a value of an attribute. - + Deletes a value of an attribute. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ attributeValueDelete( """ - External ID of a value to delete. - + External ID of a value to delete. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a value to delete. - """ + """ID of a value to delete.""" id: ID - ): AttributeValueDelete + ): AttributeValueDelete @doc(category: "Attributes") """ - Updates value of an attribute. - + Updates value of an attribute. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ attributeValueUpdate( """ - External ID of an AttributeValue to update. - + External ID of an AttributeValue to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of an AttributeValue to update. - """ + """ID of an AttributeValue to update.""" id: ID - """ - Fields required to update an AttributeValue. - """ + """Fields required to update an AttributeValue.""" input: AttributeValueUpdateInput! - ): AttributeValueUpdate + ): AttributeValueUpdate @doc(category: "Attributes") """ - Creates/updates translations for an attribute value. - + Creates/updates translations for an attribute value. + Requires one of the following permissions: MANAGE_TRANSLATIONS. """ attributeValueTranslate( - """ - AttributeValue ID or AttributeValueTranslatableContent ID. - """ + """AttributeValue ID or AttributeValueTranslatableContent ID.""" id: ID! input: AttributeValueTranslationInput! - """ - Translation language code. - """ + """Translation language code.""" languageCode: LanguageCodeEnum! - ): AttributeValueTranslate + ): AttributeValueTranslate @doc(category: "Attributes") """ - Reorder the values of an attribute. - + Reorder the values of an attribute. + Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ attributeReorderValues( - """ - ID of an attribute. - """ + """ID of an attribute.""" attributeId: ID! - """ - The list of reordering operations for given attribute values. - """ + """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. """ appCreate( - """ - Fields required to create a new app. - """ + """Fields required to create a new app.""" input: AppInput! - ): AppCreate + ): AppCreate @doc(category: "Apps") """ - Updates an existing app. - + Updates an existing app. + Requires one of the following permissions: MANAGE_APPS. """ appUpdate( - """ - ID of an app to update. - """ + """ID of an app to update.""" id: ID! - """ - Fields required to update an existing app. - """ + """Fields required to update an existing app.""" input: AppInput! - ): AppUpdate + ): AppUpdate @doc(category: "Apps") """ - Deletes an app. - + Deletes an app. + Requires one of the following permissions: MANAGE_APPS. """ appDelete( - """ - ID of an app to delete. - """ + """ID of an app to delete.""" id: ID! - ): AppDelete + ): AppDelete @doc(category: "Apps") """ - Creates a new token. - + Creates a new token. + Requires one of the following permissions: MANAGE_APPS. """ appTokenCreate( - """ - Fields required to create a new auth token. - """ + """Fields required to create a new auth token.""" input: AppTokenInput! - ): AppTokenCreate + ): AppTokenCreate @doc(category: "Apps") """ - Deletes an authentication token assigned to app. - + Deletes an authentication token assigned to app. + Requires one of the following permissions: MANAGE_APPS. """ appTokenDelete( - """ - ID of an auth token to delete. - """ + """ID of an auth token to delete.""" id: ID! - ): AppTokenDelete + ): AppTokenDelete @doc(category: "Apps") - """ - Verify provided app token. - """ + """Verify provided app token.""" appTokenVerify( - """ - App token to verify. - """ + """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. """ appInstall( - """ - Fields required to install a new app. - """ + """Fields required to install a new app.""" input: AppInstallInput! - ): AppInstall + ): AppInstall @doc(category: "Apps") """ - Retry failed installation of new app. - + Retry failed installation of new app. + Requires one of the following permissions: MANAGE_APPS. """ appRetryInstall( - """ - Determine if app will be set active or not. - """ + """Determine if app will be set active or not.""" activateAfterInstallation: Boolean = true - """ - ID of failed installation. - """ + """ID of failed installation.""" id: ID! - ): AppRetryInstall + ): AppRetryInstall @doc(category: "Apps") """ - Delete failed installation. - + Delete failed installation. + Requires one of the following permissions: MANAGE_APPS. """ appDeleteFailedInstallation( - """ - ID of failed installation to delete. - """ + """ID of failed installation to delete.""" id: ID! - ): AppDeleteFailedInstallation + ): AppDeleteFailedInstallation @doc(category: "Apps") """ - Fetch and validate manifest. - + 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. - + Activate the app. + Requires one of the following permissions: MANAGE_APPS. """ appActivate( - """ - ID of app to activate. - """ + """ID of app to activate.""" id: ID! - ): AppActivate + ): AppActivate @doc(category: "Apps") """ - Deactivate the app. - + Deactivate the app. + Requires one of the following permissions: MANAGE_APPS. """ appDeactivate( - """ - ID of app to deactivate. - """ + """ID of app to deactivate.""" id: ID! - ): AppDeactivate + ): AppDeactivate @doc(category: "Apps") - """ - Create JWT token. - """ + """Create JWT token.""" tokenCreate( """ 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 - """ - Email of a user. - """ + """Email of a user.""" email: String! - """ - Password of a user. - """ + """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. @@ -19624,179 +16354,123 @@ type Mutation { """ csrfToken: String - """ - Refresh token. - """ + """Refresh token.""" refreshToken: String - ): RefreshToken + ): RefreshToken @doc(category: "Authentication") - """ - Verify JWT token. - """ + """Verify JWT token.""" tokenVerify( - """ - JWT token to validate. - """ + """JWT token to validate.""" token: String! - ): VerifyToken + ): VerifyToken @doc(category: "Authentication") """ - Deactivate all JWT tokens of the currently authenticated user. - + 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. - """ + """The data required by plugin to create external authentication url.""" input: JSONString! - """ - The ID of the authentication plugin. - """ + """The ID of the authentication plugin.""" pluginId: String! - ): ExternalAuthenticationUrl + ): ExternalAuthenticationUrl @doc(category: "Authentication") - """ - Obtain external access tokens for user by custom plugin. - """ + """Obtain external access tokens for user by custom plugin.""" externalObtainAccessTokens( - """ - The data required by plugin to create authentication data. - """ + """The data required by plugin to create authentication data.""" input: JSONString! - """ - The ID of the authentication plugin. - """ + """The ID of the authentication plugin.""" pluginId: String! - ): ExternalObtainAccessTokens + ): ExternalObtainAccessTokens @doc(category: "Authentication") - """ - Refresh user's access by custom plugin. - """ + """Refresh user's access by custom plugin.""" externalRefresh( - """ - The data required by plugin to proceed the refresh process. - """ + """The data required by plugin to proceed the refresh process.""" input: JSONString! - """ - The ID of the authentication plugin. - """ + """The ID of the authentication plugin.""" pluginId: String! - ): ExternalRefresh + ): ExternalRefresh @doc(category: "Authentication") - """ - Logout user by custom plugin. - """ + """Logout user by custom plugin.""" externalLogout( - """ - The data required by plugin to proceed the logout process. - """ + """The data required by plugin to proceed the logout process.""" input: JSONString! - """ - The ID of the authentication plugin. - """ + """The ID of the authentication plugin.""" pluginId: String! - ): ExternalLogout + ): ExternalLogout @doc(category: "Authentication") - """ - Verify external authentication data by plugin. - """ + """Verify external authentication data by plugin.""" externalVerify( - """ - The data required by plugin to proceed the verification. - """ + """The data required by plugin to proceed the verification.""" input: JSONString! - """ - The ID of the authentication plugin. - """ + """The ID of the authentication plugin.""" pluginId: String! - ): ExternalVerify + ): ExternalVerify @doc(category: "Authentication") - """ - Sends an email with the account password modification link. - """ + """Sends an email with the account password modification link.""" requestPasswordReset( """ Slug of a channel which will be used for notify user. Optional when only one channel exists. """ channel: String - """ - Email of the user that will be used for password recovery. - """ + """Email of the user that will be used for password recovery.""" email: String! """ URL of a view where users should be redirected to reset the password. URL in RFC 1808 format. """ redirectUrl: String! - ): RequestPasswordReset + ): RequestPasswordReset @doc(category: "Users") - """ - Confirm user account with token sent by email during registration. - """ + """Confirm user account with token sent by email during registration.""" confirmAccount( - """ - E-mail of the user performing account confirmation. - """ + """E-mail of the user performing account confirmation.""" email: String! - """ - A one-time token required to confirm the account. - """ + """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. """ setPassword( - """ - Email of a user. - """ + """Email of a user.""" email: String! - """ - Password of a user. - """ + """Password of a user.""" password: String! - """ - A one-time token required to set the password. - """ + """A one-time token required to set the password.""" token: String! - ): SetPassword + ): SetPassword @doc(category: "Users") """ - Change the password of the logged in user. - + Change the password of the logged in user. + Requires one of the following permissions: AUTHENTICATED_USER. """ passwordChange( - """ - New user password. - """ + """New user password.""" newPassword: String! - """ - Current user password. - """ - oldPassword: String! - ): PasswordChange + """Current user password.""" + oldPassword: String + ): PasswordChange @doc(category: "Users") """ - Request email change of the logged in user. - + Request email change of the logged in user. + Requires one of the following permissions: AUTHENTICATED_USER. """ requestEmailChange( @@ -19805,25 +16479,21 @@ type Mutation { """ channel: String - """ - New user email. - """ + """New user email.""" newEmail: String! - """ - User password. - """ + """User password.""" password: String! """ URL of a view where users should be redirected to update the email address. URL in RFC 1808 format. """ redirectUrl: String! - ): RequestEmailChange + ): RequestEmailChange @doc(category: "Users") """ - Confirm the email change of the logged-in user. - + Confirm the email change of the logged-in user. + Requires one of the following permissions: AUTHENTICATED_USER. """ confirmEmailChange( @@ -19832,96 +16502,76 @@ type Mutation { """ channel: String - """ - A one-time token required to change the email. - """ + """A one-time token required to change the email.""" token: String! - ): ConfirmEmailChange + ): ConfirmEmailChange @doc(category: "Users") """ - Create a new address for the customer. - + Create a new address for the customer. + Requires one of the following permissions: AUTHENTICATED_USER. """ accountAddressCreate( - """ - Fields required to create address. - """ + """Fields required to create address.""" input: AddressInput! """ A type of address. If provided, the new address will be automatically assigned as the customer's default address of that type. """ type: AddressTypeEnum - ): AccountAddressCreate + ): AccountAddressCreate @doc(category: "Users") """ Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. """ accountAddressUpdate( - """ - ID of the address to update. - """ + """ID of the address to update.""" id: ID! - """ - Fields required to update the address. - """ + """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. """ accountAddressDelete( - """ - ID of the address to delete. - """ + """ID of the address to delete.""" id: ID! - ): AccountAddressDelete + ): AccountAddressDelete @doc(category: "Users") """ - Sets a default address for the authenticated user. - + Sets a default address for the authenticated user. + Requires one of the following permissions: AUTHENTICATED_USER. """ accountSetDefaultAddress( - """ - ID of the address to set as default. - """ + """ID of the address to set as default.""" id: ID! - """ - The type of address. - """ + """The type of address.""" type: AddressTypeEnum! - ): AccountSetDefaultAddress + ): AccountSetDefaultAddress @doc(category: "Users") - """ - Register a new user. - """ + """Register a new user.""" accountRegister( - """ - Fields required to create a user. - """ + """Fields required to create a user.""" input: AccountRegisterInput! - ): AccountRegister + ): AccountRegister @doc(category: "Users") """ - Updates the account of the logged-in user. - + Updates the account of the logged-in user. + Requires one of the following permissions: AUTHENTICATED_USER. """ accountUpdate( - """ - Fields required to update the account of the logged-in user. - """ + """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. - + Sends an email with the account removal link for the logged-in user. + Requires one of the following permissions: AUTHENTICATED_USER. """ accountRequestDeletion( @@ -19934,11 +16584,11 @@ 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. - + Remove user account. + Requires one of the following permissions: AUTHENTICATED_USER. """ accountDelete( @@ -19946,458 +16596,409 @@ 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. - + Creates user address. + Requires one of the following permissions: MANAGE_USERS. """ addressCreate( - """ - Fields required to create address. - """ + """Fields required to create address.""" input: AddressInput! - """ - ID of a user to create address for. - """ + """ID of a user to create address for.""" userId: ID! - ): AddressCreate + ): AddressCreate @doc(category: "Users") """ - Updates an address. - + Updates an address. + Requires one of the following permissions: MANAGE_USERS. """ addressUpdate( - """ - ID of the address to update. - """ + """ID of the address to update.""" id: ID! - """ - Fields required to update the address. - """ + """Fields required to update the address.""" input: AddressInput! - ): AddressUpdate + ): AddressUpdate @doc(category: "Users") """ - Deletes an address. - + Deletes an address. + Requires one of the following permissions: MANAGE_USERS. """ addressDelete( - """ - ID of the address to delete. - """ + """ID of the address to delete.""" id: ID! - ): AddressDelete + ): AddressDelete @doc(category: "Users") """ - Sets a default address for the given user. - + Sets a default address for the given user. + Requires one of the following permissions: MANAGE_USERS. """ addressSetDefault( - """ - ID of the address. - """ + """ID of the address.""" addressId: ID! - """ - The type of address. - """ + """The type of address.""" type: AddressTypeEnum! - """ - ID of the user to change the address for. - """ + """ID of the user to change the address for.""" userId: ID! - ): AddressSetDefault + ): AddressSetDefault @doc(category: "Users") """ - Creates a new customer. - + Creates a new customer. + Requires one of the following permissions: MANAGE_USERS. """ customerCreate( - """ - Fields required to create a customer. - """ + """Fields required to create a customer.""" input: UserCreateInput! - ): CustomerCreate + ): CustomerCreate @doc(category: "Users") """ - Updates an existing customer. - + Updates an existing customer. + Requires one of the following permissions: MANAGE_USERS. """ customerUpdate( """ - External ID of a customer to update. - + External ID of a customer to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a customer to update. - """ + """ID of a customer to update.""" id: ID - """ - Fields required to update a customer. - """ + """Fields required to update a customer.""" input: CustomerInput! - ): CustomerUpdate + ): CustomerUpdate @doc(category: "Users") """ - Deletes a customer. - + Deletes a customer. + Requires one of the following permissions: MANAGE_USERS. """ customerDelete( """ - External ID of a customer to update. - + External ID of a customer to update. + Added in Saleor 3.10. """ externalReference: String - """ - ID of a customer to delete. - """ + """ID of a customer to delete.""" id: ID - ): CustomerDelete + ): CustomerDelete @doc(category: "Users") """ - Deletes customers. - + Deletes customers. + Requires one of the following permissions: MANAGE_USERS. """ customerBulkDelete( - """ - List of user IDs to delete. - """ + """List of user IDs to delete.""" ids: [ID!]! - ): CustomerBulkDelete + ): CustomerBulkDelete @doc(category: "Users") """ - Creates a new staff user. Apps are not allowed to perform this mutation. + 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. + Requires one of the following permissions: MANAGE_STAFF. """ staffCreate( - """ - Fields required to create a staff user. - """ + """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. - + Updates an existing staff user. Apps are not allowed to perform this mutation. + Requires one of the following permissions: MANAGE_STAFF. """ staffUpdate( - """ - ID of a staff user to update. - """ + """ID of a staff user to update.""" id: ID! - """ - Fields required to update a staff user. - """ + """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. - + Deletes a staff user. Apps are not allowed to perform this mutation. + Requires one of the following permissions: MANAGE_STAFF. """ staffDelete( - """ - ID of a staff user to delete. - """ + """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. - + Deletes staff users. Apps are not allowed to perform this mutation. + Requires one of the following permissions: MANAGE_STAFF. """ staffBulkDelete( - """ - List of user IDs to delete. - """ + """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 - + 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 + Requires one of the following permissions: AUTHENTICATED_STAFF_USER. """ userAvatarUpdate( - """ - Represents an image file in a multipart request. - """ + """Represents an image file in a multipart request.""" image: Upload! - ): UserAvatarUpdate + ): UserAvatarUpdate @doc(category: "Users") """ - Deletes a user avatar. Only for staff members. - + 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. - + Activate or deactivate users. + 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. - """ + """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. - + Create new permission group. Apps are not allowed to perform this mutation. + Requires one of the following permissions: MANAGE_STAFF. """ permissionGroupCreate( - """ - Input fields to create permission group. - """ + """Input fields to create permission group.""" input: PermissionGroupCreateInput! - ): PermissionGroupCreate + ): PermissionGroupCreate @doc(category: "Users") """ - Update permission group. Apps are not allowed to perform this mutation. - + Update permission group. Apps are not allowed to perform this mutation. + Requires one of the following permissions: MANAGE_STAFF. """ permissionGroupUpdate( - """ - ID of the group to update. - """ + """ID of the group to update.""" id: ID! - """ - Input fields to create permission group. - """ + """Input fields to create permission group.""" input: PermissionGroupUpdateInput! - ): PermissionGroupUpdate + ): PermissionGroupUpdate @doc(category: "Users") """ - Delete permission group. Apps are not allowed to perform this mutation. - + Delete permission group. Apps are not allowed to perform this mutation. + Requires one of the following permissions: MANAGE_STAFF. """ permissionGroupDelete( - """ - ID of the group to delete. - """ + """ID of the group to delete.""" id: ID! - ): PermissionGroupDelete + ): PermissionGroupDelete @doc(category: "Users") } """ -Creates a new webhook subscription. +Creates a new webhook subscription. Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ -type WebhookCreate { - webhookErrors: [WebhookError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: WebhookErrorCode! } -""" -An enumeration. -""" -enum WebhookErrorCode { +"""An enumeration.""" +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 { - """ - The name of the webhook. - """ +input WebhookCreateInput @doc(category: "Webhooks") { + """The name of the webhook.""" name: String - """ - The url to receive the payload. - """ + """The url to receive the payload.""" targetUrl: String """ - The events that webhook wants to subscribe. - + The events that webhook wants to subscribe. + DEPRECATED: this field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead. """ events: [WebhookEventTypeEnum!] - """ - The asynchronous events that webhook wants to subscribe. - """ + """The asynchronous events that webhook wants to subscribe.""" asyncEvents: [WebhookEventTypeAsyncEnum!] - """ - The synchronous events that webhook wants to subscribe. - """ + """The synchronous events that webhook wants to subscribe.""" syncEvents: [WebhookEventTypeSyncEnum!] - """ - ID of the app to which webhook belongs. - """ + """ID of the app to which webhook belongs.""" app: ID - """ - Determine if webhook will be set active or not. - """ + """Determine if webhook will be set active or not.""" isActive: Boolean """ The secret key used to create a hash signature with each payload. - + DEPRECATED: this field will be removed in Saleor 4.0. As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS. """ secretKey: String """ Subscription query used to define a webhook payload. - + Added in Saleor 3.2. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ 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. + """ + customHeaders: JSONString } """ -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. +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. Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ -type WebhookDelete { - webhookErrors: [WebhookError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Updates a webhook subscription. +Updates a webhook subscription. -Requires one of the following permissions: MANAGE_APPS. +Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ -type WebhookUpdate { - webhookErrors: [WebhookError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - The new name of the webhook. - """ +input WebhookUpdateInput @doc(category: "Webhooks") { + """The new name of the webhook.""" name: String - """ - The url to receive the payload. - """ + """The url to receive the payload.""" targetUrl: String """ - The events that webhook wants to subscribe. - + The events that webhook wants to subscribe. + DEPRECATED: this field will be removed in Saleor 4.0. Use `asyncEvents` or `syncEvents` instead. """ events: [WebhookEventTypeEnum!] - """ - The asynchronous events that webhook wants to subscribe. - """ + """The asynchronous events that webhook wants to subscribe.""" asyncEvents: [WebhookEventTypeAsyncEnum!] - """ - The synchronous events that webhook wants to subscribe. - """ + """The synchronous events that webhook wants to subscribe.""" syncEvents: [WebhookEventTypeSyncEnum!] - """ - ID of the app to which webhook belongs. - """ + """ID of the app to which webhook belongs.""" app: ID - """ - Determine if webhook will be set active or not. - """ + """Determine if webhook will be set active or not.""" isActive: Boolean """ Use to create a hash signature with each payload. - + DEPRECATED: this field will be removed in Saleor 4.0. As of Saleor 3.5, webhook payloads default to signing using a verifiable JWS. """ secretKey: String """ Subscription query used to define a webhook payload. - + Added in Saleor 3.2. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ 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. + """ + customHeaders: JSONString } """ -Retries event delivery. +Retries event delivery. Requires one of the following permissions: MANAGE_APPS. """ -type EventDeliveryRetry { - """ - Event delivery. - """ +type EventDeliveryRetry @doc(category: "Webhooks") { + """Event delivery.""" delivery: EventDelivery errors: [WebhookError!]! } @@ -20407,45 +17008,40 @@ Performs a dry run of a webhook event. Supports a single event (the first, if mu Added in Saleor 3.11. -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: AUTHENTICATED_STAFF_USER. """ -type WebhookDryRun { - """ - JSON payload, that would be sent out to webhook's target URL. - """ +type WebhookDryRun @doc(category: "Webhooks") { + """JSON payload, that would be sent out to webhook's target URL.""" payload: JSONString errors: [WebhookDryRunError!]! } -type 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. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: WebhookDryRunErrorCode! } -""" -An enumeration. -""" -enum WebhookDryRunErrorCode { +"""An enumeration.""" +enum WebhookDryRunErrorCode @doc(category: "Webhooks") { GRAPHQL_ERROR - UNABLE_TO_PARSE NOT_FOUND INVALID_ID MISSING_PERMISSION TYPE_NOT_SUPPORTED + SYNTAX + MISSING_SUBSCRIPTION + UNABLE_TO_PARSE + MISSING_EVENT } """ @@ -20453,83 +17049,71 @@ Trigger a webhook event. Supports a single event (the first, if multiple provide Added in Saleor 3.11. -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: AUTHENTICATED_STAFF_USER. """ -type WebhookTrigger { +type WebhookTrigger @doc(category: "Webhooks") { delivery: EventDelivery errors: [WebhookTriggerError!]! } -type 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. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: WebhookTriggerErrorCode! } -""" -An enumeration. -""" -enum WebhookTriggerErrorCode { +"""An enumeration.""" +enum WebhookTriggerErrorCode @doc(category: "Webhooks") { GRAPHQL_ERROR NOT_FOUND INVALID_ID MISSING_PERMISSION - MISSING_QUERY TYPE_NOT_SUPPORTED + SYNTAX + MISSING_SUBSCRIPTION UNABLE_TO_PARSE + MISSING_QUERY + MISSING_EVENT } """ -Creates new warehouse. +Creates new warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseCreate { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: WarehouseErrorCode! - """ - List of shipping zones IDs which causes the error. - """ + """List of shipping zones IDs which causes the error.""" shippingZones: [ID!] } -""" -An enumeration. -""" -enum WarehouseErrorCode { +"""An enumeration.""" +enum WarehouseErrorCode @doc(category: "Products") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -20538,133 +17122,109 @@ enum WarehouseErrorCode { UNIQUE } -input WarehouseCreateInput { - """ - Warehouse slug. - """ +input WarehouseCreateInput @doc(category: "Products") { + """Warehouse slug.""" slug: String - """ - The email address of the warehouse. - """ + """The email address of the warehouse.""" email: String """ External ID of the warehouse. - + Added in Saleor 3.10. """ externalReference: String - """ - Warehouse name. - """ + """Warehouse name.""" name: String! - """ - Address of the warehouse. - """ + """Address of the warehouse.""" address: AddressInput! """ Shipping zones supported by the warehouse. - + DEPRECATED: this field will be removed in Saleor 4.0. Providing the zone ids will raise a ValidationError. """ shippingZones: [ID!] } """ -Updates given warehouse. +Updates given warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseUpdate { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Warehouse slug. - """ +input WarehouseUpdateInput @doc(category: "Products") { + """Warehouse slug.""" slug: String - """ - The email address of the warehouse. - """ + """The email address of the warehouse.""" email: String """ External ID of the warehouse. - + Added in Saleor 3.10. """ externalReference: String - """ - Warehouse name. - """ + """Warehouse name.""" name: String - """ - Address of the warehouse. - """ + """Address of the warehouse.""" address: AddressInput """ 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 """ 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 } """ -Deletes selected warehouse. +Deletes selected warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseDelete { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Add shipping zone to given warehouse. +Add shipping zone to given warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseShippingZoneAssign { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Remove shipping zone from given warehouse. +Remove shipping zone from given warehouse. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type WarehouseShippingZoneUnassign { - warehouseErrors: [WarehouseError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } @@ -20672,64 +17232,48 @@ 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TaxClassCreateErrorCode! - """ - List of country codes for which the configuration is invalid. - """ + """List of country codes for which the configuration is invalid.""" countryCodes: [String!]! } -""" -An enumeration. -""" -enum TaxClassCreateErrorCode { +"""An enumeration.""" +enum TaxClassCreateErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND } -input TaxClassCreateInput { - """ - Name of the tax class. - """ +input TaxClassCreateInput @doc(category: "Taxes") { + """Name of the tax class.""" name: String! - """ - List of country-specific tax rates to create for this tax class. - """ + """List of country-specific tax rates to create for this tax class.""" createCountryRates: [CountryRateInput!] } -input CountryRateInput { - """ - Country in which this rate applies. - """ +input CountryRateInput @doc(category: "Taxes") { + """Country in which this rate applies.""" countryCode: CountryCode! """ @@ -20741,38 +17285,30 @@ 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TaxClassDeleteErrorCode! } -""" -An enumeration. -""" -enum TaxClassDeleteErrorCode { +"""An enumeration.""" +enum TaxClassDeleteErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -20781,53 +17317,41 @@ 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TaxClassUpdateErrorCode! - """ - List of country codes for which the configuration is invalid. - """ + """List of country codes for which the configuration is invalid.""" countryCodes: [String!]! } -""" -An enumeration. -""" -enum TaxClassUpdateErrorCode { +"""An enumeration.""" +enum TaxClassUpdateErrorCode @doc(category: "Taxes") { DUPLICATED_INPUT_ITEM GRAPHQL_ERROR INVALID NOT_FOUND } -input TaxClassUpdateInput { - """ - Name of the tax class. - """ +input TaxClassUpdateInput @doc(category: "Taxes") { + """Name of the tax class.""" name: String """ @@ -20841,10 +17365,8 @@ input TaxClassUpdateInput { removeCountryRates: [CountryCode!] } -input CountryRateUpdateInput { - """ - Country in which this rate applies. - """ +input CountryRateUpdateInput @doc(category: "Taxes") { + """Country in which this rate applies.""" countryCode: CountryCode! """ @@ -20856,53 +17378,41 @@ 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TaxConfigurationUpdateErrorCode! - """ - List of country codes for which the configuration is invalid. - """ + """List of country codes for which the configuration is invalid.""" countryCodes: [String!]! } -""" -An enumeration. -""" -enum TaxConfigurationUpdateErrorCode { +"""An enumeration.""" +enum TaxConfigurationUpdateErrorCode @doc(category: "Taxes") { DUPLICATED_INPUT_ITEM GRAPHQL_ERROR INVALID NOT_FOUND } -input TaxConfigurationUpdateInput { - """ - Determines whether taxes are charged in the given channel. - """ +input TaxConfigurationUpdateInput @doc(category: "Taxes") { + """Determines whether taxes are charged in the given channel.""" chargeTaxes: Boolean """ @@ -20915,9 +17425,7 @@ input TaxConfigurationUpdateInput { """ displayGrossPrices: Boolean - """ - Determines whether prices are entered with the tax included. - """ + """Determines whether prices are entered with the tax included.""" pricesEnteredWithTax: Boolean """ @@ -20925,21 +17433,15 @@ input TaxConfigurationUpdateInput { """ updateCountriesConfiguration: [TaxConfigurationPerCountryInput!] - """ - List of country codes for which to remove the tax configuration. - """ + """List of country codes for which to remove the tax configuration.""" removeCountriesConfiguration: [CountryCode!] } -input TaxConfigurationPerCountryInput { - """ - Country in which this configuration applies. - """ +input TaxConfigurationPerCountryInput @doc(category: "Taxes") { + """Country in which this configuration applies.""" countryCode: CountryCode! - """ - Determines whether taxes are charged in this country. - """ + """Determines whether taxes are charged in this country.""" chargeTaxes: Boolean! """ @@ -20956,46 +17458,34 @@ 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 { - """ - Updated tax class rates grouped by a country. - """ +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TaxCountryConfigurationUpdateErrorCode! - """ - List of tax class IDs for which the update failed. - """ + """List of tax class IDs for which the update failed.""" taxClassIds: [String!]! } -""" -An enumeration. -""" -enum TaxCountryConfigurationUpdateErrorCode { +"""An enumeration.""" +enum TaxCountryConfigurationUpdateErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -21003,56 +17493,42 @@ enum TaxCountryConfigurationUpdateErrorCode { CANNOT_CREATE_NEGATIVE_RATE } -input TaxClassRateInput { - """ - ID of a tax class for which to update the tax rate - """ +input TaxClassRateInput @doc(category: "Taxes") { + """ID of a tax class for which to update the tax rate""" taxClassId: ID - """ - Tax rate value. - """ + """Tax rate value.""" rate: Float } """ 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 { - """ - Updated tax class rates grouped by a country. - """ +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TaxCountryConfigurationDeleteErrorCode! } -""" -An enumeration. -""" -enum TaxCountryConfigurationDeleteErrorCode { +"""An enumeration.""" +enum TaxCountryConfigurationDeleteErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -21061,40 +17537,32 @@ 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TaxExemptionManageErrorCode! } -""" -An enumeration. -""" -enum TaxExemptionManageErrorCode { +"""An enumeration.""" +enum TaxExemptionManageErrorCode @doc(category: "Taxes") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -21102,37 +17570,107 @@ enum TaxExemptionManageErrorCode { } """ -Creates a new staff notification recipient. +Updates stocks for a given variant and warehouse. -Requires one of the following permissions: MANAGE_SETTINGS. +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 StaffNotificationRecipientCreate { - shopErrors: [ShopError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [ShopError!]! - staffNotificationRecipient: StaffNotificationRecipient +type StockBulkUpdate @doc(category: "Products") { + """Returns how many objects were updated.""" + count: Int! + + """List of the updated stocks.""" + results: [StockBulkResult!]! + errors: [StockBulkUpdateError!]! } -type ShopError { +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. - """ + """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 { """ - The error code. + 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. """ - code: ShopErrorCode! + 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! } """ -An enumeration. +Creates a new staff notification recipient. + +Requires one of the following permissions: MANAGE_SETTINGS. """ +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 @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. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: ShopErrorCode! +} + +"""An enumeration.""" enum ShopErrorCode { ALREADY_EXISTS CANNOT_FETCH_TAX_RATES @@ -21144,225 +17682,179 @@ enum ShopErrorCode { } input StaffNotificationRecipientInput { - """ - The ID of the user subscribed to email notifications.. - """ + """The ID of the user subscribed to email notifications..""" user: ID - """ - Email address of a user subscribed to email notifications. - """ + """Email address of a user subscribed to email notifications.""" email: String - """ - Determines if a notification active. - """ + """Determines if a notification active.""" active: Boolean } """ -Updates a staff notification recipient. +Updates a staff notification recipient. Requires one of the following permissions: MANAGE_SETTINGS. """ -type StaffNotificationRecipientUpdate { - shopErrors: [ShopError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Delete staff notification recipient. +Delete staff notification recipient. Requires one of the following permissions: MANAGE_SETTINGS. """ -type StaffNotificationRecipientDelete { - shopErrors: [ShopError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Updates site domain of the shop. +Updates site domain of the shop. Requires one of the following permissions: MANAGE_SETTINGS. """ -type ShopDomainUpdate { - """ - Updated shop. - """ +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.") + shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShopError!]! } input SiteDomainInput { - """ - Domain name for shop. - """ + """Domain name for shop.""" domain: String - """ - Shop site name. - """ + """Shop site name.""" name: String } """ -Updates shop settings. +Updates shop settings. Requires one of the following permissions: MANAGE_SETTINGS. """ -type ShopSettingsUpdate { - """ - Updated shop. - """ +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.") + shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShopError!]! } input ShopSettingsInput { - """ - Header text. - """ + """Header text.""" headerText: String - """ - SEO description. - """ + """SEO description.""" description: String - """ - Enable inventory tracking. - """ + """Enable inventory tracking.""" trackInventoryByDefault: Boolean - """ - Default weight unit. - """ + """Default weight unit.""" defaultWeightUnit: WeightUnitsEnum - """ - Enable automatic fulfillment for all digital products. - """ + """Enable automatic fulfillment for all digital products.""" automaticFulfillmentDigitalProducts: Boolean """ Enable automatic approval of all new fulfillments. - + Added in Saleor 3.1. """ fulfillmentAutoApprove: Boolean """ Enable ability to approve fulfillments which are unpaid. - + Added in Saleor 3.1. """ fulfillmentAllowUnpaid: Boolean - """ - Default number of max downloads per digital content URL. - """ + """Default number of max downloads per digital content URL.""" defaultDigitalMaxDownloads: Int - """ - Default number of days which digital content URL will be valid. - """ + """Default number of days which digital content URL will be valid.""" defaultDigitalUrlValidDays: Int - """ - Default email sender's name. - """ + """Default email sender's name.""" defaultMailSenderName: String - """ - Default email sender's address. - """ + """Default email sender's address.""" defaultMailSenderAddress: String - """ - URL of a view where customers can set their password. - """ + """URL of a view where customers can set their password.""" customerSetPasswordUrl: String """ Default number of minutes stock will be reserved for anonymous checkout. Enter 0 or null to disable. - + Added in Saleor 3.1. """ reserveStockDurationAnonymousUser: Int """ Default number of minutes stock will be reserved for authenticated checkout. Enter 0 or null to disable. - + Added in Saleor 3.1. """ reserveStockDurationAuthenticatedUser: Int """ 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 """ - Include taxes in prices. - + Include taxes in prices. + DEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country. """ includeTaxesInPrices: Boolean """ - Display prices with tax in store. - + Display prices with tax in store. + DEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country. """ displayGrossPrices: Boolean """ - Charge taxes on shipping. - + Charge taxes on shipping. + DEPRECATED: this field will be removed in Saleor 4.0. To enable taxes for a shipping method, assign a tax class to the shipping method with `shippingPriceCreate` or `shippingPriceUpdate` mutations. """ chargeTaxesOnShipping: Boolean } """ -Fetch tax rates. +Fetch tax rates. Requires one of the following permissions: MANAGE_SETTINGS. """ -type ShopFetchTaxRates { - """ - Updated shop. - """ +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.") + shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShopError!]! } """ -Creates/updates translations for shop settings. +Creates/updates translations for shop settings. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type ShopSettingsTranslate { - """ - Updated shop settings. - """ +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.") + translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [TranslationError!]! } @@ -21372,20 +17864,14 @@ type TranslationError { """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TranslationErrorCode! } -""" -An enumeration. -""" +"""An enumeration.""" enum TranslationErrorCode { GRAPHQL_ERROR INVALID @@ -21399,180 +17885,139 @@ input ShopSettingsTranslationInput { } """ -Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. +Update the shop's address. If the `null` value is passed, the currently selected address will be deleted. Requires one of the following permissions: MANAGE_SETTINGS. """ -type ShopAddressUpdate { - """ - Updated shop. - """ +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.") + shopErrors: [ShopError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShopError!]! } """ -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 { - """ - Order settings. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: OrderSettingsErrorCode! } -""" -An enumeration. -""" -enum OrderSettingsErrorCode { +"""An enumeration.""" +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 } """ -Update gift card settings. +Update gift card settings. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardSettingsUpdate { - """ - Gift card settings. - """ +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: GiftCardSettingsErrorCode! } -""" -An enumeration. -""" -enum GiftCardSettingsErrorCode { +"""An enumeration.""" +enum GiftCardSettingsErrorCode @doc(category: "Gift cards") { INVALID REQUIRED GRAPHQL_ERROR } -input GiftCardSettingsUpdateInput { - """ - Defines gift card default expiry settings. - """ +input GiftCardSettingsUpdateInput @doc(category: "Gift cards") { + """Defines gift card default expiry settings.""" expiryType: GiftCardSettingsExpiryTypeEnum - """ - Defines gift card expiry period. - """ + """Defines gift card expiry period.""" expiryPeriod: TimePeriodInputType } input TimePeriodInputType { - """ - The length of the period. - """ + """The length of the period.""" amount: Int! - """ - The type of the period. - """ + """The type of the period.""" type: TimePeriodTypeEnum! } """ -Manage shipping method's availability in channels. +Manage shipping method's availability in channels. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingMethodChannelListingUpdate { - """ - An updated shipping method instance. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ShippingErrorCode! - """ - List of warehouse IDs which causes the error. - """ + """List of warehouse IDs which causes the error.""" warehouses: [ID!] - """ - List of channels IDs which causes the error. - """ + """List of channels IDs which causes the error.""" channels: [ID!] } -""" -An enumeration. -""" -enum ShippingErrorCode { +"""An enumeration.""" +enum ShippingErrorCode @doc(category: "Shipping") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -21583,110 +18028,73 @@ enum ShippingErrorCode { DUPLICATED_INPUT_ITEM } -input ShippingMethodChannelListingInput { - """ - List of channels to which the shipping method should be assigned. - """ +input ShippingMethodChannelListingInput @doc(category: "Shipping") { + """List of channels to which the shipping method should be assigned.""" addChannels: [ShippingMethodChannelListingAddInput!] - """ - List of channels from which the shipping method should be unassigned. - """ + """List of channels from which the shipping method should be unassigned.""" removeChannels: [ID!] } -input ShippingMethodChannelListingAddInput { - """ - ID of a channel. - """ +input ShippingMethodChannelListingAddInput @doc(category: "Shipping") { + """ID of a channel.""" channelId: ID! - """ - Shipping price of the shipping method in this channel. - """ + """Shipping price of the shipping method in this channel.""" price: PositiveDecimal - """ - Minimum order price to use this shipping method. - """ + """Minimum order price to use this shipping method.""" minimumOrderPrice: PositiveDecimal - """ - Maximum order price to use this shipping method. - """ + """Maximum order price to use this shipping method.""" maximumOrderPrice: PositiveDecimal } """ -Creates a new shipping price. +Creates a new shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceCreate { - """ - A shipping zone to which the shipping method belongs. - """ +type ShippingPriceCreate @doc(category: "Shipping") { + """A shipping zone to which the shipping method belongs.""" shippingZone: ShippingZone shippingMethod: ShippingMethodType - shippingErrors: [ShippingError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } -input ShippingPriceInput { - """ - Name of the shipping method. - """ +input ShippingPriceInput @doc(category: "Shipping") { + """Name of the shipping method.""" name: String - """ - Shipping method description. - """ + """Shipping method description.""" description: JSONString - """ - Minimum order weight to use this shipping method. - """ + """Minimum order weight to use this shipping method.""" minimumOrderWeight: WeightScalar - """ - Maximum order weight to use this shipping method. - """ + """Maximum order weight to use this shipping method.""" maximumOrderWeight: WeightScalar - """ - Maximum number of days for delivery. - """ + """Maximum number of days for delivery.""" maximumDeliveryDays: Int - """ - Minimal number of days for delivery. - """ + """Minimal number of days for delivery.""" minimumDeliveryDays: Int - """ - Shipping type: price or weight based. - """ + """Shipping type: price or weight based.""" type: ShippingMethodTypeEnum - """ - Shipping zone this method belongs to. - """ + """Shipping zone this method belongs to.""" shippingZone: ID - """ - Postal code rules to add. - """ + """Postal code rules to add.""" addPostalCodeRules: [ShippingPostalCodeRulesCreateInputRange!] - """ - Postal code rules to delete. - """ + """Postal code rules to delete.""" deletePostalCodeRules: [ID!] - """ - Inclusion type for currently assigned postal code rules. - """ + """Inclusion type for currently assigned postal code rules.""" inclusionType: PostalCodeRuleInclusionTypeEnum """ @@ -21697,77 +18105,61 @@ input ShippingPriceInput { scalar WeightScalar -input ShippingPostalCodeRulesCreateInputRange { - """ - Start range of the postal code. - """ +input ShippingPostalCodeRulesCreateInputRange @doc(category: "Shipping") { + """Start range of the postal code.""" start: String! - """ - End range of the postal code. - """ + """End range of the postal code.""" end: String } """ -Deletes a shipping price. +Deletes a shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceDelete { - """ - A shipping method to delete. - """ +type ShippingPriceDelete @doc(category: "Shipping") { + """A shipping method to delete.""" shippingMethod: ShippingMethodType - """ - A shipping zone to which the shipping method belongs. - """ + """A shipping zone to which the shipping method belongs.""" shippingZone: ShippingZone - shippingErrors: [ShippingError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } """ -Deletes shipping prices. +Deletes shipping prices. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } """ -Updates a new shipping price. +Updates a new shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceUpdate { - """ - A shipping zone to which the shipping method belongs. - """ +type ShippingPriceUpdate @doc(category: "Shipping") { + """A shipping zone to which the shipping method belongs.""" shippingZone: ShippingZone shippingMethod: ShippingMethodType - shippingErrors: [ShippingError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } """ -Creates/updates translations for a shipping method. +Creates/updates translations for a shipping method. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type ShippingPriceTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } @@ -21777,75 +18169,60 @@ input ShippingPriceTranslationInput { """ Translated shipping method description. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString } """ -Exclude products from shipping price. +Exclude products from shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceExcludeProducts { - """ - A shipping method with new list of excluded products. - """ +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.") + shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } -input ShippingPriceExcludeProductsInput { - """ - List of products which will be excluded. - """ +input ShippingPriceExcludeProductsInput @doc(category: "Shipping") { + """List of products which will be excluded.""" products: [ID!]! } """ -Remove product from excluded list for shipping price. +Remove product from excluded list for shipping price. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingPriceRemoveProductFromExclude { - """ - A shipping method with new list of excluded products. - """ +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.") + shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } """ -Creates a new shipping zone. +Creates a new shipping zone. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingZoneCreate { - shippingErrors: [ShippingError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Shipping zone's name. Visible only to the staff. - """ +input ShippingZoneCreateInput @doc(category: "Shipping") { + """Shipping zone's name. Visible only to the staff.""" name: String - """ - Description of the shipping zone. - """ + """Description of the shipping zone.""" description: String - """ - List of countries in this shipping zone. - """ + """List of countries in this shipping zone.""" countries: [String!] """ @@ -21853,70 +18230,55 @@ input ShippingZoneCreateInput { """ default: Boolean - """ - List of warehouses to assign to a shipping zone - """ + """List of warehouses to assign to a shipping zone""" addWarehouses: [ID!] - """ - List of channels to assign to the shipping zone. - """ + """List of channels to assign to the shipping zone.""" addChannels: [ID!] } """ -Deletes a shipping zone. +Deletes a shipping zone. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingZoneDelete { - shippingErrors: [ShippingError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes shipping zones. +Deletes shipping zones. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingZoneBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ShippingError!]! } """ -Updates a new shipping zone. +Updates a new shipping zone. Requires one of the following permissions: MANAGE_SHIPPING. """ -type ShippingZoneUpdate { - shippingErrors: [ShippingError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Shipping zone's name. Visible only to the staff. - """ +input ShippingZoneUpdateInput @doc(category: "Shipping") { + """Shipping zone's name. Visible only to the staff.""" name: String - """ - Description of the shipping zone. - """ + """Description of the shipping zone.""" description: String - """ - List of countries in this shipping zone. - """ + """List of countries in this shipping zone.""" countries: [String!] """ @@ -21924,73 +18286,52 @@ input ShippingZoneUpdateInput { """ default: Boolean - """ - List of warehouses to assign to a shipping zone - """ + """List of warehouses to assign to a shipping zone""" addWarehouses: [ID!] - """ - List of channels to assign to the shipping zone. - """ + """List of channels to assign to the shipping zone.""" addChannels: [ID!] - """ - List of warehouses to unassign from a shipping zone - """ + """List of warehouses to unassign from a shipping zone""" removeWarehouses: [ID!] - """ - List of channels to unassign from the shipping zone. - """ + """List of channels to unassign from the shipping zone.""" removeChannels: [ID!] } """ -Assign attributes to a given product type. +Assign attributes to a given product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductAttributeAssign { - """ - The updated product type. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ProductErrorCode! - """ - List of attributes IDs which causes the error. - """ + """List of attributes IDs which causes the error.""" attributes: [ID!] - """ - List of attribute values IDs which causes the error. - """ + """List of attribute values IDs which causes the error.""" values: [ID!] } -""" -An enumeration. -""" -enum ProductErrorCode { +"""An enumeration.""" +enum ProductErrorCode @doc(category: "Products") { ALREADY_EXISTS ATTRIBUTE_ALREADY_ASSIGNED ATTRIBUTE_CANNOT_BE_ASSIGNED @@ -22013,26 +18354,22 @@ enum ProductErrorCode { PREORDER_VARIANT_CANNOT_BE_DEACTIVATED } -input ProductAttributeAssignInput { - """ - The ID of the attribute to assign. - """ +input ProductAttributeAssignInput @doc(category: "Products") { + """The ID of the attribute to assign.""" id: ID! - """ - The attribute type to be assigned as. - """ + """The attribute type to be assigned as.""" type: ProductAttributeType! """ Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric']. - + Added in Saleor 3.1. """ variantSelection: Boolean } -enum ProductAttributeType { +enum ProductAttributeType @doc(category: "Products") { PRODUCT VARIANT } @@ -22040,118 +18377,95 @@ enum ProductAttributeType { """ Update attributes assigned to product variant for given product type. -Added in Saleor 3.1. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductAttributeAssignmentUpdate { - """ - The updated product type. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input ProductAttributeAssignmentUpdateInput { - """ - The ID of the attribute to assign. - """ +input ProductAttributeAssignmentUpdateInput @doc(category: "Products") { + """The ID of the attribute to assign.""" id: ID! """ Whether attribute is allowed in variant selection. Allowed types are: ['dropdown', 'boolean', 'swatch', 'numeric']. - + Added in Saleor 3.1. """ variantSelection: Boolean! } """ -Un-assign attributes from a given product type. +Un-assign attributes from a given product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductAttributeUnassign { - """ - The updated product type. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Creates a new category. +Creates a new category. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CategoryCreate { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString - """ - Category name. - """ + """Category name.""" name: String - """ - Category slug. - """ + """Category slug.""" slug: String - """ - Search engine optimization fields. - """ + """Search engine optimization fields.""" seo: SeoInput - """ - Background image file. - """ + """Background image file.""" backgroundImage: Upload - """ - Alt text for a product media. - """ + """Alt text for a product media.""" backgroundImageAlt: String """ Fields required to update the category metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] """ Fields required to update the category private metadata. - + Added in Saleor 3.8. """ privateMetadata: [MetadataInput!] } input SeoInput { - """ - SEO title. - """ + """SEO title.""" title: String - """ - SEO description. - """ + """SEO description.""" description: String } @@ -22161,64 +18475,54 @@ Variables of this type must be set to null in mutations. They will be replaced w scalar Upload input MetadataInput { - """ - Key of a metadata item. - """ + """Key of a metadata item.""" key: String! - """ - Value of a metadata item. - """ + """Value of a metadata item.""" value: String! } """ -Deletes a category. +Deletes a category. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CategoryDelete { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes categories. +Deletes categories. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CategoryBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Updates a category. +Updates a category. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CategoryUpdate { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Creates/updates translations for a category. +Creates/updates translations for a category. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type CategoryTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } @@ -22230,53 +18534,42 @@ input TranslationInput { """ Translated description. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString } """ -Adds products to a collection. +Adds products to a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionAddProducts { - """ - Collection to which products will be added. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - List of products IDs which causes the error. - """ + """List of products IDs which causes the error.""" products: [ID!] - """ - The error code. - """ + """The error code.""" code: CollectionErrorCode! } -""" -An enumeration. -""" -enum CollectionErrorCode { +"""An enumeration.""" +enum CollectionErrorCode @doc(category: "Products") { DUPLICATED_INPUT_ITEM GRAPHQL_ERROR INVALID @@ -22287,113 +18580,92 @@ enum CollectionErrorCode { } """ -Creates a new collection. +Creates a new collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionCreate { - collectionErrors: [CollectionError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Informs whether a collection is published. - """ +input CollectionCreateInput @doc(category: "Products") { + """Informs whether a collection is published.""" isPublished: Boolean - """ - Name of the collection. - """ + """Name of the collection.""" name: String - """ - Slug of the collection. - """ + """Slug of the collection.""" slug: String """ Description of the collection. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString - """ - Background image file. - """ + """Background image file.""" backgroundImage: Upload - """ - Alt text for an image. - """ + """Alt text for an image.""" backgroundImageAlt: String - """ - Search engine optimization fields. - """ + """Search engine optimization fields.""" seo: SeoInput """ - Publication date. ISO 8601 standard. - + Publication date. ISO 8601 standard. + DEPRECATED: this field will be removed in Saleor 4.0. """ publicationDate: Date """ Fields required to update the collection metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] """ Fields required to update the collection private metadata. - + Added in Saleor 3.8. """ privateMetadata: [MetadataInput!] - """ - List of products to be added to the collection. - """ + """List of products to be added to the collection.""" products: [ID!] } """ -Deletes a collection. +Deletes a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionDelete { - collectionErrors: [CollectionError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Reorder the products of a collection. +Reorder the products of a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionReorderProducts { - """ - Collection from which products are reordered. - """ +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.") + collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionError!]! } -input MoveProductInput { - """ - The ID of the product to move. - """ +input MoveProductInput @doc(category: "Products") { + """The ID of the product to move.""" productId: ID! """ @@ -22403,254 +18675,202 @@ input MoveProductInput { } """ -Deletes collections. +Deletes collections. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionError!]! } """ -Remove products from a collection. +Remove products from a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionRemoveProducts { - """ - Collection from which products will be removed. - """ +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.") + collectionErrors: [CollectionError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CollectionError!]! } """ -Updates a collection. +Updates a collection. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionUpdate { - collectionErrors: [CollectionError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Informs whether a collection is published. - """ +input CollectionInput @doc(category: "Products") { + """Informs whether a collection is published.""" isPublished: Boolean - """ - Name of the collection. - """ + """Name of the collection.""" name: String - """ - Slug of the collection. - """ + """Slug of the collection.""" slug: String """ Description of the collection. - + Rich text format. For reference see https://editorjs.io/ """ description: JSONString - """ - Background image file. - """ + """Background image file.""" backgroundImage: Upload - """ - Alt text for an image. - """ + """Alt text for an image.""" backgroundImageAlt: String - """ - Search engine optimization fields. - """ + """Search engine optimization fields.""" seo: SeoInput """ - Publication date. ISO 8601 standard. - + Publication date. ISO 8601 standard. + DEPRECATED: this field will be removed in Saleor 4.0. """ publicationDate: Date """ Fields required to update the collection metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] """ Fields required to update the collection private metadata. - + Added in Saleor 3.8. """ privateMetadata: [MetadataInput!] } """ -Creates/updates translations for a collection. +Creates/updates translations for a collection. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type CollectionTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Manage collection's availability in channels. +Manage collection's availability in channels. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type CollectionChannelListingUpdate { - """ - An updated collection instance. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ProductErrorCode! - """ - List of attributes IDs which causes the error. - """ + """List of attributes IDs which causes the error.""" attributes: [ID!] - """ - List of attribute values IDs which causes the error. - """ + """List of attribute values IDs which causes the error.""" values: [ID!] - """ - List of channels IDs which causes the error. - """ + """List of channels IDs which causes the error.""" channels: [ID!] } -input CollectionChannelListingUpdateInput { - """ - List of channels to which the collection should be assigned. - """ +input CollectionChannelListingUpdateInput @doc(category: "Products") { + """List of channels to which the collection should be assigned.""" addChannels: [PublishableChannelListingInput!] - """ - List of channels from which the collection should be unassigned. - """ + """List of channels from which the collection should be unassigned.""" removeChannels: [ID!] } -input PublishableChannelListingInput { - """ - ID of a channel. - """ +input PublishableChannelListingInput @doc(category: "Products") { + """ID of a channel.""" channelId: ID! - """ - Determines if object is visible to customers. - """ + """Determines if object is visible to customers.""" isPublished: Boolean """ - Publication date. ISO 8601 standard. - + Publication date. ISO 8601 standard. + DEPRECATED: this field will be removed in Saleor 4.0. Use `publishedAt` field instead. """ publicationDate: Date """ Publication date time. ISO 8601 standard. - + Added in Saleor 3.3. """ publishedAt: DateTime } """ -Creates a new product. +Creates a new product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductCreate { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - List of attributes. - """ +input ProductCreateInput @doc(category: "Products") { + """List of attributes.""" attributes: [AttributeValueInput!] - """ - ID of the product's category. - """ + """ID of the product's category.""" category: ID """ - Determine if taxes are being charged for the product. - + Determine if taxes are being charged for the product. + DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled. """ chargeTaxes: Boolean - """ - List of IDs of collections that the product belongs to. - """ + """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. - """ + """Product name.""" name: String - """ - Product slug. - """ + """Product slug.""" slug: String """ @@ -22659,58 +18879,48 @@ input ProductCreateInput { 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. + 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 - """ - Search engine optimization fields. - """ + """Search engine optimization fields.""" seo: SeoInput - """ - Weight of the Product. - """ + """Weight of the Product.""" weight: WeightScalar - """ - Defines the product rating value. - """ + """Defines the product rating value.""" rating: Float """ Fields required to update the product metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] """ Fields required to update the product private metadata. - + Added in Saleor 3.8. """ privateMetadata: [MetadataInput!] """ External ID of this product. - + Added in Saleor 3.10. """ externalReference: String - """ - ID of the type that product belongs to. - """ + """ID of the type that product belongs to.""" productType: ID! } -input AttributeValueInput { - """ - ID of the selected attribute. - """ +input AttributeValueInput @doc(category: "Attributes") { + """ID of the selected attribute.""" id: ID """ @@ -22720,82 +18930,64 @@ input AttributeValueInput { """ Attribute value ID. - + Added in Saleor 3.9. """ dropdown: AttributeValueSelectableTypeInput """ Attribute value ID. - + Added in Saleor 3.9. """ swatch: AttributeValueSelectableTypeInput """ List of attribute value IDs. - + Added in Saleor 3.9. """ multiselect: [AttributeValueSelectableTypeInput!] """ Numeric value of an attribute. - + Added in Saleor 3.9. """ numeric: String - """ - URL of the file attribute. Every time, a new value is created. - """ + """URL of the file attribute. Every time, a new value is created.""" file: String - """ - File content type. - """ + """File content type.""" contentType: String - """ - List of entity IDs that will be used as references. - """ + """List of entity IDs that will be used as references.""" references: [ID!] - """ - Text content in JSON format. - """ + """Text content in JSON format.""" richText: JSONString - """ - Plain text content. - """ + """Plain text content.""" plainText: String - """ - Represents the boolean value of the attribute value. - """ + """Represents the boolean value of the attribute value.""" boolean: Boolean - """ - Represents the date value of the attribute value. - """ + """Represents the date value of the attribute value.""" date: Date - """ - Represents the date/time value of the attribute value. - """ + """Represents the date/time value of the attribute value.""" dateTime: DateTime } """ -Represents attribute value. If no ID provided, value will be resolved. +Represents attribute value. If no ID provided, value will be resolved. Added in Saleor 3.9. """ -input AttributeValueSelectableTypeInput { - """ - ID of an attribute value. - """ +input AttributeValueSelectableTypeInput @doc(category: "Attributes") { + """ID of an attribute value.""" id: ID """ @@ -22805,82 +18997,114 @@ input AttributeValueSelectableTypeInput { } """ -Deletes a product. +Deletes a product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductDelete { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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") { """ - List of attributes. + 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!] - """ - ID of the product's category. - """ + """ID of the product's category.""" category: ID """ - Determine if taxes are being charged for the product. - + Determine if taxes are being charged for the product. + DEPRECATED: this field will be removed in Saleor 4.0. Use `Channel.taxConfiguration` to configure whether tax collection is enabled. """ chargeTaxes: Boolean - """ - List of IDs of collections that the product belongs to. - """ + """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. - """ + """Product name.""" name: String - """ - Product slug. - """ + """Product slug.""" slug: String """ @@ -22889,146 +19113,433 @@ input ProductInput { 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. + 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 - """ - Search engine optimization fields. - """ + """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 + """ - Weight of the Product. + 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 """ - Defines the product rating value. + 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 + + """ + 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 + + """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. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] """ Fields required to update the product private metadata. - + Added in Saleor 3.8. """ privateMetadata: [MetadataInput!] """ External ID of this product. - + Added in Saleor 3.10. """ externalReference: String } """ -Creates/updates translations for a product. +Creates/updates translations for a product. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type ProductTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Manage product's availability in channels. +Manage product's availability in channels. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductChannelListingUpdate { - """ - An updated product instance. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ProductErrorCode! - """ - List of attributes IDs which causes the error. - """ + """List of attributes IDs which causes the error.""" attributes: [ID!] - """ - List of attribute values IDs which causes the error. - """ + """List of attribute values IDs which causes the error.""" values: [ID!] - """ - List of channels IDs which causes the error. - """ + """List of channels IDs which causes the error.""" channels: [ID!] - """ - List of variants IDs which causes the error. - """ + """List of variants IDs which causes the error.""" variants: [ID!] } -input ProductChannelListingUpdateInput { - """ - List of channels to which the product should be assigned or updated. - """ +input ProductChannelListingUpdateInput @doc(category: "Products") { + """List of channels to which the product should be assigned or updated.""" updateChannels: [ProductChannelListingAddInput!] - """ - List of channels from which the product should be unassigned. - """ + """List of channels from which the product should be unassigned.""" removeChannels: [ID!] } -input ProductChannelListingAddInput { - """ - ID of a channel. - """ +input ProductChannelListingAddInput @doc(category: "Products") { + """ID of a channel.""" channelId: ID! - """ - Determines if object is visible to customers. - """ + """Determines if object is visible to customers.""" isPublished: Boolean """ - Publication date. ISO 8601 standard. - + Publication date. ISO 8601 standard. + DEPRECATED: this field will be removed in Saleor 4.0. Use `publishedAt` field instead. """ publicationDate: Date """ Publication date time. ISO 8601 standard. - + Added in Saleor 3.3. """ publishedAt: DateTime @@ -23038,87 +19549,69 @@ input ProductChannelListingAddInput { """ visibleInListings: Boolean - """ - Determine if product should be available for purchase. - """ + """Determine if product should be available for purchase.""" isAvailableForPurchase: Boolean """ - A start date from which a product will be available for purchase. When not set and isAvailable is set to True, the current day is assumed. - + A start date from which a product will be available for purchase. When not set and isAvailable is set to True, the current day is assumed. + DEPRECATED: this field will be removed in Saleor 4.0. Use `availableForPurchaseAt` field instead. """ availableForPurchaseDate: Date """ 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. - + Added in Saleor 3.3. """ availableForPurchaseAt: DateTime - """ - List of variants to which the channel should be assigned. - """ + """List of variants to which the channel should be assigned.""" addVariants: [ID!] - """ - List of variants from which the channel should be unassigned. - """ + """List of variants from which the channel should be unassigned.""" removeVariants: [ID!] } """ -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 +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 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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input ProductMediaCreateInput { - """ - Alt text for a product media. - """ +input ProductMediaCreateInput @doc(category: "Products") { + """Alt text for a product media.""" alt: String - """ - Represents an image file in a multipart request. - """ + """Represents an image file in a multipart request.""" image: Upload - """ - ID of an product. - """ + """ID of an product.""" product: ID! - """ - Represents an URL to an external media. - """ + """Represents an URL to an external media.""" mediaUrl: String } """ -Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. +Reorder the variants of a product. Mutation updates updated_at on product and triggers PRODUCT_UPDATED webhook. 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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } input ReorderInput { - """ - The ID of the item to move. - """ + """The ID of the item to move.""" id: ID! """ @@ -23128,92 +19621,77 @@ input ReorderInput { } """ -Deletes a product media. +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Deletes product media. +Deletes product media. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductMediaBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Changes ordering of the product media. +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Updates a product media. +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input ProductMediaUpdateInput { - """ - Alt text for a product media. - """ +input ProductMediaUpdateInput @doc(category: "Products") { + """Alt text for a product media.""" alt: String } """ -Creates a new product type. +Creates a new product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeCreate { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Name of the product type. - """ +input ProductTypeInput @doc(category: "Products") { + """Name of the product type.""" name: String - """ - Product type slug. - """ + """Product type slug.""" slug: String - """ - The product type kind. - """ + """The product type kind.""" kind: ProductTypeKindEnum """ @@ -23221,9 +19699,7 @@ input ProductTypeInput { """ hasVariants: Boolean - """ - List of attributes shared among all product variants. - """ + """List of attributes shared among all product variants.""" productAttributes: [ID!] """ @@ -23231,25 +19707,19 @@ input ProductTypeInput { """ variantAttributes: [ID!] - """ - Determines if shipping is required for products of this variant. - """ + """Determines if shipping is required for products of this variant.""" isShippingRequired: Boolean - """ - Determines if products are digital. - """ + """Determines if products are digital.""" isDigital: Boolean - """ - Weight of the ProductType items. - """ + """Weight of the ProductType items.""" weight: WeightScalar """ - 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. + 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. 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 @@ -23260,91 +19730,77 @@ input ProductTypeInput { } """ -Deletes a product type. +Deletes a product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeDelete { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes product types. +Deletes product types. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Updates an existing product type. +Updates an existing product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeUpdate { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Reorder the attributes of a product type. +Reorder the attributes of a product type. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type ProductTypeReorderAttributes { - """ - Product type from which attributes are reordered. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Reorder product attribute values. +Reorder product attribute values. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductReorderAttributeValues { - """ - Product from which attribute values are reordered. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -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 +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 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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input DigitalContentUploadInput { - """ - Use default digital content settings for this product. - """ +input DigitalContentUploadInput @doc(category: "Products") { + """Use default digital content settings for this product.""" useDefaultSettings: Boolean! """ @@ -23357,60 +19813,52 @@ input DigitalContentUploadInput { """ urlValidDays: Int - """ - Overwrite default automatic_fulfillment setting for variant. - """ + """Overwrite default automatic_fulfillment setting for variant.""" automaticFulfillment: Boolean """ Fields required to update the digital content metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] """ Fields required to update the digital content private metadata. - + Added in Saleor 3.8. """ privateMetadata: [MetadataInput!] - """ - Represents an file in a multipart request. - """ + """Represents an file in a multipart request.""" contentFile: Upload! } """ -Remove digital content assigned to given variant. +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Update digital content. +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } -input DigitalContentInput { - """ - Use default digital content settings for this product. - """ +input DigitalContentInput @doc(category: "Products") { + """Use default digital content settings for this product.""" useDefaultSettings: Boolean! """ @@ -23423,71 +19871,59 @@ input DigitalContentInput { """ urlValidDays: Int - """ - Overwrite default automatic_fulfillment setting for variant. - """ + """Overwrite default automatic_fulfillment setting for variant.""" automaticFulfillment: Boolean """ Fields required to update the digital content metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] """ Fields required to update the digital content private metadata. - + Added in Saleor 3.8. """ privateMetadata: [MetadataInput!] } """ -Generate new URL to digital content. +Generate new URL to digital content. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type DigitalContentUrlCreate { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Digital content ID which URL will belong to. - """ +input DigitalContentUrlCreateInput @doc(category: "Products") { + """Digital content ID which URL will belong to.""" content: ID! } """ -Creates a new variant for a product. +Creates a new variant for a product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantCreate { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - List of attributes specific to this variant. - """ +input ProductVariantCreateInput @doc(category: "Products") { + """List of attributes specific to this variant.""" attributes: [AttributeValueInput!]! - """ - Stock keeping unit. - """ + """Stock keeping unit.""" sku: String - """ - Variant name. - """ + """Variant name.""" name: String """ @@ -23495,177 +19931,133 @@ input ProductVariantCreateInput { """ trackInventory: Boolean - """ - Weight of the Product Variant. - """ + """Weight of the Product Variant.""" weight: WeightScalar """ 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 """ 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 """ 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 - """ - Product ID of which type is the variant. - """ + """Product ID of which type is the variant.""" product: ID! - """ - Stocks of a product available for sale. - """ + """Stocks of a product available for sale.""" 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. +Deletes a product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantDelete { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Creates product variants for a given product. +Creates product variants for a given product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantBulkCreate { - """ - Returns how many objects were created. - """ +type ProductVariantBulkCreate @doc(category: "Products") { + """Returns how many objects were created.""" count: Int! - """ - List of the created variants.This field will be removed in Saleor 4.0. - """ + """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.") + bulkProductErrors: [BulkProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [BulkProductError!]! } -type ProductVariantBulkResult { - """ - Product variant data. - """ +type ProductVariantBulkResult @doc(category: "Products") { + """Product variant data.""" productVariant: ProductVariant - """ - List of errors occurred on create attempt. - """ + """List of errors occurred on create attempt.""" errors: [ProductVariantBulkError!] } -type 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. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ProductVariantBulkErrorCode! - """ - List of attributes IDs which causes the error. - """ + """List of attributes IDs which causes the error.""" attributes: [ID!] - """ - List of attribute values IDs which causes the error. - """ + """List of attribute values IDs which causes the error.""" values: [ID!] - """ - List of warehouse IDs which causes the error. - """ + """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 { +"""An enumeration.""" +enum ProductVariantBulkErrorCode @doc(category: "Products") { ATTRIBUTE_ALREADY_ASSIGNED ATTRIBUTE_CANNOT_BE_ASSIGNED ATTRIBUTE_VARIANTS_DISABLED @@ -23680,202 +20072,48 @@ enum ProductVariantBulkErrorCode { PRODUCT_NOT_ASSIGNED_TO_CHANNEL } -type BulkProductError { +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ProductErrorCode! - """ - List of attributes IDs which causes the error. - """ + """List of attributes IDs which causes the error.""" attributes: [ID!] - """ - List of attribute values IDs which causes the error. - """ + """List of attribute values IDs which causes the error.""" values: [ID!] - """ - Index of an input list item that caused the error. - """ + """Index of an input list item that caused the error.""" index: Int - """ - List of warehouse IDs which causes the error. - """ + """List of warehouse IDs which causes the error.""" warehouses: [ID!] - """ - List of channel IDs which causes the error. - """ + """List of channel IDs which causes the error.""" channels: [ID!] } -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 ProductVariantBulkCreateInput { - """ - 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. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. - """ - preorder: PreorderSettingsInput - - """ - 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 - - """ - 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 { - """ - ID of the selected attribute. - """ - id: ID - - """ - The value or slug of an attribute to resolve. If the passed value is non-existent, it will be created. - """ - values: [String!] - - """ - The boolean value of an attribute to resolve. If the passed value is non-existent, it will be created. - """ - boolean: Boolean -} - -input ProductVariantChannelListingAddInput { - """ - ID of a channel. - """ - channelId: ID! - - """ - Price of the particular variant in channel. - """ - price: PositiveDecimal! - - """ - Cost price of the variant in channel. - """ - costPrice: PositiveDecimal - - """ - 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. - """ - preorderThreshold: Int -} - """ 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. +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 { - """ - Returns how many objects were updated. - """ +type ProductVariantBulkUpdate @doc(category: "Products") { + """Returns how many objects were updated.""" count: Int! - """ - List of the updated variants. - """ + """List of the updated variants.""" results: [ProductVariantBulkResult!]! errors: [ProductVariantBulkError!]! } @@ -23885,20 +20123,14 @@ Input fields to update product variants. Added in Saleor 3.11. """ -input ProductVariantBulkUpdateInput { - """ - List of attributes specific to this variant. - """ +input ProductVariantBulkUpdateInput @doc(category: "Products") { + """List of attributes specific to this variant.""" attributes: [BulkAttributeValueInput!] - """ - Stock keeping unit. - """ + """Stock keeping unit.""" sku: String - """ - Variant name. - """ + """Variant name.""" name: String """ @@ -23906,164 +20138,183 @@ input ProductVariantBulkUpdateInput { """ trackInventory: Boolean - """ - Weight of the Product Variant. - """ + """Weight of the Product Variant.""" weight: WeightScalar """ 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 """ 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 """ 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 input. + + Added in Saleor 3.12. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. """ - stocks: [StockInput!] + stocks: ProductVariantStocksUpdateInput """ - List of prices assigned to channels. + 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: [ProductVariantChannelListingAddInput!] + channelListings: ProductVariantChannelListingUpdateInput - """ - ID of the product variant to update. - """ + """ID of the product variant to update.""" id: ID! } +input ProductVariantStocksUpdateInput @doc(category: "Products") { + """List of warehouses to create stocks.""" + create: [StockInput!] + + """List of stocks to update.""" + update: [StockUpdateInput!] + + """List of stocks to remove.""" + remove: [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 + + """Cost price of the variant in channel.""" + costPrice: PositiveDecimal + + """The threshold for preorder variant in channel.""" + preorderThreshold: Int +} + """ -Deletes product variants. +Deletes product variants. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Creates stocks for product variant. +Creates stocks for product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantStocksCreate { - """ - Updated product variant. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ProductErrorCode! - """ - List of attributes IDs which causes the error. - """ + """List of attributes IDs which causes the error.""" attributes: [ID!] - """ - List of attribute values IDs which causes the error. - """ + """List of attribute values IDs which causes the error.""" values: [ID!] - """ - Index of an input list item that caused the error. - """ + """Index of an input list item that caused the error.""" index: Int } """ -Delete stocks from product variant. +Delete stocks from product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantStocksDelete { - """ - Updated product variant. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: StockErrorCode! } -""" -An enumeration. -""" -enum StockErrorCode { +"""An enumeration.""" +enum StockErrorCode @doc(category: "Products") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -24073,46 +20324,36 @@ enum StockErrorCode { } """ -Update stocks for product variant. +Update stocks for product variant. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantStocksUpdate { - """ - Updated product variant. - """ +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.") + bulkStockErrors: [BulkStockError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [BulkStockError!]! } """ -Updates an existing variant for product. +Updates an existing variant for product. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantUpdate { - productErrors: [ProductError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - List of attributes specific to this variant. - """ +input ProductVariantInput @doc(category: "Products") { + """List of attributes specific to this variant.""" attributes: [AttributeValueInput!] - """ - Stock keeping unit. - """ + """Stock keeping unit.""" sku: String - """ - Variant name. - """ + """Variant name.""" name: String """ @@ -24120,71 +20361,63 @@ input ProductVariantInput { """ trackInventory: Boolean - """ - Weight of the Product Variant. - """ + """Weight of the Product Variant.""" weight: WeightScalar """ 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 """ 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 """ 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 } """ -Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook. +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Creates/updates translations for a product variant. +Creates/updates translations for a product variant. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type ProductVariantTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } @@ -24194,119 +20427,96 @@ input NameTranslationInput { } """ -Manage product variant prices in channels. +Manage product variant prices in channels. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantChannelListingUpdate { - """ - An updated product variant instance. - """ +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.") + productChannelListingErrors: [ProductChannelListingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductChannelListingError!]! } """ -Reorder product variant attribute values. +Reorder product variant attribute values. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type ProductVariantReorderAttributeValues { - """ - Product variant from which attribute values are reordered. - """ +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ 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 { - """ - Product variant with ended preorder. - """ +type ProductVariantPreorderDeactivate @doc(category: "Products") { + """Product variant with ended preorder.""" productVariant: ProductVariant errors: [ProductError!]! } """ -Assign an media to a product variant. +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Unassign an media from a product variant. +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.") + productErrors: [ProductError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ProductError!]! } """ -Captures the authorized payment amount. +Captures the authorized payment amount. Requires one of the following permissions: MANAGE_ORDERS. """ -type PaymentCapture { - """ - Updated payment. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: PaymentErrorCode! - """ - List of variant IDs which causes the error. - """ + """List of variant IDs which causes the error.""" variants: [ID!] } -""" -An enumeration. -""" -enum PaymentErrorCode { +"""An enumeration.""" +enum PaymentErrorCode @doc(category: "Payments") { BILLING_ADDRESS_NOT_SET GRAPHQL_ERROR INVALID @@ -24327,97 +20537,69 @@ enum PaymentErrorCode { } """ -Refunds the captured payment amount. +Refunds the captured payment amount. Requires one of the following permissions: MANAGE_ORDERS. """ -type PaymentRefund { - """ - Updated payment. - """ +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.") + paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PaymentError!]! } """ -Voids the authorized payment. +Voids the authorized payment. Requires one of the following permissions: MANAGE_ORDERS. """ -type PaymentVoid { - """ - Updated payment. - """ +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.") + paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PaymentError!]! } -""" -Initializes payment process when it is required by gateway. -""" -type PaymentInitialize { +"""Initializes payment process when it is required by gateway.""" +type PaymentInitialize @doc(category: "Payments") { initializedPayment: PaymentInitialized - paymentErrors: [PaymentError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PaymentError!]! } """ Server-side data generated by a payment gateway. Optional step when the payment provider requires an additional action to initialize payment session. """ -type PaymentInitialized { - """ - ID of a payment gateway. - """ +type PaymentInitialized @doc(category: "Payments") { + """ID of a payment gateway.""" gateway: String! - """ - Payment gateway name. - """ + """Payment gateway name.""" name: String! - """ - Initialized data by gateway. - """ + """Initialized data by gateway.""" data: JSONString } -""" -Check payment balance. -""" -type PaymentCheckBalance { - """ - Response from the gateway. - """ +"""Check payment balance.""" +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.") + paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PaymentError!]! } -input PaymentCheckBalanceInput { - """ - An ID of a payment gateway to check. - """ +input PaymentCheckBalanceInput @doc(category: "Payments") { + """An ID of a payment gateway to check.""" gatewayId: String! - """ - Payment method name. - """ + """Payment method name.""" method: String! - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String! - """ - Information about card. - """ + """Information about card.""" card: CardInput! } @@ -24427,228 +20609,296 @@ input CardInput { """ code: String! - """ - Card security code. - """ + """Card security code.""" cvc: String - """ - Information about currency and amount. - """ + """Information about currency and amount.""" money: MoneyInput! } input MoneyInput { - """ - Currency code. - """ + """Currency code.""" currency: String! - """ - Amount of money. - """ + """Amount of money.""" amount: PositiveDecimal! } """ -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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TransactionCreateErrorCode! } -""" -An enumeration. -""" -enum TransactionCreateErrorCode { +"""An enumeration.""" +enum TransactionCreateErrorCode @doc(category: "Payments") { INVALID GRAPHQL_ERROR NOT_FOUND INCORRECT_CURRENCY METADATA_KEY_REQUIRED + UNIQUE } -input TransactionCreateInput { - """ - Status of the transaction. - """ - status: String! - - """ - Payment type used for this transaction. - """ - type: String! - - """ - Reference of the transaction. - """ - reference: String - - """ - List of all possible actions for the transaction - """ - availableActions: [TransactionActionEnum!] - - """ - Amount authorized by this transaction. - """ - amountAuthorized: MoneyInput - - """ - Amount charged by this transaction. - """ - amountCharged: MoneyInput - - """ - Amount refunded by this transaction. - """ - amountRefunded: MoneyInput - - """ - Amount voided by this transaction. - """ - amountVoided: MoneyInput - - """ - Payment public metadata. - """ - metadata: [MetadataInput!] - - """ - Payment private metadata. - """ - privateMetadata: [MetadataInput!] -} - -input TransactionEventInput { - """ - Current status of the payment transaction. - """ - status: TransactionStatus! - - """ - Reference of the transaction. - """ - reference: String - - """ - Name of the transaction. - """ - name: String -} - -""" -Create transaction for checkout or order. Requires the following permissions: AUTHENTICATED_APP and HANDLE_PAYMENTS. - -Added in Saleor 3.4. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. -""" -type TransactionUpdate { - transaction: TransactionItem - errors: [TransactionUpdateError!]! -} - -type TransactionUpdateError { - """ - 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: TransactionUpdateErrorCode! -} - -""" -An enumeration. -""" -enum TransactionUpdateErrorCode { - INVALID - GRAPHQL_ERROR - NOT_FOUND - INCORRECT_CURRENCY - METADATA_KEY_REQUIRED -} - -input TransactionUpdateInput { +input TransactionCreateInput @doc(category: "Payments") { """ Status of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.14 (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. + + DEPRECATED: this field will be removed in Saleor 3.14 (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.14 (Preview Feature). Use `pspReference` instead. """ reference: String """ - List of all possible actions for the transaction + PSP Reference of the transaction. + + Added in Saleor 3.13. """ + pspReference: String + + """List of all possible actions for the transaction""" availableActions: [TransactionActionEnum!] - """ - Amount authorized by this transaction. - """ + """Amount authorized by this transaction.""" amountAuthorized: MoneyInput - """ - Amount charged by this transaction. - """ + """Amount charged by this transaction.""" amountCharged: MoneyInput - """ - Amount refunded by this transaction. - """ + """Amount refunded by this transaction.""" amountRefunded: MoneyInput """ Amount voided by this transaction. + + DEPRECATED: this field will be removed in Saleor 3.14 (Preview Feature). Use `amountCanceled` instead. """ amountVoided: MoneyInput """ - Payment public metadata. + Amount canceled by this transaction. + + Added in Saleor 3.13. """ + amountCanceled: MoneyInput + + """Payment public metadata.""" metadata: [MetadataInput!] - """ - Payment private metadata. - """ + """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 @doc(category: "Payments") { + """ + Current status of the payment transaction. + + DEPRECATED: this field will be removed in Saleor 3.14 (Preview Feature). Status will be calculated by Saleor. + """ + status: TransactionStatus + + """ + Reference of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.14 (Preview Feature). Use `pspReference` instead. + """ + reference: String + + """ + 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.14 (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 +} + +""" +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 @doc(category: "Payments") { + transaction: TransactionItem + errors: [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. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: TransactionUpdateErrorCode! +} + +"""An enumeration.""" +enum TransactionUpdateErrorCode @doc(category: "Payments") { + INVALID + GRAPHQL_ERROR + NOT_FOUND + INCORRECT_CURRENCY + METADATA_KEY_REQUIRED + UNIQUE +} + +input TransactionUpdateInput @doc(category: "Payments") { + """ + Status of the transaction. + + DEPRECATED: this field will be removed in Saleor 3.14 (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. + + DEPRECATED: this field will be removed in Saleor 3.14 (Preview Feature). Use `name` and `message` instead. + """ + type: String + + """ + 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.14 (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!] + + """Amount authorized by this transaction.""" + amountAuthorized: MoneyInput + + """Amount charged by this transaction.""" + amountCharged: MoneyInput + + """Amount refunded by this transaction.""" + amountRefunded: MoneyInput + + """ + Amount voided by this transaction. + + DEPRECATED: this field will be removed in Saleor 3.14 (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 } """ @@ -24656,36 +20906,30 @@ Request an action for payment transaction. 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, 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: TransactionRequestActionErrorCode! } -""" -An enumeration. -""" -enum TransactionRequestActionErrorCode { +"""An enumeration.""" +enum TransactionRequestActionErrorCode @doc(category: "Payments") { INVALID GRAPHQL_ERROR NOT_FOUND @@ -24693,48 +20937,234 @@ enum TransactionRequestActionErrorCode { } """ -Creates a new page. +Report the event for the transaction. -Requires one of the following permissions: MANAGE_PAGES. +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 PageCreate { - pageErrors: [PageError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [PageError!]! - page: Page +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 PageError { +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. - """ + """The error message.""" message: String - """ - The error code. - """ - code: PageErrorCode! + """The error code.""" + code: TransactionEventReportErrorCode! +} - """ - List of attributes IDs which causes the error. - """ - attributes: [ID!] - - """ - List of attribute values IDs which causes the error. - """ - values: [ID!] +"""An enumeration.""" +enum TransactionEventReportErrorCode @doc(category: "Payments") { + INVALID + GRAPHQL_ERROR + NOT_FOUND + INCORRECT_DETAILS + ALREADY_EXISTS } """ -An enumeration. +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. """ -enum PageErrorCode { +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 @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 @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. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: PageErrorCode! + + """List of attributes IDs which causes the error.""" + attributes: [ID!] + + """List of attribute values IDs which causes the error.""" + values: [ID!] +} + +"""An enumeration.""" +enum PageErrorCode @doc(category: "Pages") { GRAPHQL_ERROR INVALID NOT_FOUND @@ -24744,169 +21174,138 @@ enum PageErrorCode { ATTRIBUTE_ALREADY_ASSIGNED } -input PageCreateInput { - """ - Page internal name. - """ +input PageCreateInput @doc(category: "Pages") { + """Page internal name.""" slug: String - """ - Page title. - """ + """Page title.""" title: String """ Page content. - + Rich text format. For reference see https://editorjs.io/ """ content: JSONString - """ - List of attributes. - """ + """List of attributes.""" attributes: [AttributeValueInput!] - """ - Determines if page is visible in the storefront. - """ + """Determines if page is visible in the storefront.""" isPublished: Boolean """ - Publication date. ISO 8601 standard. - + Publication date. ISO 8601 standard. + DEPRECATED: this field will be removed in Saleor 4.0. Use `publishedAt` field instead. """ publicationDate: String """ Publication date time. ISO 8601 standard. - + Added in Saleor 3.3. """ publishedAt: DateTime - """ - Search engine optimization fields. - """ + """Search engine optimization fields.""" seo: SeoInput - """ - ID of the page type that page belongs to. - """ + """ID of the page type that page belongs to.""" pageType: ID! } """ -Deletes a page. +Deletes a page. Requires one of the following permissions: MANAGE_PAGES. """ -type PageDelete { - pageErrors: [PageError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes pages. +Deletes pages. Requires one of the following permissions: MANAGE_PAGES. """ -type PageBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! } """ -Publish pages. +Publish pages. Requires one of the following permissions: MANAGE_PAGES. """ -type PageBulkPublish { - """ - Returns how many objects were affected. - """ +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.") + pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! } """ -Updates an existing page. +Updates an existing page. Requires one of the following permissions: MANAGE_PAGES. """ -type PageUpdate { - pageErrors: [PageError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Page internal name. - """ +input PageInput @doc(category: "Pages") { + """Page internal name.""" slug: String - """ - Page title. - """ + """Page title.""" title: String """ Page content. - + Rich text format. For reference see https://editorjs.io/ """ content: JSONString - """ - List of attributes. - """ + """List of attributes.""" attributes: [AttributeValueInput!] - """ - Determines if page is visible in the storefront. - """ + """Determines if page is visible in the storefront.""" isPublished: Boolean """ - Publication date. ISO 8601 standard. - + Publication date. ISO 8601 standard. + DEPRECATED: this field will be removed in Saleor 4.0. Use `publishedAt` field instead. """ publicationDate: String """ Publication date time. ISO 8601 standard. - + Added in Saleor 3.3. """ publishedAt: DateTime - """ - Search engine optimization fields. - """ + """Search engine optimization fields.""" seo: SeoInput } """ -Creates/updates translations for a page. +Creates/updates translations for a page. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type PageTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } @@ -24918,233 +21317,179 @@ input PageTranslationInput { """ Translated page content. - + Rich text format. For reference see https://editorjs.io/ """ content: JSONString } """ -Create a new page type. +Create a new page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeCreate { - pageErrors: [PageError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Name of the page type. - """ +input PageTypeCreateInput @doc(category: "Pages") { + """Name of the page type.""" name: String - """ - Page type slug. - """ + """Page type slug.""" slug: String - """ - List of attribute IDs to be assigned to the page type. - """ + """List of attribute IDs to be assigned to the page type.""" addAttributes: [ID!] } """ -Update page type. +Update page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeUpdate { - pageErrors: [PageError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Name of the page type. - """ +input PageTypeUpdateInput @doc(category: "Pages") { + """Name of the page type.""" name: String - """ - Page type slug. - """ + """Page type slug.""" slug: String - """ - List of attribute IDs to be assigned to the page type. - """ + """List of attribute IDs to be assigned to the page type.""" addAttributes: [ID!] - """ - List of attribute IDs to be assigned to the page type. - """ + """List of attribute IDs to be assigned to the page type.""" removeAttributes: [ID!] } """ -Delete a page type. +Delete a page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeDelete { - pageErrors: [PageError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Delete page types. +Delete page types. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! } """ -Assign attributes to a given page type. +Assign attributes to a given page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageAttributeAssign { - """ - The updated page type. - """ +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.") + pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! } """ -Unassign attributes from a given page type. +Unassign attributes from a given page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageAttributeUnassign { - """ - The updated page type. - """ +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.") + pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! } """ -Reorder the attributes of a page type. +Reorder the attributes of a page type. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type PageTypeReorderAttributes { - """ - Page type from which attributes are reordered. - """ +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.") + pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! } """ -Reorder page attribute values. +Reorder page attribute values. Requires one of the following permissions: MANAGE_PAGES. """ -type PageReorderAttributeValues { - """ - Page from which attribute values are reordered. - """ +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.") + pageErrors: [PageError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PageError!]! } """ -Completes creating an order. +Completes creating an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderComplete { - """ - Completed order. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Creates a new draft order. +Creates a new draft order. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderCreate { - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Billing address of the customer. - """ +input DraftOrderCreateInput @doc(category: "Orders") { + """Billing address of the customer.""" billingAddress: AddressInput - """ - Customer associated with the draft order. - """ + """Customer associated with the draft order.""" user: ID - """ - Email address of the customer. - """ + """Email address of the customer.""" userEmail: String - """ - Discount amount for the order. - """ + """Discount amount for the order.""" discount: PositiveDecimal - """ - Shipping address of the customer. - """ + """Shipping address of the customer.""" shippingAddress: AddressInput - """ - ID of a selected shipping method. - """ + """ID of a selected shipping method.""" shippingMethod: ID - """ - ID of the voucher associated with the order. - """ + """ID of the voucher associated with the order.""" voucher: ID - """ - A note from a customer. Visible by customers in the order summary. - """ + """A note from a customer. Visible by customers in the order summary.""" customerNote: String - """ - ID of the channel associated with the order. - """ + """ID of the channel associated with the order.""" channelId: ID """ @@ -25154,136 +21499,102 @@ input DraftOrderCreateInput { """ External ID of this order. - + Added in Saleor 3.10. """ externalReference: String - """ - Variant line input consisting of variant ID and quantity of products. - """ + """Variant line input consisting of variant ID and quantity of products.""" lines: [OrderLineCreateInput!] } -input OrderLineCreateInput { - """ - Number of variant items ordered. - """ +input OrderLineCreateInput @doc(category: "Orders") { + """Number of variant items ordered.""" quantity: Int! - """ - Product variant ID. - """ + """Product variant ID.""" variantId: ID! """ - Flag that allow force splitting the same variant into multiple lines by skipping the matching logic. - + 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 } """ -Deletes a draft order. +Deletes a draft order. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderDelete { - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes draft orders. +Deletes draft orders. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Deletes order lines. +Deletes order lines. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderLinesBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Updates a draft order. +Updates a draft order. Requires one of the following permissions: MANAGE_ORDERS. """ -type DraftOrderUpdate { - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Billing address of the customer. - """ +input DraftOrderInput @doc(category: "Orders") { + """Billing address of the customer.""" billingAddress: AddressInput - """ - Customer associated with the draft order. - """ + """Customer associated with the draft order.""" user: ID - """ - Email address of the customer. - """ + """Email address of the customer.""" userEmail: String - """ - Discount amount for the order. - """ + """Discount amount for the order.""" discount: PositiveDecimal - """ - Shipping address of the customer. - """ + """Shipping address of the customer.""" shippingAddress: AddressInput - """ - ID of a selected shipping method. - """ + """ID of a selected shipping method.""" shippingMethod: ID - """ - ID of the voucher associated with the order. - """ + """ID of the voucher associated with the order.""" voucher: ID - """ - A note from a customer. Visible by customers in the order summary. - """ + """A note from a customer. Visible by customers in the order summary.""" customerNote: String - """ - ID of the channel associated with the order. - """ + """ID of the channel associated with the order.""" channelId: ID """ @@ -25293,170 +21604,132 @@ input DraftOrderInput { """ External ID of this order. - + Added in Saleor 3.10. """ externalReference: String } """ -Adds note to the order. +Adds note to the order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderAddNote { - """ - Order with the note added. - """ +type OrderAddNote @doc(category: "Orders") { + """Order with the note added.""" order: Order - """ - Order note created. - """ + """Order note created.""" event: OrderEvent - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } -input OrderAddNoteInput { - """ - Note message. - """ +input OrderAddNoteInput @doc(category: "Orders") { + """Note message.""" message: String! } """ -Cancel an order. +Cancel an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderCancel { - """ - Canceled order. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Capture an order. +Capture an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderCapture { - """ - Captured order. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Confirms an unconfirmed order by changing status to unfulfilled. +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Creates new fulfillments for an order. +Creates new fulfillments for an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderFulfill { - """ - List of created fulfillments. - """ +type OrderFulfill @doc(category: "Orders") { + """List of created fulfillments.""" fulfillments: [Fulfillment!] - """ - Fulfilled order. - """ + """Fulfilled order.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } -input OrderFulfillInput { - """ - List of items informing how to fulfill the order. - """ +input OrderFulfillInput @doc(category: "Orders") { + """List of items informing how to fulfill the order.""" lines: [OrderFulfillLineInput!]! - """ - If true, send an email notification to the customer. - """ + """If true, send an email notification to the customer.""" notifyCustomer: Boolean - """ - If true, then allow proceed fulfillment when stock is exceeded. - """ + """If true, then allow proceed fulfillment when stock is exceeded.""" allowStockToBeExceeded: Boolean = false """ Fulfillment tracking number. - + Added in Saleor 3.6. """ trackingNumber: String } -input OrderFulfillLineInput { - """ - The ID of the order line. - """ +input OrderFulfillLineInput @doc(category: "Orders") { + """The ID of the order line.""" orderLineId: ID - """ - List of stock items to create. - """ + """List of stock items to create.""" stocks: [OrderFulfillStockInput!]! } -input OrderFulfillStockInput { - """ - The number of line items to be fulfilled from given warehouse. - """ +input OrderFulfillStockInput @doc(category: "Orders") { + """The number of line items to be fulfilled from given warehouse.""" quantity: Int! - """ - ID of the warehouse from which the item will be fulfilled. - """ + """ID of the warehouse from which the item will be fulfilled.""" warehouse: ID! } """ -Cancels existing fulfillment and optionally restocks items. +Cancels existing fulfillment and optionally restocks items. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentCancel { - """ - A canceled fulfillment. - """ +type FulfillmentCancel @doc(category: "Orders") { + """A canceled fulfillment.""" fulfillment: Fulfillment - """ - Order which fulfillment was cancelled. - """ + """Order which fulfillment was cancelled.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") 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. """ @@ -25466,91 +21739,66 @@ input FulfillmentCancelInput { """ Approve existing fulfillment. -Added in Saleor 3.1. +Added in Saleor 3.1. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentApprove { - """ - An approved fulfillment. - """ +type FulfillmentApprove @doc(category: "Orders") { + """An approved fulfillment.""" fulfillment: Fulfillment - """ - Order which fulfillment was approved. - """ + """Order which fulfillment was approved.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Updates a fulfillment for an order. +Updates a fulfillment for an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentUpdateTracking { - """ - A fulfillment with updated tracking. - """ +type FulfillmentUpdateTracking @doc(category: "Orders") { + """A fulfillment with updated tracking.""" fulfillment: Fulfillment - """ - Order for which fulfillment was updated. - """ + """Order for which fulfillment was updated.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } -input FulfillmentUpdateTrackingInput { - """ - Fulfillment tracking number. - """ +input FulfillmentUpdateTrackingInput @doc(category: "Orders") { + """Fulfillment tracking number.""" trackingNumber: String - """ - If true, send an email notification to the customer. - """ + """If true, send an email notification to the customer.""" notifyCustomer: Boolean = false } """ -Refund products. +Refund products. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentRefundProducts { - """ - A refunded fulfillment. - """ +type FulfillmentRefundProducts @doc(category: "Orders") { + """A refunded fulfillment.""" fulfillment: Fulfillment - """ - Order which fulfillment was refunded. - """ + """Order which fulfillment was refunded.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } -input OrderRefundProductsInput { - """ - List of unfulfilled lines to refund. - """ +input OrderRefundProductsInput @doc(category: "Orders") { + """List of unfulfilled lines to refund.""" orderLines: [OrderRefundLineInput!] - """ - List of fulfilled lines to refund. - """ + """List of fulfilled lines to refund.""" fulfillmentLines: [OrderRefundFulfillmentLineInput!] - """ - The total amount of refund when the value is provided manually. - """ + """The total amount of refund when the value is provided manually.""" amountToRefund: PositiveDecimal """ @@ -25559,74 +21807,51 @@ input OrderRefundProductsInput { includeShippingCosts: Boolean = false } -input OrderRefundLineInput { - """ - The ID of the order line to refund. - """ +input OrderRefundLineInput @doc(category: "Orders") { + """The ID of the order line to refund.""" orderLineId: ID! - """ - The number of items to be refunded. - """ + """The number of items to be refunded.""" quantity: Int! } -input OrderRefundFulfillmentLineInput { - """ - The ID of the fulfillment line to refund. - """ +input OrderRefundFulfillmentLineInput @doc(category: "Orders") { + """The ID of the fulfillment line to refund.""" fulfillmentLineId: ID! - """ - The number of items to be refunded. - """ + """The number of items to be refunded.""" quantity: Int! } """ -Return products. +Return products. Requires one of the following permissions: MANAGE_ORDERS. """ -type FulfillmentReturnProducts { - """ - A return fulfillment. - """ +type FulfillmentReturnProducts @doc(category: "Orders") { + """A return fulfillment.""" returnFulfillment: Fulfillment - """ - A replace fulfillment. - """ + """A replace fulfillment.""" replaceFulfillment: Fulfillment - """ - Order which fulfillment was returned. - """ + """Order which fulfillment was returned.""" order: Order - """ - A draft order which was created for products with replace flag. - """ + """A draft order which was created for products with replace flag.""" replaceOrder: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } -input OrderReturnProductsInput { - """ - List of unfulfilled lines to return. - """ +input OrderReturnProductsInput @doc(category: "Orders") { + """List of unfulfilled lines to return.""" orderLines: [OrderReturnLineInput!] - """ - List of fulfilled lines to return. - """ + """List of fulfilled lines to return.""" fulfillmentLines: [OrderReturnFulfillmentLineInput!] - """ - The total amount of refund when the value is provided manually. - """ + """The total amount of refund when the value is provided manually.""" amountToRefund: PositiveDecimal """ @@ -25634,293 +21859,323 @@ input OrderReturnProductsInput { """ includeShippingCosts: Boolean = false - """ - If true, Saleor will call refund action for all lines. - """ + """If true, Saleor will call refund action for all lines.""" refund: Boolean = false } -input OrderReturnLineInput { - """ - The ID of the order line to return. - """ +input OrderReturnLineInput @doc(category: "Orders") { + """The ID of the order line to return.""" orderLineId: ID! - """ - The number of items to be returned. - """ + """The number of items to be returned.""" quantity: Int! - """ - Determines, if the line should be added to replace order. - """ + """Determines, if the line should be added to replace order.""" replace: Boolean = false } -input OrderReturnFulfillmentLineInput { - """ - The ID of the fulfillment line to return. - """ +input OrderReturnFulfillmentLineInput @doc(category: "Orders") { + """The ID of the fulfillment line to return.""" fulfillmentLineId: ID! - """ - The number of items to be returned. - """ + """The number of items to be returned.""" quantity: Int! - """ - Determines, if the line should be added to replace order. - """ + """Determines, if the line should be added to replace order.""" replace: Boolean = false } """ -Create order lines for an order. +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 OrderLinesCreate { - """ - Related order. - """ +type OrderGrantRefundCreate @doc(category: "Orders") { + """Order which has assigned new grant refund.""" order: Order - """ - List of added order lines. - """ - orderLines: [OrderLine!] - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! + """Created granted refund.""" + grantedRefund: OrderGrantedRefund + errors: [OrderGrantRefundCreateError!]! } -""" -Deletes an order line from an order. +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 -Requires one of the following permissions: MANAGE_ORDERS. -""" -type OrderLineDelete { - """ - A related order. - """ - order: Order + """The error message.""" + message: String - """ - An order line that was deleted. - """ - orderLine: OrderLine - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! + """The error code.""" + code: OrderGrantRefundCreateErrorCode! } -""" -Updates an order line of an order. - -Requires one of the following permissions: MANAGE_ORDERS. -""" -type OrderLineUpdate { - """ - Related order. - """ - order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") - errors: [OrderError!]! - orderLine: OrderLine +"""An enumeration.""" +enum OrderGrantRefundCreateErrorCode @doc(category: "Orders") { + GRAPHQL_ERROR + NOT_FOUND } -input OrderLineInput { - """ - Number of variant items ordered. - """ - quantity: Int! -} +input OrderGrantRefundCreateInput @doc(category: "Orders") { + """Amount of the granted refund.""" + amount: Decimal! -""" -Adds discount to the order. - -Requires one of the following permissions: MANAGE_ORDERS. -""" -type OrderDiscountAdd { - """ - 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 { - """ - Type of the discount: fixed or percent - """ - valueType: DiscountValueTypeEnum! - - """ - Value of the discount. Can store fixed value or percent value - """ - value: PositiveDecimal! - - """ - Explanation for the applied discount. - """ + """Reason of the granted refund.""" reason: String } """ -Update discount for the order. +Custom Decimal implementation. + +Returns Decimal as a float in the API, +parses float to the Decimal on the way back. +""" +scalar Decimal + +""" +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 OrderDiscountUpdate { - """ - Order which has been discounted. - """ +type OrderGrantRefundUpdate @doc(category: "Orders") { + """Order which has assigned updated grant refund.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + + """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 @doc(category: "Orders") { + """Related order.""" + order: Order + + """List of added order lines.""" + orderLines: [OrderLine!] + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Remove discount from the order. +Deletes an order line from an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderDiscountDelete { - """ - Order which has removed discount. - """ +type OrderLineDelete @doc(category: "Orders") { + """A related order.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + + """An order line that was deleted.""" + orderLine: OrderLine + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Update discount for the order line. +Updates an order line of an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderLineDiscountUpdate { - """ - Order line which has been discounted. - """ +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.") + errors: [OrderError!]! + orderLine: OrderLine +} + +input OrderLineInput @doc(category: "Orders") { + """Number of variant items ordered.""" + quantity: Int! +} + +""" +Adds discount to the order. + +Requires one of the following permissions: MANAGE_ORDERS. +""" +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 @doc(category: "Orders") { + """Type of the discount: fixed or percent""" + valueType: DiscountValueTypeEnum! + + """Value of the discount. Can store fixed value or percent value""" + value: PositiveDecimal! + + """Explanation for the applied discount.""" + reason: String +} + +""" +Update discount for the order. + +Requires one of the following permissions: MANAGE_ORDERS. +""" +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.") + errors: [OrderError!]! +} + +""" +Remove discount from the order. + +Requires one of the following permissions: MANAGE_ORDERS. +""" +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.") + errors: [OrderError!]! +} + +""" +Update discount for the order line. + +Requires one of the following permissions: MANAGE_ORDERS. +""" +type OrderLineDiscountUpdate @doc(category: "Orders") { + """Order line which has been discounted.""" orderLine: OrderLine - """ - Order which is related to the discounted line. - """ + """Order which is related to the discounted line.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Remove discount applied to the order line. +Remove discount applied to the order line. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderLineDiscountRemove { - """ - Order line which has removed discount. - """ +type OrderLineDiscountRemove @doc(category: "Orders") { + """Order line which has removed discount.""" orderLine: OrderLine - """ - Order which is related to line which has removed discount. - """ + """Order which is related to line which has removed discount.""" order: Order - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Mark order as manually paid. +Mark order as manually paid. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderMarkAsPaid { - """ - Order marked as paid. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Refund an order. +Refund an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderRefund { - """ - A refunded order. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Updates an order. +Updates an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderUpdate { - orderErrors: [OrderError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Billing address of the customer. - """ +input OrderUpdateInput @doc(category: "Orders") { + """Billing address of the customer.""" billingAddress: AddressInput - """ - Email address of the customer. - """ + """Email address of the customer.""" userEmail: String - """ - Shipping address of the customer. - """ + """Shipping address of the customer.""" shippingAddress: AddressInput """ External ID of this order. - + Added in Saleor 3.10. """ externalReference: String } """ -Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed. +Updates a shipping method of the order. Requires shipping method ID to update, when null is passed then currently assigned shipping method is removed. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderUpdateShipping { - """ - Order with updated shipping method. - """ +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.") + 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. """ @@ -25928,32 +22183,26 @@ input OrderUpdateShippingInput { } """ -Void an order. +Void an order. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderVoid { - """ - A voided order. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } """ -Cancels orders. +Cancels orders. Requires one of the following permissions: MANAGE_ORDERS. """ -type OrderBulkCancel { - """ - Returns how many objects were affected. - """ +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.") + orderErrors: [OrderError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [OrderError!]! } @@ -25961,8 +22210,7 @@ type OrderBulkCancel { Delete metadata of an object. To use it, you need to have access to the modified object. """ type DeleteMetadata { - metadataErrors: [MetadataError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MetadataError!]! item: ObjectWithMetadata } @@ -25973,20 +22221,14 @@ type MetadataError { """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: MetadataErrorCode! } -""" -An enumeration. -""" +"""An enumeration.""" enum MetadataErrorCode { GRAPHQL_ERROR INVALID @@ -25999,8 +22241,7 @@ enum MetadataErrorCode { Delete object's private metadata. To use it, you need to be an authenticated staff user or an app and have access to the modified object. """ type DeletePrivateMetadata { - metadataErrors: [MetadataError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MetadataError!]! item: ObjectWithMetadata } @@ -26009,8 +22250,7 @@ type DeletePrivateMetadata { Updates metadata of an object. To use it, you need to have access to the modified object. """ type UpdateMetadata { - metadataErrors: [MetadataError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MetadataError!]! item: ObjectWithMetadata } @@ -26019,47 +22259,37 @@ type UpdateMetadata { Updates private metadata of an object. To use it, you need to be an authenticated staff user or an app and have access to the modified object. """ type UpdatePrivateMetadata { - metadataErrors: [MetadataError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + metadataErrors: [MetadataError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MetadataError!]! item: ObjectWithMetadata } """ -Assigns storefront's navigation menus. +Assigns storefront's navigation menus. Requires one of the following permissions: MANAGE_MENUS, MANAGE_SETTINGS. """ -type AssignNavigation { - """ - Assigned navigation menu. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: MenuErrorCode! } -""" -An enumeration. -""" +"""An enumeration.""" enum MenuErrorCode { CANNOT_ASSIGN_NODE GRAPHQL_ERROR @@ -26073,248 +22303,190 @@ enum MenuErrorCode { } enum NavigationType { - """ - Main storefront navigation. - """ + """Main storefront navigation.""" MAIN - """ - Secondary storefront navigation. - """ + """Secondary storefront navigation.""" SECONDARY } """ -Creates a new Menu. +Creates a new Menu. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuCreate { - menuErrors: [MenuError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } input MenuCreateInput { - """ - Name of the menu. - """ + """Name of the menu.""" name: String! - """ - Slug of the menu. Will be generated if not provided. - """ + """Slug of the menu. Will be generated if not provided.""" slug: String - """ - List of menu items. - """ + """List of menu items.""" items: [MenuItemInput!] } input MenuItemInput { - """ - Name of the menu item. - """ + """Name of the menu item.""" name: String - """ - URL of the pointed item. - """ + """URL of the pointed item.""" url: String - """ - Category to which item points. - """ + """Category to which item points.""" category: ID - """ - Collection to which item points. - """ + """Collection to which item points.""" collection: ID - """ - Page to which item points. - """ + """Page to which item points.""" page: ID } """ -Deletes a menu. +Deletes a menu. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuDelete { - menuErrors: [MenuError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes menus. +Deletes menus. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! } """ -Updates a menu. +Updates a menu. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuUpdate { - menuErrors: [MenuError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } input MenuInput { - """ - Name of the menu. - """ + """Name of the menu.""" name: String - """ - Slug of the menu. - """ + """Slug of the menu.""" slug: String } """ -Creates a new menu item. +Creates a new menu item. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemCreate { - menuErrors: [MenuError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } input MenuItemCreateInput { - """ - Name of the menu item. - """ + """Name of the menu item.""" name: String! - """ - URL of the pointed item. - """ + """URL of the pointed item.""" url: String - """ - Category to which item points. - """ + """Category to which item points.""" category: ID - """ - Collection to which item points. - """ + """Collection to which item points.""" collection: ID - """ - Page to which item points. - """ + """Page to which item points.""" page: ID - """ - Menu to which item belongs. - """ + """Menu to which item belongs.""" menu: ID! - """ - ID of the parent menu. If empty, menu will be top level menu. - """ + """ID of the parent menu. If empty, menu will be top level menu.""" parent: ID } """ -Deletes a menu item. +Deletes a menu item. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemDelete { - menuErrors: [MenuError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes menu items. +Deletes menu items. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! } """ -Updates a menu item. +Updates a menu item. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemUpdate { - menuErrors: [MenuError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Creates/updates translations for a menu item. +Creates/updates translations for a menu item. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type MenuItemTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Moves items of menus. +Moves items of menus. Requires one of the following permissions: MANAGE_MENUS. """ -type MenuItemMove { - """ - Assigned menu to move within. - """ +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.") + menuErrors: [MenuError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [MenuError!]! } input MenuItemMoveInput { - """ - The menu item ID to move. - """ + """The menu item ID to move.""" itemId: ID! - """ - ID of the parent menu. If empty, menu will be top level menu. - """ + """ID of the parent menu. If empty, menu will be top level menu.""" parentId: ID """ @@ -26324,42 +22496,33 @@ input MenuItemMoveInput { } """ -Request an invoice for the order using plugin. +Request an invoice for the order using plugin. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceRequest { - """ - Order related to an invoice. - """ +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.") + invoiceErrors: [InvoiceError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [InvoiceError!]! 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: InvoiceErrorCode! } -""" -An enumeration. -""" -enum InvoiceErrorCode { +"""An enumeration.""" +enum InvoiceErrorCode @doc(category: "Orders") { REQUIRED NOT_READY URL_NOT_SET @@ -26371,130 +22534,106 @@ enum InvoiceErrorCode { } """ -Requests deletion of an invoice. +Requests deletion of an invoice. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceRequestDelete { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Creates a ready to send invoice. +Creates a ready to send invoice. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceCreate { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Invoice number. - """ +input InvoiceCreateInput @doc(category: "Orders") { + """Invoice number.""" number: String! - """ - URL of an invoice to download. - """ + """URL of an invoice to download.""" url: String! } """ -Deletes an invoice. +Deletes an invoice. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceDelete { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Updates an invoice. +Updates an invoice. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceUpdate { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Invoice number - """ +input UpdateInvoiceInput @doc(category: "Orders") { + """Invoice number""" number: String - """ - URL of an invoice to download. - """ + """URL of an invoice to download.""" url: String } """ -Send an invoice notification to the customer. +Send an invoice notification to the customer. Requires one of the following permissions: MANAGE_ORDERS. """ -type InvoiceSendNotification { - invoiceErrors: [InvoiceError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Activate a gift card. +Activate a gift card. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardActivate { - """ - Activated gift card. - """ +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: GiftCardErrorCode! - """ - List of tag values that cause the error. - """ + """List of tag values that cause the error.""" tags: [String!] } -""" -An enumeration. -""" -enum GiftCardErrorCode { +"""An enumeration.""" +enum GiftCardErrorCode @doc(category: "Gift cards") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -26506,198 +22645,164 @@ enum GiftCardErrorCode { } """ -Creates a new gift card. +Creates a new gift card. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardCreate { - giftCardErrors: [GiftCardError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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!] """ 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 """ - Start date of the gift card in ISO 8601 format. - + Start date of the gift card in ISO 8601 format. + DEPRECATED: this field will be removed in Saleor 4.0. """ startDate: Date """ - End date of the gift card in ISO 8601 format. - + End date of the gift card in ISO 8601 format. + DEPRECATED: this field will be removed in Saleor 4.0. Use `expiryDate` from `expirySettings` instead. """ endDate: Date - """ - Balance of the gift card. - """ + """Balance of the gift card.""" balance: PriceInput! - """ - Email of the customer to whom gift card will be sent. - """ + """Email of the customer to whom gift card will be sent.""" userEmail: String """ 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 """ 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! """ - Code to use the gift card. - + Code to use the gift card. + DEPRECATED: this field will be removed in Saleor 4.0. The code is now auto generated. """ code: String """ 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 } input PriceInput { - """ - Currency code. - """ + """Currency code.""" currency: String! - """ - Amount of money. - """ + """Amount of money.""" amount: PositiveDecimal! } """ 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 { - giftCardErrors: [GiftCardError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deactivate a gift card. +Deactivate a gift card. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardDeactivate { - """ - Deactivated gift card. - """ +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.") + giftCardErrors: [GiftCardError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [GiftCardError!]! } """ -Update a gift card. +Update a gift card. Requires one of the following permissions: MANAGE_GIFT_CARD. """ -type GiftCardUpdate { - giftCardErrors: [GiftCardError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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!] """ 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 """ - Start date of the gift card in ISO 8601 format. - + Start date of the gift card in ISO 8601 format. + DEPRECATED: this field will be removed in Saleor 4.0. """ startDate: Date """ - End date of the gift card in ISO 8601 format. - + End date of the gift card in ISO 8601 format. + DEPRECATED: this field will be removed in Saleor 4.0. Use `expiryDate` from `expirySettings` instead. """ endDate: Date """ 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!] """ 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 } @@ -26705,128 +22810,90 @@ 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 { - """ - Gift card which has been sent. - """ +type GiftCardResend @doc(category: "Gift cards") { + """Gift card which has been sent.""" giftCard: GiftCard errors: [GiftCardError!]! } -input GiftCardResendInput { - """ - ID of a gift card to resend. - """ +input GiftCardResendInput @doc(category: "Gift cards") { + """ID of a gift card to resend.""" id: ID! - """ - Email to which gift card should be send. - """ + """Email to which gift card should be send.""" email: String - """ - Slug of a channel from which the email should be sent. - """ + """Slug of a channel from which the email should be sent.""" channel: String! } """ 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 { - """ - Gift card with the note added. - """ +type GiftCardAddNote @doc(category: "Gift cards") { + """Gift card with the note added.""" giftCard: GiftCard - """ - Gift card note created. - """ + """Gift card note created.""" event: GiftCardEvent errors: [GiftCardError!]! } -input GiftCardAddNoteInput { - """ - Note message. - """ +input GiftCardAddNoteInput @doc(category: "Gift cards") { + """Note message.""" message: String! } """ 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 { - """ - Returns how many objects were created. - """ +type GiftCardBulkCreate @doc(category: "Gift cards") { + """Returns how many objects were created.""" count: Int! - """ - List of created gift cards. - """ + """List of created gift cards.""" giftCards: [GiftCard!]! errors: [GiftCardError!]! } -input GiftCardBulkCreateInput { - """ - The number of cards to issue. - """ +input GiftCardBulkCreateInput @doc(category: "Gift cards") { + """The number of cards to issue.""" count: Int! - """ - Balance of the gift card. - """ + """Balance of the gift card.""" balance: PriceInput! - """ - The gift card tags. - """ + """The gift card tags.""" tags: [String!] - """ - The gift card expiry date. - """ + """The gift card expiry date.""" expiryDate: Date - """ - Determine if gift card is active. - """ + """Determine if gift card is active.""" isActive: Boolean! } """ 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 { - """ - Returns how many objects were affected. - """ +type GiftCardBulkDelete @doc(category: "Gift cards") { + """Returns how many objects were affected.""" count: Int! errors: [GiftCardError!]! } @@ -26834,16 +22901,12 @@ 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 { - """ - Returns how many objects were affected. - """ +type GiftCardBulkActivate @doc(category: "Gift cards") { + """Returns how many objects were affected.""" count: Int! errors: [GiftCardError!]! } @@ -26851,29 +22914,24 @@ 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 { - """ - Returns how many objects were affected. - """ +type GiftCardBulkDeactivate @doc(category: "Gift cards") { + """Returns how many objects were affected.""" count: Int! errors: [GiftCardError!]! } """ -Update plugin configuration. +Update plugin configuration. Requires one of the following permissions: MANAGE_PLUGINS. """ type PluginUpdate { plugin: Plugin - pluginsErrors: [PluginError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + pluginsErrors: [PluginError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PluginError!]! } @@ -26883,20 +22941,14 @@ type PluginError { """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: PluginErrorCode! } -""" -An enumeration. -""" +"""An enumeration.""" enum PluginErrorCode { GRAPHQL_ERROR INVALID @@ -26907,26 +22959,18 @@ enum PluginErrorCode { } input PluginUpdateInput { - """ - Indicates whether the plugin should be enabled. - """ + """Indicates whether the plugin should be enabled.""" active: Boolean - """ - Configuration of the plugin. - """ + """Configuration of the plugin.""" configuration: [ConfigurationItemInput!] } input ConfigurationItemInput { - """ - Name of the field to update. - """ + """Name of the field to update.""" name: String! - """ - Value of the given field to update. - """ + """Value of the given field to update.""" value: String } @@ -26945,20 +22989,14 @@ type ExternalNotificationError { """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ExternalNotificationErrorCodes! } -""" -An enumeration. -""" +"""An enumeration.""" enum ExternalNotificationErrorCodes { REQUIRED INVALID_MODEL_TYPE @@ -26984,48 +23022,37 @@ input ExternalNotificationTriggerInput { } """ -Creates a new sale. +Creates a new sale. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleCreate { - discountErrors: [DiscountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - List of products IDs which causes the error. - """ + """List of products IDs which causes the error.""" products: [ID!] - """ - The error code. - """ + """The error code.""" code: DiscountErrorCode! - """ - List of channels IDs which causes the error. - """ + """List of channels IDs which causes the error.""" channels: [ID!] } -""" -An enumeration. -""" -enum DiscountErrorCode { +"""An enumeration.""" +enum DiscountErrorCode @doc(category: "Discounts") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -27036,426 +23063,324 @@ enum DiscountErrorCode { DUPLICATED_INPUT_ITEM } -input SaleInput { - """ - Voucher name. - """ +input SaleInput @doc(category: "Discounts") { + """Voucher name.""" name: String - """ - Fixed or percentage. - """ + """Fixed or percentage.""" type: DiscountValueTypeEnum - """ - Value of the voucher. - """ + """Value of the voucher.""" value: PositiveDecimal - """ - Products related to the discount. - """ + """Products related to the discount.""" products: [ID!] variants: [ID!] - """ - Categories related to the discount. - """ + """Categories related to the discount.""" categories: [ID!] - """ - Collections related to the discount. - """ + """Collections related to the discount.""" collections: [ID!] - """ - Start date of the voucher in ISO 8601 format. - """ + """Start date of the voucher in ISO 8601 format.""" startDate: DateTime - """ - End date of the voucher in ISO 8601 format. - """ + """End date of the voucher in ISO 8601 format.""" endDate: DateTime } """ -Deletes a sale. +Deletes a sale. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleDelete { - discountErrors: [DiscountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes sales. +Deletes sales. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } """ -Updates a sale. +Updates a sale. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleUpdate { - discountErrors: [DiscountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Adds products, categories, collections to a voucher. +Adds products, categories, collections to a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleAddCatalogues { - """ - Sale of which catalogue IDs will be modified. - """ +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.") + discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } -input CatalogueInput { - """ - Products related to the discount. - """ +input CatalogueInput @doc(category: "Discounts") { + """Products related to the discount.""" products: [ID!] - """ - Categories related to the discount. - """ + """Categories related to the discount.""" categories: [ID!] - """ - Collections related to the discount. - """ + """Collections related to the discount.""" collections: [ID!] """ Product variant related to the discount. - + Added in Saleor 3.1. """ variants: [ID!] } """ -Removes products, categories, collections from a sale. +Removes products, categories, collections from a sale. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleRemoveCatalogues { - """ - Sale of which catalogue IDs will be modified. - """ +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.") + discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } """ -Creates/updates translations for a sale. +Creates/updates translations for a sale. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type SaleTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Manage sale's availability in channels. +Manage sale's availability in channels. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type SaleChannelListingUpdate { - """ - An updated sale instance. - """ +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.") + discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } -input SaleChannelListingInput { - """ - List of channels to which the sale should be assigned. - """ +input SaleChannelListingInput @doc(category: "Discounts") { + """List of channels to which the sale should be assigned.""" addChannels: [SaleChannelListingAddInput!] - """ - List of channels from which the sale should be unassigned. - """ + """List of channels from which the sale should be unassigned.""" removeChannels: [ID!] } -input SaleChannelListingAddInput { - """ - ID of a channel. - """ +input SaleChannelListingAddInput @doc(category: "Discounts") { + """ID of a channel.""" channelId: ID! - """ - The value of the discount. - """ + """The value of the discount.""" discountValue: PositiveDecimal! } """ -Creates a new voucher. +Creates a new voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherCreate { - discountErrors: [DiscountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER. - """ +input VoucherInput @doc(category: "Discounts") { + """Voucher type: PRODUCT, CATEGORY SHIPPING or ENTIRE_ORDER.""" type: VoucherTypeEnum - """ - Voucher name. - """ + """Voucher name.""" name: String - """ - Code to use the voucher. - """ + """Code to use the voucher.""" code: String - """ - Start date of the voucher in ISO 8601 format. - """ + """Start date of the voucher in ISO 8601 format.""" startDate: DateTime - """ - End date of the voucher in ISO 8601 format. - """ + """End date of the voucher in ISO 8601 format.""" endDate: DateTime - """ - Choices: fixed or percentage. - """ + """Choices: fixed or percentage.""" discountValueType: DiscountValueTypeEnum - """ - Products discounted by the voucher. - """ + """Products discounted by the voucher.""" products: [ID!] """ Variants discounted by the voucher. - + Added in Saleor 3.1. """ variants: [ID!] - """ - Collections discounted by the voucher. - """ + """Collections discounted by the voucher.""" collections: [ID!] - """ - Categories discounted by the voucher. - """ + """Categories discounted by the voucher.""" categories: [ID!] - """ - Minimal quantity of checkout items required to apply the voucher. - """ + """Minimal quantity of checkout items required to apply the voucher.""" minCheckoutItemsQuantity: Int - """ - Country codes that can be used with the shipping voucher. - """ + """Country codes that can be used with the shipping voucher.""" countries: [String!] - """ - Voucher should be applied to the cheapest item or entire order. - """ + """Voucher should be applied to the cheapest item or entire order.""" applyOncePerOrder: Boolean - """ - Voucher should be applied once per customer. - """ + """Voucher should be applied once per customer.""" applyOncePerCustomer: Boolean - """ - Voucher can be used only by staff user. - """ + """Voucher can be used only by staff user.""" onlyForStaff: Boolean - """ - Limit number of times this voucher can be used in total. - """ + """Limit number of times this voucher can be used in total.""" usageLimit: Int } """ -Deletes a voucher. +Deletes a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherDelete { - discountErrors: [DiscountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes vouchers. +Deletes vouchers. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } """ -Updates a voucher. +Updates a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherUpdate { - discountErrors: [DiscountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Adds products, categories, collections to a voucher. +Adds products, categories, collections to a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherAddCatalogues { - """ - Voucher of which catalogue IDs will be modified. - """ +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.") + discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } """ -Removes products, categories, collections from a voucher. +Removes products, categories, collections from a voucher. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherRemoveCatalogues { - """ - Voucher of which catalogue IDs will be modified. - """ +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.") + discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } """ -Creates/updates translations for a voucher. +Creates/updates translations for a voucher. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type VoucherTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Manage voucher's availability in channels. +Manage voucher's availability in channels. Requires one of the following permissions: MANAGE_DISCOUNTS. """ -type VoucherChannelListingUpdate { - """ - An updated voucher instance. - """ +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.") + discountErrors: [DiscountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [DiscountError!]! } -input VoucherChannelListingInput { - """ - List of channels to which the voucher should be assigned. - """ +input VoucherChannelListingInput @doc(category: "Discounts") { + """List of channels to which the voucher should be assigned.""" addChannels: [VoucherChannelListingAddInput!] - """ - List of channels from which the voucher should be unassigned. - """ + """List of channels from which the voucher should be unassigned.""" removeChannels: [ID!] } -input VoucherChannelListingAddInput { - """ - ID of a channel. - """ +input VoucherChannelListingAddInput @doc(category: "Discounts") { + """ID of a channel.""" channelId: ID! - """ - Value of the voucher. - """ + """Value of the voucher.""" discountValue: PositiveDecimal - """ - Min purchase amount required to apply the voucher. - """ + """Min purchase amount required to apply the voucher.""" minAmountSpent: PositiveDecimal } """ -Export products to csv file. +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. """ exportFile: ExportFile - exportErrors: [ExportError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + exportErrors: [ExportError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ExportError!]! } @@ -27465,20 +23390,14 @@ type ExportError { """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ExportErrorCode! } -""" -An enumeration. -""" +"""An enumeration.""" enum ExportErrorCode { GRAPHQL_ERROR INVALID @@ -27486,73 +23405,49 @@ enum ExportErrorCode { REQUIRED } -input ExportProductsInput { - """ - Determine which products should be exported. - """ +input ExportProductsInput @doc(category: "Products") { + """Determine which products should be exported.""" scope: ExportScope! - """ - Filtering options for products. - """ + """Filtering options for products.""" filter: ProductFilterInput - """ - List of products IDs to export. - """ + """List of products IDs to export.""" ids: [ID!] - """ - Input with info about fields which should be exported. - """ + """Input with info about fields which should be exported.""" exportInfo: ExportInfoInput - """ - Type of exported file. - """ + """Type of exported file.""" fileType: FileTypesEnum! } -enum ExportScope { - """ - Export all products. - """ +enum ExportScope @doc(category: "Products") { + """Export all products.""" ALL - """ - Export products with given ids. - """ + """Export products with given ids.""" IDS - """ - Export the filtered products. - """ + """Export the filtered products.""" FILTER } -input ExportInfoInput { - """ - List of attribute ids witch should be exported. - """ +input ExportInfoInput @doc(category: "Products") { + """List of attribute ids witch should be exported.""" attributes: [ID!] - """ - List of warehouse ids witch should be exported. - """ + """List of warehouse ids witch should be exported.""" warehouses: [ID!] - """ - List of channels ids which should be exported. - """ + """List of channels ids which should be exported.""" channels: [ID!] - """ - List of product fields witch should be exported. - """ + """List of product fields witch should be exported.""" fields: [ProductFieldEnum!] } -enum ProductFieldEnum { +enum ProductFieldEnum @doc(category: "Products") { NAME DESCRIPTION PRODUCT_TYPE @@ -27567,9 +23462,7 @@ enum ProductFieldEnum { VARIANT_MEDIA } -""" -An enumeration. -""" +"""An enumeration.""" enum FileTypesEnum { CSV XLSX @@ -27578,13 +23471,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. """ @@ -27592,37 +23483,28 @@ type ExportGiftCards { errors: [ExportError!]! } -input ExportGiftCardsInput { - """ - Determine which gift cards should be exported. - """ +input ExportGiftCardsInput @doc(category: "Gift cards") { + """Determine which gift cards should be exported.""" scope: ExportScope! - """ - Filtering options for gift cards. - """ + """Filtering options for gift cards.""" filter: GiftCardFilterInput - """ - List of gift cards IDs to export. - """ + """List of gift cards IDs to export.""" ids: [ID!] - """ - Type of exported file. - """ + """Type of exported file.""" fileType: FileTypesEnum! } """ -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 +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 Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ type FileUpload { uploadedFile: File - uploadErrors: [UploadError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + uploadErrors: [UploadError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [UploadError!]! } @@ -27632,73 +23514,50 @@ type UploadError { """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: UploadErrorCode! } -""" -An enumeration. -""" +"""An enumeration.""" enum UploadErrorCode { GRAPHQL_ERROR } -""" -Adds a gift card or a voucher to a checkout. -""" -type CheckoutAddPromoCode { - """ - The checkout with the added gift card or voucher. - """ +"""Adds a gift card or a voucher to a checkout.""" +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.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: CheckoutErrorCode! - """ - List of varint IDs which causes the error. - """ + """List of varint IDs which causes the error.""" variants: [ID!] - """ - List of line Ids which cause the error. - """ + """List of line Ids which cause the error.""" lines: [ID!] - """ - A type of address that causes the error. - """ + """A type of address that causes the error.""" addressType: AddressTypeEnum } -""" -An enumeration. -""" -enum CheckoutErrorCode { +"""An enumeration.""" +enum CheckoutErrorCode @doc(category: "Checkout") { BILLING_ADDRESS_NOT_SET CHECKOUT_NOT_FULLY_PAID GRAPHQL_ERROR @@ -27729,20 +23588,15 @@ enum CheckoutErrorCode { INACTIVE_PAYMENT } -""" -Update billing address in the existing checkout. -""" -type CheckoutBillingAddressUpdate { - """ - An updated checkout. - """ +"""Update billing address in the existing checkout.""" +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.") + 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. """ @@ -27762,10 +23616,8 @@ 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 { - """ - Placed order. - """ +type CheckoutComplete @doc(category: "Checkout") { + """Placed order.""" order: Order """ @@ -27773,34 +23625,25 @@ type CheckoutComplete { """ confirmationNeeded: Boolean! - """ - Confirmation data used to process additional authorization steps. - """ + """Confirmation data used to process additional authorization steps.""" confirmationData: JSONString - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -""" -Create a new checkout. -""" -type CheckoutCreate { +"""Create a new checkout.""" +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. """ - created: Boolean - @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `true`.") - checkoutErrors: [CheckoutError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + created: Boolean @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `true`.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! checkout: Checkout } -input CheckoutCreateInput { - """ - Slug of a channel in which to create a checkout. - """ +input CheckoutCreateInput @doc(category: "Checkout") { + """Slug of a channel in which to create a checkout.""" channel: String """ @@ -27808,9 +23651,7 @@ input CheckoutCreateInput { """ lines: [CheckoutLineInput!]! - """ - The customer's email address. - """ + """The customer's email address.""" email: String """ @@ -27818,64 +23659,50 @@ input CheckoutCreateInput { """ shippingAddress: AddressInput - """ - Billing address of the customer. - """ + """Billing address of the customer.""" billingAddress: AddressInput - """ - Checkout language code. - """ + """Checkout language code.""" languageCode: LanguageCodeEnum """ 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 { - """ - The number of items purchased. - """ +input CheckoutLineInput @doc(category: "Checkout") { + """The number of items purchased.""" quantity: Int! - """ - ID of the product variant. - """ + """ID of the product variant.""" variantId: ID! """ 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 """ - Flag that allow force splitting the same variant into multiple lines by skipping the matching logic. - + 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 """ Fields required to update the object's metadata. - + Added in Saleor 3.8. """ metadata: [MetadataInput!] } -input CheckoutValidationRules { +input CheckoutValidationRules @doc(category: "Checkout") { """ The validation rules that can be applied to provided shipping address data. """ @@ -27888,68 +23715,48 @@ input CheckoutValidationRules { } """ -Sets the customer as the owner of the checkout. +Sets the customer as the owner of the checkout. Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER. """ -type CheckoutCustomerAttach { - """ - An updated checkout. - """ +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } """ -Removes the user assigned as the owner of the checkout. +Removes the user assigned as the owner of the checkout. Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER. """ -type CheckoutCustomerDetach { - """ - An updated checkout. - """ +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -""" -Updates email address in the existing checkout object. -""" -type CheckoutEmailUpdate { - """ - An updated checkout. - """ +"""Updates email address in the existing checkout object.""" +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -""" -Deletes a CheckoutLine. -""" -type CheckoutLineDelete { - """ - An updated checkout. - """ +"""Deletes a CheckoutLine.""" +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -""" -Deletes checkout lines. -""" -type CheckoutLinesDelete { - """ - An updated checkout. - """ +"""Deletes checkout lines.""" +type CheckoutLinesDelete @doc(category: "Checkout") { + """An updated checkout.""" checkout: Checkout errors: [CheckoutError!]! } @@ -27957,33 +23764,25 @@ type CheckoutLinesDelete { """ Adds a checkout line to the existing checkout.If line was already in checkout, its quantity will be increased. """ -type CheckoutLinesAdd { - """ - An updated checkout. - """ +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -""" -Updates checkout line in the existing checkout. -""" -type CheckoutLinesUpdate { - """ - An updated checkout. - """ +"""Updates checkout line in the existing checkout.""" +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.") + 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. - + ID of the product variant. + DEPRECATED: this field will be removed in Saleor 4.0. Use `lineId` instead. """ variantId: ID @@ -27995,56 +23794,40 @@ 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 """ ID of the line. - + Added in Saleor 3.6. """ lineId: ID } -""" -Remove a gift card or a voucher from a checkout. -""" -type CheckoutRemovePromoCode { - """ - The checkout with the removed gift card or voucher. - """ +"""Remove a gift card or a voucher from a checkout.""" +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -""" -Create a new payment for given checkout. -""" -type CheckoutPaymentCreate { - """ - Related checkout object. - """ +"""Create a new payment for given checkout.""" +type CheckoutPaymentCreate @doc(category: "Checkout") { + """Related checkout object.""" checkout: Checkout - """ - A newly created payment. - """ + """A newly created payment.""" payment: Payment - paymentErrors: [PaymentError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + paymentErrors: [PaymentError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [PaymentError!]! } -input PaymentInput { - """ - A gateway to use with that payment. - """ +input PaymentInput @doc(category: "Payments") { + """A gateway to use with that payment.""" gateway: String! """ @@ -28064,23 +23847,21 @@ input PaymentInput { """ Payment store type. - + Added in Saleor 3.1. """ storePaymentMethod: StorePaymentMethodEnum = NONE """ User public metadata. - + Added in Saleor 3.1. """ metadata: [MetadataInput!] } -""" -Enum representing the type of a payment storage in a gateway. -""" -enum StorePaymentMethodEnum { +"""Enum representing the type of a payment storage in a gateway.""" +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. """ @@ -28091,35 +23872,23 @@ enum StorePaymentMethodEnum { """ OFF_SESSION - """ - Storage is disabled. The payment is not stored. - """ + """Storage is disabled. The payment is not stored.""" NONE } -""" -Update shipping address in the existing checkout. -""" -type CheckoutShippingAddressUpdate { - """ - An updated checkout. - """ +"""Update shipping address in the existing checkout.""" +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } -""" -Updates the shipping method of the checkout. -""" -type CheckoutShippingMethodUpdate { - """ - An updated checkout. - """ +"""Updates the shipping method of the checkout.""" +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } @@ -28127,27 +23896,18 @@ 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 { - """ - An updated checkout. - """ +type CheckoutDeliveryMethodUpdate @doc(category: "Checkout") { + """An updated checkout.""" checkout: Checkout errors: [CheckoutError!]! } -""" -Update language code in the existing checkout. -""" -type CheckoutLanguageCodeUpdate { - """ - An updated checkout. - """ +"""Update language code in the existing checkout.""" +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.") + checkoutErrors: [CheckoutError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [CheckoutError!]! } @@ -28155,48 +23915,34 @@ 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 { - """ - Placed order. - """ +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: OrderCreateFromCheckoutErrorCode! - """ - List of variant IDs which causes the error. - """ + """List of variant IDs which causes the error.""" variants: [ID!] - """ - List of line Ids which cause the error. - """ + """List of line Ids which cause the error.""" lines: [ID!] } -""" -An enumeration. -""" -enum OrderCreateFromCheckoutErrorCode { +"""An enumeration.""" +enum OrderCreateFromCheckoutErrorCode @doc(category: "Orders") { GRAPHQL_ERROR CHECKOUT_NOT_FOUND CHANNEL_INACTIVE @@ -28214,48 +23960,37 @@ enum OrderCreateFromCheckoutErrorCode { } """ -Creates new channel. +Creates new channel. Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelCreate { - channelErrors: [ChannelError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: ChannelErrorCode! - """ - List of shipping zone IDs which causes the error. - """ + """List of shipping zone IDs which causes the error.""" shippingZones: [ID!] - """ - List of warehouses IDs which causes the error. - """ + """List of warehouses IDs which causes the error.""" warehouses: [ID!] } -""" -An enumeration. -""" -enum ChannelErrorCode { +"""An enumeration.""" +enum ChannelErrorCode @doc(category: "Channels") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -28267,237 +24002,238 @@ enum ChannelErrorCode { DUPLICATED_INPUT_ITEM } -input ChannelCreateInput { - """ - isActive flag. - """ +input ChannelCreateInput @doc(category: "Channels") { + """isActive flag.""" isActive: Boolean """ 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 - """ - List of shipping zones to assign to the channel. - """ + """List of shipping zones to assign to the channel.""" addShippingZones: [ID!] """ 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!] """ - Name of the channel. + The channel order settings + + Added in Saleor 3.12. """ + orderSettings: OrderSettingsInput + + """Name of the channel.""" name: String! - """ - Slug of the channel. - """ + """Slug of the channel.""" slug: String! - """ - Currency of the channel. - """ + """Currency of the channel.""" currencyCode: String! """ 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 + + """ + 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. 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 { - channelErrors: [ChannelError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - isActive flag. - """ +input ChannelUpdateInput @doc(category: "Channels") { + """isActive flag.""" isActive: Boolean """ 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 - """ - List of shipping zones to assign to the channel. - """ + """List of shipping zones to assign to the channel.""" addShippingZones: [ID!] """ 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!] """ - Name of the channel. + The channel order settings + + Added in Saleor 3.12. """ + orderSettings: OrderSettingsInput + + """Name of the channel.""" name: String - """ - Slug of the channel. - """ + """Slug of the channel.""" slug: String """ 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. """ defaultCountry: CountryCode - """ - List of shipping zones to unassign from the channel. - """ + """List of shipping zones to unassign from the channel.""" removeShippingZones: [ID!] """ 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!] } """ -Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. +Delete a channel. Orders associated with the deleted channel will be moved to the target channel. Checkouts, product availability, and pricing will be removed. Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelDelete { - channelErrors: [ChannelError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - ID of channel to migrate orders from origin channel. - """ +input ChannelDeleteInput @doc(category: "Channels") { + """ID of channel to migrate orders from origin channel.""" channelId: ID! } """ -Activate a channel. +Activate a channel. Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelActivate { - """ - Activated channel. - """ +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.") + channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ChannelError!]! } """ -Deactivate a channel. +Deactivate a channel. Requires one of the following permissions: MANAGE_CHANNELS. """ -type ChannelDeactivate { - """ - Deactivated channel. - """ +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.") + channelErrors: [ChannelError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [ChannelError!]! } """ 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 { - """ - Channel within the warehouses are reordered. - """ +type ChannelReorderWarehouses @doc(category: "Channels") { + """Channel within the warehouses are reordered.""" channel: Channel errors: [ChannelError!]! } -""" -Creates an attribute. -""" -type AttributeCreate { +"""Creates an attribute.""" +type AttributeCreate @doc(category: "Attributes") { attribute: Attribute - attributeErrors: [AttributeError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: AttributeErrorCode! } -""" -An enumeration. -""" -enum AttributeErrorCode { +"""An enumeration.""" +enum AttributeErrorCode @doc(category: "Attributes") { ALREADY_EXISTS GRAPHQL_ERROR INVALID @@ -28506,92 +24242,70 @@ enum AttributeErrorCode { UNIQUE } -input AttributeCreateInput { - """ - The input type to use for entering attribute values in the dashboard. - """ +input AttributeCreateInput @doc(category: "Attributes") { + """The input type to use for entering attribute values in the dashboard.""" inputType: AttributeInputTypeEnum - """ - The entity type which can be used as a reference. - """ + """The entity type which can be used as a reference.""" entityType: AttributeEntityTypeEnum - """ - Name of an attribute displayed in the interface. - """ + """Name of an attribute displayed in the interface.""" name: String! - """ - Internal representation of an attribute name. - """ + """Internal representation of an attribute name.""" slug: String - """ - The attribute type. - """ + """The attribute type.""" type: AttributeTypeEnum! - """ - The unit of attribute values. - """ + """The unit of attribute values.""" unit: MeasurementUnitsEnum - """ - List of attribute's values. - """ + """List of attribute's values.""" values: [AttributeValueCreateInput!] - """ - Whether the attribute requires values to be passed or not. - """ + """Whether the attribute requires values to be passed or not.""" valueRequired: Boolean - """ - Whether the attribute is for variants only. - """ + """Whether the attribute is for variants only.""" isVariantOnly: Boolean - """ - Whether the attribute should be visible or not in storefront. - """ + """Whether the attribute should be visible or not in storefront.""" visibleInStorefront: Boolean """ 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. - """ + """Whether the attribute can be filtered in dashboard.""" filterableInDashboard: Boolean """ 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. - + DEPRECATED: this field will be removed in Saleor 4.0. """ availableInGrid: Boolean """ External ID of this attribute. - + Added in Saleor 3.10. """ externalReference: String } -input AttributeValueCreateInput { +input AttributeValueCreateInput @doc(category: "Attributes") { """ Represent value of the attribute value (e.g. color values for swatch attributes). """ @@ -28599,143 +24313,117 @@ input AttributeValueCreateInput { """ Represents the text of the attribute value, includes formatting. - + Rich text format. For reference see https://editorjs.io/ - + DEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. """ richText: JSONString """ Represents the text of the attribute value, plain text without formating. - + DEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. """ plainText: String - """ - URL of the file attribute. Every time, a new value is created. - """ + """URL of the file attribute. Every time, a new value is created.""" fileUrl: String - """ - File content type. - """ + """File content type.""" contentType: String """ External ID of this attribute value. - + Added in Saleor 3.10. """ externalReference: String - """ - Name of a value displayed in the interface. - """ + """Name of a value displayed in the interface.""" name: String! } """ -Deletes an attribute. +Deletes an attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeDelete { - attributeErrors: [AttributeError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Updates attribute. +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.") + attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! } -input AttributeUpdateInput { - """ - Name of an attribute displayed in the interface. - """ +input AttributeUpdateInput @doc(category: "Attributes") { + """Name of an attribute displayed in the interface.""" name: String - """ - Internal representation of an attribute name. - """ + """Internal representation of an attribute name.""" slug: String - """ - The unit of attribute values. - """ + """The unit of attribute values.""" unit: MeasurementUnitsEnum - """ - IDs of values to be removed from this attribute. - """ + """IDs of values to be removed from this attribute.""" removeValues: [ID!] - """ - New values to be created for this attribute. - """ + """New values to be created for this attribute.""" addValues: [AttributeValueUpdateInput!] - """ - Whether the attribute requires values to be passed or not. - """ + """Whether the attribute requires values to be passed or not.""" valueRequired: Boolean - """ - Whether the attribute is for variants only. - """ + """Whether the attribute is for variants only.""" isVariantOnly: Boolean - """ - Whether the attribute should be visible or not in storefront. - """ + """Whether the attribute should be visible or not in storefront.""" visibleInStorefront: Boolean """ 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. - """ + """Whether the attribute can be filtered in dashboard.""" filterableInDashboard: Boolean """ 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. - + DEPRECATED: this field will be removed in Saleor 4.0. """ availableInGrid: Boolean """ External ID of this product. - + Added in Saleor 3.10. """ externalReference: String } -input AttributeValueUpdateInput { +input AttributeValueUpdateInput @doc(category: "Attributes") { """ Represent value of the attribute value (e.g. color values for swatch attributes). """ @@ -28743,141 +24431,118 @@ input AttributeValueUpdateInput { """ Represents the text of the attribute value, includes formatting. - + Rich text format. For reference see https://editorjs.io/ - + DEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. """ richText: JSONString """ Represents the text of the attribute value, plain text without formating. - + DEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. """ plainText: String - """ - URL of the file attribute. Every time, a new value is created. - """ + """URL of the file attribute. Every time, a new value is created.""" fileUrl: String - """ - File content type. - """ + """File content type.""" contentType: String """ External ID of this attribute value. - + Added in Saleor 3.10. """ externalReference: String - """ - Name of a value displayed in the interface. - """ + """Name of a value displayed in the interface.""" name: String } """ -Creates/updates translations for an attribute. +Creates/updates translations for an attribute. Requires one of the following permissions: MANAGE_TRANSLATIONS. """ -type AttributeTranslate { - translationErrors: [TranslationError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes attributes. +Deletes attributes. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type AttributeBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! } """ -Deletes values of attributes. +Deletes values of attributes. Requires one of the following permissions: MANAGE_PAGE_TYPES_AND_ATTRIBUTES. """ -type AttributeValueBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! } """ -Creates a value for an attribute. +Creates a value for an attribute. Requires one of the following permissions: MANAGE_PRODUCTS. """ -type AttributeValueCreate { - """ - The updated attribute. - """ +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.") + attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! attributeValue: AttributeValue } """ -Deletes a value of an attribute. +Deletes a value of an attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeValueDelete { - """ - The updated attribute. - """ +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.") + attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! attributeValue: AttributeValue } """ -Updates value of an attribute. +Updates value of an attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeValueUpdate { - """ - The updated attribute. - """ +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.") + attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! attributeValue: AttributeValue } """ -Creates/updates translations for an attribute value. +Creates/updates translations for an attribute value. 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.") +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 } @@ -28887,72 +24552,56 @@ input AttributeValueTranslationInput { """ Translated text. - + Rich text format. For reference see https://editorjs.io/ """ richText: JSONString - """ - Translated text. - """ + """Translated text.""" plainText: String } """ -Reorder the values of an attribute. +Reorder the values of an attribute. Requires one of the following permissions: MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES. """ -type AttributeReorderValues { - """ - Attribute from which values are reordered. - """ +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.") + attributeErrors: [AttributeError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AttributeError!]! } """ Creates a new app. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. """ -type AppCreate { - """ - The newly created authentication token. - """ +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.") + appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: AppErrorCode! - """ - List of permissions which causes the error. - """ + """List of permissions which causes the error.""" permissions: [PermissionEnum!] } -""" -An enumeration. -""" -enum AppErrorCode { +"""An enumeration.""" +enum AppErrorCode @doc(category: "Apps") { FORBIDDEN GRAPHQL_ERROR INVALID @@ -28960,175 +24609,144 @@ 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 { - """ - Name of the app. - """ +input AppInput @doc(category: "Apps") { + """Name of the app.""" name: String - """ - List of permission code names to assign to this app. - """ + """List of permission code names to assign to this app.""" permissions: [PermissionEnum!] } """ -Updates an existing app. +Updates an existing app. Requires one of the following permissions: MANAGE_APPS. """ -type AppUpdate { - appErrors: [AppError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes an app. +Deletes an app. Requires one of the following permissions: MANAGE_APPS. """ -type AppDelete { - appErrors: [AppError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Creates a new token. +Creates a new token. Requires one of the following permissions: MANAGE_APPS. """ -type AppTokenCreate { - """ - The newly created authentication token. - """ +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.") + appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! appToken: AppToken } -input AppTokenInput { - """ - Name of the token. - """ +input AppTokenInput @doc(category: "Apps") { + """Name of the token.""" name: String - """ - ID of app. - """ + """ID of app.""" app: ID! } """ -Deletes an authentication token assigned to app. +Deletes an authentication token assigned to app. Requires one of the following permissions: MANAGE_APPS. """ -type AppTokenDelete { - appErrors: [AppError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Determine if token is valid or not. - """ +"""Verify provided app token.""" +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.") + appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! } """ Install new app by using app manifest. Requires the following permissions: AUTHENTICATED_STAFF_USER and MANAGE_APPS. """ -type AppInstall { - appErrors: [AppError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Name of the app to install. - """ +input AppInstallInput @doc(category: "Apps") { + """Name of the app to install.""" appName: String - """ - Url to app's manifest in JSON format. - """ + """Url to app's manifest in JSON format.""" manifestUrl: String - """ - Determine if app will be set active or not. - """ + """Determine if app will be set active or not.""" activateAfterInstallation: Boolean = true - """ - List of permission code names to assign to this app. - """ + """List of permission code names to assign to this app.""" permissions: [PermissionEnum!] } """ -Retry failed installation of new app. +Retry failed installation of new app. Requires one of the following permissions: MANAGE_APPS. """ -type AppRetryInstall { - appErrors: [AppError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Delete failed installation. +Delete failed installation. Requires one of the following permissions: MANAGE_APPS. """ -type AppDeleteFailedInstallation { - appErrors: [AppError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Fetch and validate manifest. +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.") + appErrors: [AppError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AppError!]! } -""" -The manifest definition. -""" -type Manifest { +"""The manifest definition.""" +type Manifest @doc(category: "Apps") { identifier: String! version: String! name: String! @@ -29136,18 +24754,12 @@ type Manifest { permissions: [Permission!] appUrl: String - """ - URL to iframe with the configuration for the app. - """ - configurationUrl: String - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.") + """URL to iframe with the configuration for the app.""" + configurationUrl: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `appUrl` instead.") tokenTargetUrl: String - """ - Description of the data privacy defined for this app. - """ - dataPrivacy: String - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.") + """Description of the data privacy defined for this app.""" + dataPrivacy: String @deprecated(reason: "This field will be removed in Saleor 4.0. Use `dataPrivacyUrl` instead.") dataPrivacyUrl: String homepageUrl: String supportUrl: String @@ -29155,155 +24767,149 @@ 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!]! """ The audience that will be included in all JWT tokens for the app. - + Added in Saleor 3.8. - - Note: this API is currently in Feature Preview and can be subject to changes at later point. """ 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. + """ + 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 } -type AppManifestExtension { - """ - List of the app extension's permissions. - """ +type AppManifestExtension @doc(category: "Apps") { + """List of the app extension's permissions.""" permissions: [Permission!]! - """ - Label of the extension to show in the dashboard. - """ + """Label of the extension to show in the dashboard.""" label: String! - """ - URL of a view where extension's iframe is placed. - """ + """URL of a view where extension's iframe is placed.""" url: String! - """ - Place where given extension will be mounted. - """ + """Place where given extension will be mounted.""" mount: AppExtensionMountEnum! - """ - Type of way how app extension will be opened. - """ + """Type of way how app extension will be opened.""" target: AppExtensionTargetEnum! } -type AppManifestWebhook { - """ - The name of the webhook. - """ +type AppManifestWebhook @doc(category: "Apps") { + """The name of the webhook.""" name: String! - """ - The asynchronous events that webhook wants to subscribe. - """ + """The asynchronous events that webhook wants to subscribe.""" asyncEvents: [WebhookEventTypeAsyncEnum!] - """ - The synchronous events that webhook wants to subscribe. - """ + """The synchronous events that webhook wants to subscribe.""" syncEvents: [WebhookEventTypeSyncEnum!] - """ - Subscription query of a webhook - """ + """Subscription query of a webhook""" query: String! - """ - The url to receive the payload. - """ + """The url to receive the payload.""" 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! +} + """ -Activate the app. +Activate the app. Requires one of the following permissions: MANAGE_APPS. """ -type AppActivate { - appErrors: [AppError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deactivate the app. +Deactivate the app. Requires one of the following permissions: MANAGE_APPS. """ -type AppDeactivate { - appErrors: [AppError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - JWT token, required to authenticate. - """ +"""Create JWT token.""" +type CreateToken @doc(category: "Authentication") { + """JWT token, required to authenticate.""" token: String - """ - JWT refresh token, required to re-generate access token. - """ + """JWT refresh token, required to re-generate access token.""" refreshToken: String - """ - CSRF token required to re-generate access token. - """ + """CSRF token required to re-generate access token.""" csrfToken: String - """ - A user instance. - """ + """A user instance.""" user: User - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") 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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: AccountErrorCode! - """ - A type of address that causes the error. - """ + """A type of address that causes the error.""" addressType: AddressTypeEnum } -""" -An enumeration. -""" -enum AccountErrorCode { +"""An enumeration.""" +enum AccountErrorCode @doc(category: "Users") { ACTIVATE_OWN_ACCOUNT ACTIVATE_SUPERUSER_ACCOUNT DUPLICATED_INPUT_ITEM @@ -29327,6 +24933,7 @@ enum AccountErrorCode { PASSWORD_TOO_COMMON PASSWORD_TOO_SHORT PASSWORD_TOO_SIMILAR + PASSWORD_RESET_ALREADY_REQUESTED REQUIRED UNIQUE JWT_SIGNATURE_EXPIRED @@ -29342,41 +24949,27 @@ 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. """ -type RefreshToken { - """ - JWT token, required to authenticate. - """ +type RefreshToken @doc(category: "Authentication") { + """JWT token, required to authenticate.""" token: String - """ - A user instance. - """ + """A user instance.""" user: User - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } -""" -Verify JWT token. -""" -type VerifyToken { - """ - User assigned to token. - """ +"""Verify JWT token.""" +type VerifyToken @doc(category: "Authentication") { + """User assigned to token.""" user: User - """ - Determine if token is valid or not. - """ + """Determine if token is valid or not.""" isValid: Boolean! - """ - JWT payload. - """ + """JWT payload.""" payload: GenericScalar - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } @@ -29388,228 +24981,157 @@ String, Boolean, Int, Float, List or Object. scalar GenericScalar """ -Deactivate all JWT tokens of the currently authenticated user. +Deactivate all JWT tokens of the currently authenticated user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type DeactivateAllUserTokens { - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - The data returned by authentication plugin. - """ +"""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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } -""" -Obtain external access tokens for user by custom plugin. -""" -type ExternalObtainAccessTokens { - """ - The token, required to authenticate. - """ +"""Obtain external access tokens for user by custom plugin.""" +type ExternalObtainAccessTokens @doc(category: "Authentication") { + """The token, required to authenticate.""" token: String - """ - The refresh token, required to re-generate external access token. - """ + """The refresh token, required to re-generate external access token.""" refreshToken: String - """ - CSRF token required to re-generate external access token. - """ + """CSRF token required to re-generate external access token.""" csrfToken: String - """ - A user instance. - """ + """A user instance.""" user: User - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } -""" -Refresh user's access by custom plugin. -""" -type ExternalRefresh { - """ - The token, required to authenticate. - """ +"""Refresh user's access by custom plugin.""" +type ExternalRefresh @doc(category: "Authentication") { + """The token, required to authenticate.""" token: String - """ - The refresh token, required to re-generate external access token. - """ + """The refresh token, required to re-generate external access token.""" refreshToken: String - """ - CSRF token required to re-generate external access token. - """ + """CSRF token required to re-generate external access token.""" csrfToken: String - """ - A user instance. - """ + """A user instance.""" user: User - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } -""" -Logout user by custom plugin. -""" -type ExternalLogout { - """ - The data returned by authentication plugin. - """ +"""Logout user by custom plugin.""" +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } -""" -Verify external authentication data by plugin. -""" -type ExternalVerify { - """ - User assigned to data. - """ +"""Verify external authentication data by plugin.""" +type ExternalVerify @doc(category: "Authentication") { + """User assigned to data.""" user: User - """ - Determine if authentication data is valid or not. - """ + """Determine if authentication data is valid or not.""" isValid: Boolean! - """ - External data. - """ + """External data.""" verifyData: JSONString - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } -""" -Sends an email with the account password modification link. -""" -type RequestPasswordReset { - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +"""Sends an email with the account password modification link.""" +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 { - """ - An activated user account. - """ +"""Confirm user account with token sent by email during registration.""" +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ Sets the user's password from the token sent by email using the RequestPasswordReset mutation. """ -type SetPassword { - """ - JWT token, required to authenticate. - """ +type SetPassword @doc(category: "Users") { + """JWT token, required to authenticate.""" token: String - """ - JWT refresh token, required to re-generate access token. - """ + """JWT refresh token, required to re-generate access token.""" refreshToken: String - """ - CSRF token required to re-generate access token. - """ + """CSRF token required to re-generate access token.""" csrfToken: String - """ - A user instance. - """ + """A user instance.""" user: User - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Change the password of the logged in user. +Change the password of the logged in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type PasswordChange { - """ - A user instance with a new password. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Request email change of the logged in user. +Request email change of the logged in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type RequestEmailChange { - """ - A user instance. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Confirm the email change of the logged-in user. +Confirm the email change of the logged-in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type ConfirmEmailChange { - """ - A user instance with a new email. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Create a new address for the customer. +Create a new address for the customer. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountAddressCreate { - """ - A user instance for which the address was created. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! address: Address } @@ -29617,13 +25139,10 @@ type AccountAddressCreate { """ Updates an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. """ -type AccountAddressUpdate { - """ - A user object for which the address was edited. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! address: Address } @@ -29631,80 +25150,56 @@ type AccountAddressUpdate { """ Delete an address of the logged-in user. Requires one of the following permissions: MANAGE_USERS, IS_OWNER. """ -type AccountAddressDelete { - """ - A user instance for which the address was deleted. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! address: Address } """ -Sets a default address for the authenticated user. +Sets a default address for the authenticated user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountSetDefaultAddress { - """ - An updated user instance. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } -""" -Register a new user. -""" -type AccountRegister { - """ - Informs whether users need to confirm their email address. - """ +"""Register a new user.""" +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! user: User } -input AccountRegisterInput { - """ - Given name. - """ +"""Fields required to create a user.""" +input AccountRegisterInput @doc(category: "Users") { + """Given name.""" firstName: String - """ - Family name. - """ + """Family name.""" lastName: String - """ - User language code. - """ + """User language code.""" languageCode: LanguageCodeEnum - """ - The email address of the user. - """ + """The email address of the user.""" email: String! - """ - Password. - """ + """Password.""" password: String! - """ - Base of frontend URL that will be needed to create confirmation URL. - """ + """Base of frontend URL that will be needed to create confirmation URL.""" redirectUrl: String - """ - User public metadata. - """ + """User public metadata.""" metadata: [MetadataInput!] """ @@ -29714,186 +25209,145 @@ input AccountRegisterInput { } """ -Updates the account of the logged-in user. +Updates the account of the logged-in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountUpdate { - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Given name. - """ +"""Fields required to update the user.""" +input AccountInput @doc(category: "Users") { + """Given name.""" firstName: String - """ - Family name. - """ + """Family name.""" lastName: String - """ - User language code. - """ + """User language code.""" languageCode: LanguageCodeEnum - """ - Billing address of the customer. - """ + """Billing address of the customer.""" defaultBillingAddress: AddressInput - """ - Shipping address of the customer. - """ + """Shipping address of the customer.""" defaultShippingAddress: AddressInput } """ -Sends an email with the account removal link for the logged-in user. +Sends an email with the account removal link for the logged-in user. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountRequestDeletion { - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +type AccountRequestDeletion @doc(category: "Users") { + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Remove user account. +Remove user account. Requires one of the following permissions: AUTHENTICATED_USER. """ -type AccountDelete { - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Creates user address. +Creates user address. Requires one of the following permissions: MANAGE_USERS. """ -type AddressCreate { - """ - A user instance for which the address was created. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! address: Address } """ -Updates an address. +Updates an address. Requires one of the following permissions: MANAGE_USERS. """ -type AddressUpdate { - """ - A user object for which the address was edited. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! address: Address } """ -Deletes an address. +Deletes an address. Requires one of the following permissions: MANAGE_USERS. """ -type AddressDelete { - """ - A user instance for which the address was deleted. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! address: Address } """ -Sets a default address for the given user. +Sets a default address for the given user. Requires one of the following permissions: MANAGE_USERS. """ -type AddressSetDefault { - """ - An updated user instance. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Creates a new customer. +Creates a new customer. Requires one of the following permissions: MANAGE_USERS. """ -type CustomerCreate { - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Billing address of the customer. - """ +input UserCreateInput @doc(category: "Users") { + """Billing address of the customer.""" defaultBillingAddress: AddressInput - """ - Shipping address of the customer. - """ + """Shipping address of the customer.""" defaultShippingAddress: AddressInput - """ - Given name. - """ + """Given name.""" firstName: String - """ - Family name. - """ + """Family name.""" lastName: String - """ - The unique email address of the user. - """ + """The unique email address of the user.""" email: String - """ - User account is active. - """ + """User account is active.""" isActive: Boolean - """ - A note about the user. - """ + """A note about the user.""" note: String - """ - User language code. - """ + """User language code.""" languageCode: LanguageCodeEnum """ External ID of the customer. - + Added in Saleor 3.10. """ externalReference: String @@ -29910,171 +25364,188 @@ input UserCreateInput { } """ -Updates an existing customer. +Updates an existing customer. Requires one of the following permissions: MANAGE_USERS. """ -type CustomerUpdate { - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Billing address of the customer. - """ +input CustomerInput @doc(category: "Users") { + """Billing address of the customer.""" defaultBillingAddress: AddressInput - """ - Shipping address of the customer. - """ + """Shipping address of the customer.""" defaultShippingAddress: AddressInput - """ - Given name. - """ + """Given name.""" firstName: String - """ - Family name. - """ + """Family name.""" lastName: String - """ - The unique email address of the user. - """ + """The unique email address of the user.""" email: String - """ - User account is active. - """ + """User account is active.""" isActive: Boolean - """ - A note about the user. - """ + """A note about the user.""" note: String - """ - User language code. - """ + """User language code.""" languageCode: LanguageCodeEnum """ External ID of the customer. - + Added in Saleor 3.10. """ externalReference: String } """ -Deletes a customer. +Deletes a customer. Requires one of the following permissions: MANAGE_USERS. """ -type CustomerDelete { - accountErrors: [AccountError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes customers. +Deletes customers. Requires one of the following permissions: MANAGE_USERS. """ -type CustomerBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Creates a new staff user. Apps are not allowed to perform this mutation. +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 { - staffErrors: [StaffError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: AccountErrorCode! - """ - A type of address that causes the error. - """ + """A type of address that causes the error.""" addressType: AddressTypeEnum - """ - List of permissions which causes the error. - """ + """List of permissions which causes the error.""" permissions: [PermissionEnum!] - """ - List of permission group IDs which cause the error. - """ + """List of permission group IDs which cause the error.""" groups: [ID!] - """ - List of user IDs which causes the error. - """ + """List of user IDs which causes the error.""" users: [ID!] } -input StaffCreateInput { - """ - Given name. - """ +"""Fields required to create a staff user.""" +input StaffCreateInput @doc(category: "Users") { + """Given name.""" firstName: String - """ - Family name. - """ + """Family name.""" lastName: String - """ - The unique email address of the user. - """ + """The unique email address of the user.""" email: String - """ - User account is active. - """ + """User account is active.""" isActive: Boolean - """ - A note about the user. - """ + """A note about the user.""" note: String - """ - List of permission group IDs to which user should be assigned. - """ + """List of permission group IDs to which user should be assigned.""" addGroups: [ID!] """ @@ -30084,169 +25555,131 @@ input StaffCreateInput { } """ -Updates an existing staff user. Apps are not allowed to perform this mutation. +Updates an existing staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type StaffUpdate { - staffErrors: [StaffError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - Given name. - """ +"""Fields required to update a staff user.""" +input StaffUpdateInput @doc(category: "Users") { + """Given name.""" firstName: String - """ - Family name. - """ + """Family name.""" lastName: String - """ - The unique email address of the user. - """ + """The unique email address of the user.""" email: String - """ - User account is active. - """ + """User account is active.""" isActive: Boolean - """ - A note about the user. - """ + """A note about the user.""" note: String - """ - List of permission group IDs to which user should be assigned. - """ + """List of permission group IDs to which user should be assigned.""" addGroups: [ID!] - """ - List of permission group IDs from which user should be unassigned. - """ + """List of permission group IDs from which user should be unassigned.""" removeGroups: [ID!] } """ -Deletes a staff user. Apps are not allowed to perform this mutation. +Deletes a staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type StaffDelete { - staffErrors: [StaffError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } """ -Deletes staff users. Apps are not allowed to perform this mutation. +Deletes staff users. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type StaffBulkDelete { - """ - Returns how many objects were affected. - """ +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.") + staffErrors: [StaffError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [StaffError!]! } """ -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 +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 Requires one of the following permissions: AUTHENTICATED_STAFF_USER. """ -type UserAvatarUpdate { - """ - An updated user instance. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Deletes a user avatar. Only for staff members. +Deletes a user avatar. Only for staff members. Requires one of the following permissions: AUTHENTICATED_STAFF_USER. """ -type UserAvatarDelete { - """ - An updated user instance. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Activate or deactivate users. +Activate or deactivate users. Requires one of the following permissions: MANAGE_USERS. """ -type UserBulkSetActive { - """ - Returns how many objects were affected. - """ +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.") + accountErrors: [AccountError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") errors: [AccountError!]! } """ -Create new permission group. Apps are not allowed to perform this mutation. +Create new permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type PermissionGroupCreate { - permissionGroupErrors: [PermissionGroupError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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. """ field: String - """ - The error message. - """ + """The error message.""" message: String - """ - The error code. - """ + """The error code.""" code: PermissionGroupErrorCode! - """ - List of permissions which causes the error. - """ + """List of permissions which causes the error.""" permissions: [PermissionEnum!] - """ - List of user IDs which causes the error. - """ + """List of user IDs which causes the error.""" users: [ID!] } -""" -An enumeration. -""" -enum PermissionGroupErrorCode { +"""An enumeration.""" +enum PermissionGroupErrorCode @doc(category: "Users") { ASSIGN_NON_STAFF_MEMBER DUPLICATED_INPUT_ITEM CANNOT_REMOVE_FROM_LAST_GROUP @@ -30257,70 +25690,52 @@ enum PermissionGroupErrorCode { UNIQUE } -input PermissionGroupCreateInput { - """ - List of permission code names to assign to this group. - """ +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. - """ + """List of users to assign to this group.""" addUsers: [ID!] - """ - Group name. - """ + """Group name.""" name: String! } """ -Update permission group. Apps are not allowed to perform this mutation. +Update permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type PermissionGroupUpdate { - permissionGroupErrors: [PermissionGroupError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 { - """ - List of permission code names to assign to this group. - """ +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. - """ + """List of users to assign to this group.""" addUsers: [ID!] - """ - Group name. - """ + """Group name.""" name: String - """ - List of permission code names to unassign from this group. - """ + """List of permission code names to unassign from this group.""" removePermissions: [PermissionEnum!] - """ - List of users to unassign from this group. - """ + """List of users to unassign from this group.""" removeUsers: [ID!] } """ -Delete permission group. Apps are not allowed to perform this mutation. +Delete permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ -type PermissionGroupDelete { - permissionGroupErrors: [PermissionGroupError!]! - @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") +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 } @@ -30328,41 +25743,29 @@ type PermissionGroupDelete { 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 } interface Event { - """ - Time of the event. - """ + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ - recipient: App + """The application receiving the webhook.""" + recipient: App @doc(category: "Apps") } union IssuingPrincipal = App | User -""" -An enumeration. -""" +"""An enumeration.""" enum DistanceUnitsEnum { CM M @@ -30372,9 +25775,7 @@ enum DistanceUnitsEnum { INCH } -""" -An enumeration. -""" +"""An enumeration.""" enum AreaUnitsEnum { SQ_CM SQ_M @@ -30384,9 +25785,7 @@ enum AreaUnitsEnum { SQ_INCH } -""" -An enumeration. -""" +"""An enumeration.""" enum VolumeUnitsEnum { CUBIC_MILLIMETER CUBIC_CENTIMETER @@ -30407,33 +25806,21 @@ 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 { - """ - Time of the event. - """ +type AddressCreated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The address the event relates to. - """ + """The address the event relates to.""" address: Address } @@ -30441,33 +25828,21 @@ 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 { - """ - Time of the event. - """ +type AddressUpdated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The address the event relates to. - """ + """The address the event relates to.""" address: Address } @@ -30475,33 +25850,21 @@ 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 { - """ - Time of the event. - """ +type AddressDeleted implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The address the event relates to. - """ + """The address the event relates to.""" address: Address } @@ -30509,33 +25872,21 @@ 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 { - """ - Time of the event. - """ +type AppInstalled implements Event @doc(category: "Apps") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The application the event relates to. - """ + """The application the event relates to.""" app: App } @@ -30543,33 +25894,21 @@ 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 { - """ - Time of the event. - """ +type AppUpdated implements Event @doc(category: "Apps") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The application the event relates to. - """ + """The application the event relates to.""" app: App } @@ -30577,33 +25916,21 @@ 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 { - """ - Time of the event. - """ +type AppDeleted implements Event @doc(category: "Apps") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The application the event relates to. - """ + """The application the event relates to.""" app: App } @@ -30611,33 +25938,21 @@ 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 { - """ - Time of the event. - """ +type AppStatusChanged implements Event @doc(category: "Apps") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The application the event relates to. - """ + """The application the event relates to.""" app: App } @@ -30645,33 +25960,21 @@ 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 { - """ - Time of the event. - """ +type AttributeCreated implements Event @doc(category: "Attributes") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The attribute the event relates to. - """ + """The attribute the event relates to.""" attribute: Attribute } @@ -30679,33 +25982,21 @@ 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 { - """ - Time of the event. - """ +type AttributeUpdated implements Event @doc(category: "Attributes") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The attribute the event relates to. - """ + """The attribute the event relates to.""" attribute: Attribute } @@ -30713,33 +26004,21 @@ 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 { - """ - Time of the event. - """ +type AttributeDeleted implements Event @doc(category: "Attributes") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The attribute the event relates to. - """ + """The attribute the event relates to.""" attribute: Attribute } @@ -30747,33 +26026,21 @@ 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 { - """ - Time of the event. - """ +type AttributeValueCreated implements Event @doc(category: "Attributes") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The attribute value the event relates to. - """ + """The attribute value the event relates to.""" attributeValue: AttributeValue } @@ -30781,33 +26048,21 @@ 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 { - """ - Time of the event. - """ +type AttributeValueUpdated implements Event @doc(category: "Attributes") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The attribute value the event relates to. - """ + """The attribute value the event relates to.""" attributeValue: AttributeValue } @@ -30815,33 +26070,21 @@ 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 { - """ - Time of the event. - """ +type AttributeValueDeleted implements Event @doc(category: "Attributes") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The attribute value the event relates to. - """ + """The attribute value the event relates to.""" attributeValue: AttributeValue } @@ -30849,33 +26092,21 @@ 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 { - """ - Time of the event. - """ +type CategoryCreated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The category the event relates to. - """ + """The category the event relates to.""" category: Category } @@ -30883,33 +26114,21 @@ 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 { - """ - Time of the event. - """ +type CategoryUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The category the event relates to. - """ + """The category the event relates to.""" category: Category } @@ -30917,33 +26136,21 @@ 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 { - """ - Time of the event. - """ +type CategoryDeleted implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The category the event relates to. - """ + """The category the event relates to.""" category: Category } @@ -30951,33 +26158,21 @@ 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 { - """ - Time of the event. - """ +type ChannelCreated implements Event @doc(category: "Channels") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The channel the event relates to. - """ + """The channel the event relates to.""" channel: Channel } @@ -30985,33 +26180,21 @@ 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 { - """ - Time of the event. - """ +type ChannelUpdated implements Event @doc(category: "Channels") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The channel the event relates to. - """ + """The channel the event relates to.""" channel: Channel } @@ -31019,33 +26202,21 @@ 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 { - """ - Time of the event. - """ +type ChannelDeleted implements Event @doc(category: "Channels") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The channel the event relates to. - """ + """The channel the event relates to.""" channel: Channel } @@ -31053,33 +26224,21 @@ 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 { - """ - Time of the event. - """ +type ChannelStatusChanged implements Event @doc(category: "Channels") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The channel the event relates to. - """ + """The channel the event relates to.""" channel: Channel } @@ -31087,33 +26246,21 @@ 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 { - """ - Time of the event. - """ +type GiftCardCreated implements Event @doc(category: "Gift cards") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The gift card the event relates to. - """ + """The gift card the event relates to.""" giftCard: GiftCard } @@ -31121,33 +26268,21 @@ 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 { - """ - Time of the event. - """ +type GiftCardUpdated implements Event @doc(category: "Gift cards") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The gift card the event relates to. - """ + """The gift card the event relates to.""" giftCard: GiftCard } @@ -31155,67 +26290,73 @@ type GiftCardUpdated implements Event { Event sent when gift card is deleted. Added in Saleor 3.2. +""" +type GiftCardDeleted 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 +} + +""" +Event sent when gift card is e-mailed. + +Added in Saleor 3.13. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardDeleted implements Event { - """ - Time of the event. - """ +type GiftCardSent implements Event @doc(category: "Gift cards") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The gift card the event relates to. - """ + """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. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type GiftCardStatusChanged implements Event { - """ - Time of the event. - """ +type GiftCardStatusChanged implements Event @doc(category: "Gift cards") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The gift card the event relates to. - """ + """The gift card the event relates to.""" giftCard: GiftCard } @@ -31223,33 +26364,21 @@ 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 { - """ - Time of the event. - """ +type GiftCardMetadataUpdated implements Event @doc(category: "Gift cards") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The gift card the event relates to. - """ + """The gift card the event relates to.""" giftCard: GiftCard } @@ -31257,37 +26386,23 @@ 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 { - """ - Time of the event. - """ +type MenuCreated implements Event @doc(category: "Menu") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The menu the event relates to. - """ + """The menu the event relates to.""" menu( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Menu } @@ -31296,37 +26411,23 @@ 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 { - """ - Time of the event. - """ +type MenuUpdated implements Event @doc(category: "Menu") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The menu the event relates to. - """ + """The menu the event relates to.""" menu( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Menu } @@ -31335,37 +26436,23 @@ 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 { - """ - Time of the event. - """ +type MenuDeleted implements Event @doc(category: "Menu") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The menu the event relates to. - """ + """The menu the event relates to.""" menu( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Menu } @@ -31374,37 +26461,23 @@ 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 { - """ - Time of the event. - """ +type MenuItemCreated implements Event @doc(category: "Menu") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The menu item the event relates to. - """ + """The menu item the event relates to.""" menuItem( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): MenuItem } @@ -31413,37 +26486,23 @@ 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 { - """ - Time of the event. - """ +type MenuItemUpdated implements Event @doc(category: "Menu") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The menu item the event relates to. - """ + """The menu item the event relates to.""" menuItem( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): MenuItem } @@ -31452,37 +26511,23 @@ 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 { - """ - Time of the event. - """ +type MenuItemDeleted implements Event @doc(category: "Menu") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The menu item the event relates to. - """ + """The menu item the event relates to.""" menuItem( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): MenuItem } @@ -31491,33 +26536,21 @@ 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 { - """ - Time of the event. - """ +type OrderCreated implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31525,33 +26558,21 @@ 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 { - """ - Time of the event. - """ +type OrderUpdated implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31559,33 +26580,21 @@ 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 { - """ - Time of the event. - """ +type OrderConfirmed implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31593,33 +26602,21 @@ type OrderConfirmed implements Event { Event sent when order is fully paid. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderFullyPaid implements Event { - """ - Time of the event. - """ +type OrderFullyPaid implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31627,33 +26624,21 @@ 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 { - """ - Time of the event. - """ +type OrderFulfilled implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31661,33 +26646,45 @@ 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 { - """ - Time of the event. - """ +type OrderExpired implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31695,33 +26692,21 @@ 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 { - """ - Time of the event. - """ +type OrderMetadataUpdated implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31729,33 +26714,21 @@ type OrderMetadataUpdated implements Event { Event sent when new draft order is created. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type DraftOrderCreated implements Event { - """ - Time of the event. - """ +type DraftOrderCreated implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31763,33 +26736,21 @@ 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 { - """ - Time of the event. - """ +type DraftOrderUpdated implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31797,33 +26758,21 @@ 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 { - """ - Time of the event. - """ +type DraftOrderDeleted implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order } @@ -31831,43 +26780,27 @@ 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 { - """ - Time of the event. - """ +type ProductCreated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product the event relates to. - """ + """The product the event relates to.""" product( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Product - """ - The category of the product. - """ + """The category of the product.""" category: Category } @@ -31875,43 +26808,27 @@ 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 { - """ - Time of the event. - """ +type ProductUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product the event relates to. - """ + """The product the event relates to.""" product( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Product - """ - The category of the product. - """ + """The category of the product.""" category: Category } @@ -31919,43 +26836,27 @@ 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 { - """ - Time of the event. - """ +type ProductDeleted implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product the event relates to. - """ + """The product the event relates to.""" product( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Product - """ - The category of the product. - """ + """The category of the product.""" category: Category } @@ -31963,81 +26864,117 @@ 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 { - """ - Time of the event. - """ +type ProductMetadataUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product the event relates to. - """ + """The product the event relates to.""" product( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Product - """ - The category of the product. - """ + """The category of the product.""" 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 { - """ - Time of the event. - """ +type ProductVariantCreated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product variant the event relates to. - """ + """The product variant the event relates to.""" productVariant( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ProductVariant } @@ -32046,37 +26983,23 @@ 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 { - """ - Time of the event. - """ +type ProductVariantUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product variant the event relates to. - """ + """The product variant the event relates to.""" productVariant( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ProductVariant } @@ -32085,43 +27008,27 @@ 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 { - """ - Time of the event. - """ +type ProductVariantOutOfStock implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product variant the event relates to. - """ + """The product variant the event relates to.""" productVariant( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ProductVariant - """ - Look up a warehouse. - """ + """Look up a warehouse.""" warehouse: Warehouse } @@ -32129,43 +27036,27 @@ type ProductVariantOutOfStock implements Event { Event sent when product variant is back in stock. Added in Saleor 3.2. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductVariantBackInStock implements Event { - """ - Time of the event. - """ +type ProductVariantBackInStock implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product variant the event relates to. - """ + """The product variant the event relates to.""" productVariant( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ProductVariant - """ - Look up a warehouse. - """ + """Look up a warehouse.""" warehouse: Warehouse } @@ -32176,40 +27067,26 @@ Added in Saleor 3.11. Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type ProductVariantStockUpdated implements Event { - """ - Time of the event. - """ +type ProductVariantStockUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product variant the event relates to. - """ + """The product variant the event relates to.""" productVariant( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ProductVariant - """ - Look up a warehouse. - """ + """Look up a warehouse.""" warehouse: Warehouse } @@ -32217,37 +27094,23 @@ type ProductVariantStockUpdated 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 { - """ - Time of the event. - """ +type ProductVariantDeleted implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product variant the event relates to. - """ + """The product variant the event relates to.""" productVariant( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ProductVariant } @@ -32256,37 +27119,23 @@ 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 { - """ - Time of the event. - """ +type ProductVariantMetadataUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The product variant the event relates to. - """ + """The product variant the event relates to.""" productVariant( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ProductVariant } @@ -32295,37 +27144,23 @@ 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 { - """ - Time of the event. - """ +type SaleCreated implements Event @doc(category: "Discounts") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The sale the event relates to. - """ + """The sale the event relates to.""" sale( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Sale } @@ -32334,37 +27169,23 @@ 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 { - """ - Time of the event. - """ +type SaleUpdated implements Event @doc(category: "Discounts") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The sale the event relates to. - """ + """The sale the event relates to.""" sale( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Sale } @@ -32373,37 +27194,23 @@ 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 { - """ - Time of the event. - """ +type SaleDeleted implements Event @doc(category: "Discounts") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The sale the event relates to. - """ + """The sale the event relates to.""" sale( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Sale } @@ -32412,41 +27219,27 @@ 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 { - """ - Time of the event. - """ +type SaleToggle implements Event @doc(category: "Discounts") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App """ 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. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Sale } @@ -32455,38 +27248,26 @@ 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 { - """ - Time of the event. - """ +type InvoiceRequested implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The invoice the event relates to. - """ + """The invoice the event relates to.""" invoice: Invoice """ Order related to the invoice. - + Added in Saleor 3.10. """ order: Order! @@ -32496,38 +27277,26 @@ 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 { - """ - Time of the event. - """ +type InvoiceDeleted implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The invoice the event relates to. - """ + """The invoice the event relates to.""" invoice: Invoice """ Order related to the invoice. - + Added in Saleor 3.10. """ order: Order @@ -32537,38 +27306,26 @@ 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 { - """ - Time of the event. - """ +type InvoiceSent implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The invoice the event relates to. - """ + """The invoice the event relates to.""" invoice: Invoice """ Order related to the invoice. - + Added in Saleor 3.10. """ order: Order @@ -32578,38 +27335,24 @@ 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 { - """ - Time of the event. - """ +type FulfillmentCreated implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The fulfillment the event relates to. - """ + """The fulfillment the event relates to.""" fulfillment: Fulfillment - """ - The order the fulfillment belongs to. - """ + """The order the fulfillment belongs to.""" order: Order } @@ -32617,38 +27360,24 @@ 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 { - """ - Time of the event. - """ +type FulfillmentCanceled implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The fulfillment the event relates to. - """ + """The fulfillment the event relates to.""" fulfillment: Fulfillment - """ - The order the fulfillment belongs to. - """ + """The order the fulfillment belongs to.""" order: Order } @@ -32656,38 +27385,24 @@ 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 { - """ - Time of the event. - """ +type FulfillmentApproved implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The fulfillment the event relates to. - """ + """The fulfillment the event relates to.""" fulfillment: Fulfillment - """ - The order the fulfillment belongs to. - """ + """The order the fulfillment belongs to.""" order: Order } @@ -32695,38 +27410,24 @@ 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 { - """ - Time of the event. - """ +type FulfillmentMetadataUpdated implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The fulfillment the event relates to. - """ + """The fulfillment the event relates to.""" fulfillment: Fulfillment - """ - The order the fulfillment belongs to. - """ + """The order the fulfillment belongs to.""" order: Order } @@ -32734,33 +27435,21 @@ 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 { - """ - Time of the event. - """ +type CustomerCreated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The user the event relates to. - """ + """The user the event relates to.""" user: User } @@ -32768,33 +27457,21 @@ 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 { - """ - Time of the event. - """ +type CustomerUpdated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The user the event relates to. - """ + """The user the event relates to.""" user: User } @@ -32802,33 +27479,21 @@ 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 { - """ - Time of the event. - """ +type CustomerMetadataUpdated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The user the event relates to. - """ + """The user the event relates to.""" user: User } @@ -32836,37 +27501,23 @@ 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 { - """ - Time of the event. - """ +type CollectionCreated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The collection the event relates to. - """ + """The collection the event relates to.""" collection( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Collection } @@ -32875,37 +27526,23 @@ 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 { - """ - Time of the event. - """ +type CollectionUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The collection the event relates to. - """ + """The collection the event relates to.""" collection( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Collection } @@ -32914,37 +27551,23 @@ 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 { - """ - Time of the event. - """ +type CollectionDeleted implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The collection the event relates to. - """ + """The collection the event relates to.""" collection( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Collection } @@ -32953,37 +27576,23 @@ 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 { - """ - Time of the event. - """ +type CollectionMetadataUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The collection the event relates to. - """ + """The collection the event relates to.""" collection( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Collection } @@ -32992,33 +27601,21 @@ 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 { - """ - Time of the event. - """ +type CheckoutCreated implements Event @doc(category: "Checkout") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The checkout the event relates to. - """ + """The checkout the event relates to.""" checkout: Checkout } @@ -33026,33 +27623,45 @@ 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 { - """ - Time of the event. - """ +type CheckoutFullyPaid implements Event @doc(category: "Checkout") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The checkout the event relates to. - """ + """The checkout the event relates to.""" checkout: Checkout } @@ -33060,33 +27669,21 @@ 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 { - """ - Time of the event. - """ +type CheckoutMetadataUpdated implements Event @doc(category: "Checkout") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The checkout the event relates to. - """ + """The checkout the event relates to.""" checkout: Checkout } @@ -33094,33 +27691,21 @@ 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 { - """ - Time of the event. - """ +type PageCreated implements Event @doc(category: "Pages") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The page the event relates to. - """ + """The page the event relates to.""" page: Page } @@ -33128,33 +27713,21 @@ 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 { - """ - Time of the event. - """ +type PageUpdated implements Event @doc(category: "Pages") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The page the event relates to. - """ + """The page the event relates to.""" page: Page } @@ -33162,33 +27735,21 @@ 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 { - """ - Time of the event. - """ +type PageDeleted implements Event @doc(category: "Pages") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The page the event relates to. - """ + """The page the event relates to.""" page: Page } @@ -33196,33 +27757,21 @@ 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 { - """ - Time of the event. - """ +type PageTypeCreated implements Event @doc(category: "Pages") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The page type the event relates to. - """ + """The page type the event relates to.""" pageType: PageType } @@ -33230,33 +27779,21 @@ 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 { - """ - Time of the event. - """ +type PageTypeUpdated implements Event @doc(category: "Pages") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The page type the event relates to. - """ + """The page type the event relates to.""" pageType: PageType } @@ -33264,33 +27801,21 @@ 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 { - """ - Time of the event. - """ +type PageTypeDeleted implements Event @doc(category: "Pages") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The page type the event relates to. - """ + """The page type the event relates to.""" pageType: PageType } @@ -33298,33 +27823,21 @@ 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 { - """ - Time of the event. - """ +type PermissionGroupCreated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The permission group the event relates to. - """ + """The permission group the event relates to.""" permissionGroup: Group } @@ -33332,33 +27845,21 @@ 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 { - """ - Time of the event. - """ +type PermissionGroupUpdated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The permission group the event relates to. - """ + """The permission group the event relates to.""" permissionGroup: Group } @@ -33366,33 +27867,21 @@ 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 { - """ - Time of the event. - """ +type PermissionGroupDeleted implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The permission group the event relates to. - """ + """The permission group the event relates to.""" permissionGroup: Group } @@ -33400,47 +27889,29 @@ 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 { - """ - Time of the event. - """ +type ShippingPriceCreated implements Event @doc(category: "Shipping") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The shipping method the event relates to. - """ + """The shipping method the event relates to.""" shippingMethod( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingMethodType - """ - The shipping zone the shipping method belongs to. - """ + """The shipping zone the shipping method belongs to.""" shippingZone( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingZone } @@ -33449,47 +27920,29 @@ 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 { - """ - Time of the event. - """ +type ShippingPriceUpdated implements Event @doc(category: "Shipping") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The shipping method the event relates to. - """ + """The shipping method the event relates to.""" shippingMethod( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingMethodType - """ - The shipping zone the shipping method belongs to. - """ + """The shipping zone the shipping method belongs to.""" shippingZone( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingZone } @@ -33498,47 +27951,29 @@ 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 { - """ - Time of the event. - """ +type ShippingPriceDeleted implements Event @doc(category: "Shipping") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The shipping method the event relates to. - """ + """The shipping method the event relates to.""" shippingMethod( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingMethodType - """ - The shipping zone the shipping method belongs to. - """ + """The shipping zone the shipping method belongs to.""" shippingZone( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingZone } @@ -33547,37 +27982,23 @@ 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 { - """ - Time of the event. - """ +type ShippingZoneCreated implements Event @doc(category: "Shipping") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The shipping zone the event relates to. - """ + """The shipping zone the event relates to.""" shippingZone( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingZone } @@ -33586,37 +28007,23 @@ 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 { - """ - Time of the event. - """ +type ShippingZoneUpdated implements Event @doc(category: "Shipping") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The shipping zone the event relates to. - """ + """The shipping zone the event relates to.""" shippingZone( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingZone } @@ -33625,37 +28032,23 @@ 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 { - """ - Time of the event. - """ +type ShippingZoneDeleted implements Event @doc(category: "Shipping") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The shipping zone the event relates to. - """ + """The shipping zone the event relates to.""" shippingZone( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingZone } @@ -33664,37 +28057,23 @@ 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 { - """ - Time of the event. - """ +type ShippingZoneMetadataUpdated implements Event @doc(category: "Shipping") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The shipping zone the event relates to. - """ + """The shipping zone the event relates to.""" shippingZone( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): ShippingZone } @@ -33703,33 +28082,21 @@ 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 { - """ - Time of the event. - """ +type StaffCreated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The user the event relates to. - """ + """The user the event relates to.""" user: User } @@ -33737,33 +28104,21 @@ 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 { - """ - Time of the event. - """ +type StaffUpdated implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The user the event relates to. - """ + """The user the event relates to.""" user: User } @@ -33771,33 +28126,21 @@ 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 { - """ - Time of the event. - """ +type StaffDeleted implements Event @doc(category: "Users") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The user the event relates to. - """ + """The user the event relates to.""" user: User } @@ -33806,57 +28149,33 @@ 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 { - """ - Time of the event. - """ +type TransactionActionRequest implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """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 { - """ - Determines the action type. - """ +type TransactionAction @doc(category: "Payments") { + """Determines the action type.""" actionType: TransactionActionEnum! - """ - Transaction request amount. Null when action type is VOID. - """ + """Transaction request amount. Null when action type is VOID.""" amount: PositiveDecimal } @@ -33864,35 +28183,21 @@ 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 { - """ - Time of the event. - """ +type TransactionItemMetadataUpdated implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """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 } @@ -33900,80 +28205,45 @@ 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. - """ + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The translation the event relates to. - """ + """The translation the event relates to.""" translation: TranslationTypes } -union TranslationTypes = - ProductTranslation - | CollectionTranslation - | CategoryTranslation - | AttributeTranslation - | AttributeValueTranslation - | ProductVariantTranslation - | PageTranslation - | ShippingMethodTranslation - | SaleTranslation - | VoucherTranslation - | MenuItemTranslation +union TranslationTypes = ProductTranslation | CollectionTranslation | CategoryTranslation | AttributeTranslation | AttributeValueTranslation | ProductVariantTranslation | PageTranslation | ShippingMethodTranslation | SaleTranslation | VoucherTranslation | MenuItemTranslation """ 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. - """ + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The translation the event relates to. - """ + """The translation the event relates to.""" translation: TranslationTypes } @@ -33981,37 +28251,23 @@ 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 { - """ - Time of the event. - """ +type VoucherCreated implements Event @doc(category: "Discounts") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The voucher the event relates to. - """ + """The voucher the event relates to.""" voucher( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Voucher } @@ -34020,37 +28276,23 @@ 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 { - """ - Time of the event. - """ +type VoucherUpdated implements Event @doc(category: "Discounts") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The voucher the event relates to. - """ + """The voucher the event relates to.""" voucher( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Voucher } @@ -34059,37 +28301,23 @@ 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 { - """ - Time of the event. - """ +type VoucherDeleted implements Event @doc(category: "Discounts") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The voucher the event relates to. - """ + """The voucher the event relates to.""" voucher( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Voucher } @@ -34098,37 +28326,23 @@ 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 { - """ - Time of the event. - """ +type VoucherMetadataUpdated implements Event @doc(category: "Discounts") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The voucher the event relates to. - """ + """The voucher the event relates to.""" voucher( - """ - Slug of a channel for which the data should be returned. - """ + """Slug of a channel for which the data should be returned.""" channel: String ): Voucher } @@ -34137,33 +28351,21 @@ 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 { - """ - Time of the event. - """ +type WarehouseCreated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The warehouse the event relates to. - """ + """The warehouse the event relates to.""" warehouse: Warehouse } @@ -34171,33 +28373,21 @@ 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 { - """ - Time of the event. - """ +type WarehouseUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The warehouse the event relates to. - """ + """The warehouse the event relates to.""" warehouse: Warehouse } @@ -34205,33 +28395,21 @@ 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 { - """ - Time of the event. - """ +type WarehouseDeleted implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The warehouse the event relates to. - """ + """The warehouse the event relates to.""" warehouse: Warehouse } @@ -34239,67 +28417,90 @@ 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 { - """ - Time of the event. - """ +type WarehouseMetadataUpdated implements Event @doc(category: "Products") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" + recipient: App + + """The warehouse the event relates to.""" + 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 """ - The warehouse the event relates to. + Thumbnail id. + + Added in Saleor 3.12. """ - warehouse: Warehouse + 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 { - """ - Time of the event. - """ +type PaymentAuthorize implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - Look up a payment. - """ + """Look up a payment.""" payment: Payment } @@ -34307,33 +28508,21 @@ 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 { - """ - Time of the event. - """ +type PaymentCaptureEvent implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - Look up a payment. - """ + """Look up a payment.""" payment: Payment } @@ -34341,33 +28530,21 @@ 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 { - """ - Time of the event. - """ +type PaymentRefundEvent implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - Look up a payment. - """ + """Look up a payment.""" payment: Payment } @@ -34375,33 +28552,21 @@ 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 { - """ - Time of the event. - """ +type PaymentVoidEvent implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - Look up a payment. - """ + """Look up a payment.""" payment: Payment } @@ -34409,33 +28574,21 @@ 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 { - """ - Time of the event. - """ +type PaymentConfirmEvent implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - Look up a payment. - """ + """Look up a payment.""" payment: Payment } @@ -34443,33 +28596,21 @@ 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 { - """ - Time of the event. - """ +type PaymentProcessEvent implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - Look up a payment. - """ + """Look up a payment.""" payment: Payment } @@ -34477,75 +28618,130 @@ type PaymentProcessEvent implements Event { List payment gateways. Added in Saleor 3.6. +""" +type PaymentListGateways 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 + + """The checkout the event relates to.""" + checkout: Checkout +} + +""" +Event sent when transaction cancelation 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 PaymentListGateways implements Event { - """ - Time of the event. - """ +type TransactionCancelationRequested implements Event @doc(category: "Payments") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The checkout the event relates to. - """ - checkout: Checkout + """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. - -Note: this API is currently in Feature Preview and can be subject to changes at later point. """ -type OrderFilterShippingMethods implements Event { - """ - Time of the event. - """ +type OrderFilterShippingMethods implements Event @doc(category: "Orders") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The order the event relates to. - """ + """The order the event relates to.""" order: Order """ 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!] } @@ -34554,41 +28750,27 @@ 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 { - """ - Time of the event. - """ +type CheckoutFilterShippingMethods implements Event @doc(category: "Checkout") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The checkout the event relates to. - """ + """The checkout the event relates to.""" checkout: Checkout """ 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!] } @@ -34597,41 +28779,27 @@ 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 { - """ - Time of the event. - """ +type ShippingListMethodsForCheckout implements Event @doc(category: "Checkout") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App - """ - The checkout the event relates to. - """ + """The checkout the event relates to.""" checkout: Checkout """ 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!] } @@ -34640,156 +28808,204 @@ 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 { - """ - Time of the event. - """ +type CalculateTaxes implements Event @doc(category: "Taxes") { + """Time of the event.""" issuedAt: DateTime - """ - Saleor version that triggered the event. - """ + """Saleor version that triggered the event.""" version: String - """ - The user or application that triggered the event. - """ + """The user or application that triggered the event.""" issuingPrincipal: IssuingPrincipal - """ - The application receiving the webhook. - """ + """The application receiving the webhook.""" recipient: App taxBase: TaxableObject! } -""" -Taxable object. -""" -type TaxableObject { - """ - The source object related to this tax object. - """ +"""Taxable object.""" +type TaxableObject @doc(category: "Taxes") { + """The source object related to this tax object.""" sourceObject: TaxSourceObject! - """ - Determines if prices contain entered tax.. - """ + """Determines if prices contain entered tax..""" pricesEnteredWithTax: Boolean! - """ - The currency of the object. - """ + """The currency of the object.""" currency: String! - """ - The price of shipping method. - """ + """The price of shipping method.""" shippingPrice: Money! - """ - The address data. - """ + """The address data.""" address: Address - """ - List of discounts. - """ + """List of discounts.""" discounts: [TaxableObjectDiscount!]! - """ - List of lines assigned to the object. - """ + """List of lines assigned to the object.""" lines: [TaxableObjectLine!]! channel: Channel! } -""" -Taxable object discount. -""" -type TaxableObjectDiscount { - """ - The name of the discount. - """ +"""Taxable object discount.""" +type TaxableObjectDiscount @doc(category: "Taxes") { + """The name of the discount.""" name: String - """ - The amount of the discount. - """ + """The amount of the discount.""" amount: Money! } -type TaxableObjectLine { - """ - The source line related to this tax line. - """ +type TaxableObjectLine @doc(category: "Taxes") { + """The source line related to this tax line.""" sourceLine: TaxSourceLine! - """ - Number of items. - """ + """Number of items.""" quantity: Int! - """ - Determines if taxes are being charged for the product. - """ + """Determines if taxes are being charged for the product.""" chargeTaxes: Boolean! - """ - The product name. - """ + """The product name.""" productName: String! - """ - The variant name. - """ + """The variant name.""" variantName: String! - """ - The product sku. - """ + """The product sku.""" productSku: String - """ - Price of the single item in the order line. - """ + """Price of the single item in the order line.""" unitPrice: Money! - """ - Price of the order line. - """ + """Price of the order line.""" totalPrice: Money! } union TaxSourceLine = CheckoutLine | OrderLine """ -_Any value scalar as defined by Federation spec. +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 +"""_Entity union as defined by Federation spec.""" +union _Entity = App | Address | User | Group | ProductVariant | Product | ProductType | ProductMedia | Category | Collection | Order | PageType -""" -_Service manifest as defined by Federation spec. -""" +"""_Service manifest as defined by Federation spec.""" type _Service { sdl: String } diff --git a/apps/emails-and-messages/package.json b/apps/emails-and-messages/package.json index 837ec40..c49178c 100644 --- a/apps/emails-and-messages/package.json +++ b/apps/emails-and-messages/package.json @@ -74,6 +74,6 @@ }, "private": true, "saleor": { - "schemaVersion": "3.11.7" + "schemaVersion": "3.13" } } diff --git a/apps/emails-and-messages/src/lib/generate-random-id.ts b/apps/emails-and-messages/src/lib/generate-random-id.ts index 68d63fa..559e177 100644 --- a/apps/emails-and-messages/src/lib/generate-random-id.ts +++ b/apps/emails-and-messages/src/lib/generate-random-id.ts @@ -6,5 +6,6 @@ export const generateRandomId = () => { const offsetInMinutes = date.getTimezoneOffset(); const randomDate = date.setMinutes(date.getMinutes() + offsetInMinutes).valueOf(); const randomString = (Math.random() + 1).toString(36).substring(7); + return `${randomDate}${randomString}`; }; diff --git a/apps/emails-and-messages/src/lib/set-backend-errors.ts b/apps/emails-and-messages/src/lib/set-backend-errors.ts index 0e9e6a1..c3e1ac1 100644 --- a/apps/emails-and-messages/src/lib/set-backend-errors.ts +++ b/apps/emails-and-messages/src/lib/set-backend-errors.ts @@ -32,7 +32,7 @@ export function setBackendErrors({ notifyError( "Could not save the configuration", - isFieldErrorSet ? "Submitted form contain errors" : "Error saving configuration", + isFieldErrorSet ? "Submitted form contain errors" : error.message, formErrorMessage ); } diff --git a/apps/emails-and-messages/src/modules/app-configuration/app-configuration.router.ts b/apps/emails-and-messages/src/modules/app-configuration/app-configuration.router.ts new file mode 100644 index 0000000..d3b9eee --- /dev/null +++ b/apps/emails-and-messages/src/modules/app-configuration/app-configuration.router.ts @@ -0,0 +1,12 @@ +import { createLogger } from "@saleor/apps-shared"; +import { router } from "../trpc/trpc-server"; +import { protectedWithConfigurationServices } from "../trpc/protected-client-procedure-with-services"; + +export const appConfigurationRouter = router({ + featureFlags: protectedWithConfigurationServices.query(async ({ ctx }) => { + const logger = createLogger({ saleorApiUrl: ctx.saleorApiUrl }); + + logger.debug("appConfigurationRouter.featureFlags called"); + return await ctx.featureFlagService.getFeatureFlags(); + }), +}); diff --git a/apps/emails-and-messages/src/modules/event-handlers/default-payloads.ts b/apps/emails-and-messages/src/modules/event-handlers/default-payloads.ts index 3848bb9..a47eab8 100644 --- a/apps/emails-and-messages/src/modules/event-handlers/default-payloads.ts +++ b/apps/emails-and-messages/src/modules/event-handlers/default-payloads.ts @@ -7,6 +7,7 @@ import { OrderFulfilledWebhookPayloadFragment, OrderFullyPaidWebhookPayloadFragment, InvoiceSentWebhookPayloadFragment, + GiftCardSentWebhookPayloadFragment, } from "../../../generated/graphql"; import { NotifyEventPayload } from "../../pages/api/webhooks/notify"; @@ -247,6 +248,33 @@ const accountDeletePayload: NotifyEventPayload = { logo_url: "", }; +// TODO: UPDATE WITH BETTER DATA +const giftCardSentPayload: GiftCardSentWebhookPayloadFragment = { + channel: "default_channel", + sentToEmail: "user@example.com", + giftCard: { + code: "XXXX", + tags: [], + created: "2021-03-16T13:12:00+00:00", + currentBalance: { + amount: 100, + currency: "USD", + }, + id: "R2lmdENhcmQ6MjI=", + initialBalance: { + amount: 100, + currency: "USD", + }, + isActive: true, + lastUsedOn: null, + displayCode: "XXXX-XXXX-XXXX-XXXX", + last4CodeChars: "XXXX", + expiryDate: "2021-03-16T13:12:00+00:00", + usedByEmail: null, + usedBy: null, + }, +}; + export const examplePayloads: Record = { ORDER_CREATED: orderCreatedPayload, ORDER_CONFIRMED: orderConfirmedPayload, @@ -254,6 +282,7 @@ export const examplePayloads: Record = { ORDER_FULFILLED: orderFulfilledPayload, ORDER_FULLY_PAID: orderFullyPaidPayload, INVOICE_SENT: invoiceSentPayload, + GIFT_CARD_SENT: giftCardSentPayload, ACCOUNT_CONFIRMATION: accountConfirmationPayload, ACCOUNT_PASSWORD_RESET: accountPasswordResetPayload, ACCOUNT_CHANGE_EMAIL_REQUEST: accountChangeEmailRequestPayload, diff --git a/apps/emails-and-messages/src/modules/event-handlers/message-event-types.ts b/apps/emails-and-messages/src/modules/event-handlers/message-event-types.ts index 1d0c589..8a90bf1 100644 --- a/apps/emails-and-messages/src/modules/event-handlers/message-event-types.ts +++ b/apps/emails-and-messages/src/modules/event-handlers/message-event-types.ts @@ -10,6 +10,7 @@ export const messageEventTypes = [ "ACCOUNT_CHANGE_EMAIL_REQUEST", "ACCOUNT_CHANGE_EMAIL_CONFIRM", "ACCOUNT_DELETE", + "GIFT_CARD_SENT", ] as const; export type MessageEventTypes = (typeof messageEventTypes)[number]; @@ -21,6 +22,7 @@ export const messageEventTypesLabels: Record = { ORDER_CANCELLED: "Order cancelled", ORDER_FULLY_PAID: "Order fully paid", INVOICE_SENT: "Invoice sent", + GIFT_CARD_SENT: "Gift card sent", ACCOUNT_CONFIRMATION: "Customer account confirmation", ACCOUNT_PASSWORD_RESET: "Customer account password reset request", ACCOUNT_CHANGE_EMAIL_REQUEST: "Customer account change email request", diff --git a/apps/emails-and-messages/src/modules/event-handlers/send-event-messages.ts b/apps/emails-and-messages/src/modules/event-handlers/send-event-messages.ts index 8d18b81..17b2287 100644 --- a/apps/emails-and-messages/src/modules/event-handlers/send-event-messages.ts +++ b/apps/emails-and-messages/src/modules/event-handlers/send-event-messages.ts @@ -9,6 +9,7 @@ import { MessageEventTypes } from "./message-event-types"; import { SmtpPrivateMetadataManager } from "../smtp/configuration/smtp-metadata-manager"; import { createSettingsManager } from "../../lib/metadata-manager"; import { SendgridPrivateMetadataManager } from "../sendgrid/configuration/sendgrid-metadata-manager"; +import { FeatureFlagService } from "../feature-flag-service/feature-flag-service"; interface SendEventMessagesArgs { recipientEmail: string; @@ -33,11 +34,16 @@ export const sendEventMessages = async ({ logger.debug("Function called"); + const featureFlagService = new FeatureFlagService({ + client, + }); + const smtpConfigurationService = new SmtpConfigurationService({ metadataManager: new SmtpPrivateMetadataManager( createSettingsManager(client, authData.appId), authData.saleorApiUrl ), + featureFlagService, }); const availableSmtpConfigurations = await smtpConfigurationService.getConfigurations({ @@ -66,6 +72,7 @@ export const sendEventMessages = async ({ createSettingsManager(client, authData.appId), authData.saleorApiUrl ), + featureFlagService, }); const availableSendgridConfigurations = await sendgridConfigurationService.getConfigurations({ diff --git a/apps/emails-and-messages/src/modules/feature-flag-service/feature-flag-service.test.ts b/apps/emails-and-messages/src/modules/feature-flag-service/feature-flag-service.test.ts new file mode 100644 index 0000000..be27dde --- /dev/null +++ b/apps/emails-and-messages/src/modules/feature-flag-service/feature-flag-service.test.ts @@ -0,0 +1,48 @@ +import { it, describe, expect, afterEach, vi } from "vitest"; +import { FeatureFlagService } from "./feature-flag-service"; +import * as fetchSaleorVersionExports from "./fetch-saleor-version"; + +import { Client } from "urql"; + +describe("FeatureFlagService", function () { + const createMockedClient = () => ({} as Client); + + afterEach(() => { + vi.resetAllMocks(); + }); + + it("No API calls, when version is passed to the constructor", async () => { + const passedVersion = "3.13.0"; + + const service = new FeatureFlagService({ + client: createMockedClient(), + saleorVersion: passedVersion, + }); + + const versionFetchSpy = vi + .spyOn(fetchSaleorVersionExports, "fetchSaleorVersion") + .mockResolvedValue("XXXX"); + + expect(await service.getSaleorVersion()).toEqual(passedVersion); + expect(versionFetchSpy).not.toHaveBeenCalled(); + }); + + it("Use cached version, when once fetched", async () => { + const fetchedVersion = "3.13.0"; + + const service = new FeatureFlagService({ + client: createMockedClient(), + }); + + const versionFetchSpy = vi + .spyOn(fetchSaleorVersionExports, "fetchSaleorVersion") + .mockResolvedValue(fetchedVersion); + + expect(await service.getSaleorVersion()).toEqual(fetchedVersion); + expect(versionFetchSpy).toHaveBeenCalledOnce(); + + // Request version once again - should be cached + expect(await service.getSaleorVersion()).toEqual(fetchedVersion); + expect(versionFetchSpy).toHaveBeenCalledOnce(); + }); +}); diff --git a/apps/emails-and-messages/src/modules/feature-flag-service/feature-flag-service.ts b/apps/emails-and-messages/src/modules/feature-flag-service/feature-flag-service.ts new file mode 100644 index 0000000..b7a2157 --- /dev/null +++ b/apps/emails-and-messages/src/modules/feature-flag-service/feature-flag-service.ts @@ -0,0 +1,40 @@ +import { Client } from "urql"; +import { FeatureFlagsState, getFeatureFlags } from "./get-feature-flags"; +import { fetchSaleorVersion } from "./fetch-saleor-version"; +import { createLogger } from "@saleor/apps-shared"; + +const logger = createLogger({ + name: "FeatureFlagService", +}); + +/* + * Manages state of feature flags, based on Saleor version. + * If `saleorVersion` is not provided, it will be fetched from the API on first call. + * `saleorVersion` is expected to be in Semver format, e.g. "3.13.0" + */ +export class FeatureFlagService { + private client: Client; + private saleorVersion?: string; + + constructor(args: { client: Client; saleorVersion?: string }) { + this.client = args.client; + this.saleorVersion = args.saleorVersion; + } + + public getSaleorVersion = async (): Promise => { + if (!this.saleorVersion) { + logger.debug("No cached value, fetching version from the API"); + this.saleorVersion = await fetchSaleorVersion(this.client); + } + return this.saleorVersion; + }; + + public getFeatureFlags = async (): Promise => { + logger.debug("Checking feature flags"); + const saleorVersion = await this.getSaleorVersion(); + const flags = getFeatureFlags({ saleorVersion }); + + logger.debug({ flags }, "Feature flags checked"); + return flags; + }; +} diff --git a/apps/emails-and-messages/src/modules/feature-flag-service/fetch-saleor-version.ts b/apps/emails-and-messages/src/modules/feature-flag-service/fetch-saleor-version.ts new file mode 100644 index 0000000..ac7177f --- /dev/null +++ b/apps/emails-and-messages/src/modules/feature-flag-service/fetch-saleor-version.ts @@ -0,0 +1,22 @@ +import { Client, gql } from "urql"; +import { FetchSaleorVersionDocument, FetchSaleorVersionQuery } from "../../../generated/graphql"; + +gql` + query FetchSaleorVersion { + shop { + version + } + } +`; + +export async function fetchSaleorVersion(client: Client): Promise { + const { error, data } = await client + .query(FetchSaleorVersionDocument, {}) + .toPromise(); + + if (error || !data?.shop.version) { + throw new Error("Can't fetch Saleor version"); + } + + return data.shop.version; +} diff --git a/apps/emails-and-messages/src/modules/feature-flag-service/get-feature-flags.test.ts b/apps/emails-and-messages/src/modules/feature-flag-service/get-feature-flags.test.ts new file mode 100644 index 0000000..c7f886f --- /dev/null +++ b/apps/emails-and-messages/src/modules/feature-flag-service/get-feature-flags.test.ts @@ -0,0 +1,11 @@ +import { it, describe, expect } from "vitest"; +import { getFeatureFlags } from "./get-feature-flags"; + +describe("getFeatureFlags", function () { + it("Flag should be turned off, when using too old version", () => { + expect(getFeatureFlags({ saleorVersion: "3.10.0" }).giftCardSentEvent).toEqual(false); + }); + it("Flag should be turned on, when using version with feature support", () => { + expect(getFeatureFlags({ saleorVersion: "3.13.0" }).giftCardSentEvent).toEqual(true); + }); +}); diff --git a/apps/emails-and-messages/src/modules/feature-flag-service/get-feature-flags.ts b/apps/emails-and-messages/src/modules/feature-flag-service/get-feature-flags.ts new file mode 100644 index 0000000..f19074a --- /dev/null +++ b/apps/emails-and-messages/src/modules/feature-flag-service/get-feature-flags.ts @@ -0,0 +1,21 @@ +import { SaleorVersionCompatibilityValidator } from "@saleor/apps-shared"; + +export const featureFlags = ["giftCardSentEvent"] as const; + +export type FeatureFlag = (typeof featureFlags)[number]; + +export type FeatureFlagsState = Record; + +interface GetFeatureFlagsArgs { + saleorVersion: string; +} + +/* + * Returns list of feature flags based on Saleor version. + * `saleorVersion` is expected to be in Semver format, e.g. "3.13.0" + */ +export const getFeatureFlags = ({ saleorVersion }: GetFeatureFlagsArgs): FeatureFlagsState => { + return { + giftCardSentEvent: new SaleorVersionCompatibilityValidator(">=3.13").isValid(saleorVersion), + }; +}; diff --git a/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.router.ts b/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.router.ts index 1b5dc7d..1403fb4 100644 --- a/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.router.ts +++ b/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.router.ts @@ -26,17 +26,22 @@ export const throwTrpcErrorFromConfigurationServiceError = ( case "CONFIGURATION_NOT_FOUND": throw new TRPCError({ code: "NOT_FOUND", - message: "Configuration not found", + message: "Configuration not found.", }); case "EVENT_CONFIGURATION_NOT_FOUND": throw new TRPCError({ code: "NOT_FOUND", - message: "Event configuration not found", + message: "Event configuration not found.", }); case "CANT_FETCH": throw new TRPCError({ code: "INTERNAL_SERVER_ERROR", - message: "Can't fetch configuration", + message: "Can't fetch configuration.", + }); + case "WRONG_SALEOR_VERSION": + throw new TRPCError({ + code: "INTERNAL_SERVER_ERROR", + message: "Feature you are trying to use is not supported in this version of Saleor.", }); } } @@ -80,7 +85,7 @@ export const sendgridConfigurationRouter = router({ } }), createConfiguration: protectedWithConfigurationServices - .meta({ requiredClientPermissions: ["MANAGE_APPS"], updateWebhooks: true }) + .meta({ requiredClientPermissions: ["MANAGE_APPS"] }) .input(sendgridCreateConfigurationInputSchema) .mutation(async ({ ctx, input }) => { const logger = createLogger({ saleorApiUrl: ctx.saleorApiUrl }); @@ -241,20 +246,17 @@ export const sendgridConfigurationRouter = router({ logger.debug(input, "sendgridConfigurationRouter.updateEventArray called"); - return await Promise.all( - input.events.map(async (event) => { - const { eventType, ...eventConfiguration } = event; + try { + const configuration = await ctx.sendgridConfigurationService.getConfiguration({ + id: input.configurationId, + }); - try { - return await ctx.sendgridConfigurationService.updateEventConfiguration({ - configurationId: input.configurationId, - eventType, - eventConfiguration, - }); - } catch (e) { - throwTrpcErrorFromConfigurationServiceError(e); - } - }) - ); + await ctx.sendgridConfigurationService.updateConfiguration({ + ...configuration, + events: input.events, + }); + } catch (e) { + throwTrpcErrorFromConfigurationServiceError(e); + } }), }); diff --git a/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.service.test.ts b/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.service.test.ts index 2856e58..8b73512 100644 --- a/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.service.test.ts +++ b/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.service.test.ts @@ -3,6 +3,8 @@ import { SendgridConfigurationService } from "./sendgrid-configuration.service"; import { SettingsManager } from "@saleor/app-sdk/settings-manager"; import { SendgridPrivateMetadataManager } from "./sendgrid-metadata-manager"; import { SendgridConfig } from "./sendgrid-config-schema"; +import { Client } from "urql"; +import { FeatureFlagService } from "../../feature-flag-service/feature-flag-service"; const mockSaleorApiUrl = "https://demo.saleor.io/graphql/"; @@ -79,6 +81,11 @@ const validConfig: SendgridConfig = { eventType: "ACCOUNT_DELETE", template: undefined, }, + { + active: true, + eventType: "GIFT_CARD_SENT", + template: undefined, + }, ], sender: "1", senderEmail: "no-reply@example.com", @@ -170,6 +177,10 @@ describe("SendgridConfigurationService", function () { const getConfigMock = vi.spyOn(configurator, "getConfig").mockResolvedValue(undefined); new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, }); @@ -187,6 +198,10 @@ describe("SendgridConfigurationService", function () { const getConfigMock = vi.spyOn(configurator, "getConfig").mockResolvedValue(validConfig); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, }); @@ -209,6 +224,10 @@ describe("SendgridConfigurationService", function () { const getConfigMock = vi.spyOn(configurator, "getConfig").mockResolvedValue(emptyConfigRoot); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -230,6 +249,10 @@ describe("SendgridConfigurationService", function () { // Service initialized with empty configuration const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: emptyConfigRoot, }); @@ -244,6 +267,28 @@ describe("SendgridConfigurationService", function () { expect(await service.getConfigurationRoot()); expect(getConfigMock).toBeCalledTimes(0); }); + + it("Operation should be rejected, when attempting to save event not available according to feature flag", async () => { + const configurator = new SendgridPrivateMetadataManager( + null as unknown as SettingsManager, + mockSaleorApiUrl + ); + + // Service initialized with empty configuration + const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.12.0", // Feature flag is available since 3.13.0 + }), + metadataManager: configurator, + initialData: emptyConfigRoot, + }); + + // Set configuration + await expect(async () => await service.setConfigurationRoot(validConfig)).rejects.toThrow( + "Gift card sent event is not supported for this Saleor version" + ); + }); }); describe("getConfiguration", () => { @@ -254,6 +299,10 @@ describe("SendgridConfigurationService", function () { ); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -270,6 +319,10 @@ describe("SendgridConfigurationService", function () { ); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -288,6 +341,10 @@ describe("SendgridConfigurationService", function () { ); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: emptyConfigRoot, }); @@ -302,6 +359,10 @@ describe("SendgridConfigurationService", function () { ); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -323,6 +384,10 @@ describe("SendgridConfigurationService", function () { const setConfigMock = vi.spyOn(configurator, "setConfig").mockResolvedValue(); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: emptyConfigRoot, }); @@ -351,6 +416,10 @@ describe("SendgridConfigurationService", function () { const getConfigMock = vi.spyOn(configurator, "getConfig").mockResolvedValue(undefined); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -381,6 +450,10 @@ describe("SendgridConfigurationService", function () { const getConfigMock = vi.spyOn(configurator, "getConfig").mockResolvedValue(undefined); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -404,6 +477,10 @@ describe("SendgridConfigurationService", function () { const setConfigMock = vi.spyOn(configurator, "setConfig").mockResolvedValue(); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -433,6 +510,10 @@ describe("SendgridConfigurationService", function () { const setConfigMock = vi.spyOn(configurator, "setConfig").mockResolvedValue(); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -456,6 +537,10 @@ describe("SendgridConfigurationService", function () { ); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -475,6 +560,10 @@ describe("SendgridConfigurationService", function () { ); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -506,6 +595,10 @@ describe("SendgridConfigurationService", function () { const setConfigMock = vi.spyOn(configurator, "setConfig").mockResolvedValue(); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); @@ -538,6 +631,10 @@ describe("SendgridConfigurationService", function () { const setConfigMock = vi.spyOn(configurator, "setConfig").mockResolvedValue(); const service = new SendgridConfigurationService({ + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), metadataManager: configurator, initialData: { ...validConfig }, }); diff --git a/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.service.ts b/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.service.ts index bd693de..d978e80 100644 --- a/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.service.ts +++ b/apps/emails-and-messages/src/modules/sendgrid/configuration/sendgrid-configuration.service.ts @@ -9,6 +9,7 @@ import { MessageEventTypes } from "../../event-handlers/message-event-types"; import { generateRandomId } from "../../../lib/generate-random-id"; import { filterConfigurations } from "../../app-configuration/filter-configurations"; import { SendgridPrivateMetadataManager } from "./sendgrid-metadata-manager"; +import { FeatureFlagService } from "../../feature-flag-service/feature-flag-service"; const logger = createLogger({ service: "SendgridConfigurationService", @@ -18,7 +19,8 @@ export type SendgridConfigurationServiceErrorType = | "OTHER" | "CONFIGURATION_NOT_FOUND" | "EVENT_CONFIGURATION_NOT_FOUND" - | "CANT_FETCH"; + | "CANT_FETCH" + | "WRONG_SALEOR_VERSION"; export interface ConfigurationPartial extends Partial { id: SendgridConfiguration["id"]; @@ -45,16 +47,20 @@ export interface FilterConfigurationsArgs { export class SendgridConfigurationService { private configurationData?: SendgridConfig; private metadataConfigurator: SendgridPrivateMetadataManager; + private featureFlagService: FeatureFlagService; constructor(args: { metadataManager: SendgridPrivateMetadataManager; initialData?: SendgridConfig; + featureFlagService: FeatureFlagService; }) { this.metadataConfigurator = args.metadataManager; if (args.initialData) { this.configurationData = args.initialData; } + + this.featureFlagService = args.featureFlagService; } /** @@ -101,10 +107,35 @@ export class SendgridConfigurationService { return this.configurationData; } + private containActiveGiftCardEvent(config: SendgridConfig) { + for (const configuration of config.configurations) { + const giftCardSentEvent = configuration.events.find( + (event) => event.eventType === "GIFT_CARD_SENT" + ); + + if (giftCardSentEvent?.active) { + return true; + } + } + return false; + } + // Saves configuration to Saleor API and cache it async setConfigurationRoot(config: SendgridConfig) { - logger.debug("Set configuration root"); + logger.debug("Validate configuration before sending it to the Saleor API"); + const availableFeatures = await this.featureFlagService.getFeatureFlags(); + if (!availableFeatures.giftCardSentEvent && this.containActiveGiftCardEvent(config)) { + logger.error( + "Attempt to enable gift card sent event for unsupported Saleor version. Aborting configuration update." + ); + throw new SendgridConfigurationServiceError( + "Gift card sent event is not supported for this Saleor version", + "WRONG_SALEOR_VERSION" + ); + } + + logger.debug("Set configuration root"); this.configurationData = config; await this.pushConfiguration(); } @@ -179,7 +210,7 @@ export class SendgridConfigurationService { updatedConfigRoot.configurations[configurationIndex] = updatedConfiguration; - this.setConfigurationRoot(updatedConfigRoot); + await this.setConfigurationRoot(updatedConfigRoot); return updatedConfiguration; } @@ -199,7 +230,7 @@ export class SendgridConfigurationService { (configuration) => configuration.id !== id ); - this.setConfigurationRoot(updatedConfigRoot); + await this.setConfigurationRoot(updatedConfigRoot); } /** diff --git a/apps/emails-and-messages/src/modules/sendgrid/sendgrid-api.ts b/apps/emails-and-messages/src/modules/sendgrid/sendgrid-api.ts index 7ebaad4..46f892e 100644 --- a/apps/emails-and-messages/src/modules/sendgrid/sendgrid-api.ts +++ b/apps/emails-and-messages/src/modules/sendgrid/sendgrid-api.ts @@ -20,6 +20,7 @@ export const fetchTemplates = }, } ); + if (!response.ok) { console.error("Could not fetch available Sendgrid templates"); return []; @@ -33,6 +34,7 @@ export const fetchTemplates = value: r.id.toString(), label: r.name, })) || []; + return templates; } catch (e) { console.error("Could not parse the response from Sendgrid", e); @@ -55,6 +57,7 @@ export const fetchSenders = Authorization: `Bearer ${apiKey}`, }, }); + if (!response.ok) { console.error("Could not fetch available Sendgrid senders"); return []; @@ -70,6 +73,7 @@ export const fetchSenders = nickname: r.nickname, from_email: r.from_email, })) || []; + return senders; } catch (e) { console.error("Could not parse the response from Sendgrid", e); diff --git a/apps/emails-and-messages/src/modules/sendgrid/ui/sendgrid-events-section.tsx b/apps/emails-and-messages/src/modules/sendgrid/ui/sendgrid-events-section.tsx index 0d6ae4e..e3a066f 100644 --- a/apps/emails-and-messages/src/modules/sendgrid/ui/sendgrid-events-section.tsx +++ b/apps/emails-and-messages/src/modules/sendgrid/ui/sendgrid-events-section.tsx @@ -1,9 +1,6 @@ -import { - SendgridConfiguration, - SendgridEventConfiguration, -} from "../configuration/sendgrid-config-schema"; +import { SendgridConfiguration } from "../configuration/sendgrid-config-schema"; import { BoxWithBorder } from "../../../components/box-with-border"; -import { Box, Button, Text } from "@saleor/macaw-ui/next"; +import { Box, Button, Text, Tooltip } from "@saleor/macaw-ui/next"; import { defaultPadding } from "../../../components/ui-defaults"; import { useDashboardNotification } from "@saleor/apps-shared"; import { trpcClient } from "../../trpc/trpc-client"; @@ -30,6 +27,8 @@ interface SendgridEventsSectionProps { export const SendgridEventsSection = ({ configuration }: SendgridEventsSectionProps) => { const { notifySuccess, notifyError } = useDashboardNotification(); + const { data: featureFlags } = trpcClient.app.featureFlags.useQuery(); + // Sort events by displayed label const eventsSorted = configuration.events.sort((a, b) => messageEventTypesLabels[a.eventType].localeCompare(messageEventTypesLabels[b.eventType]) @@ -92,23 +91,43 @@ export const SendgridEventsSection = ({ configuration }: SendgridEventsSectionPr - {eventsSorted.map((event, index) => ( - - - - - - {messageEventTypesLabels[event.eventType]} - - - + + {isUnsupported && ( + + Event is available in Saleor version 3.13 and above only. + + + )} + + + + {messageEventTypesLabels[event.eventType]} + + + - - - {messageEventTypesLabels[event.eventType]} - - - - - - ))} + {eventsSorted.map((event, index) => { + const isUnsupported = + !featureFlags?.giftCardSentEvent && event.eventType === "GIFT_CARD_SENT"; + + return ( + + + + + + + {isUnsupported && ( + + Event is available in Saleor version 3.13 and above only. + + + )} + + + + {messageEventTypesLabels[event.eventType]} + + + + + + ); + })} diff --git a/apps/emails-and-messages/src/modules/trpc/protected-client-procedure-with-services.ts b/apps/emails-and-messages/src/modules/trpc/protected-client-procedure-with-services.ts index f0bf857..d512daa 100644 --- a/apps/emails-and-messages/src/modules/trpc/protected-client-procedure-with-services.ts +++ b/apps/emails-and-messages/src/modules/trpc/protected-client-procedure-with-services.ts @@ -7,6 +7,7 @@ import { SmtpPrivateMetadataManager } from "../smtp/configuration/smtp-metadata- import { syncWebhookStatus } from "../webhook-management/sync-webhook-status"; import { protectedClientProcedure } from "./protected-client-procedure"; import { WebhookManagementService } from "../webhook-management/webhook-management-service"; +import { FeatureFlagService } from "../feature-flag-service/feature-flag-service"; const logger = createLogger({ name: "protectedWithConfigurationServices middleware" }); @@ -19,11 +20,21 @@ const logger = createLogger({ name: "protectedWithConfigurationServices middlewa */ export const protectedWithConfigurationServices = protectedClientProcedure.use( async ({ next, ctx, meta }) => { + /* + * TODO: When App Bridge will add Saleor Version do the context, + * extract it from there and pass it to the service constructor. + * It will reduce additional call to the API. + */ + const featureFlagService = new FeatureFlagService({ + client: ctx.apiClient, + }); + const smtpConfigurationService = new SmtpConfigurationService({ metadataManager: new SmtpPrivateMetadataManager( createSettingsManager(ctx.apiClient, ctx.appId!), ctx.saleorApiUrl ), + featureFlagService, }); const sendgridConfigurationService = new SendgridConfigurationService({ @@ -31,19 +42,25 @@ export const protectedWithConfigurationServices = protectedClientProcedure.use( createSettingsManager(ctx.apiClient, ctx.appId!), ctx.saleorApiUrl ), + featureFlagService, }); const result = await next({ ctx: { smtpConfigurationService, sendgridConfigurationService, + featureFlagService, }, }); if (meta?.updateWebhooks) { logger.debug("Updating webhooks"); - const webhookManagementService = new WebhookManagementService(ctx.baseUrl, ctx.apiClient); + const webhookManagementService = new WebhookManagementService({ + appBaseUrl: ctx.baseUrl, + client: ctx.apiClient, + featureFlagService: featureFlagService, + }); await syncWebhookStatus({ sendgridConfigurationService, diff --git a/apps/emails-and-messages/src/modules/trpc/trpc-app-router.ts b/apps/emails-and-messages/src/modules/trpc/trpc-app-router.ts index 856350b..6f68738 100644 --- a/apps/emails-and-messages/src/modules/trpc/trpc-app-router.ts +++ b/apps/emails-and-messages/src/modules/trpc/trpc-app-router.ts @@ -2,8 +2,10 @@ import { channelsRouter } from "../channels/channels.router"; import { router } from "./trpc-server"; import { smtpConfigurationRouter } from "../smtp/configuration/smtp-configuration.router"; import { sendgridConfigurationRouter } from "../sendgrid/configuration/sendgrid-configuration.router"; +import { appConfigurationRouter } from "../app-configuration/app-configuration.router"; export const appRouter = router({ + app: appConfigurationRouter, channels: channelsRouter, smtpConfiguration: smtpConfigurationRouter, sendgridConfiguration: sendgridConfigurationRouter, diff --git a/apps/emails-and-messages/src/modules/webhook-management/get-webhook-statuses-from-configurations.test.ts b/apps/emails-and-messages/src/modules/webhook-management/get-webhook-statuses-from-configurations.test.ts index 079597b..0e0735b 100644 --- a/apps/emails-and-messages/src/modules/webhook-management/get-webhook-statuses-from-configurations.test.ts +++ b/apps/emails-and-messages/src/modules/webhook-management/get-webhook-statuses-from-configurations.test.ts @@ -177,6 +177,7 @@ describe("getWebhookStatusesFromConfigurations", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); }); @@ -194,6 +195,7 @@ describe("getWebhookStatusesFromConfigurations", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); }); @@ -216,6 +218,7 @@ describe("getWebhookStatusesFromConfigurations", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); }); @@ -246,6 +249,7 @@ describe("getWebhookStatusesFromConfigurations", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); }); @@ -282,6 +286,7 @@ describe("getWebhookStatusesFromConfigurations", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); }); }); diff --git a/apps/emails-and-messages/src/modules/webhook-management/get-webhook-statuses-from-configurations.ts b/apps/emails-and-messages/src/modules/webhook-management/get-webhook-statuses-from-configurations.ts index 55366a9..4e53e38 100644 --- a/apps/emails-and-messages/src/modules/webhook-management/get-webhook-statuses-from-configurations.ts +++ b/apps/emails-and-messages/src/modules/webhook-management/get-webhook-statuses-from-configurations.ts @@ -13,13 +13,15 @@ export const getWebhookStatusesFromConfigurations = ({ smtpConfigurations: SmtpConfiguration[]; sendgridConfigurations: SendgridConfiguration[]; }) => { + // TODO: this dict should be generated in one place instead of manually edited const statuses: Record = { + giftCardSentWebhook: false, invoiceSentWebhook: false, notifyWebhook: false, orderCancelledWebhook: false, orderConfirmedWebhook: false, - orderFulfilledWebhook: false, orderCreatedWebhook: false, + orderFulfilledWebhook: false, orderFullyPaidWebhook: false, }; diff --git a/apps/emails-and-messages/src/modules/webhook-management/sync-webhook-status.test.ts b/apps/emails-and-messages/src/modules/webhook-management/sync-webhook-status.test.ts index afa9bb6..3224c72 100644 --- a/apps/emails-and-messages/src/modules/webhook-management/sync-webhook-status.test.ts +++ b/apps/emails-and-messages/src/modules/webhook-management/sync-webhook-status.test.ts @@ -64,6 +64,7 @@ describe("syncWebhookStatus", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); const getWebhooksStatusMock = vi @@ -76,6 +77,7 @@ describe("syncWebhookStatus", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); await syncWebhookStatus({ @@ -98,6 +100,7 @@ describe("syncWebhookStatus", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); const getWebhooksStatusMock = vi @@ -110,6 +113,7 @@ describe("syncWebhookStatus", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); await syncWebhookStatus({ @@ -132,6 +136,7 @@ describe("syncWebhookStatus", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); const getWebhooksStatusMock = vi @@ -144,6 +149,7 @@ describe("syncWebhookStatus", function () { orderFulfilledWebhook: false, orderCreatedWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); await syncWebhookStatus({ diff --git a/apps/emails-and-messages/src/modules/webhook-management/webhook-management-service.test.ts b/apps/emails-and-messages/src/modules/webhook-management/webhook-management-service.test.ts index 9ff7367..25c2422 100644 --- a/apps/emails-and-messages/src/modules/webhook-management/webhook-management-service.test.ts +++ b/apps/emails-and-messages/src/modules/webhook-management/webhook-management-service.test.ts @@ -5,8 +5,8 @@ import * as operationExports from "./api-operations"; import { WebhookEventTypeAsyncEnum } from "../../../generated/graphql"; import { invoiceSentWebhook } from "../../pages/api/webhooks/invoice-sent"; import { orderCancelledWebhook } from "../../pages/api/webhooks/order-cancelled"; - -const mockSaleorApiUrl = "https://demo.saleor.io/graphql/"; +import { FeatureFlagService } from "../feature-flag-service/feature-flag-service"; +import { giftCardSentWebhook } from "../../pages/api/webhooks/gift-card-sent"; describe("WebhookManagementService", function () { const mockedClient = {} as Client; @@ -16,10 +16,14 @@ describe("WebhookManagementService", function () { }); it("API should be called, when getWebhooks is used", async () => { - const webhookManagementService = new WebhookManagementService( - "https://example.com", - mockedClient - ); + const webhookManagementService = new WebhookManagementService({ + client: mockedClient, + appBaseUrl: "https://example.com", + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), + }); const fetchAppWebhooksMock = vi.spyOn(operationExports, "fetchAppWebhooks").mockResolvedValue([ { @@ -43,11 +47,15 @@ describe("WebhookManagementService", function () { expect(fetchAppWebhooksMock).toBeCalledTimes(1); }); - it("Webhook statuses should be active, when whists in API and active", async () => { - const webhookManagementService = new WebhookManagementService( - "https://example.com", - mockedClient - ); + it("Webhook statuses should be active, when webhook is created in the API and set to active", async () => { + const webhookManagementService = new WebhookManagementService({ + client: mockedClient, + appBaseUrl: "https://example.com", + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), + }); const fetchAppWebhooksMock = vi.spyOn(operationExports, "fetchAppWebhooks").mockResolvedValue([ { @@ -76,15 +84,20 @@ describe("WebhookManagementService", function () { orderCreatedWebhook: false, orderFulfilledWebhook: false, orderFullyPaidWebhook: false, + giftCardSentWebhook: false, }); expect(fetchAppWebhooksMock).toBeCalledTimes(1); }); it("Webhook should be created using the API, when requested", async () => { - const webhookManagementService = new WebhookManagementService( - "https://example.com", - mockedClient - ); + const webhookManagementService = new WebhookManagementService({ + client: mockedClient, + appBaseUrl: "https://example.com", + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), + }); const createAppWebhookMock = vi.spyOn(operationExports, "createAppWebhook").mockResolvedValue({ id: "1", @@ -113,11 +126,33 @@ describe("WebhookManagementService", function () { }); }); + it("Should throw error, when attempting to create gift card sent webhook in unsupported environment", async () => { + const webhookManagementService = new WebhookManagementService({ + client: mockedClient, + appBaseUrl: "https://example.com", + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.12.0", // Gift card sent webhook is supported from 3.13.0 + }), + }); + + await expect( + async () => + await webhookManagementService.createWebhook({ + webhook: "giftCardSentWebhook", + }) + ).rejects.toThrow("Gift card event is not supported in this environment"); + }); + it("Webhook should be deleted using the API, when requested", async () => { - const webhookManagementService = new WebhookManagementService( - "https://example.com", - mockedClient - ); + const webhookManagementService = new WebhookManagementService({ + client: mockedClient, + appBaseUrl: "https://example.com", + featureFlagService: new FeatureFlagService({ + client: {} as Client, + saleorVersion: "3.14.0", + }), + }); vi.spyOn(operationExports, "fetchAppWebhooks").mockResolvedValue([ { diff --git a/apps/emails-and-messages/src/modules/webhook-management/webhook-management-service.ts b/apps/emails-and-messages/src/modules/webhook-management/webhook-management-service.ts index 9d763c7..4ba58e3 100644 --- a/apps/emails-and-messages/src/modules/webhook-management/webhook-management-service.ts +++ b/apps/emails-and-messages/src/modules/webhook-management/webhook-management-service.ts @@ -10,25 +10,30 @@ import { notifyWebhook } from "../../pages/api/webhooks/notify"; import { MessageEventTypes } from "../event-handlers/message-event-types"; import { createLogger } from "@saleor/apps-shared"; import { WebhookEventTypeAsyncEnum } from "../../../generated/graphql"; +import { giftCardSentWebhook } from "../../pages/api/webhooks/gift-card-sent"; +import { FeatureFlagService } from "../feature-flag-service/feature-flag-service"; +import { FeatureFlagsState } from "../feature-flag-service/get-feature-flags"; export const AppWebhooks = { - orderCreatedWebhook, - orderFulfilledWebhook, - orderConfirmedWebhook, - orderCancelledWebhook, - orderFullyPaidWebhook, + giftCardSentWebhook, invoiceSentWebhook, notifyWebhook, + orderCancelledWebhook, + orderConfirmedWebhook, + orderCreatedWebhook, + orderFulfilledWebhook, + orderFullyPaidWebhook, }; export type AppWebhook = keyof typeof AppWebhooks; export const eventToWebhookMapping: Record = { + ACCOUNT_CHANGE_EMAIL_CONFIRM: "notifyWebhook", + ACCOUNT_CHANGE_EMAIL_REQUEST: "notifyWebhook", ACCOUNT_CONFIRMATION: "notifyWebhook", ACCOUNT_DELETE: "notifyWebhook", ACCOUNT_PASSWORD_RESET: "notifyWebhook", - ACCOUNT_CHANGE_EMAIL_REQUEST: "notifyWebhook", - ACCOUNT_CHANGE_EMAIL_CONFIRM: "notifyWebhook", + GIFT_CARD_SENT: "giftCardSentWebhook", INVOICE_SENT: "invoiceSentWebhook", ORDER_CANCELLED: "orderCancelledWebhook", ORDER_CONFIRMED: "orderConfirmedWebhook", @@ -42,7 +47,19 @@ const logger = createLogger({ }); export class WebhookManagementService { - constructor(private appBaseUrl: string, private client: Client) {} + private appBaseUrl: string; + private client: Client; + private featureFlagService: FeatureFlagService; + + constructor(args: { + appBaseUrl: string; + client: Client; + featureFlagService: FeatureFlagService; + }) { + this.appBaseUrl = args.appBaseUrl; + this.client = args.client; + this.featureFlagService = args.featureFlagService; + } // Returns list of webhooks registered for the App in the Saleor instance public async getWebhooks() { @@ -70,6 +87,13 @@ export class WebhookManagementService { } public async createWebhook({ webhook }: { webhook: AppWebhook }) { + const flags = await this.featureFlagService.getFeatureFlags(); + + if (!flags.giftCardSentEvent && webhook === "giftCardSentWebhook") { + logger.error(`Attempt to activate Gift Card Sent webhook despite unsupported environment`); + throw new Error("Gift card event is not supported in this environment"); + } + const webhookManifest = AppWebhooks[webhook].getWebhookManifest(this.appBaseUrl); const asyncWebhooks = webhookManifest.asyncEvents; diff --git a/apps/emails-and-messages/src/pages/api/register.ts b/apps/emails-and-messages/src/pages/api/register.ts index 382f71a..578e5b5 100644 --- a/apps/emails-and-messages/src/pages/api/register.ts +++ b/apps/emails-and-messages/src/pages/api/register.ts @@ -1,6 +1,12 @@ import { createAppRegisterHandler } from "@saleor/app-sdk/handlers/next"; -import { saleorApp } from "../../saleor-app"; +import { REQUIRED_SALEOR_VERSION, saleorApp } from "../../saleor-app"; +import { + SaleorVersionCompatibilityValidator, + createGraphQLClient, + createLogger, +} from "@saleor/apps-shared"; +import { fetchSaleorVersion } from "../../modules/feature-flag-service/fetch-saleor-version"; const allowedUrlsPattern = process.env.ALLOWED_DOMAIN_PATTERN; @@ -21,4 +27,54 @@ export default createAppRegisterHandler({ return true; }, ], + async onRequestVerified(req, { authData: { token, saleorApiUrl }, respondWithError }) { + const logger = createLogger({ + name: "onRequestVerified", + }); + + let saleorVersion: string; + + try { + const client = createGraphQLClient({ + saleorApiUrl: saleorApiUrl, + token: token, + }); + + saleorVersion = await fetchSaleorVersion(client); + } catch (e: unknown) { + const message = (e as Error)?.message ?? "Unknown error"; + + logger.debug( + { message, saleorApiUrl }, + "Error during fetching saleor version in onRequestVerified handler" + ); + + throw respondWithError({ + message: "Couldn't communicate with Saleor API", + status: 400, + }); + } + + if (!saleorVersion) { + logger.warn({ saleorApiUrl }, "No version returned from Saleor API"); + throw respondWithError({ + message: "Saleor version couldn't be fetched from the API", + status: 400, + }); + } + + const isVersionValid = new SaleorVersionCompatibilityValidator(REQUIRED_SALEOR_VERSION).isValid( + saleorVersion + ); + + if (!isVersionValid) { + logger.info({ saleorApiUrl }, "Rejecting installation due to incompatible Saleor version"); + throw respondWithError({ + message: `Saleor version (${saleorVersion}) is not compatible with this app version (${REQUIRED_SALEOR_VERSION})`, + status: 400, + }); + } + + logger.info("Saleor version validated successfully"); + }, }); diff --git a/apps/emails-and-messages/src/pages/api/webhooks/gift-card-sent.ts b/apps/emails-and-messages/src/pages/api/webhooks/gift-card-sent.ts new file mode 100644 index 0000000..15227b4 --- /dev/null +++ b/apps/emails-and-messages/src/pages/api/webhooks/gift-card-sent.ts @@ -0,0 +1,118 @@ +import { NextWebhookApiHandler, SaleorAsyncWebhook } from "@saleor/app-sdk/handlers/next"; +import { gql } from "urql"; +import { saleorApp } from "../../../saleor-app"; +import { createLogger, createGraphQLClient } from "@saleor/apps-shared"; +import { GiftCardSentWebhookPayloadFragment } from "../../../../generated/graphql"; +import { sendEventMessages } from "../../../modules/event-handlers/send-event-messages"; + +const GiftCardSentWebhookPayload = gql` + fragment GiftCardSentWebhookPayload on GiftCardSent { + giftCard { + id + code + displayCode + last4CodeChars + created + usedByEmail + isActive + initialBalance { + currency + amount + } + currentBalance { + currency + amount + } + tags { + id + name + } + expiryDate + lastUsedOn + usedBy { + firstName + lastName + email + } + } + sentToEmail + channel + } +`; + +const GiftCardSentGraphqlSubscription = gql` + ${GiftCardSentWebhookPayload} + subscription GiftCardSent { + event { + ...GiftCardSentWebhookPayload + } + } +`; + +export const giftCardSentWebhook = new SaleorAsyncWebhook({ + name: "Gift card sent in Saleor", + webhookPath: "api/webhooks/gift-card-sent", + asyncEvent: "GIFT_CARD_SENT", + apl: saleorApp.apl, + subscriptionQueryAst: GiftCardSentGraphqlSubscription, +}); + +const handler: NextWebhookApiHandler = async ( + req, + res, + context +) => { + const logger = createLogger({ + webhook: giftCardSentWebhook.name, + }); + + logger.debug("Webhook received"); + + const { payload, authData } = context; + const { giftCard } = payload; + + if (!giftCard) { + logger.error("No gift card data payload"); + return res.status(200).end(); + } + + const recipientEmail = payload.sentToEmail; + + if (!recipientEmail?.length) { + logger.error(`The gift card ${giftCard.id} had no email recipient set. Aborting.`); + return res + .status(200) + .json({ error: "Email recipient has not been specified in the event payload." }); + } + + const channel = payload.channel; + + if (!channel) { + logger.error("No channel specified in payload"); + return res.status(200).end(); + } + + const client = createGraphQLClient({ + saleorApiUrl: authData.saleorApiUrl, + token: authData.token, + }); + + await sendEventMessages({ + authData, + channel, + client, + event: "GIFT_CARD_SENT", + payload, + recipientEmail, + }); + + return res.status(200).json({ message: "The event has been handled" }); +}; + +export default giftCardSentWebhook.createHandler(handler); + +export const config = { + api: { + bodyParser: false, + }, +}; diff --git a/apps/emails-and-messages/src/saleor-app.ts b/apps/emails-and-messages/src/saleor-app.ts index 67fb20d..b46146c 100644 --- a/apps/emails-and-messages/src/saleor-app.ts +++ b/apps/emails-and-messages/src/saleor-app.ts @@ -33,3 +33,5 @@ switch (aplType) { export const saleorApp = new SaleorApp({ apl, }); + +export const REQUIRED_SALEOR_VERSION = ">=3.11.7 <4"; diff --git a/packages/shared/src/saleor-version-compatibility-validator.ts b/packages/shared/src/saleor-version-compatibility-validator.ts index 18f7350..945188a 100644 --- a/packages/shared/src/saleor-version-compatibility-validator.ts +++ b/packages/shared/src/saleor-version-compatibility-validator.ts @@ -3,12 +3,14 @@ const semver = require("semver"); export class SaleorVersionCompatibilityValidator { constructor(private appRequiredVersion: string) {} - validateOrThrow(saleorVersion: string) { - const versionIsValid = semver.satisfies(saleorVersion, this.appRequiredVersion, { + isValid(saleorVersion: string) { + return semver.satisfies(saleorVersion, this.appRequiredVersion, { includePrerelease: true, }); + } - if (!versionIsValid) { + validateOrThrow(saleorVersion: string) { + if (!this.isValid(saleorVersion)) { throw new Error( `Your Saleor version (${saleorVersion}) doesn't match App's required version (semver: ${this.appRequiredVersion})` );