From 804e14768b61ab27b20f28fb8d3b3a5861ea7767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dro=C5=84?= Date: Tue, 2 Aug 2022 14:50:37 +0200 Subject: [PATCH] Add sync webhooks for tax calculations (#2204) * Update schema * Build types * Add badgesto MultiAutocompleteSelectField * Reduce z-index on MultiAutocompleteSelectField * Add preview pills for new webhooks * Change grid variant to uniform in Webhook details view to reduce clipping * Update snapshots * Change isWebhookInPreview to more scalable solution --- introspection.json | 962 ++++++++++++++++-- schema.graphql | 527 +++++++++- .../MultiAutocompleteSelectField.tsx | 2 +- .../MultiAutocompleteSelectFieldContent.tsx | 14 +- src/graphql/fragmentTypes.generated.ts | 3 + src/graphql/typePolicies.generated.ts | 59 +- src/graphql/types.generated.ts | 141 ++- .../__snapshots__/Stories.test.ts.snap | 10 +- .../WebhookDetailsPage/WebhookDetailsPage.tsx | 2 +- src/webhooks/{utils.ts => utils.tsx} | 11 + 10 files changed, 1574 insertions(+), 157 deletions(-) rename src/webhooks/{utils.ts => utils.tsx} (73%) diff --git a/introspection.json b/introspection.json index e5d38dd30..e10b9d5b0 100644 --- a/introspection.json +++ b/introspection.json @@ -3956,6 +3956,24 @@ "inputFields": null, "interfaces": null, "enumValues": [ + { + "name": "CUSTOMER_OVERVIEW_CREATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_OVERVIEW_MORE_ACTIONS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CUSTOMER_DETAILS_MORE_ACTIONS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "PRODUCT_OVERVIEW_CREATE", "description": null, @@ -10713,7 +10731,7 @@ "args": [ { "name": "size", - "description": "Size of the image.", + "description": "Size of the image. If not provided, the original image will be returned.", "type": { "kind": "SCALAR", "name": "Int", @@ -10722,6 +10740,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "format", + "description": "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.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "ENUM", + "name": "ThumbnailFormatEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -11972,9 +12002,25 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "slug", + "description": "Slug of the channel.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "name", - "description": null, + "description": "Name of the channel.\n\nRequires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.", "args": [], "type": { "kind": "NON_NULL", @@ -11990,7 +12036,7 @@ }, { "name": "isActive", - "description": null, + "description": "Whether the channel is active.\n\nRequires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.", "args": [], "type": { "kind": "NON_NULL", @@ -12006,23 +12052,7 @@ }, { "name": "currencyCode", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "slug", - "description": null, + "description": "A currency that is assigned to the channel.\n\nRequires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.", "args": [], "type": { "kind": "NON_NULL", @@ -12054,7 +12084,7 @@ }, { "name": "defaultCountry", - "description": "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.\n\nAdded in Saleor 3.1.", + "description": "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.\n\nAdded in Saleor 3.1.\n\nRequires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.", "args": [], "type": { "kind": "NON_NULL", @@ -12070,7 +12100,7 @@ }, { "name": "warehouses", - "description": "List of warehouses assigned to this channel.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "description": "List of warehouses assigned to this channel.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.\n\nRequires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.", "args": [], "type": { "kind": "NON_NULL", @@ -12091,6 +12121,67 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "countries", + "description": "List of shippable countries for the channel.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CountryDisplay", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableShippingMethodsPerCountry", + "description": "Shipping methods that are available for the channel.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "countries", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethodsPerCountry", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -13969,6 +14060,53 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutAddressValidationRules", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "checkRequiredFields", + "description": "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.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "true", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkFieldsFormat", + "description": "Determines if an error should be raised when the provided address doesn't match the expected format. Example: using letters for postal code when the numbers are expected.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "true", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "enableFieldsNormalization", + "description": "Determines if Saleor should apply normalization on address fields. Example: converting city field to uppercase letters.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "true", + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "CheckoutBillingAddressUpdate", @@ -14417,6 +14555,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "validationRules", + "description": "The checkout validation rules that can be changed.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutValidationRules", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -16433,6 +16583,41 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutValidationRules", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "shippingAddress", + "description": "The validation rules that can be applied to provided shipping address data.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutAddressValidationRules", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "billingAddress", + "description": "The validation rules that can be applied to provided billing address data.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutAddressValidationRules", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "ChoiceValue", @@ -16844,7 +17029,7 @@ "args": [ { "name": "size", - "description": "Size of the image.", + "description": "Size of the image. If not provided, the original image will be returned.", "type": { "kind": "SCALAR", "name": "Int", @@ -16853,6 +17038,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "format", + "description": "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.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "ENUM", + "name": "ThumbnailFormatEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -21531,6 +21728,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ACCOUNT_ACTIVATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACCOUNT_DEACTIVATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "PASSWORD_RESET_LINK_SENT", "description": null, @@ -24872,6 +25081,21 @@ "name": "PageUpdated", "ofType": null }, + { + "kind": "OBJECT", + "name": "PermissionGroupCreated", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PermissionGroupDeleted", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PermissionGroupUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "ProductCreated", @@ -50084,6 +50308,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "validationRules", + "description": "The rules for changing validation for received billing address data.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutAddressValidationRules", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -50844,6 +51080,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "validationRules", + "description": "The rules for changing validation for received shipping address data.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutAddressValidationRules", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -53374,7 +53622,7 @@ }, { "name": "staffCreate", - "description": "Creates a new staff user. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Creates a new staff user. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "args": [ { "name": "input", @@ -53403,7 +53651,7 @@ }, { "name": "staffUpdate", - "description": "Updates an existing staff user. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Updates an existing staff user. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "args": [ { "name": "id", @@ -53448,7 +53696,7 @@ }, { "name": "staffDelete", - "description": "Deletes a staff user. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Deletes a staff user. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "args": [ { "name": "id", @@ -53477,7 +53725,7 @@ }, { "name": "staffBulkDelete", - "description": "Deletes staff users. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Deletes staff users. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "args": [ { "name": "ids", @@ -53608,7 +53856,7 @@ }, { "name": "permissionGroupCreate", - "description": "Create new permission group. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Create new permission group. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "args": [ { "name": "input", @@ -53637,7 +53885,7 @@ }, { "name": "permissionGroupUpdate", - "description": "Update permission group. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Update permission group. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "args": [ { "name": "id", @@ -53682,7 +53930,7 @@ }, { "name": "permissionGroupDelete", - "description": "Delete permission group. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Delete permission group. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "args": [ { "name": "id", @@ -59562,11 +59810,11 @@ }, { "name": "thumbnail", - "description": "The main thumbnail for the ordered product.", + "description": null, "args": [ { "name": "size", - "description": "Size of thumbnail.", + "description": "Size of the image. If not provided, the original image will be returned.", "type": { "kind": "SCALAR", "name": "Int", @@ -59575,6 +59823,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "format", + "description": "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.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "ENUM", + "name": "ThumbnailFormatEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -67047,6 +67307,12 @@ "description": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "HANDLE_TAXES", + "description": null, + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null @@ -67054,7 +67320,7 @@ { "kind": "OBJECT", "name": "PermissionGroupCreate", - "description": "Create new permission group. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Create new permission group. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "fields": [ { "name": "permissionGroupErrors", @@ -67189,10 +67455,87 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "PermissionGroupCreated", + "description": null, + "fields": [ + { + "name": "issuedAt", + "description": "Time of the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "version", + "description": "Saleor version that triggered the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issuingPrincipal", + "description": "The user or application that triggered the event.", + "args": [], + "type": { + "kind": "UNION", + "name": "IssuingPrincipal", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "recipient", + "description": "The application receiving the webhook.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroup", + "description": "The permission group the event relates to.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "PermissionGroupDelete", - "description": "Delete permission group. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Delete permission group. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "fields": [ { "name": "permissionGroupErrors", @@ -67260,6 +67603,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "PermissionGroupDeleted", + "description": null, + "fields": [ + { + "name": "issuedAt", + "description": "Time of the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "version", + "description": "Saleor version that triggered the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issuingPrincipal", + "description": "The user or application that triggered the event.", + "args": [], + "type": { + "kind": "UNION", + "name": "IssuingPrincipal", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "recipient", + "description": "The application receiving the webhook.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroup", + "description": "The permission group the event relates to.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "PermissionGroupError", @@ -67516,7 +67936,7 @@ { "kind": "OBJECT", "name": "PermissionGroupUpdate", - "description": "Update permission group. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Update permission group. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "fields": [ { "name": "permissionGroupErrors", @@ -67687,6 +68107,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "PermissionGroupUpdated", + "description": null, + "fields": [ + { + "name": "issuedAt", + "description": "Time of the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "version", + "description": "Saleor version that triggered the event.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issuingPrincipal", + "description": "The user or application that triggered the event.", + "args": [], + "type": { + "kind": "UNION", + "name": "IssuingPrincipal", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "recipient", + "description": "The application receiving the webhook.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "App", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permissionGroup", + "description": "The permission group the event relates to.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Group", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "Plugin", @@ -68981,11 +69478,11 @@ }, { "name": "thumbnail", - "description": "The main thumbnail for a product.", + "description": null, "args": [ { "name": "size", - "description": "Size of thumbnail.", + "description": "Size of the image. If not provided, the original image will be returned.", "type": { "kind": "SCALAR", "name": "Int", @@ -68994,6 +69491,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "format", + "description": "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.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "ENUM", + "name": "ThumbnailFormatEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -71355,7 +71864,7 @@ }, { "name": "stockAvailability", - "description": null, + "description": "Filter by variants having specific stock status.", "type": { "kind": "ENUM", "name": "StockAvailability", @@ -71423,7 +71932,7 @@ }, { "name": "minimalPrice", - "description": null, + "description": "Filter by the lowest variant price after discounts.", "type": { "kind": "INPUT_OBJECT", "name": "PriceRangeInput", @@ -71435,7 +71944,7 @@ }, { "name": "updatedAt", - "description": null, + "description": "Filter by when was the most recent update.", "type": { "kind": "INPUT_OBJECT", "name": "DateTimeRangeInput", @@ -71467,7 +71976,7 @@ }, { "name": "giftCard", - "description": null, + "description": "Filter on whether product is a gift card or not.", "type": { "kind": "SCALAR", "name": "Boolean", @@ -71573,11 +72082,11 @@ }, { "name": "url", - "description": "The URL of the image.", + "description": null, "args": [ { "name": "size", - "description": "Size of the image.", + "description": "Size of the image. If not provided, the original image will be returned.", "type": { "kind": "SCALAR", "name": "Int", @@ -71586,6 +72095,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "format", + "description": "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.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "ENUM", + "name": "ThumbnailFormatEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -71848,11 +72369,11 @@ }, { "name": "url", - "description": "The URL of the media.", + "description": null, "args": [ { "name": "size", - "description": "Size of the image.", + "description": "Size of the image. If not provided, the original image will be returned.", "type": { "kind": "SCALAR", "name": "Int", @@ -71861,6 +72382,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "format", + "description": "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.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "ENUM", + "name": "ThumbnailFormatEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -79407,6 +79940,35 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "transaction", + "description": "Look up a transaction by ID.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.\n\nRequires one of the following permissions: HANDLE_PAYMENTS.", + "args": [ + { + "name": "id", + "description": "ID of a transaction.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TransactionItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "page", "description": "Look up a page by ID or slug.", @@ -81233,7 +81795,7 @@ }, { "name": "channel", - "description": "Look up a channel by ID.\n\nRequires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER.", + "description": "Look up a channel by ID or slug.", "args": [ { "name": "id", @@ -81246,6 +81808,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "slug", + "description": "Slug of the channel.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -86533,6 +87107,53 @@ ], "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ShippingMethodsPerCountry", + "description": "List of shipping methods available for the country.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "countryCode", + "description": "The country code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CountryCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "shippingMethods", + "description": "List of available shipping methods.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingMethod", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "ShippingPostalCodeRulesCreateInputRange", @@ -90493,7 +91114,7 @@ { "kind": "OBJECT", "name": "StaffBulkDelete", - "description": "Deletes staff users. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Deletes staff users. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "fields": [ { "name": "count", @@ -90568,7 +91189,7 @@ { "kind": "OBJECT", "name": "StaffCreate", - "description": "Creates a new staff user. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Creates a new staff user. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "fields": [ { "name": "staffErrors", @@ -90819,7 +91440,7 @@ { "kind": "OBJECT", "name": "StaffDelete", - "description": "Deletes a staff user. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Deletes a staff user. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "fields": [ { "name": "staffErrors", @@ -91442,7 +92063,7 @@ { "kind": "OBJECT", "name": "StaffUpdate", - "description": "Updates an existing staff user. \n\nRequires one of the following permissions: MANAGE_STAFF.", + "description": "Updates an existing staff user. Apps are not allowed to perform this mutation. \n\nRequires one of the following permissions: MANAGE_STAFF.", "fields": [ { "name": "staffErrors", @@ -92368,6 +92989,23 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "ThumbnailFormatEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "WEBP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "TimePeriod", @@ -93610,6 +94248,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "order", + "description": "The related order.\n\nAdded in Saleor 3.6.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "events", "description": "List of all transaction's events.", @@ -95628,7 +96278,7 @@ "args": [ { "name": "size", - "description": "Size of the avatar.", + "description": "Size of the image. If not provided, the original image will be returned.", "type": { "kind": "SCALAR", "name": "Int", @@ -95637,6 +96287,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "format", + "description": "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.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "ENUM", + "name": "ThumbnailFormatEnum", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -98659,6 +99321,26 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "ids", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -102034,43 +102716,43 @@ }, { "name": "DRAFT_ORDER_CREATED", - "description": null, + "description": "A draft order is created.", "isDeprecated": false, "deprecationReason": null }, { "name": "DRAFT_ORDER_UPDATED", - "description": null, + "description": "A draft order is updated.", "isDeprecated": false, "deprecationReason": null }, { "name": "DRAFT_ORDER_DELETED", - "description": null, + "description": "A draft order is deleted.", "isDeprecated": false, "deprecationReason": null }, { "name": "SALE_CREATED", - "description": null, + "description": "A sale is created.", "isDeprecated": false, "deprecationReason": null }, { "name": "SALE_UPDATED", - "description": null, + "description": "A sale is updated.", "isDeprecated": false, "deprecationReason": null }, { "name": "SALE_DELETED", - "description": null, + "description": "A sale is deleted.", "isDeprecated": false, "deprecationReason": null }, { "name": "SALE_TOGGLE", - "description": null, + "description": "A sale is activated or deactivated.", "isDeprecated": false, "deprecationReason": null }, @@ -102166,13 +102848,13 @@ }, { "name": "PRODUCT_VARIANT_OUT_OF_STOCK", - "description": null, + "description": "A product variant is out of stock.", "isDeprecated": false, "deprecationReason": null }, { "name": "PRODUCT_VARIANT_BACK_IN_STOCK", - "description": null, + "description": "A product variant is back in stock.", "isDeprecated": false, "deprecationReason": null }, @@ -102242,6 +102924,24 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PERMISSION_GROUP_CREATED", + "description": "A new permission group is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERMISSION_GROUP_UPDATED", + "description": "A permission group is updated.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERMISSION_GROUP_DELETED", + "description": "A permission group is deleted.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "SHIPPING_PRICE_CREATED", "description": "A new shipping price is created.", @@ -102280,37 +102980,37 @@ }, { "name": "STAFF_CREATED", - "description": "A staff user is deleted", + "description": "A new staff user is created.", "isDeprecated": false, "deprecationReason": null }, { "name": "STAFF_UPDATED", - "description": null, + "description": "A staff user is updated.", "isDeprecated": false, "deprecationReason": null }, { "name": "STAFF_DELETED", - "description": null, + "description": "A staff user is deleted.", "isDeprecated": false, "deprecationReason": null }, { "name": "TRANSACTION_ACTION_REQUEST", - "description": null, + "description": "An action requested for transaction.", "isDeprecated": false, "deprecationReason": null }, { "name": "TRANSLATION_CREATED", - "description": null, + "description": "A new translation is created.", "isDeprecated": false, "deprecationReason": null }, { "name": "TRANSLATION_UPDATED", - "description": null, + "description": "A translation is updated.", "isDeprecated": false, "deprecationReason": null }, @@ -102591,43 +103291,43 @@ }, { "name": "DRAFT_ORDER_CREATED", - "description": null, + "description": "A draft order is created.", "isDeprecated": false, "deprecationReason": null }, { "name": "DRAFT_ORDER_UPDATED", - "description": null, + "description": "A draft order is updated.", "isDeprecated": false, "deprecationReason": null }, { "name": "DRAFT_ORDER_DELETED", - "description": null, + "description": "A draft order is deleted.", "isDeprecated": false, "deprecationReason": null }, { "name": "SALE_CREATED", - "description": null, + "description": "A sale is created.", "isDeprecated": false, "deprecationReason": null }, { "name": "SALE_UPDATED", - "description": null, + "description": "A sale is updated.", "isDeprecated": false, "deprecationReason": null }, { "name": "SALE_DELETED", - "description": null, + "description": "A sale is deleted.", "isDeprecated": false, "deprecationReason": null }, { "name": "SALE_TOGGLE", - "description": null, + "description": "A sale is activated or deactivated.", "isDeprecated": false, "deprecationReason": null }, @@ -102723,13 +103423,13 @@ }, { "name": "PRODUCT_VARIANT_OUT_OF_STOCK", - "description": null, + "description": "A product variant is out of stock.", "isDeprecated": false, "deprecationReason": null }, { "name": "PRODUCT_VARIANT_BACK_IN_STOCK", - "description": null, + "description": "A product variant is back in stock.", "isDeprecated": false, "deprecationReason": null }, @@ -102799,6 +103499,24 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PERMISSION_GROUP_CREATED", + "description": "A new permission group is created.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERMISSION_GROUP_UPDATED", + "description": "A permission group is updated.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERMISSION_GROUP_DELETED", + "description": "A permission group is deleted.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "SHIPPING_PRICE_CREATED", "description": "A new shipping price is created.", @@ -102837,37 +103555,37 @@ }, { "name": "STAFF_CREATED", - "description": "A staff user is deleted", + "description": "A new staff user is created.", "isDeprecated": false, "deprecationReason": null }, { "name": "STAFF_UPDATED", - "description": null, + "description": "A staff user is updated.", "isDeprecated": false, "deprecationReason": null }, { "name": "STAFF_DELETED", - "description": null, + "description": "A staff user is deleted.", "isDeprecated": false, "deprecationReason": null }, { "name": "TRANSACTION_ACTION_REQUEST", - "description": null, + "description": "An action requested for transaction.", "isDeprecated": false, "deprecationReason": null }, { "name": "TRANSLATION_CREATED", - "description": null, + "description": "A new translation is created.", "isDeprecated": false, "deprecationReason": null }, { "name": "TRANSLATION_UPDATED", - "description": null, + "description": "A translation is updated.", "isDeprecated": false, "deprecationReason": null }, @@ -102915,61 +103633,73 @@ }, { "name": "PAYMENT_AUTHORIZE", - "description": null, + "description": "Authorize payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_CAPTURE", - "description": null, + "description": "Capture payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_CONFIRM", - "description": null, + "description": "Confirm payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_LIST_GATEWAYS", - "description": null, + "description": "Listing available payment gateways.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_PROCESS", - "description": null, + "description": "Process payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_REFUND", - "description": null, + "description": "Refund payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_VOID", - "description": null, + "description": "Void payment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_CALCULATE_TAXES", + "description": "Event called for checkout tax calculation.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CALCULATE_TAXES", + "description": "Event called for order tax calculation.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", "isDeprecated": false, "deprecationReason": null }, { "name": "SHIPPING_LIST_METHODS_FOR_CHECKOUT", - "description": null, + "description": "Fetch external shipping methods for checkout.", "isDeprecated": false, "deprecationReason": null }, { "name": "ORDER_FILTER_SHIPPING_METHODS", - "description": null, + "description": "Filter shipping methods for order.", "isDeprecated": false, "deprecationReason": null }, { "name": "CHECKOUT_FILTER_SHIPPING_METHODS", - "description": null, + "description": "Filter shipping methods for checkout.", "isDeprecated": false, "deprecationReason": null } @@ -102986,61 +103716,73 @@ "enumValues": [ { "name": "PAYMENT_AUTHORIZE", - "description": null, + "description": "Authorize payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_CAPTURE", - "description": null, + "description": "Capture payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_CONFIRM", - "description": null, + "description": "Confirm payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_LIST_GATEWAYS", - "description": null, + "description": "Listing available payment gateways.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_PROCESS", - "description": null, + "description": "Process payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_REFUND", - "description": null, + "description": "Refund payment.", "isDeprecated": false, "deprecationReason": null }, { "name": "PAYMENT_VOID", - "description": null, + "description": "Void payment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHECKOUT_CALCULATE_TAXES", + "description": "Event called for checkout tax calculation.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_CALCULATE_TAXES", + "description": "Event called for order tax calculation.\n\nAdded in Saleor 3.6.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", "isDeprecated": false, "deprecationReason": null }, { "name": "SHIPPING_LIST_METHODS_FOR_CHECKOUT", - "description": null, + "description": "Fetch external shipping methods for checkout.", "isDeprecated": false, "deprecationReason": null }, { "name": "ORDER_FILTER_SHIPPING_METHODS", - "description": null, + "description": "Filter shipping methods for order.", "isDeprecated": false, "deprecationReason": null }, { "name": "CHECKOUT_FILTER_SHIPPING_METHODS", - "description": null, + "description": "Filter shipping methods for checkout.", "isDeprecated": false, "deprecationReason": null } @@ -103481,6 +104223,24 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PERMISSION_GROUP_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERMISSION_GROUP_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERMISSION_GROUP_DELETED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "SHIPPING_PRICE_CREATED", "description": null, diff --git a/schema.graphql b/schema.graphql index 96eefa94e..0cf8f0592 100644 --- a/schema.graphql +++ b/schema.graphql @@ -707,6 +707,9 @@ input AppExtensionFilterInput { """All places where app extension can be mounted.""" enum AppExtensionMountEnum { + CUSTOMER_OVERVIEW_CREATE + CUSTOMER_OVERVIEW_MORE_ACTIONS + CUSTOMER_DETAILS_MORE_ACTIONS PRODUCT_OVERVIEW_CREATE PRODUCT_OVERVIEW_MORE_ACTIONS PRODUCT_DETAILS_MORE_ACTIONS @@ -2175,8 +2178,19 @@ type Category implements Node & ObjectWithMetadata { last: Int ): CategoryCountableConnection backgroundImage( - """Size of the image.""" + """ + 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 ): Image """Returns translated category fields for the given language code.""" @@ -2441,11 +2455,31 @@ type CategoryUpdated implements Event { """Represents channel.""" type Channel implements Node { id: ID! - name: String! - isActive: Boolean! - currencyCode: String! + + """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. @@ -2457,6 +2491,8 @@ type Channel implements Node { 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! @@ -2466,8 +2502,28 @@ type Channel implements Node { Added in Saleor 3.5. Note: this API is currently in Feature Preview and can be subject to changes at later point. + + Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. """ warehouses: [Warehouse!]! + + """ + 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!] } """ @@ -2883,6 +2939,23 @@ type CheckoutAddPromoCode { errors: [CheckoutError!]! } +input CheckoutAddressValidationRules { + """ + 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. + """ + checkRequiredFields: Boolean = true + + """ + Determines if an error should be raised when the provided address doesn't match the expected format. Example: using letters for postal code when the numbers are expected. + """ + checkFieldsFormat: Boolean = true + + """ + Determines if Saleor should apply normalization on address fields. Example: converting city field to uppercase letters. + """ + enableFieldsNormalization: Boolean = true +} + """Update billing address in the existing checkout.""" type CheckoutBillingAddressUpdate { """An updated checkout.""" @@ -2959,6 +3032,15 @@ input CheckoutCreateInput { """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 } type CheckoutCreated implements Event { @@ -3329,6 +3411,18 @@ type CheckoutUpdated implements Event { checkout: Checkout } +input CheckoutValidationRules { + """ + The validation rules that can be applied to provided shipping address data. + """ + shippingAddress: CheckoutAddressValidationRules + + """ + The validation rules that can be applied to provided billing address data. + """ + billingAddress: CheckoutAddressValidationRules +} + type ChoiceValue { raw: String verbose: String @@ -3428,8 +3522,19 @@ type Collection implements Node & ObjectWithMetadata { last: Int ): ProductCountableConnection backgroundImage( - """Size of the image.""" + """ + 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 ): Image """Returns translated collection fields for the given language code.""" @@ -4357,6 +4462,8 @@ type CustomerEvent implements Node { """An enumeration.""" enum CustomerEventsEnum { ACCOUNT_CREATED + ACCOUNT_ACTIVATED + ACCOUNT_DEACTIVATED PASSWORD_RESET_LINK_SENT PASSWORD_RESET EMAIL_CHANGED_REQUEST @@ -10793,6 +10900,15 @@ type Mutation { 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 """ @@ -11119,6 +11235,15 @@ type Mutation { 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 """Updates the shipping method of the checkout.""" @@ -11873,7 +11998,7 @@ type Mutation { ): CustomerBulkDelete """ - Creates a new staff user. + Creates a new staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -11883,7 +12008,7 @@ type Mutation { ): StaffCreate """ - Updates an existing staff user. + Updates an existing staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -11896,7 +12021,7 @@ type Mutation { ): StaffUpdate """ - Deletes a staff user. + Deletes a staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -11906,7 +12031,7 @@ type Mutation { ): StaffDelete """ - Deletes staff users. + Deletes staff users. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -11946,7 +12071,7 @@ type Mutation { ): UserBulkSetActive """ - Create new permission group. + Create new permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -11956,7 +12081,7 @@ type Mutation { ): PermissionGroupCreate """ - Update permission group. + Update permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -11969,7 +12094,7 @@ type Mutation { ): PermissionGroupUpdate """ - Delete permission group. + Delete permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -13058,11 +13183,20 @@ type OrderLine implements Node & ObjectWithMetadata { unitDiscountReason: String taxRate: Float! digitalContentUrl: DigitalContentUrl - - """The main thumbnail for the ordered product.""" thumbnail( - """Size of thumbnail.""" + """ + 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 ): Image """Price of the single item in the order line.""" @@ -14660,10 +14794,11 @@ enum PermissionEnum { MANAGE_TRANSLATIONS MANAGE_CHECKOUTS HANDLE_CHECKOUTS + HANDLE_TAXES } """ -Create new permission group. +Create new permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -14684,8 +14819,31 @@ input PermissionGroupCreateInput { name: String! } +type PermissionGroupCreated 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 permission group the event relates to. + + Added in Saleor 3.6. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + permissionGroup: Group +} + """ -Delete permission group. +Delete permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -14695,6 +14853,29 @@ type PermissionGroupDelete { group: Group } +type PermissionGroupDeleted 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 permission group the event relates to. + + Added in Saleor 3.6. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + permissionGroup: Group +} + type PermissionGroupError { """ Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. @@ -14745,7 +14926,7 @@ input PermissionGroupSortingInput { } """ -Update permission group. +Update permission group. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -14772,6 +14953,29 @@ input PermissionGroupUpdateInput { removeUsers: [ID!] } +type PermissionGroupUpdated 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 permission group the event relates to. + + Added in Saleor 3.6. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + permissionGroup: Group +} + """Plugin.""" type Plugin { """Identifier of the plugin.""" @@ -15036,11 +15240,20 @@ type Product implements Node & ObjectWithMetadata { 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.") - - """The main thumbnail for a product.""" thumbnail( - """Size of thumbnail.""" + """ + 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 ): Image """ @@ -15563,14 +15776,22 @@ input ProductFilterInput { categories: [ID!] hasCategory: Boolean attributes: [AttributeInput!] + + """Filter by variants having specific stock status.""" stockAvailability: StockAvailability stocks: ProductStockFilterInput search: String metadata: [MetadataFilter!] price: PriceRangeInput + + """Filter by the lowest variant price after discounts.""" minimalPrice: PriceRangeInput + + """Filter by when was the most recent update.""" updatedAt: DateTimeRangeInput productTypes: [ID!] + + """Filter on whether product is a gift card or not.""" giftCard: Boolean ids: [ID!] hasPreorderedVariants: Boolean @@ -15595,11 +15816,20 @@ type ProductImage { The new relative sorting position of the item (from -inf to +inf). 1 moves the item one position forward, -1 moves the item one position backward, 0 leaves the item unchanged. """ sortOrder: Int - - """The URL of the image.""" url( - """Size of the image.""" + """ + Size 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! } @@ -15649,11 +15879,20 @@ type ProductMedia implements Node { alt: String! type: ProductMediaType! oembedData: JSONString! - - """The URL of the media.""" url( - """Size of the image.""" + """ + 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! } @@ -17436,6 +17675,20 @@ type Query { last: Int ): PaymentCountableConnection + """ + 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: ID! + ): TransactionItem + """Look up a page by ID or slug.""" page( """ID of the page.""" @@ -17987,14 +18240,19 @@ type Query { last: Int ): CheckoutLineCountableConnection - """ - Look up a channel by ID. - - Requires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_STAFF_USER. - """ + """Look up a channel by ID or slug.""" 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 """ @@ -19197,6 +19455,21 @@ enum ShippingMethodTypeEnum { WEIGHT } +""" +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.""" + countryCode: CountryCode! + + """List of available shipping methods.""" + shippingMethods: [ShippingMethod!] +} + input ShippingPostalCodeRulesCreateInputRange { """Start range of the postal code.""" start: String! @@ -20115,7 +20388,7 @@ input SiteDomainInput { } """ -Deletes staff users. +Deletes staff users. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -20127,7 +20400,7 @@ type StaffBulkDelete { } """ -Creates a new staff user. +Creates a new staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -20186,7 +20459,7 @@ type StaffCreated implements Event { } """ -Deletes a staff user. +Deletes a staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -20313,7 +20586,7 @@ type StaffNotificationRecipientUpdate { } """ -Updates an existing staff user. +Updates an existing staff user. Apps are not allowed to perform this mutation. Requires one of the following permissions: MANAGE_STAFF. """ @@ -20523,6 +20796,11 @@ type TaxedMoneyRange { stop: TaxedMoney } +"""An enumeration.""" +enum ThumbnailFormatEnum { + WEBP +} + type TimePeriod { """The length of the period.""" amount: Int! @@ -20795,6 +21073,13 @@ type TransactionItem implements Node & ObjectWithMetadata { """Reference of transaction.""" reference: String! + """ + The related order. + + Added in Saleor 3.6. + """ + order: Order + """List of all transaction's events.""" events: [TransactionEvent!]! } @@ -21208,8 +21493,19 @@ type User implements Node & ObjectWithMetadata { """List of user's permission groups which user can manage.""" editableGroups: [Group!] avatar( - """Size of the avatar.""" + """ + 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 ): Image """ @@ -21795,6 +22091,7 @@ input VoucherFilterInput { started: DateTimeRangeInput search: String metadata: [MetadataFilter!] + ids: [ID!] } input VoucherInput { @@ -22590,12 +22887,26 @@ enum WebhookEventTypeAsyncEnum { """An order is fulfilled.""" ORDER_FULFILLED + + """A draft order is created.""" DRAFT_ORDER_CREATED + + """A draft order is updated.""" DRAFT_ORDER_UPDATED + + """A draft order is deleted.""" DRAFT_ORDER_DELETED + + """A sale is created.""" SALE_CREATED + + """A sale is updated.""" SALE_UPDATED + + """A sale is deleted.""" SALE_DELETED + + """A sale is activated or deactivated.""" SALE_TOGGLE """An invoice for order requested.""" @@ -22642,7 +22953,11 @@ enum WebhookEventTypeAsyncEnum { """A product variant is deleted.""" PRODUCT_VARIANT_DELETED + + """A product variant is out of stock.""" PRODUCT_VARIANT_OUT_OF_STOCK + + """A product variant is back in stock.""" PRODUCT_VARIANT_BACK_IN_STOCK """A new checkout is created.""" @@ -22680,6 +22995,15 @@ enum WebhookEventTypeAsyncEnum { """A page type is deleted.""" PAGE_TYPE_DELETED + """A new permission group is created.""" + PERMISSION_GROUP_CREATED + + """A permission group is updated.""" + PERMISSION_GROUP_UPDATED + + """A permission group is deleted.""" + PERMISSION_GROUP_DELETED + """A new shipping price is created.""" SHIPPING_PRICE_CREATED @@ -22698,12 +23022,22 @@ enum WebhookEventTypeAsyncEnum { """A shipping zone is deleted.""" SHIPPING_ZONE_DELETED - """A staff user is deleted""" + """A new staff user is created.""" STAFF_CREATED + + """A staff user is updated.""" STAFF_UPDATED + + """A staff user is deleted.""" STAFF_DELETED + + """An action requested for transaction.""" TRANSACTION_ACTION_REQUEST + + """A new translation is created.""" TRANSLATION_CREATED + + """A translation is updated.""" TRANSLATION_UPDATED """A new warehouse created.""" @@ -22844,12 +23178,26 @@ enum WebhookEventTypeEnum { """An order is fulfilled.""" ORDER_FULFILLED + + """A draft order is created.""" DRAFT_ORDER_CREATED + + """A draft order is updated.""" DRAFT_ORDER_UPDATED + + """A draft order is deleted.""" DRAFT_ORDER_DELETED + + """A sale is created.""" SALE_CREATED + + """A sale is updated.""" SALE_UPDATED + + """A sale is deleted.""" SALE_DELETED + + """A sale is activated or deactivated.""" SALE_TOGGLE """An invoice for order requested.""" @@ -22896,7 +23244,11 @@ enum WebhookEventTypeEnum { """A product variant is deleted.""" PRODUCT_VARIANT_DELETED + + """A product variant is out of stock.""" PRODUCT_VARIANT_OUT_OF_STOCK + + """A product variant is back in stock.""" PRODUCT_VARIANT_BACK_IN_STOCK """A new checkout is created.""" @@ -22934,6 +23286,15 @@ enum WebhookEventTypeEnum { """A page type is deleted.""" PAGE_TYPE_DELETED + """A new permission group is created.""" + PERMISSION_GROUP_CREATED + + """A permission group is updated.""" + PERMISSION_GROUP_UPDATED + + """A permission group is deleted.""" + PERMISSION_GROUP_DELETED + """A new shipping price is created.""" SHIPPING_PRICE_CREATED @@ -22952,12 +23313,22 @@ enum WebhookEventTypeEnum { """A shipping zone is deleted.""" SHIPPING_ZONE_DELETED - """A staff user is deleted""" + """A new staff user is created.""" STAFF_CREATED + + """A staff user is updated.""" STAFF_UPDATED + + """A staff user is deleted.""" STAFF_DELETED + + """An action requested for transaction.""" TRANSACTION_ACTION_REQUEST + + """A new translation is created.""" TRANSLATION_CREATED + + """A translation is updated.""" TRANSLATION_UPDATED """A new warehouse created.""" @@ -22980,29 +23351,104 @@ enum WebhookEventTypeEnum { """An observability event is created.""" OBSERVABILITY + + """Authorize payment.""" PAYMENT_AUTHORIZE + + """Capture payment.""" PAYMENT_CAPTURE + + """Confirm payment.""" PAYMENT_CONFIRM + + """Listing available payment gateways.""" PAYMENT_LIST_GATEWAYS + + """Process payment.""" PAYMENT_PROCESS + + """Refund payment.""" PAYMENT_REFUND + + """Void payment.""" PAYMENT_VOID + + """ + Event called for checkout tax calculation. + + Added in Saleor 3.6. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + CHECKOUT_CALCULATE_TAXES + + """ + 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.""" SHIPPING_LIST_METHODS_FOR_CHECKOUT + + """Filter shipping methods for order.""" ORDER_FILTER_SHIPPING_METHODS + + """Filter shipping methods for checkout.""" CHECKOUT_FILTER_SHIPPING_METHODS } """Enum determining type of webhook.""" enum WebhookEventTypeSyncEnum { + """Authorize payment.""" PAYMENT_AUTHORIZE + + """Capture payment.""" PAYMENT_CAPTURE + + """Confirm payment.""" PAYMENT_CONFIRM + + """Listing available payment gateways.""" PAYMENT_LIST_GATEWAYS + + """Process payment.""" PAYMENT_PROCESS + + """Refund payment.""" PAYMENT_REFUND + + """Void payment.""" PAYMENT_VOID + + """ + Event called for checkout tax calculation. + + Added in Saleor 3.6. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + CHECKOUT_CALCULATE_TAXES + + """ + 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.""" SHIPPING_LIST_METHODS_FOR_CHECKOUT + + """Filter shipping methods for order.""" ORDER_FILTER_SHIPPING_METHODS + + """Filter shipping methods for checkout.""" CHECKOUT_FILTER_SHIPPING_METHODS } @@ -23079,6 +23525,9 @@ enum WebhookSampleEventTypeEnum { PAGE_TYPE_CREATED PAGE_TYPE_UPDATED PAGE_TYPE_DELETED + PERMISSION_GROUP_CREATED + PERMISSION_GROUP_UPDATED + PERMISSION_GROUP_DELETED SHIPPING_PRICE_CREATED SHIPPING_PRICE_UPDATED SHIPPING_PRICE_DELETED diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx index c8b2a2043..7438158b6 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx @@ -235,7 +235,7 @@ const MultiAutocompleteSelectFieldComponent: React.FC diff --git a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx index 81e59527e..e9f67872b 100644 --- a/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx +++ b/src/components/MultiAutocompleteSelectField/MultiAutocompleteSelectFieldContent.tsx @@ -6,6 +6,7 @@ import { Typography, } from "@material-ui/core"; import AddIcon from "@material-ui/icons/Add"; +import HorizontalSpacer from "@saleor/apps/components/HorizontalSpacer"; import Checkbox from "@saleor/components/Checkbox"; import useElementScroll, { isScrolledToBottom, @@ -14,7 +15,7 @@ import { makeStyles } from "@saleor/macaw-ui"; import { FetchMoreProps } from "@saleor/types"; import classNames from "classnames"; import { GetItemPropsOptions } from "downshift"; -import React from "react"; +import React, { ReactNode } from "react"; import SVG from "react-inlinesvg"; import { FormattedMessage } from "react-intl"; @@ -32,6 +33,7 @@ export interface MultiAutocompleteChoiceType { label: string; value: any; disabled?: boolean; + badge?: ReactNode; } export interface MultiAutocompleteSelectFieldContentProps extends Partial { @@ -123,6 +125,7 @@ const useStyles = makeStyles( whiteSpace: "normal", }, menuItemLabel: { + display: "flex", overflowWrap: "break-word", }, progress: {}, @@ -264,7 +267,11 @@ const MultiAutocompleteSelectFieldContent: React.FC - {value.label} + + {value.badge} + {value.badge && } + {value.label} + ))} {displayValues?.length > 0 && choices.length > 0 && ( @@ -297,7 +304,10 @@ const MultiAutocompleteSelectFieldContent: React.FC + + {suggestion.badge} + {suggestion.badge && } {suggestion.label} diff --git a/src/graphql/fragmentTypes.generated.ts b/src/graphql/fragmentTypes.generated.ts index 6117fc85a..68cdb8b31 100644 --- a/src/graphql/fragmentTypes.generated.ts +++ b/src/graphql/fragmentTypes.generated.ts @@ -69,6 +69,9 @@ "PageTypeDeleted", "PageTypeUpdated", "PageUpdated", + "PermissionGroupCreated", + "PermissionGroupDeleted", + "PermissionGroupUpdated", "ProductCreated", "ProductDeleted", "ProductUpdated", diff --git a/src/graphql/typePolicies.generated.ts b/src/graphql/typePolicies.generated.ts index ac4a2d065..ebb88d357 100644 --- a/src/graphql/typePolicies.generated.ts +++ b/src/graphql/typePolicies.generated.ts @@ -716,16 +716,18 @@ export type CategoryUpdatedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, category?: FieldPolicy | FieldReadFunction }; -export type ChannelKeySpecifier = ('id' | 'name' | 'isActive' | 'currencyCode' | 'slug' | 'hasOrders' | 'defaultCountry' | 'warehouses' | ChannelKeySpecifier)[]; +export type ChannelKeySpecifier = ('id' | 'slug' | 'name' | 'isActive' | 'currencyCode' | 'hasOrders' | 'defaultCountry' | 'warehouses' | 'countries' | 'availableShippingMethodsPerCountry' | ChannelKeySpecifier)[]; export type ChannelFieldPolicy = { id?: FieldPolicy | FieldReadFunction, + slug?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction, isActive?: FieldPolicy | FieldReadFunction, currencyCode?: FieldPolicy | FieldReadFunction, - slug?: FieldPolicy | FieldReadFunction, hasOrders?: FieldPolicy | FieldReadFunction, defaultCountry?: FieldPolicy | FieldReadFunction, - warehouses?: FieldPolicy | FieldReadFunction + warehouses?: FieldPolicy | FieldReadFunction, + countries?: FieldPolicy | FieldReadFunction, + availableShippingMethodsPerCountry?: FieldPolicy | FieldReadFunction }; export type ChannelActivateKeySpecifier = ('channel' | 'channelErrors' | 'errors' | ChannelActivateKeySpecifier)[]; export type ChannelActivateFieldPolicy = { @@ -3240,12 +3242,28 @@ export type PermissionGroupCreateFieldPolicy = { errors?: FieldPolicy | FieldReadFunction, group?: FieldPolicy | FieldReadFunction }; +export type PermissionGroupCreatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'permissionGroup' | PermissionGroupCreatedKeySpecifier)[]; +export type PermissionGroupCreatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + permissionGroup?: FieldPolicy | FieldReadFunction +}; export type PermissionGroupDeleteKeySpecifier = ('permissionGroupErrors' | 'errors' | 'group' | PermissionGroupDeleteKeySpecifier)[]; export type PermissionGroupDeleteFieldPolicy = { permissionGroupErrors?: FieldPolicy | FieldReadFunction, errors?: FieldPolicy | FieldReadFunction, group?: FieldPolicy | FieldReadFunction }; +export type PermissionGroupDeletedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'permissionGroup' | PermissionGroupDeletedKeySpecifier)[]; +export type PermissionGroupDeletedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + permissionGroup?: FieldPolicy | FieldReadFunction +}; export type PermissionGroupErrorKeySpecifier = ('field' | 'message' | 'code' | 'permissions' | 'users' | PermissionGroupErrorKeySpecifier)[]; export type PermissionGroupErrorFieldPolicy = { field?: FieldPolicy | FieldReadFunction, @@ -3260,6 +3278,14 @@ export type PermissionGroupUpdateFieldPolicy = { errors?: FieldPolicy | FieldReadFunction, group?: FieldPolicy | FieldReadFunction }; +export type PermissionGroupUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'permissionGroup' | PermissionGroupUpdatedKeySpecifier)[]; +export type PermissionGroupUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + permissionGroup?: FieldPolicy | FieldReadFunction +}; export type PluginKeySpecifier = ('id' | 'name' | 'description' | 'globalConfiguration' | 'channelConfigurations' | PluginKeySpecifier)[]; export type PluginFieldPolicy = { id?: FieldPolicy | FieldReadFunction, @@ -3818,7 +3844,7 @@ export type ProductVariantUpdatedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, productVariant?: FieldPolicy | FieldReadFunction }; -export type QueryKeySpecifier = ('webhook' | 'webhookEvents' | 'webhookSamplePayload' | 'warehouse' | 'warehouses' | 'translations' | 'translation' | 'stock' | 'stocks' | 'shop' | 'orderSettings' | 'giftCardSettings' | 'shippingZone' | 'shippingZones' | 'digitalContent' | 'digitalContents' | 'categories' | 'category' | 'collection' | 'collections' | 'product' | 'products' | 'productType' | 'productTypes' | 'productVariant' | 'productVariants' | 'reportProductSales' | 'payment' | 'payments' | 'page' | 'pages' | 'pageType' | 'pageTypes' | 'homepageEvents' | 'order' | 'orders' | 'draftOrders' | 'ordersTotal' | 'orderByToken' | 'menu' | 'menus' | 'menuItem' | 'menuItems' | 'giftCard' | 'giftCards' | 'giftCardCurrencies' | 'giftCardTags' | 'plugin' | 'plugins' | 'sale' | 'sales' | 'voucher' | 'vouchers' | 'exportFile' | 'exportFiles' | 'taxTypes' | 'checkout' | 'checkouts' | 'checkoutLines' | 'channel' | 'channels' | 'attributes' | 'attribute' | 'appsInstallations' | 'apps' | 'app' | 'appExtensions' | 'appExtension' | 'addressValidationRules' | 'address' | 'customers' | 'permissionGroups' | 'permissionGroup' | 'me' | 'staffUsers' | 'user' | '_entities' | '_service' | QueryKeySpecifier)[]; +export type QueryKeySpecifier = ('webhook' | 'webhookEvents' | 'webhookSamplePayload' | 'warehouse' | 'warehouses' | 'translations' | 'translation' | 'stock' | 'stocks' | 'shop' | 'orderSettings' | 'giftCardSettings' | 'shippingZone' | 'shippingZones' | 'digitalContent' | 'digitalContents' | 'categories' | 'category' | 'collection' | 'collections' | 'product' | 'products' | 'productType' | 'productTypes' | 'productVariant' | 'productVariants' | 'reportProductSales' | 'payment' | 'payments' | 'transaction' | 'page' | 'pages' | 'pageType' | 'pageTypes' | 'homepageEvents' | 'order' | 'orders' | 'draftOrders' | 'ordersTotal' | 'orderByToken' | 'menu' | 'menus' | 'menuItem' | 'menuItems' | 'giftCard' | 'giftCards' | 'giftCardCurrencies' | 'giftCardTags' | 'plugin' | 'plugins' | 'sale' | 'sales' | 'voucher' | 'vouchers' | 'exportFile' | 'exportFiles' | 'taxTypes' | 'checkout' | 'checkouts' | 'checkoutLines' | 'channel' | 'channels' | 'attributes' | 'attribute' | 'appsInstallations' | 'apps' | 'app' | 'appExtensions' | 'appExtension' | 'addressValidationRules' | 'address' | 'customers' | 'permissionGroups' | 'permissionGroup' | 'me' | 'staffUsers' | 'user' | '_entities' | '_service' | QueryKeySpecifier)[]; export type QueryFieldPolicy = { webhook?: FieldPolicy | FieldReadFunction, webhookEvents?: FieldPolicy | FieldReadFunction, @@ -3849,6 +3875,7 @@ export type QueryFieldPolicy = { reportProductSales?: FieldPolicy | FieldReadFunction, payment?: FieldPolicy | FieldReadFunction, payments?: FieldPolicy | FieldReadFunction, + transaction?: FieldPolicy | FieldReadFunction, page?: FieldPolicy | FieldReadFunction, pages?: FieldPolicy | FieldReadFunction, pageType?: FieldPolicy | FieldReadFunction, @@ -4161,6 +4188,11 @@ export type ShippingMethodTypeFieldPolicy = { maximumDeliveryDays?: FieldPolicy | FieldReadFunction, minimumDeliveryDays?: FieldPolicy | FieldReadFunction }; +export type ShippingMethodsPerCountryKeySpecifier = ('countryCode' | 'shippingMethods' | ShippingMethodsPerCountryKeySpecifier)[]; +export type ShippingMethodsPerCountryFieldPolicy = { + countryCode?: FieldPolicy | FieldReadFunction, + shippingMethods?: FieldPolicy | FieldReadFunction +}; export type ShippingPriceBulkDeleteKeySpecifier = ('count' | 'shippingErrors' | 'errors' | ShippingPriceBulkDeleteKeySpecifier)[]; export type ShippingPriceBulkDeleteFieldPolicy = { count?: FieldPolicy | FieldReadFunction, @@ -4570,7 +4602,7 @@ export type TransactionEventFieldPolicy = { reference?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction }; -export type TransactionItemKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'createdAt' | 'modifiedAt' | 'actions' | 'authorizedAmount' | 'refundedAmount' | 'voidedAmount' | 'chargedAmount' | 'status' | 'type' | 'reference' | 'events' | TransactionItemKeySpecifier)[]; +export type TransactionItemKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'createdAt' | 'modifiedAt' | 'actions' | 'authorizedAmount' | 'refundedAmount' | 'voidedAmount' | 'chargedAmount' | 'status' | 'type' | 'reference' | 'order' | 'events' | TransactionItemKeySpecifier)[]; export type TransactionItemFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -4589,6 +4621,7 @@ export type TransactionItemFieldPolicy = { status?: FieldPolicy | FieldReadFunction, type?: FieldPolicy | FieldReadFunction, reference?: FieldPolicy | FieldReadFunction, + order?: FieldPolicy | FieldReadFunction, events?: FieldPolicy | FieldReadFunction }; export type TransactionRequestActionKeySpecifier = ('transaction' | 'errors' | TransactionRequestActionKeySpecifier)[]; @@ -6598,10 +6631,18 @@ export type StrictTypedTypePolicies = { keyFields?: false | PermissionGroupCreateKeySpecifier | (() => undefined | PermissionGroupCreateKeySpecifier), fields?: PermissionGroupCreateFieldPolicy, }, + PermissionGroupCreated?: Omit & { + keyFields?: false | PermissionGroupCreatedKeySpecifier | (() => undefined | PermissionGroupCreatedKeySpecifier), + fields?: PermissionGroupCreatedFieldPolicy, + }, PermissionGroupDelete?: Omit & { keyFields?: false | PermissionGroupDeleteKeySpecifier | (() => undefined | PermissionGroupDeleteKeySpecifier), fields?: PermissionGroupDeleteFieldPolicy, }, + PermissionGroupDeleted?: Omit & { + keyFields?: false | PermissionGroupDeletedKeySpecifier | (() => undefined | PermissionGroupDeletedKeySpecifier), + fields?: PermissionGroupDeletedFieldPolicy, + }, PermissionGroupError?: Omit & { keyFields?: false | PermissionGroupErrorKeySpecifier | (() => undefined | PermissionGroupErrorKeySpecifier), fields?: PermissionGroupErrorFieldPolicy, @@ -6610,6 +6651,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | PermissionGroupUpdateKeySpecifier | (() => undefined | PermissionGroupUpdateKeySpecifier), fields?: PermissionGroupUpdateFieldPolicy, }, + PermissionGroupUpdated?: Omit & { + keyFields?: false | PermissionGroupUpdatedKeySpecifier | (() => undefined | PermissionGroupUpdatedKeySpecifier), + fields?: PermissionGroupUpdatedFieldPolicy, + }, Plugin?: Omit & { keyFields?: false | PluginKeySpecifier | (() => undefined | PluginKeySpecifier), fields?: PluginFieldPolicy, @@ -7022,6 +7067,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | ShippingMethodTypeKeySpecifier | (() => undefined | ShippingMethodTypeKeySpecifier), fields?: ShippingMethodTypeFieldPolicy, }, + ShippingMethodsPerCountry?: Omit & { + keyFields?: false | ShippingMethodsPerCountryKeySpecifier | (() => undefined | ShippingMethodsPerCountryKeySpecifier), + fields?: ShippingMethodsPerCountryFieldPolicy, + }, ShippingPriceBulkDelete?: Omit & { keyFields?: false | ShippingPriceBulkDeleteKeySpecifier | (() => undefined | ShippingPriceBulkDeleteKeySpecifier), fields?: ShippingPriceBulkDeleteFieldPolicy, diff --git a/src/graphql/types.generated.ts b/src/graphql/types.generated.ts index 319d0ea2e..defe0bfa7 100644 --- a/src/graphql/types.generated.ts +++ b/src/graphql/types.generated.ts @@ -180,6 +180,9 @@ export type AppExtensionFilterInput = { /** All places where app extension can be mounted. */ export enum AppExtensionMountEnum { + CUSTOMER_OVERVIEW_CREATE = 'CUSTOMER_OVERVIEW_CREATE', + CUSTOMER_OVERVIEW_MORE_ACTIONS = 'CUSTOMER_OVERVIEW_MORE_ACTIONS', + CUSTOMER_DETAILS_MORE_ACTIONS = 'CUSTOMER_DETAILS_MORE_ACTIONS', PRODUCT_OVERVIEW_CREATE = 'PRODUCT_OVERVIEW_CREATE', PRODUCT_OVERVIEW_MORE_ACTIONS = 'PRODUCT_OVERVIEW_MORE_ACTIONS', PRODUCT_DETAILS_MORE_ACTIONS = 'PRODUCT_DETAILS_MORE_ACTIONS', @@ -682,6 +685,15 @@ export type ChannelUpdateInput = { removeWarehouses?: InputMaybe>; }; +export type CheckoutAddressValidationRules = { + /** 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. */ + checkRequiredFields?: InputMaybe; + /** Determines if an error should be raised when the provided address doesn't match the expected format. Example: using letters for postal code when the numbers are expected. */ + checkFieldsFormat?: InputMaybe; + /** Determines if Saleor should apply normalization on address fields. Example: converting city field to uppercase letters. */ + enableFieldsNormalization?: InputMaybe; +}; + export type CheckoutCreateInput = { /** Slug of a channel in which to create a checkout. */ channel?: InputMaybe; @@ -695,6 +707,14 @@ export type CheckoutCreateInput = { billingAddress?: InputMaybe; /** Checkout language code. */ languageCode?: InputMaybe; + /** + * 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?: InputMaybe; }; /** An enumeration. */ @@ -782,6 +802,13 @@ export type CheckoutSortingInput = { field: CheckoutSortField; }; +export type CheckoutValidationRules = { + /** The validation rules that can be applied to provided shipping address data. */ + shippingAddress?: InputMaybe; + /** The validation rules that can be applied to provided billing address data. */ + billingAddress?: InputMaybe; +}; + export type CollectionChannelListingUpdateInput = { /** List of channels to which the collection should be assigned. */ addChannels?: InputMaybe>; @@ -1192,6 +1219,8 @@ export type CountryFilterInput = { /** An enumeration. */ export enum CustomerEventsEnum { ACCOUNT_CREATED = 'ACCOUNT_CREATED', + ACCOUNT_ACTIVATED = 'ACCOUNT_ACTIVATED', + ACCOUNT_DEACTIVATED = 'ACCOUNT_DEACTIVATED', PASSWORD_RESET_LINK_SENT = 'PASSWORD_RESET_LINK_SENT', PASSWORD_RESET = 'PASSWORD_RESET', EMAIL_CHANGED_REQUEST = 'EMAIL_CHANGED_REQUEST', @@ -3412,7 +3441,8 @@ export enum PermissionEnum { MANAGE_SETTINGS = 'MANAGE_SETTINGS', MANAGE_TRANSLATIONS = 'MANAGE_TRANSLATIONS', MANAGE_CHECKOUTS = 'MANAGE_CHECKOUTS', - HANDLE_CHECKOUTS = 'HANDLE_CHECKOUTS' + HANDLE_CHECKOUTS = 'HANDLE_CHECKOUTS', + HANDLE_TAXES = 'HANDLE_TAXES' } export type PermissionGroupCreateInput = { @@ -3688,14 +3718,18 @@ export type ProductFilterInput = { categories?: InputMaybe>; hasCategory?: InputMaybe; attributes?: InputMaybe>; + /** Filter by variants having specific stock status. */ stockAvailability?: InputMaybe; stocks?: InputMaybe; search?: InputMaybe; metadata?: InputMaybe>; price?: InputMaybe; + /** Filter by the lowest variant price after discounts. */ minimalPrice?: InputMaybe; + /** Filter by when was the most recent update. */ updatedAt?: InputMaybe; productTypes?: InputMaybe>; + /** Filter on whether product is a gift card or not. */ giftCard?: InputMaybe; ids?: InputMaybe>; hasPreorderedVariants?: InputMaybe; @@ -4443,6 +4477,11 @@ export enum StorePaymentMethodEnum { NONE = 'NONE' } +/** An enumeration. */ +export enum ThumbnailFormatEnum { + WEBP = 'WEBP' +} + export type TimePeriodInputType = { /** The length of the period. */ amount: Scalars['Int']; @@ -4718,6 +4757,7 @@ export type VoucherFilterInput = { started?: InputMaybe; search?: InputMaybe; metadata?: InputMaybe>; + ids?: InputMaybe>; }; export type VoucherInput = { @@ -4996,12 +5036,19 @@ export enum WebhookEventTypeAsyncEnum { ORDER_CANCELLED = 'ORDER_CANCELLED', /** An order is fulfilled. */ ORDER_FULFILLED = 'ORDER_FULFILLED', + /** A draft order is created. */ DRAFT_ORDER_CREATED = 'DRAFT_ORDER_CREATED', + /** A draft order is updated. */ DRAFT_ORDER_UPDATED = 'DRAFT_ORDER_UPDATED', + /** A draft order is deleted. */ DRAFT_ORDER_DELETED = 'DRAFT_ORDER_DELETED', + /** A sale is created. */ SALE_CREATED = 'SALE_CREATED', + /** A sale is updated. */ SALE_UPDATED = 'SALE_UPDATED', + /** A sale is deleted. */ SALE_DELETED = 'SALE_DELETED', + /** A sale is activated or deactivated. */ SALE_TOGGLE = 'SALE_TOGGLE', /** An invoice for order requested. */ INVOICE_REQUESTED = 'INVOICE_REQUESTED', @@ -5033,7 +5080,9 @@ export enum WebhookEventTypeAsyncEnum { PRODUCT_VARIANT_UPDATED = 'PRODUCT_VARIANT_UPDATED', /** A product variant is deleted. */ PRODUCT_VARIANT_DELETED = 'PRODUCT_VARIANT_DELETED', + /** A product variant is out of stock. */ PRODUCT_VARIANT_OUT_OF_STOCK = 'PRODUCT_VARIANT_OUT_OF_STOCK', + /** A product variant is back in stock. */ PRODUCT_VARIANT_BACK_IN_STOCK = 'PRODUCT_VARIANT_BACK_IN_STOCK', /** A new checkout is created. */ CHECKOUT_CREATED = 'CHECKOUT_CREATED', @@ -5057,6 +5106,12 @@ export enum WebhookEventTypeAsyncEnum { PAGE_TYPE_UPDATED = 'PAGE_TYPE_UPDATED', /** A page type is deleted. */ PAGE_TYPE_DELETED = 'PAGE_TYPE_DELETED', + /** A new permission group is created. */ + PERMISSION_GROUP_CREATED = 'PERMISSION_GROUP_CREATED', + /** A permission group is updated. */ + PERMISSION_GROUP_UPDATED = 'PERMISSION_GROUP_UPDATED', + /** A permission group is deleted. */ + PERMISSION_GROUP_DELETED = 'PERMISSION_GROUP_DELETED', /** A new shipping price is created. */ SHIPPING_PRICE_CREATED = 'SHIPPING_PRICE_CREATED', /** A shipping price is updated. */ @@ -5069,12 +5124,17 @@ export enum WebhookEventTypeAsyncEnum { SHIPPING_ZONE_UPDATED = 'SHIPPING_ZONE_UPDATED', /** A shipping zone is deleted. */ SHIPPING_ZONE_DELETED = 'SHIPPING_ZONE_DELETED', - /** A staff user is deleted */ + /** A new staff user is created. */ STAFF_CREATED = 'STAFF_CREATED', + /** A staff user is updated. */ STAFF_UPDATED = 'STAFF_UPDATED', + /** A staff user is deleted. */ STAFF_DELETED = 'STAFF_DELETED', + /** An action requested for transaction. */ TRANSACTION_ACTION_REQUEST = 'TRANSACTION_ACTION_REQUEST', + /** A new translation is created. */ TRANSLATION_CREATED = 'TRANSLATION_CREATED', + /** A translation is updated. */ TRANSLATION_UPDATED = 'TRANSLATION_UPDATED', /** A new warehouse created. */ WAREHOUSE_CREATED = 'WAREHOUSE_CREATED', @@ -5168,12 +5228,19 @@ export enum WebhookEventTypeEnum { ORDER_CANCELLED = 'ORDER_CANCELLED', /** An order is fulfilled. */ ORDER_FULFILLED = 'ORDER_FULFILLED', + /** A draft order is created. */ DRAFT_ORDER_CREATED = 'DRAFT_ORDER_CREATED', + /** A draft order is updated. */ DRAFT_ORDER_UPDATED = 'DRAFT_ORDER_UPDATED', + /** A draft order is deleted. */ DRAFT_ORDER_DELETED = 'DRAFT_ORDER_DELETED', + /** A sale is created. */ SALE_CREATED = 'SALE_CREATED', + /** A sale is updated. */ SALE_UPDATED = 'SALE_UPDATED', + /** A sale is deleted. */ SALE_DELETED = 'SALE_DELETED', + /** A sale is activated or deactivated. */ SALE_TOGGLE = 'SALE_TOGGLE', /** An invoice for order requested. */ INVOICE_REQUESTED = 'INVOICE_REQUESTED', @@ -5205,7 +5272,9 @@ export enum WebhookEventTypeEnum { PRODUCT_VARIANT_UPDATED = 'PRODUCT_VARIANT_UPDATED', /** A product variant is deleted. */ PRODUCT_VARIANT_DELETED = 'PRODUCT_VARIANT_DELETED', + /** A product variant is out of stock. */ PRODUCT_VARIANT_OUT_OF_STOCK = 'PRODUCT_VARIANT_OUT_OF_STOCK', + /** A product variant is back in stock. */ PRODUCT_VARIANT_BACK_IN_STOCK = 'PRODUCT_VARIANT_BACK_IN_STOCK', /** A new checkout is created. */ CHECKOUT_CREATED = 'CHECKOUT_CREATED', @@ -5229,6 +5298,12 @@ export enum WebhookEventTypeEnum { PAGE_TYPE_UPDATED = 'PAGE_TYPE_UPDATED', /** A page type is deleted. */ PAGE_TYPE_DELETED = 'PAGE_TYPE_DELETED', + /** A new permission group is created. */ + PERMISSION_GROUP_CREATED = 'PERMISSION_GROUP_CREATED', + /** A permission group is updated. */ + PERMISSION_GROUP_UPDATED = 'PERMISSION_GROUP_UPDATED', + /** A permission group is deleted. */ + PERMISSION_GROUP_DELETED = 'PERMISSION_GROUP_DELETED', /** A new shipping price is created. */ SHIPPING_PRICE_CREATED = 'SHIPPING_PRICE_CREATED', /** A shipping price is updated. */ @@ -5241,12 +5316,17 @@ export enum WebhookEventTypeEnum { SHIPPING_ZONE_UPDATED = 'SHIPPING_ZONE_UPDATED', /** A shipping zone is deleted. */ SHIPPING_ZONE_DELETED = 'SHIPPING_ZONE_DELETED', - /** A staff user is deleted */ + /** A new staff user is created. */ STAFF_CREATED = 'STAFF_CREATED', + /** A staff user is updated. */ STAFF_UPDATED = 'STAFF_UPDATED', + /** A staff user is deleted. */ STAFF_DELETED = 'STAFF_DELETED', + /** An action requested for transaction. */ TRANSACTION_ACTION_REQUEST = 'TRANSACTION_ACTION_REQUEST', + /** A new translation is created. */ TRANSLATION_CREATED = 'TRANSLATION_CREATED', + /** A translation is updated. */ TRANSLATION_UPDATED = 'TRANSLATION_UPDATED', /** A new warehouse created. */ WAREHOUSE_CREATED = 'WAREHOUSE_CREATED', @@ -5262,29 +5342,81 @@ export enum WebhookEventTypeEnum { VOUCHER_DELETED = 'VOUCHER_DELETED', /** An observability event is created. */ OBSERVABILITY = 'OBSERVABILITY', + /** Authorize payment. */ PAYMENT_AUTHORIZE = 'PAYMENT_AUTHORIZE', + /** Capture payment. */ PAYMENT_CAPTURE = 'PAYMENT_CAPTURE', + /** Confirm payment. */ PAYMENT_CONFIRM = 'PAYMENT_CONFIRM', + /** Listing available payment gateways. */ PAYMENT_LIST_GATEWAYS = 'PAYMENT_LIST_GATEWAYS', + /** Process payment. */ PAYMENT_PROCESS = 'PAYMENT_PROCESS', + /** Refund payment. */ PAYMENT_REFUND = 'PAYMENT_REFUND', + /** Void payment. */ PAYMENT_VOID = 'PAYMENT_VOID', + /** + * Event called for checkout tax calculation. + * + * Added in Saleor 3.6. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + CHECKOUT_CALCULATE_TAXES = '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 = 'ORDER_CALCULATE_TAXES', + /** Fetch external shipping methods for checkout. */ SHIPPING_LIST_METHODS_FOR_CHECKOUT = 'SHIPPING_LIST_METHODS_FOR_CHECKOUT', + /** Filter shipping methods for order. */ ORDER_FILTER_SHIPPING_METHODS = 'ORDER_FILTER_SHIPPING_METHODS', + /** Filter shipping methods for checkout. */ CHECKOUT_FILTER_SHIPPING_METHODS = 'CHECKOUT_FILTER_SHIPPING_METHODS' } /** Enum determining type of webhook. */ export enum WebhookEventTypeSyncEnum { + /** Authorize payment. */ PAYMENT_AUTHORIZE = 'PAYMENT_AUTHORIZE', + /** Capture payment. */ PAYMENT_CAPTURE = 'PAYMENT_CAPTURE', + /** Confirm payment. */ PAYMENT_CONFIRM = 'PAYMENT_CONFIRM', + /** Listing available payment gateways. */ PAYMENT_LIST_GATEWAYS = 'PAYMENT_LIST_GATEWAYS', + /** Process payment. */ PAYMENT_PROCESS = 'PAYMENT_PROCESS', + /** Refund payment. */ PAYMENT_REFUND = 'PAYMENT_REFUND', + /** Void payment. */ PAYMENT_VOID = 'PAYMENT_VOID', + /** + * Event called for checkout tax calculation. + * + * Added in Saleor 3.6. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + CHECKOUT_CALCULATE_TAXES = '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 = 'ORDER_CALCULATE_TAXES', + /** Fetch external shipping methods for checkout. */ SHIPPING_LIST_METHODS_FOR_CHECKOUT = 'SHIPPING_LIST_METHODS_FOR_CHECKOUT', + /** Filter shipping methods for order. */ ORDER_FILTER_SHIPPING_METHODS = 'ORDER_FILTER_SHIPPING_METHODS', + /** Filter shipping methods for checkout. */ CHECKOUT_FILTER_SHIPPING_METHODS = 'CHECKOUT_FILTER_SHIPPING_METHODS' } @@ -5361,6 +5493,9 @@ export enum WebhookSampleEventTypeEnum { PAGE_TYPE_CREATED = 'PAGE_TYPE_CREATED', PAGE_TYPE_UPDATED = 'PAGE_TYPE_UPDATED', PAGE_TYPE_DELETED = 'PAGE_TYPE_DELETED', + PERMISSION_GROUP_CREATED = 'PERMISSION_GROUP_CREATED', + PERMISSION_GROUP_UPDATED = 'PERMISSION_GROUP_UPDATED', + PERMISSION_GROUP_DELETED = 'PERMISSION_GROUP_DELETED', SHIPPING_PRICE_CREATED = 'SHIPPING_PRICE_CREATED', SHIPPING_PRICE_UPDATED = 'SHIPPING_PRICE_UPDATED', SHIPPING_PRICE_DELETED = 'SHIPPING_PRICE_DELETED', diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index ea1c8a382..b8808bb0e 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -26541,7 +26541,7 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details default 1`] = `
= ({ {appName} - +
+ ([ + WebhookEventTypeSyncEnum.CHECKOUT_CALCULATE_TAXES, + WebhookEventTypeSyncEnum.ORDER_CALCULATE_TAXES, + ] as WebhookEventType[]).includes(webhook); + export function mapSyncEventsToChoices( events: WebhookEventTypeSyncEnum[], ): MultiAutocompleteChoiceType[] { return events.map(event => ({ label: event, value: event, + badge: isWebhookInPreview(event) ? : undefined, })); }