diff --git a/introspection.json b/introspection.json index ce5832eac..baf265376 100644 --- a/introspection.json +++ b/introspection.json @@ -683,6 +683,26 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "metadata", + "description": "Fields required to update the user metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -15967,6 +15987,287 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "CheckoutCreateFromOrder", + "description": "Create new checkout from existing order.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "fields": [ + { + "name": "unavailableVariants", + "description": "Variants that were not attached to the checkout.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutCreateFromOrderUnavailableVariant", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "checkout", + "description": "Created checkout.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "errors", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CheckoutCreateFromOrderError", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutCreateFromOrderError", + "description": null, + "fields": [ + { + "name": "field", + "description": "Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CheckoutCreateFromOrderErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CheckoutCreateFromOrderErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "GRAPHQL_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANNEL_INACTIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TAX_ERROR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CheckoutCreateFromOrderUnavailableVariant", + "description": null, + "fields": [ + { + "name": "message", + "description": "The error message.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "code", + "description": "The error code.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CheckoutCreateFromOrderUnavailableVariantErrorCode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantId", + "description": "Variant ID that is unavailable.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lineId", + "description": "Order line ID that is unavailable.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CheckoutCreateFromOrderUnavailableVariantErrorCode", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NOT_FOUND", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_UNAVAILABLE_FOR_PURCHASE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNAVAILABLE_VARIANT_IN_CHANNEL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRODUCT_NOT_PUBLISHED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "QUANTITY_GREATER_THAN_LIMIT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INSUFFICIENT_STOCK", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "CheckoutCreateInput", @@ -24427,6 +24728,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the user metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "Fields required to update the user private metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "languageCode", "description": "User language code.", @@ -27769,11 +28110,26 @@ "name": "OrderFullyPaid", "ofType": null }, + { + "kind": "OBJECT", + "name": "OrderFullyRefunded", + "ofType": null + }, { "kind": "OBJECT", "name": "OrderMetadataUpdated", "ofType": null }, + { + "kind": "OBJECT", + "name": "OrderPaid", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "OrderRefunded", + "ofType": null + }, { "kind": "OBJECT", "name": "OrderUpdated", @@ -35525,6 +35881,42 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "accessibleChannels", + "description": "List of channels the group has access to.\n\nAdded in Saleor 3.14.\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": "Channel", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "restrictedAccessToChannels", + "description": "Determine if the group have restricted access to channels.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -36149,6 +36541,46 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "metadata", + "description": "Fields required to update the invoice metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "Fields required to update the invoice private metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -45969,7 +46401,7 @@ }, { "name": "webhookUpdate", - "description": "Updates a webhook subscription. \n\nRequires one of the following permissions: MANAGE_APPS.", + "description": "Updates a webhook subscription. \n\nRequires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.", "args": [ { "name": "id", @@ -48294,7 +48726,7 @@ "args": [ { "name": "errorPolicy", - "description": "Policies of error handling.", + "description": "Policies of error handling. DEFAULT: REJECT_EVERYTHING", "type": { "kind": "ENUM", "name": "ErrorPolicyEnum", @@ -55032,6 +55464,35 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "checkoutCreateFromOrder", + "description": "Create new checkout from existing order.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [ + { + "name": "id", + "description": "ID of a order that will be used to create the checkout.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutCreateFromOrder", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "checkoutCustomerAttach", "description": "Sets the customer as the owner of the checkout. \n\nRequires one of the following permissions: AUTHENTICATED_APP, AUTHENTICATED_USER.", @@ -57114,11 +57575,11 @@ }, { "name": "tokenRefresh", - "description": "Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie.", + "description": "Refresh JWT token. Mutation tries to take refreshToken from the input. If it fails it will try to take `refreshToken` from the http-only cookie `refreshToken`. `csrfToken` is required when `refreshToken` is provided as a cookie.", "args": [ { "name": "csrfToken", - "description": "CSRF token required to refresh token. This argument is required when refreshToken is provided as a cookie.", + "description": "CSRF token required to refresh token. This argument is required when `refreshToken` is provided as a cookie.", "type": { "kind": "SCALAR", "name": "String", @@ -62450,6 +62911,12 @@ "inputFields": null, "interfaces": null, "enumValues": [ + { + "name": "SALE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "VOUCHER", "description": null, @@ -64797,6 +65264,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "OrderFullyRefunded", + "description": "The order is fully refunded.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "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": "order", + "description": "The order the event relates to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "OrderGrantRefundCreate", @@ -66604,6 +67148,83 @@ ], "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "OrderPaid", + "description": "Payment has been made. The order may be partially or fully paid.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "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": "order", + "description": "The order the event relates to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "OrderRefund", @@ -66836,6 +67457,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "OrderRefunded", + "description": "The order received a refund. The order may be partially or fully refunded.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "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": "order", + "description": "The order the event relates to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Order", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "OrderReturnFulfillmentLineInput", @@ -74585,6 +75283,26 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "addChannels", + "description": "List of channels to assign to this group.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "name", "description": "Group name.", @@ -74600,6 +75318,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "restrictedAccessToChannels", + "description": "Determine if the group has restricted access to channels. DEFAULT: False\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false", + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -74915,6 +75645,26 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "channels", + "description": "List of chnnels IDs which causes the error.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -74930,6 +75680,18 @@ "inputFields": null, "interfaces": null, "enumValues": [ + { + "name": "REQUIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNIQUE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "ASSIGN_NON_STAFF_MEMBER", "description": null, @@ -74967,13 +75729,7 @@ "deprecationReason": null }, { - "name": "REQUIRED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNIQUE", + "name": "OUT_OF_SCOPE_CHANNEL", "description": null, "isDeprecated": false, "deprecationReason": null @@ -75201,6 +75957,26 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "addChannels", + "description": "List of channels to assign to this group.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "name", "description": "Group name.", @@ -75252,6 +76028,38 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "removeChannels", + "description": "List of channels to unassign from this group.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "restrictedAccessToChannels", + "description": "Determine if the group has restricted access to channels.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -85214,6 +86022,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "path", + "description": "Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field.\n\nAdded in Saleor 3.14.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "attributes", "description": "List of attributes IDs which causes the error.", @@ -92549,7 +93369,7 @@ }, { "name": "address", - "description": "Look up an address by ID.", + "description": "Look up an address by ID.\n\nRequires one of the following permissions: MANAGE_USERS, OWNER.", "args": [ { "name": "id", @@ -93018,7 +93838,7 @@ { "kind": "OBJECT", "name": "RefreshToken", - "description": "Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie.", + "description": "Refresh JWT token. Mutation tries to take refreshToken from the input. If it fails it will try to take `refreshToken` from the http-only cookie `refreshToken`. `csrfToken` is required when `refreshToken` is provided as a cookie.", "fields": [ { "name": "token", @@ -100673,6 +101493,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "enableAccountConfirmationByEmail", + "description": "Determines if account confirmation by email is enabled.\n\nAdded in Saleor 3.14.\n\nRequires one of the following permissions: MANAGE_SETTINGS.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "limits", "description": "Resource limitations and current usage if any set for a shop\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER.", @@ -101278,6 +102110,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "enableAccountConfirmationByEmail", + "description": "Enable automatic account confirmation by email.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "includeTaxesInPrices", "description": "Include taxes in prices. \n\nDEPRECATED: this field will be removed in Saleor 4.0. Use `taxConfigurationUpdate` mutation to configure this setting per channel or country.", @@ -101824,6 +102668,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the user metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "Fields required to update the user private metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "addGroups", "description": "List of permission group IDs to which user should be assigned.", @@ -102698,6 +103582,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the user metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "Fields required to update the user private metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "addGroups", "description": "List of permission group IDs to which user should be assigned.", @@ -111089,6 +112013,46 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "metadata", + "description": "Fields required to update the invoice metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "Fields required to update the invoice private metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "interfaces": null, @@ -111957,6 +112921,42 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "accessibleChannels", + "description": "List of channels the user has access to. The sum of channels from all user groups. If at least one group has `restrictedAccessToChannels` set to False - all channels are returned.\n\nAdded in Saleor 3.14.\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": "Channel", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "restrictedAccessToChannels", + "description": "Determine if user have restricted access to channels. False if at least one user group has `restrictedAccessToChannels` set to False.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "avatar", "description": null, @@ -112573,6 +113573,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the user metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privateMetadata", + "description": "Fields required to update the user private metadata.\n\nAdded in Saleor 3.14.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MetadataInput", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "languageCode", "description": "User language code.", @@ -118898,12 +119938,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_PAID", + "description": "Payment has been made. The order may be partially or fully paid.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "ORDER_FULLY_PAID", "description": "Payment is made and an order is fully paid.", "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_REFUNDED", + "description": "The order received a refund. The order may be partially or fully refunded.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULLY_REFUNDED", + "description": "The order is fully refunded.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "ORDER_UPDATED", "description": "An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED.", @@ -119599,12 +120657,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_PAID", + "description": "Payment has been made. The order may be partially or fully paid.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "ORDER_FULLY_PAID", "description": "Payment is made and an order is fully paid.", "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_REFUNDED", + "description": "The order received a refund. The order may be partially or fully refunded.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULLY_REFUNDED", + "description": "The order is fully refunded.\n\nAdded in Saleor 3.14.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "ORDER_UPDATED", "description": "An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED.", @@ -120521,12 +121597,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_PAID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "ORDER_FULLY_PAID", "description": null, "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_REFUNDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORDER_FULLY_REFUNDED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "ORDER_UPDATED", "description": null, @@ -121176,7 +122270,7 @@ { "kind": "OBJECT", "name": "WebhookUpdate", - "description": "Updates a webhook subscription. \n\nRequires one of the following permissions: MANAGE_APPS.", + "description": "Updates a webhook subscription. \n\nRequires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP.", "fields": [ { "name": "webhookErrors", diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index f2366307b..421672b64 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -302,6 +302,10 @@ "context": "OrderCustomer Fulfillment from Local Warehouse", "string": "Fulfill from Local Stock" }, + "/xJSe8": { + "context": "When users confirm their email account, all previous anonymous orders placed under the same email would be added to their order history.", + "string": "When users confirm their email account, all previous anonymous orders placed under the same email would be added to their order history." + }, "/xXvjF": { "context": "section header", "string": "Unfulfilled" @@ -6684,6 +6688,10 @@ "context": "option", "string": "Gift card product type" }, + "kpRxSA": { + "context": "Require email confirmation link", + "string": "Require email confirmation link" + }, "kuo4fW": { "context": "dialog title", "string": "Capture manual transaction" @@ -7389,6 +7397,10 @@ "context": "notes about customer header", "string": "Notes" }, + "qNeXG1": { + "context": "User registration", + "string": "User registration" + }, "qT6YYk": { "context": "order line total price", "string": "Total" @@ -7930,6 +7942,10 @@ "context": "error message", "string": "Invoice not found" }, + "uRfta0": { + "context": "Enable email confirmation", + "string": "Enable email confirmation" + }, "uT5L4h": { "context": "cancel button label", "string": "Cancel" diff --git a/schema.graphql b/schema.graphql index ecc98769e..a29994591 100644 --- a/schema.graphql +++ b/schema.graphql @@ -121,6 +121,13 @@ input AccountInput { """Shipping address of the customer.""" defaultShippingAddress: AddressInput + + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] } """Register a new user.""" @@ -3575,6 +3582,68 @@ type CheckoutCreate { checkout: Checkout } +""" +Create new checkout from existing order. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type CheckoutCreateFromOrder { + """Variants that were not attached to the checkout.""" + unavailableVariants: [CheckoutCreateFromOrderUnavailableVariant!] + + """Created checkout.""" + checkout: Checkout + errors: [CheckoutCreateFromOrderError!]! +} + +type CheckoutCreateFromOrderError { + """ + Name of a field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + """ + field: String + + """The error message.""" + message: String + + """The error code.""" + code: CheckoutCreateFromOrderErrorCode! +} + +"""An enumeration.""" +enum CheckoutCreateFromOrderErrorCode { + GRAPHQL_ERROR + INVALID + ORDER_NOT_FOUND + CHANNEL_INACTIVE + TAX_ERROR +} + +type CheckoutCreateFromOrderUnavailableVariant { + """The error message.""" + message: String! + + """The error code.""" + code: CheckoutCreateFromOrderUnavailableVariantErrorCode! + + """Variant ID that is unavailable.""" + variantId: ID! + + """Order line ID that is unavailable.""" + lineId: ID! +} + +"""An enumeration.""" +enum CheckoutCreateFromOrderUnavailableVariantErrorCode { + NOT_FOUND + PRODUCT_UNAVAILABLE_FOR_PURCHASE + UNAVAILABLE_VARIANT_IN_CHANNEL + PRODUCT_NOT_PUBLISHED + QUANTITY_GREATER_THAN_LIMIT + INSUFFICIENT_STOCK +} + input CheckoutCreateInput { """Slug of a channel in which to create a checkout.""" channel: String @@ -5321,6 +5390,20 @@ input CustomerInput { """A note about the user.""" note: String + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the user private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] + """User language code.""" languageCode: LanguageCodeEnum @@ -7626,6 +7709,24 @@ type Group implements Node { True, if the currently authenticated user has rights to manage a group. """ userCanManage: Boolean! + + """ + List of channels the group has access to. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + accessibleChannels: [Channel!] + + """ + Determine if the group have restricted access to channels. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + restrictedAccessToChannels: Boolean! } type GroupCountableConnection { @@ -7749,6 +7850,20 @@ input InvoiceCreateInput { """URL of an invoice to download.""" url: String! + + """ + Fields required to update the invoice metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the invoice private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] } """ @@ -9613,7 +9728,7 @@ type Mutation { """ Updates a webhook subscription. - Requires one of the following permissions: MANAGE_APPS. + Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ webhookUpdate( """ID of a webhook to update.""" @@ -10332,7 +10447,7 @@ type Mutation { Requires one of the following permissions: MANAGE_PRODUCTS. """ productBulkCreate( - """Policies of error handling.""" + """Policies of error handling. DEFAULT: REJECT_EVERYTHING""" errorPolicy: ErrorPolicyEnum """Input list of products to create.""" @@ -12397,6 +12512,18 @@ type Mutation { input: CheckoutCreateInput! ): CheckoutCreate + """ + Create new checkout from existing order. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + checkoutCreateFromOrder( + """ID of a order that will be used to create the checkout.""" + id: ID! + ): CheckoutCreateFromOrder + """ Sets the customer as the owner of the checkout. @@ -13148,11 +13275,11 @@ type Mutation { ): CreateToken """ - Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie. + Refresh JWT token. Mutation tries to take refreshToken from the input. If it fails it will try to take `refreshToken` from the http-only cookie `refreshToken`. `csrfToken` is required when `refreshToken` is provided as a cookie. """ tokenRefresh( """ - CSRF token required to refresh token. This argument is required when refreshToken is provided as a cookie. + CSRF token required to refresh token. This argument is required when `refreshToken` is provided as a cookie. """ csrfToken: String @@ -14401,6 +14528,7 @@ type OrderDiscountDelete { """An enumeration.""" enum OrderDiscountType { + SALE VOUCHER MANUAL } @@ -14860,6 +14988,30 @@ type OrderFullyPaid implements Event { order: Order } +""" +The order is fully refunded. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type OrderFullyRefunded implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + """ Adds granted refund to the order. @@ -15280,6 +15432,30 @@ enum OrderOriginEnum { REISSUE } +""" +Payment has been made. The order may be partially or fully paid. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type OrderPaid implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + """ Refund an order. @@ -15324,6 +15500,30 @@ input OrderRefundProductsInput { includeShippingCosts: Boolean = false } +""" +The order received a refund. The order may be partially or fully refunded. + +Added in Saleor 3.14. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type OrderRefunded implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The order the event relates to.""" + order: Order +} + input OrderReturnFulfillmentLineInput { """The ID of the fulfillment line to return.""" fulfillmentLineId: ID! @@ -17101,8 +17301,26 @@ input PermissionGroupCreateInput { """List of users to assign to this group.""" addUsers: [ID!] + """ + List of channels to assign to this group. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + addChannels: [ID!] + """Group name.""" name: String! + + """ + Determine if the group has restricted access to channels. DEFAULT: False + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + restrictedAccessToChannels: Boolean = false } """ @@ -17177,18 +17395,22 @@ type PermissionGroupError { """List of user IDs which causes the error.""" users: [ID!] + + """List of chnnels IDs which causes the error.""" + channels: [ID!] } """An enumeration.""" enum PermissionGroupErrorCode { + REQUIRED + UNIQUE ASSIGN_NON_STAFF_MEMBER DUPLICATED_INPUT_ITEM CANNOT_REMOVE_FROM_LAST_GROUP LEFT_NOT_MANAGEABLE_PERMISSION OUT_OF_SCOPE_PERMISSION OUT_OF_SCOPE_USER - REQUIRED - UNIQUE + OUT_OF_SCOPE_CHANNEL } input PermissionGroupFilterInput { @@ -17228,6 +17450,15 @@ input PermissionGroupUpdateInput { """List of users to assign to this group.""" addUsers: [ID!] + """ + List of channels to assign to this group. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + addChannels: [ID!] + """Group name.""" name: String @@ -17236,6 +17467,24 @@ input PermissionGroupUpdateInput { """List of users to unassign from this group.""" removeUsers: [ID!] + + """ + List of channels to unassign from this group. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + removeChannels: [ID!] + + """ + Determine if the group has restricted access to channels. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + restrictedAccessToChannels: Boolean } """ @@ -19572,6 +19821,13 @@ type ProductVariantBulkError { """The error code.""" code: ProductVariantBulkErrorCode! + """ + Path to field that caused the error. A value of `null` indicates that the error isn't associated with a particular field. + + Added in Saleor 3.14. + """ + path: String + """List of attributes IDs which causes the error.""" attributes: [ID!] @@ -21705,7 +21961,11 @@ type Query { cityArea: String ): AddressValidationData - """Look up an address by ID.""" + """ + Look up an address by ID. + + Requires one of the following permissions: MANAGE_USERS, OWNER. + """ address( """ID of an address.""" id: ID! @@ -21844,7 +22104,7 @@ type ReducedRate { } """ -Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie. +Refresh JWT token. Mutation tries to take refreshToken from the input. If it fails it will try to take `refreshToken` from the http-only cookie `refreshToken`. `csrfToken` is required when `refreshToken` is provided as a cookie. """ type RefreshToken { """JWT token, required to authenticate.""" @@ -23546,6 +23806,15 @@ type Shop { """ staffNotificationRecipients: [StaffNotificationRecipient!] + """ + Determines if account confirmation by email is enabled. + + Added in Saleor 3.14. + + Requires one of the following permissions: MANAGE_SETTINGS. + """ + enableAccountConfirmationByEmail: Boolean + """ Resource limitations and current usage if any set for a shop @@ -23703,6 +23972,13 @@ input ShopSettingsInput { """ limitQuantityPerCheckout: Int + """ + Enable automatic account confirmation by email. + + Added in Saleor 3.14. + """ + enableAccountConfirmationByEmail: Boolean + """ Include taxes in prices. @@ -23811,6 +24087,20 @@ input StaffCreateInput { """A note about the user.""" note: String + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the user private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] + """List of permission group IDs to which user should be assigned.""" addGroups: [ID!] @@ -23997,6 +24287,20 @@ input StaffUpdateInput { """A note about the user.""" note: String + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the user private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] + """List of permission group IDs to which user should be assigned.""" addGroups: [ID!] @@ -26124,6 +26428,20 @@ input UpdateInvoiceInput { """URL of an invoice to download.""" url: String + + """ + Fields required to update the invoice metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the invoice private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] } """ @@ -26321,6 +26639,24 @@ type User implements Node & ObjectWithMetadata { """List of user's permission groups which user can manage.""" editableGroups: [Group!] + + """ + List of channels the user has access to. The sum of channels from all user groups. If at least one group has `restrictedAccessToChannels` set to False - all channels are returned. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + accessibleChannels: [Channel!] + + """ + Determine if user have restricted access to channels. False if at least one user group has `restrictedAccessToChannels` set to False. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + restrictedAccessToChannels: Boolean! avatar( """ Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended). @@ -26439,6 +26775,20 @@ input UserCreateInput { """A note about the user.""" note: String + """ + Fields required to update the user metadata. + + Added in Saleor 3.14. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the user private metadata. + + Added in Saleor 3.14. + """ + privateMetadata: [MetadataInput!] + """User language code.""" languageCode: LanguageCodeEnum @@ -27885,9 +28235,36 @@ enum WebhookEventTypeAsyncEnum { """ ORDER_CONFIRMED + """ + Payment has been made. The order may be partially or fully paid. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_PAID + """Payment is made and an order is fully paid.""" ORDER_FULLY_PAID + """ + The order received a refund. The order may be partially or fully refunded. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_REFUNDED + + """ + The order is fully refunded. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_FULLY_REFUNDED + """ An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. """ @@ -28311,9 +28688,36 @@ enum WebhookEventTypeEnum { """ ORDER_CONFIRMED + """ + Payment has been made. The order may be partially or fully paid. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_PAID + """Payment is made and an order is fully paid.""" ORDER_FULLY_PAID + """ + The order received a refund. The order may be partially or fully refunded. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_REFUNDED + + """ + The order is fully refunded. + + Added in Saleor 3.14. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_FULLY_REFUNDED + """ An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. """ @@ -28805,7 +29209,10 @@ enum WebhookSampleEventTypeEnum { MENU_ITEM_DELETED ORDER_CREATED ORDER_CONFIRMED + ORDER_PAID ORDER_FULLY_PAID + ORDER_REFUNDED + ORDER_FULLY_REFUNDED ORDER_UPDATED ORDER_CANCELLED ORDER_EXPIRED @@ -28931,7 +29338,7 @@ enum WebhookTriggerErrorCode { """ Updates a webhook subscription. -Requires one of the following permissions: MANAGE_APPS. +Requires one of the following permissions: MANAGE_APPS, AUTHENTICATED_APP. """ type WebhookUpdate { webhookErrors: [WebhookError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") diff --git a/src/components/CompanyAddressInput/CompanyAddressInput.tsx b/src/components/CompanyAddressInput/CompanyAddressInput.tsx index 67c11ba06..28fe4fba7 100644 --- a/src/components/CompanyAddressInput/CompanyAddressInput.tsx +++ b/src/components/CompanyAddressInput/CompanyAddressInput.tsx @@ -1,38 +1,24 @@ -import { Card, CardContent } from "@material-ui/core"; -import { makeStyles } from "@saleor/macaw-ui"; -import clsx from "clsx"; import React from "react"; -import CardTitle from "../CardTitle"; +import { DashboardCard } from "../Card"; import CompanyAddressForm, { CompanyAddressFormProps, } from "./CompanyAddressForm"; interface CompanyAddressInputProps extends CompanyAddressFormProps { - className?: string; header: string; } -const useStyles = makeStyles( - { - root: { - overflow: "visible", - }, - }, - { name: "CompanyAddressInput" }, -); - const CompanyAddressInput: React.FC = props => { - const { className, header, ...formProps } = props; - const classes = useStyles(props); + const { header, ...formProps } = props; return ( - - - + + {header} + - - + + ); }; CompanyAddressInput.displayName = "CompanyAddressInput"; diff --git a/src/fragments/shop.ts b/src/fragments/shop.ts index 96c2618c5..c3d2da499 100644 --- a/src/fragments/shop.ts +++ b/src/fragments/shop.ts @@ -55,5 +55,6 @@ export const shopFragment = gql` reserveStockDurationAnonymousUser reserveStockDurationAuthenticatedUser limitQuantityPerCheckout + enableAccountConfirmationByEmail } `; diff --git a/src/graphql/fragmentTypes.generated.ts b/src/graphql/fragmentTypes.generated.ts index cf53a4f43..98cd0f95b 100644 --- a/src/graphql/fragmentTypes.generated.ts +++ b/src/graphql/fragmentTypes.generated.ts @@ -74,7 +74,10 @@ "OrderFilterShippingMethods", "OrderFulfilled", "OrderFullyPaid", + "OrderFullyRefunded", "OrderMetadataUpdated", + "OrderPaid", + "OrderRefunded", "OrderUpdated", "PageCreated", "PageDeleted", diff --git a/src/graphql/hooks.generated.ts b/src/graphql/hooks.generated.ts index 8c593cef8..9a740fc0c 100644 --- a/src/graphql/hooks.generated.ts +++ b/src/graphql/hooks.generated.ts @@ -2701,6 +2701,7 @@ export const ShopFragmentDoc = gql` reserveStockDurationAnonymousUser reserveStockDurationAuthenticatedUser limitQuantityPerCheckout + enableAccountConfirmationByEmail } ${AddressFragmentDoc}`; export const StaffMemberDetailsFragmentDoc = gql` diff --git a/src/graphql/typePolicies.generated.ts b/src/graphql/typePolicies.generated.ts index 6d814beaf..ec09fd491 100644 --- a/src/graphql/typePolicies.generated.ts +++ b/src/graphql/typePolicies.generated.ts @@ -912,6 +912,25 @@ export type CheckoutCreateFieldPolicy = { errors?: FieldPolicy | FieldReadFunction, checkout?: FieldPolicy | FieldReadFunction }; +export type CheckoutCreateFromOrderKeySpecifier = ('unavailableVariants' | 'checkout' | 'errors' | CheckoutCreateFromOrderKeySpecifier)[]; +export type CheckoutCreateFromOrderFieldPolicy = { + unavailableVariants?: FieldPolicy | FieldReadFunction, + checkout?: FieldPolicy | FieldReadFunction, + errors?: FieldPolicy | FieldReadFunction +}; +export type CheckoutCreateFromOrderErrorKeySpecifier = ('field' | 'message' | 'code' | CheckoutCreateFromOrderErrorKeySpecifier)[]; +export type CheckoutCreateFromOrderErrorFieldPolicy = { + field?: FieldPolicy | FieldReadFunction, + message?: FieldPolicy | FieldReadFunction, + code?: FieldPolicy | FieldReadFunction +}; +export type CheckoutCreateFromOrderUnavailableVariantKeySpecifier = ('message' | 'code' | 'variantId' | 'lineId' | CheckoutCreateFromOrderUnavailableVariantKeySpecifier)[]; +export type CheckoutCreateFromOrderUnavailableVariantFieldPolicy = { + message?: FieldPolicy | FieldReadFunction, + code?: FieldPolicy | FieldReadFunction, + variantId?: FieldPolicy | FieldReadFunction, + lineId?: FieldPolicy | FieldReadFunction +}; export type CheckoutCreatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'checkout' | CheckoutCreatedKeySpecifier)[]; export type CheckoutCreatedFieldPolicy = { issuedAt?: FieldPolicy | FieldReadFunction, @@ -1995,13 +2014,15 @@ export type GiftCardUpdatedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, giftCard?: FieldPolicy | FieldReadFunction }; -export type GroupKeySpecifier = ('id' | 'name' | 'users' | 'permissions' | 'userCanManage' | GroupKeySpecifier)[]; +export type GroupKeySpecifier = ('id' | 'name' | 'users' | 'permissions' | 'userCanManage' | 'accessibleChannels' | 'restrictedAccessToChannels' | GroupKeySpecifier)[]; export type GroupFieldPolicy = { id?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction, users?: FieldPolicy | FieldReadFunction, permissions?: FieldPolicy | FieldReadFunction, - userCanManage?: FieldPolicy | FieldReadFunction + userCanManage?: FieldPolicy | FieldReadFunction, + accessibleChannels?: FieldPolicy | FieldReadFunction, + restrictedAccessToChannels?: FieldPolicy | FieldReadFunction }; export type GroupCountableConnectionKeySpecifier = ('pageInfo' | 'edges' | 'totalCount' | GroupCountableConnectionKeySpecifier)[]; export type GroupCountableConnectionFieldPolicy = { @@ -2360,7 +2381,7 @@ export type MoneyRangeFieldPolicy = { start?: FieldPolicy | FieldReadFunction, stop?: FieldPolicy | FieldReadFunction }; -export type MutationKeySpecifier = ('webhookCreate' | 'webhookDelete' | 'webhookUpdate' | 'eventDeliveryRetry' | 'webhookDryRun' | 'webhookTrigger' | 'createWarehouse' | 'updateWarehouse' | 'deleteWarehouse' | 'assignWarehouseShippingZone' | 'unassignWarehouseShippingZone' | 'taxClassCreate' | 'taxClassDelete' | 'taxClassUpdate' | 'taxConfigurationUpdate' | 'taxCountryConfigurationUpdate' | 'taxCountryConfigurationDelete' | 'taxExemptionManage' | 'stockBulkUpdate' | 'staffNotificationRecipientCreate' | 'staffNotificationRecipientUpdate' | 'staffNotificationRecipientDelete' | 'shopDomainUpdate' | 'shopSettingsUpdate' | 'shopFetchTaxRates' | 'shopSettingsTranslate' | 'shopAddressUpdate' | 'orderSettingsUpdate' | 'giftCardSettingsUpdate' | 'shippingMethodChannelListingUpdate' | 'shippingPriceCreate' | 'shippingPriceDelete' | 'shippingPriceBulkDelete' | 'shippingPriceUpdate' | 'shippingPriceTranslate' | 'shippingPriceExcludeProducts' | 'shippingPriceRemoveProductFromExclude' | 'shippingZoneCreate' | 'shippingZoneDelete' | 'shippingZoneBulkDelete' | 'shippingZoneUpdate' | 'productAttributeAssign' | 'productAttributeAssignmentUpdate' | 'productAttributeUnassign' | 'categoryCreate' | 'categoryDelete' | 'categoryBulkDelete' | 'categoryUpdate' | 'categoryTranslate' | 'collectionAddProducts' | 'collectionCreate' | 'collectionDelete' | 'collectionReorderProducts' | 'collectionBulkDelete' | 'collectionRemoveProducts' | 'collectionUpdate' | 'collectionTranslate' | 'collectionChannelListingUpdate' | 'productCreate' | 'productDelete' | 'productBulkCreate' | 'productBulkDelete' | 'productUpdate' | 'productTranslate' | 'productChannelListingUpdate' | 'productMediaCreate' | 'productVariantReorder' | 'productMediaDelete' | 'productMediaBulkDelete' | 'productMediaReorder' | 'productMediaUpdate' | 'productTypeCreate' | 'productTypeDelete' | 'productTypeBulkDelete' | 'productTypeUpdate' | 'productTypeReorderAttributes' | 'productReorderAttributeValues' | 'digitalContentCreate' | 'digitalContentDelete' | 'digitalContentUpdate' | 'digitalContentUrlCreate' | 'productVariantCreate' | 'productVariantDelete' | 'productVariantBulkCreate' | 'productVariantBulkUpdate' | 'productVariantBulkDelete' | 'productVariantStocksCreate' | 'productVariantStocksDelete' | 'productVariantStocksUpdate' | 'productVariantUpdate' | 'productVariantSetDefault' | 'productVariantTranslate' | 'productVariantChannelListingUpdate' | 'productVariantReorderAttributeValues' | 'productVariantPreorderDeactivate' | 'variantMediaAssign' | 'variantMediaUnassign' | 'paymentCapture' | 'paymentRefund' | 'paymentVoid' | 'paymentInitialize' | 'paymentCheckBalance' | 'transactionCreate' | 'transactionUpdate' | 'transactionRequestAction' | 'transactionEventReport' | 'paymentGatewayInitialize' | 'transactionInitialize' | 'transactionProcess' | 'pageCreate' | 'pageDelete' | 'pageBulkDelete' | 'pageBulkPublish' | 'pageUpdate' | 'pageTranslate' | 'pageTypeCreate' | 'pageTypeUpdate' | 'pageTypeDelete' | 'pageTypeBulkDelete' | 'pageAttributeAssign' | 'pageAttributeUnassign' | 'pageTypeReorderAttributes' | 'pageReorderAttributeValues' | 'draftOrderComplete' | 'draftOrderCreate' | 'draftOrderDelete' | 'draftOrderBulkDelete' | 'draftOrderLinesBulkDelete' | 'draftOrderUpdate' | 'orderAddNote' | 'orderCancel' | 'orderCapture' | 'orderConfirm' | 'orderFulfill' | 'orderFulfillmentCancel' | 'orderFulfillmentApprove' | 'orderFulfillmentUpdateTracking' | 'orderFulfillmentRefundProducts' | 'orderFulfillmentReturnProducts' | 'orderGrantRefundCreate' | 'orderGrantRefundUpdate' | 'orderLinesCreate' | 'orderLineDelete' | 'orderLineUpdate' | 'orderDiscountAdd' | 'orderDiscountUpdate' | 'orderDiscountDelete' | 'orderLineDiscountUpdate' | 'orderLineDiscountRemove' | 'orderMarkAsPaid' | 'orderRefund' | 'orderUpdate' | 'orderUpdateShipping' | 'orderVoid' | 'orderBulkCancel' | 'deleteMetadata' | 'deletePrivateMetadata' | 'updateMetadata' | 'updatePrivateMetadata' | 'assignNavigation' | 'menuCreate' | 'menuDelete' | 'menuBulkDelete' | 'menuUpdate' | 'menuItemCreate' | 'menuItemDelete' | 'menuItemBulkDelete' | 'menuItemUpdate' | 'menuItemTranslate' | 'menuItemMove' | 'invoiceRequest' | 'invoiceRequestDelete' | 'invoiceCreate' | 'invoiceDelete' | 'invoiceUpdate' | 'invoiceSendNotification' | 'giftCardActivate' | 'giftCardCreate' | 'giftCardDelete' | 'giftCardDeactivate' | 'giftCardUpdate' | 'giftCardResend' | 'giftCardAddNote' | 'giftCardBulkCreate' | 'giftCardBulkDelete' | 'giftCardBulkActivate' | 'giftCardBulkDeactivate' | 'pluginUpdate' | 'externalNotificationTrigger' | 'saleCreate' | 'saleDelete' | 'saleBulkDelete' | 'saleUpdate' | 'saleCataloguesAdd' | 'saleCataloguesRemove' | 'saleTranslate' | 'saleChannelListingUpdate' | 'voucherCreate' | 'voucherDelete' | 'voucherBulkDelete' | 'voucherUpdate' | 'voucherCataloguesAdd' | 'voucherCataloguesRemove' | 'voucherTranslate' | 'voucherChannelListingUpdate' | 'exportProducts' | 'exportGiftCards' | 'fileUpload' | 'checkoutAddPromoCode' | 'checkoutBillingAddressUpdate' | 'checkoutComplete' | 'checkoutCreate' | 'checkoutCustomerAttach' | 'checkoutCustomerDetach' | 'checkoutEmailUpdate' | 'checkoutLineDelete' | 'checkoutLinesDelete' | 'checkoutLinesAdd' | 'checkoutLinesUpdate' | 'checkoutRemovePromoCode' | 'checkoutPaymentCreate' | 'checkoutShippingAddressUpdate' | 'checkoutShippingMethodUpdate' | 'checkoutDeliveryMethodUpdate' | 'checkoutLanguageCodeUpdate' | 'orderCreateFromCheckout' | 'channelCreate' | 'channelUpdate' | 'channelDelete' | 'channelActivate' | 'channelDeactivate' | 'channelReorderWarehouses' | 'attributeCreate' | 'attributeDelete' | 'attributeUpdate' | 'attributeTranslate' | 'attributeBulkDelete' | 'attributeValueBulkDelete' | 'attributeValueCreate' | 'attributeValueDelete' | 'attributeValueUpdate' | 'attributeValueTranslate' | 'attributeReorderValues' | 'appCreate' | 'appUpdate' | 'appDelete' | 'appTokenCreate' | 'appTokenDelete' | 'appTokenVerify' | 'appInstall' | 'appRetryInstall' | 'appDeleteFailedInstallation' | 'appFetchManifest' | 'appActivate' | 'appDeactivate' | 'tokenCreate' | 'tokenRefresh' | 'tokenVerify' | 'tokensDeactivateAll' | 'externalAuthenticationUrl' | 'externalObtainAccessTokens' | 'externalRefresh' | 'externalLogout' | 'externalVerify' | 'requestPasswordReset' | 'confirmAccount' | 'setPassword' | 'passwordChange' | 'requestEmailChange' | 'confirmEmailChange' | 'accountAddressCreate' | 'accountAddressUpdate' | 'accountAddressDelete' | 'accountSetDefaultAddress' | 'accountRegister' | 'accountUpdate' | 'accountRequestDeletion' | 'accountDelete' | 'addressCreate' | 'addressUpdate' | 'addressDelete' | 'addressSetDefault' | 'customerCreate' | 'customerUpdate' | 'customerDelete' | 'customerBulkDelete' | 'customerBulkUpdate' | 'staffCreate' | 'staffUpdate' | 'staffDelete' | 'staffBulkDelete' | 'userAvatarUpdate' | 'userAvatarDelete' | 'userBulkSetActive' | 'permissionGroupCreate' | 'permissionGroupUpdate' | 'permissionGroupDelete' | MutationKeySpecifier)[]; +export type MutationKeySpecifier = ('webhookCreate' | 'webhookDelete' | 'webhookUpdate' | 'eventDeliveryRetry' | 'webhookDryRun' | 'webhookTrigger' | 'createWarehouse' | 'updateWarehouse' | 'deleteWarehouse' | 'assignWarehouseShippingZone' | 'unassignWarehouseShippingZone' | 'taxClassCreate' | 'taxClassDelete' | 'taxClassUpdate' | 'taxConfigurationUpdate' | 'taxCountryConfigurationUpdate' | 'taxCountryConfigurationDelete' | 'taxExemptionManage' | 'stockBulkUpdate' | 'staffNotificationRecipientCreate' | 'staffNotificationRecipientUpdate' | 'staffNotificationRecipientDelete' | 'shopDomainUpdate' | 'shopSettingsUpdate' | 'shopFetchTaxRates' | 'shopSettingsTranslate' | 'shopAddressUpdate' | 'orderSettingsUpdate' | 'giftCardSettingsUpdate' | 'shippingMethodChannelListingUpdate' | 'shippingPriceCreate' | 'shippingPriceDelete' | 'shippingPriceBulkDelete' | 'shippingPriceUpdate' | 'shippingPriceTranslate' | 'shippingPriceExcludeProducts' | 'shippingPriceRemoveProductFromExclude' | 'shippingZoneCreate' | 'shippingZoneDelete' | 'shippingZoneBulkDelete' | 'shippingZoneUpdate' | 'productAttributeAssign' | 'productAttributeAssignmentUpdate' | 'productAttributeUnassign' | 'categoryCreate' | 'categoryDelete' | 'categoryBulkDelete' | 'categoryUpdate' | 'categoryTranslate' | 'collectionAddProducts' | 'collectionCreate' | 'collectionDelete' | 'collectionReorderProducts' | 'collectionBulkDelete' | 'collectionRemoveProducts' | 'collectionUpdate' | 'collectionTranslate' | 'collectionChannelListingUpdate' | 'productCreate' | 'productDelete' | 'productBulkCreate' | 'productBulkDelete' | 'productUpdate' | 'productTranslate' | 'productChannelListingUpdate' | 'productMediaCreate' | 'productVariantReorder' | 'productMediaDelete' | 'productMediaBulkDelete' | 'productMediaReorder' | 'productMediaUpdate' | 'productTypeCreate' | 'productTypeDelete' | 'productTypeBulkDelete' | 'productTypeUpdate' | 'productTypeReorderAttributes' | 'productReorderAttributeValues' | 'digitalContentCreate' | 'digitalContentDelete' | 'digitalContentUpdate' | 'digitalContentUrlCreate' | 'productVariantCreate' | 'productVariantDelete' | 'productVariantBulkCreate' | 'productVariantBulkUpdate' | 'productVariantBulkDelete' | 'productVariantStocksCreate' | 'productVariantStocksDelete' | 'productVariantStocksUpdate' | 'productVariantUpdate' | 'productVariantSetDefault' | 'productVariantTranslate' | 'productVariantChannelListingUpdate' | 'productVariantReorderAttributeValues' | 'productVariantPreorderDeactivate' | 'variantMediaAssign' | 'variantMediaUnassign' | 'paymentCapture' | 'paymentRefund' | 'paymentVoid' | 'paymentInitialize' | 'paymentCheckBalance' | 'transactionCreate' | 'transactionUpdate' | 'transactionRequestAction' | 'transactionEventReport' | 'paymentGatewayInitialize' | 'transactionInitialize' | 'transactionProcess' | 'pageCreate' | 'pageDelete' | 'pageBulkDelete' | 'pageBulkPublish' | 'pageUpdate' | 'pageTranslate' | 'pageTypeCreate' | 'pageTypeUpdate' | 'pageTypeDelete' | 'pageTypeBulkDelete' | 'pageAttributeAssign' | 'pageAttributeUnassign' | 'pageTypeReorderAttributes' | 'pageReorderAttributeValues' | 'draftOrderComplete' | 'draftOrderCreate' | 'draftOrderDelete' | 'draftOrderBulkDelete' | 'draftOrderLinesBulkDelete' | 'draftOrderUpdate' | 'orderAddNote' | 'orderCancel' | 'orderCapture' | 'orderConfirm' | 'orderFulfill' | 'orderFulfillmentCancel' | 'orderFulfillmentApprove' | 'orderFulfillmentUpdateTracking' | 'orderFulfillmentRefundProducts' | 'orderFulfillmentReturnProducts' | 'orderGrantRefundCreate' | 'orderGrantRefundUpdate' | 'orderLinesCreate' | 'orderLineDelete' | 'orderLineUpdate' | 'orderDiscountAdd' | 'orderDiscountUpdate' | 'orderDiscountDelete' | 'orderLineDiscountUpdate' | 'orderLineDiscountRemove' | 'orderMarkAsPaid' | 'orderRefund' | 'orderUpdate' | 'orderUpdateShipping' | 'orderVoid' | 'orderBulkCancel' | 'deleteMetadata' | 'deletePrivateMetadata' | 'updateMetadata' | 'updatePrivateMetadata' | 'assignNavigation' | 'menuCreate' | 'menuDelete' | 'menuBulkDelete' | 'menuUpdate' | 'menuItemCreate' | 'menuItemDelete' | 'menuItemBulkDelete' | 'menuItemUpdate' | 'menuItemTranslate' | 'menuItemMove' | 'invoiceRequest' | 'invoiceRequestDelete' | 'invoiceCreate' | 'invoiceDelete' | 'invoiceUpdate' | 'invoiceSendNotification' | 'giftCardActivate' | 'giftCardCreate' | 'giftCardDelete' | 'giftCardDeactivate' | 'giftCardUpdate' | 'giftCardResend' | 'giftCardAddNote' | 'giftCardBulkCreate' | 'giftCardBulkDelete' | 'giftCardBulkActivate' | 'giftCardBulkDeactivate' | 'pluginUpdate' | 'externalNotificationTrigger' | 'saleCreate' | 'saleDelete' | 'saleBulkDelete' | 'saleUpdate' | 'saleCataloguesAdd' | 'saleCataloguesRemove' | 'saleTranslate' | 'saleChannelListingUpdate' | 'voucherCreate' | 'voucherDelete' | 'voucherBulkDelete' | 'voucherUpdate' | 'voucherCataloguesAdd' | 'voucherCataloguesRemove' | 'voucherTranslate' | 'voucherChannelListingUpdate' | 'exportProducts' | 'exportGiftCards' | 'fileUpload' | 'checkoutAddPromoCode' | 'checkoutBillingAddressUpdate' | 'checkoutComplete' | 'checkoutCreate' | 'checkoutCreateFromOrder' | 'checkoutCustomerAttach' | 'checkoutCustomerDetach' | 'checkoutEmailUpdate' | 'checkoutLineDelete' | 'checkoutLinesDelete' | 'checkoutLinesAdd' | 'checkoutLinesUpdate' | 'checkoutRemovePromoCode' | 'checkoutPaymentCreate' | 'checkoutShippingAddressUpdate' | 'checkoutShippingMethodUpdate' | 'checkoutDeliveryMethodUpdate' | 'checkoutLanguageCodeUpdate' | 'orderCreateFromCheckout' | 'channelCreate' | 'channelUpdate' | 'channelDelete' | 'channelActivate' | 'channelDeactivate' | 'channelReorderWarehouses' | 'attributeCreate' | 'attributeDelete' | 'attributeUpdate' | 'attributeTranslate' | 'attributeBulkDelete' | 'attributeValueBulkDelete' | 'attributeValueCreate' | 'attributeValueDelete' | 'attributeValueUpdate' | 'attributeValueTranslate' | 'attributeReorderValues' | 'appCreate' | 'appUpdate' | 'appDelete' | 'appTokenCreate' | 'appTokenDelete' | 'appTokenVerify' | 'appInstall' | 'appRetryInstall' | 'appDeleteFailedInstallation' | 'appFetchManifest' | 'appActivate' | 'appDeactivate' | 'tokenCreate' | 'tokenRefresh' | 'tokenVerify' | 'tokensDeactivateAll' | 'externalAuthenticationUrl' | 'externalObtainAccessTokens' | 'externalRefresh' | 'externalLogout' | 'externalVerify' | 'requestPasswordReset' | 'confirmAccount' | 'setPassword' | 'passwordChange' | 'requestEmailChange' | 'confirmEmailChange' | 'accountAddressCreate' | 'accountAddressUpdate' | 'accountAddressDelete' | 'accountSetDefaultAddress' | 'accountRegister' | 'accountUpdate' | 'accountRequestDeletion' | 'accountDelete' | 'addressCreate' | 'addressUpdate' | 'addressDelete' | 'addressSetDefault' | 'customerCreate' | 'customerUpdate' | 'customerDelete' | 'customerBulkDelete' | 'customerBulkUpdate' | 'staffCreate' | 'staffUpdate' | 'staffDelete' | 'staffBulkDelete' | 'userAvatarUpdate' | 'userAvatarDelete' | 'userBulkSetActive' | 'permissionGroupCreate' | 'permissionGroupUpdate' | 'permissionGroupDelete' | MutationKeySpecifier)[]; export type MutationFieldPolicy = { webhookCreate?: FieldPolicy | FieldReadFunction, webhookDelete?: FieldPolicy | FieldReadFunction, @@ -2574,6 +2595,7 @@ export type MutationFieldPolicy = { checkoutBillingAddressUpdate?: FieldPolicy | FieldReadFunction, checkoutComplete?: FieldPolicy | FieldReadFunction, checkoutCreate?: FieldPolicy | FieldReadFunction, + checkoutCreateFromOrder?: FieldPolicy | FieldReadFunction, checkoutCustomerAttach?: FieldPolicy | FieldReadFunction, checkoutCustomerDetach?: FieldPolicy | FieldReadFunction, checkoutEmailUpdate?: FieldPolicy | FieldReadFunction, @@ -2970,6 +2992,14 @@ export type OrderFullyPaidFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, order?: FieldPolicy | FieldReadFunction }; +export type OrderFullyRefundedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'order' | OrderFullyRefundedKeySpecifier)[]; +export type OrderFullyRefundedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + order?: FieldPolicy | FieldReadFunction +}; export type OrderGrantRefundCreateKeySpecifier = ('order' | 'grantedRefund' | 'errors' | OrderGrantRefundCreateKeySpecifier)[]; export type OrderGrantRefundCreateFieldPolicy = { order?: FieldPolicy | FieldReadFunction, @@ -3090,12 +3120,28 @@ export type OrderMetadataUpdatedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, order?: FieldPolicy | FieldReadFunction }; +export type OrderPaidKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'order' | OrderPaidKeySpecifier)[]; +export type OrderPaidFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + order?: FieldPolicy | FieldReadFunction +}; export type OrderRefundKeySpecifier = ('order' | 'orderErrors' | 'errors' | OrderRefundKeySpecifier)[]; export type OrderRefundFieldPolicy = { order?: FieldPolicy | FieldReadFunction, orderErrors?: FieldPolicy | FieldReadFunction, errors?: FieldPolicy | FieldReadFunction }; +export type OrderRefundedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'order' | OrderRefundedKeySpecifier)[]; +export type OrderRefundedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + order?: FieldPolicy | FieldReadFunction +}; export type OrderSettingsKeySpecifier = ('automaticallyConfirmAllNewOrders' | 'automaticallyFulfillNonShippableGiftCard' | 'expireOrdersAfter' | 'markAsPaidStrategy' | 'defaultTransactionFlowStrategy' | OrderSettingsKeySpecifier)[]; export type OrderSettingsFieldPolicy = { automaticallyConfirmAllNewOrders?: FieldPolicy | FieldReadFunction, @@ -3594,13 +3640,14 @@ export type PermissionGroupDeletedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, permissionGroup?: FieldPolicy | FieldReadFunction }; -export type PermissionGroupErrorKeySpecifier = ('field' | 'message' | 'code' | 'permissions' | 'users' | PermissionGroupErrorKeySpecifier)[]; +export type PermissionGroupErrorKeySpecifier = ('field' | 'message' | 'code' | 'permissions' | 'users' | 'channels' | PermissionGroupErrorKeySpecifier)[]; export type PermissionGroupErrorFieldPolicy = { field?: FieldPolicy | FieldReadFunction, message?: FieldPolicy | FieldReadFunction, code?: FieldPolicy | FieldReadFunction, permissions?: FieldPolicy | FieldReadFunction, - users?: FieldPolicy | FieldReadFunction + users?: FieldPolicy | FieldReadFunction, + channels?: FieldPolicy | FieldReadFunction }; export type PermissionGroupUpdateKeySpecifier = ('permissionGroupErrors' | 'errors' | 'group' | PermissionGroupUpdateKeySpecifier)[]; export type PermissionGroupUpdateFieldPolicy = { @@ -4105,11 +4152,12 @@ export type ProductVariantBulkDeleteFieldPolicy = { productErrors?: FieldPolicy | FieldReadFunction, errors?: FieldPolicy | FieldReadFunction }; -export type ProductVariantBulkErrorKeySpecifier = ('field' | 'message' | 'code' | 'attributes' | 'values' | 'warehouses' | 'stocks' | 'channels' | 'channelListings' | ProductVariantBulkErrorKeySpecifier)[]; +export type ProductVariantBulkErrorKeySpecifier = ('field' | 'message' | 'code' | 'path' | 'attributes' | 'values' | 'warehouses' | 'stocks' | 'channels' | 'channelListings' | ProductVariantBulkErrorKeySpecifier)[]; export type ProductVariantBulkErrorFieldPolicy = { field?: FieldPolicy | FieldReadFunction, message?: FieldPolicy | FieldReadFunction, code?: FieldPolicy | FieldReadFunction, + path?: FieldPolicy | FieldReadFunction, attributes?: FieldPolicy | FieldReadFunction, values?: FieldPolicy | FieldReadFunction, warehouses?: FieldPolicy | FieldReadFunction, @@ -4805,7 +4853,7 @@ export type ShippingZoneUpdatedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, shippingZone?: FieldPolicy | FieldReadFunction }; -export type ShopKeySpecifier = ('availablePaymentGateways' | 'availableExternalAuthentications' | 'availableShippingMethods' | 'channelCurrencies' | 'countries' | 'defaultCountry' | 'defaultMailSenderName' | 'defaultMailSenderAddress' | 'description' | 'domain' | 'languages' | 'name' | 'permissions' | 'phonePrefixes' | 'headerText' | 'fulfillmentAutoApprove' | 'fulfillmentAllowUnpaid' | 'trackInventoryByDefault' | 'defaultWeightUnit' | 'translation' | 'automaticFulfillmentDigitalProducts' | 'reserveStockDurationAnonymousUser' | 'reserveStockDurationAuthenticatedUser' | 'limitQuantityPerCheckout' | 'defaultDigitalMaxDownloads' | 'defaultDigitalUrlValidDays' | 'companyAddress' | 'customerSetPasswordUrl' | 'staffNotificationRecipients' | 'limits' | 'version' | 'schemaVersion' | 'includeTaxesInPrices' | 'displayGrossPrices' | 'chargeTaxesOnShipping' | ShopKeySpecifier)[]; +export type ShopKeySpecifier = ('availablePaymentGateways' | 'availableExternalAuthentications' | 'availableShippingMethods' | 'channelCurrencies' | 'countries' | 'defaultCountry' | 'defaultMailSenderName' | 'defaultMailSenderAddress' | 'description' | 'domain' | 'languages' | 'name' | 'permissions' | 'phonePrefixes' | 'headerText' | 'fulfillmentAutoApprove' | 'fulfillmentAllowUnpaid' | 'trackInventoryByDefault' | 'defaultWeightUnit' | 'translation' | 'automaticFulfillmentDigitalProducts' | 'reserveStockDurationAnonymousUser' | 'reserveStockDurationAuthenticatedUser' | 'limitQuantityPerCheckout' | 'defaultDigitalMaxDownloads' | 'defaultDigitalUrlValidDays' | 'companyAddress' | 'customerSetPasswordUrl' | 'staffNotificationRecipients' | 'enableAccountConfirmationByEmail' | 'limits' | 'version' | 'schemaVersion' | 'includeTaxesInPrices' | 'displayGrossPrices' | 'chargeTaxesOnShipping' | ShopKeySpecifier)[]; export type ShopFieldPolicy = { availablePaymentGateways?: FieldPolicy | FieldReadFunction, availableExternalAuthentications?: FieldPolicy | FieldReadFunction, @@ -4836,6 +4884,7 @@ export type ShopFieldPolicy = { companyAddress?: FieldPolicy | FieldReadFunction, customerSetPasswordUrl?: FieldPolicy | FieldReadFunction, staffNotificationRecipients?: FieldPolicy | FieldReadFunction, + enableAccountConfirmationByEmail?: FieldPolicy | FieldReadFunction, limits?: FieldPolicy | FieldReadFunction, version?: FieldPolicy | FieldReadFunction, schemaVersion?: FieldPolicy | FieldReadFunction, @@ -5489,7 +5538,7 @@ export type UploadErrorFieldPolicy = { message?: FieldPolicy | FieldReadFunction, code?: FieldPolicy | FieldReadFunction }; -export type UserKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'email' | 'firstName' | 'lastName' | 'isStaff' | 'isActive' | 'addresses' | 'checkout' | 'checkoutTokens' | 'checkoutIds' | 'checkouts' | 'giftCards' | 'note' | 'orders' | 'userPermissions' | 'permissionGroups' | 'editableGroups' | 'avatar' | 'events' | 'storedPaymentSources' | 'languageCode' | 'defaultShippingAddress' | 'defaultBillingAddress' | 'externalReference' | 'lastLogin' | 'dateJoined' | 'updatedAt' | UserKeySpecifier)[]; +export type UserKeySpecifier = ('id' | 'privateMetadata' | 'privateMetafield' | 'privateMetafields' | 'metadata' | 'metafield' | 'metafields' | 'email' | 'firstName' | 'lastName' | 'isStaff' | 'isActive' | 'addresses' | 'checkout' | 'checkoutTokens' | 'checkoutIds' | 'checkouts' | 'giftCards' | 'note' | 'orders' | 'userPermissions' | 'permissionGroups' | 'editableGroups' | 'accessibleChannels' | 'restrictedAccessToChannels' | 'avatar' | 'events' | 'storedPaymentSources' | 'languageCode' | 'defaultShippingAddress' | 'defaultBillingAddress' | 'externalReference' | 'lastLogin' | 'dateJoined' | 'updatedAt' | UserKeySpecifier)[]; export type UserFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -5514,6 +5563,8 @@ export type UserFieldPolicy = { userPermissions?: FieldPolicy | FieldReadFunction, permissionGroups?: FieldPolicy | FieldReadFunction, editableGroups?: FieldPolicy | FieldReadFunction, + accessibleChannels?: FieldPolicy | FieldReadFunction, + restrictedAccessToChannels?: FieldPolicy | FieldReadFunction, avatar?: FieldPolicy | FieldReadFunction, events?: FieldPolicy | FieldReadFunction, storedPaymentSources?: FieldPolicy | FieldReadFunction, @@ -6374,6 +6425,18 @@ export type StrictTypedTypePolicies = { keyFields?: false | CheckoutCreateKeySpecifier | (() => undefined | CheckoutCreateKeySpecifier), fields?: CheckoutCreateFieldPolicy, }, + CheckoutCreateFromOrder?: Omit & { + keyFields?: false | CheckoutCreateFromOrderKeySpecifier | (() => undefined | CheckoutCreateFromOrderKeySpecifier), + fields?: CheckoutCreateFromOrderFieldPolicy, + }, + CheckoutCreateFromOrderError?: Omit & { + keyFields?: false | CheckoutCreateFromOrderErrorKeySpecifier | (() => undefined | CheckoutCreateFromOrderErrorKeySpecifier), + fields?: CheckoutCreateFromOrderErrorFieldPolicy, + }, + CheckoutCreateFromOrderUnavailableVariant?: Omit & { + keyFields?: false | CheckoutCreateFromOrderUnavailableVariantKeySpecifier | (() => undefined | CheckoutCreateFromOrderUnavailableVariantKeySpecifier), + fields?: CheckoutCreateFromOrderUnavailableVariantFieldPolicy, + }, CheckoutCreated?: Omit & { keyFields?: false | CheckoutCreatedKeySpecifier | (() => undefined | CheckoutCreatedKeySpecifier), fields?: CheckoutCreatedFieldPolicy, @@ -7294,6 +7357,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | OrderFullyPaidKeySpecifier | (() => undefined | OrderFullyPaidKeySpecifier), fields?: OrderFullyPaidFieldPolicy, }, + OrderFullyRefunded?: Omit & { + keyFields?: false | OrderFullyRefundedKeySpecifier | (() => undefined | OrderFullyRefundedKeySpecifier), + fields?: OrderFullyRefundedFieldPolicy, + }, OrderGrantRefundCreate?: Omit & { keyFields?: false | OrderGrantRefundCreateKeySpecifier | (() => undefined | OrderGrantRefundCreateKeySpecifier), fields?: OrderGrantRefundCreateFieldPolicy, @@ -7346,10 +7413,18 @@ export type StrictTypedTypePolicies = { keyFields?: false | OrderMetadataUpdatedKeySpecifier | (() => undefined | OrderMetadataUpdatedKeySpecifier), fields?: OrderMetadataUpdatedFieldPolicy, }, + OrderPaid?: Omit & { + keyFields?: false | OrderPaidKeySpecifier | (() => undefined | OrderPaidKeySpecifier), + fields?: OrderPaidFieldPolicy, + }, OrderRefund?: Omit & { keyFields?: false | OrderRefundKeySpecifier | (() => undefined | OrderRefundKeySpecifier), fields?: OrderRefundFieldPolicy, }, + OrderRefunded?: Omit & { + keyFields?: false | OrderRefundedKeySpecifier | (() => undefined | OrderRefundedKeySpecifier), + fields?: OrderRefundedFieldPolicy, + }, OrderSettings?: Omit & { keyFields?: false | OrderSettingsKeySpecifier | (() => undefined | OrderSettingsKeySpecifier), fields?: OrderSettingsFieldPolicy, diff --git a/src/graphql/types.generated.ts b/src/graphql/types.generated.ts index d6a2c85dc..3eaca855b 100644 --- a/src/graphql/types.generated.ts +++ b/src/graphql/types.generated.ts @@ -116,6 +116,12 @@ export type AccountInput = { defaultBillingAddress?: InputMaybe; /** Shipping address of the customer. */ defaultShippingAddress?: InputMaybe; + /** + * Fields required to update the user metadata. + * + * Added in Saleor 3.14. + */ + metadata?: InputMaybe>; }; /** Fields required to create a user. */ @@ -1021,6 +1027,25 @@ export enum CheckoutChargeStatusEnum { OVERCHARGED = 'OVERCHARGED' } +/** An enumeration. */ +export enum CheckoutCreateFromOrderErrorCode { + GRAPHQL_ERROR = 'GRAPHQL_ERROR', + INVALID = 'INVALID', + ORDER_NOT_FOUND = 'ORDER_NOT_FOUND', + CHANNEL_INACTIVE = 'CHANNEL_INACTIVE', + TAX_ERROR = 'TAX_ERROR' +} + +/** An enumeration. */ +export enum CheckoutCreateFromOrderUnavailableVariantErrorCode { + NOT_FOUND = 'NOT_FOUND', + PRODUCT_UNAVAILABLE_FOR_PURCHASE = 'PRODUCT_UNAVAILABLE_FOR_PURCHASE', + UNAVAILABLE_VARIANT_IN_CHANNEL = 'UNAVAILABLE_VARIANT_IN_CHANNEL', + PRODUCT_NOT_PUBLISHED = 'PRODUCT_NOT_PUBLISHED', + QUANTITY_GREATER_THAN_LIMIT = 'QUANTITY_GREATER_THAN_LIMIT', + INSUFFICIENT_STOCK = 'INSUFFICIENT_STOCK' +} + export type CheckoutCreateInput = { /** Slug of a channel in which to create a checkout. */ channel?: InputMaybe; @@ -1672,6 +1697,18 @@ export type CustomerInput = { isActive?: InputMaybe; /** A note about the user. */ note?: InputMaybe; + /** + * Fields required to update the user metadata. + * + * Added in Saleor 3.14. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the user private metadata. + * + * Added in Saleor 3.14. + */ + privateMetadata?: InputMaybe>; /** User language code. */ languageCode?: InputMaybe; /** @@ -2241,6 +2278,18 @@ export type InvoiceCreateInput = { number: Scalars['String']; /** URL of an invoice to download. */ url: Scalars['String']; + /** + * Fields required to update the invoice metadata. + * + * Added in Saleor 3.14. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the invoice private metadata. + * + * Added in Saleor 3.14. + */ + privateMetadata?: InputMaybe>; }; /** An enumeration. */ @@ -3381,6 +3430,7 @@ export type OrderDiscountCommonInput = { /** An enumeration. */ export enum OrderDiscountType { + SALE = 'SALE', VOUCHER = 'VOUCHER', MANUAL = 'MANUAL' } @@ -4081,20 +4131,37 @@ export type PermissionGroupCreateInput = { addPermissions?: InputMaybe>; /** List of users to assign to this group. */ addUsers?: InputMaybe>; + /** + * List of channels to assign to this group. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + addChannels?: InputMaybe>; /** Group name. */ name: Scalars['String']; + /** + * Determine if the group has restricted access to channels. DEFAULT: False + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + restrictedAccessToChannels?: InputMaybe; }; /** An enumeration. */ export enum PermissionGroupErrorCode { + REQUIRED = 'REQUIRED', + UNIQUE = 'UNIQUE', ASSIGN_NON_STAFF_MEMBER = 'ASSIGN_NON_STAFF_MEMBER', DUPLICATED_INPUT_ITEM = 'DUPLICATED_INPUT_ITEM', CANNOT_REMOVE_FROM_LAST_GROUP = 'CANNOT_REMOVE_FROM_LAST_GROUP', LEFT_NOT_MANAGEABLE_PERMISSION = 'LEFT_NOT_MANAGEABLE_PERMISSION', OUT_OF_SCOPE_PERMISSION = 'OUT_OF_SCOPE_PERMISSION', OUT_OF_SCOPE_USER = 'OUT_OF_SCOPE_USER', - REQUIRED = 'REQUIRED', - UNIQUE = 'UNIQUE' + OUT_OF_SCOPE_CHANNEL = 'OUT_OF_SCOPE_CHANNEL' } export type PermissionGroupFilterInput = { @@ -4120,12 +4187,36 @@ export type PermissionGroupUpdateInput = { addPermissions?: InputMaybe>; /** List of users to assign to this group. */ addUsers?: InputMaybe>; + /** + * List of channels to assign to this group. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + addChannels?: InputMaybe>; /** Group name. */ name?: InputMaybe; /** List of permission code names to unassign from this group. */ removePermissions?: InputMaybe>; /** List of users to unassign from this group. */ removeUsers?: InputMaybe>; + /** + * List of channels to unassign from this group. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + removeChannels?: InputMaybe>; + /** + * Determine if the group has restricted access to channels. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + restrictedAccessToChannels?: InputMaybe; }; export enum PluginConfigurationType { @@ -5324,6 +5415,12 @@ export type ShopSettingsInput = { * Added in Saleor 3.1. */ limitQuantityPerCheckout?: InputMaybe; + /** + * Enable automatic account confirmation by email. + * + * Added in Saleor 3.14. + */ + enableAccountConfirmationByEmail?: InputMaybe; /** * Include taxes in prices. * @@ -5368,6 +5465,18 @@ export type StaffCreateInput = { isActive?: InputMaybe; /** A note about the user. */ note?: InputMaybe; + /** + * Fields required to update the user metadata. + * + * Added in Saleor 3.14. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the user private metadata. + * + * Added in Saleor 3.14. + */ + privateMetadata?: InputMaybe>; /** List of permission group IDs to which user should be assigned. */ addGroups?: InputMaybe>; /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ @@ -5403,6 +5512,18 @@ export type StaffUpdateInput = { isActive?: InputMaybe; /** A note about the user. */ note?: InputMaybe; + /** + * Fields required to update the user metadata. + * + * Added in Saleor 3.14. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the user private metadata. + * + * Added in Saleor 3.14. + */ + privateMetadata?: InputMaybe>; /** List of permission group IDs to which user should be assigned. */ addGroups?: InputMaybe>; /** List of permission group IDs from which user should be unassigned. */ @@ -6024,6 +6145,18 @@ export type UpdateInvoiceInput = { number?: InputMaybe; /** URL of an invoice to download. */ url?: InputMaybe; + /** + * Fields required to update the invoice metadata. + * + * Added in Saleor 3.14. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the invoice private metadata. + * + * Added in Saleor 3.14. + */ + privateMetadata?: InputMaybe>; }; /** An enumeration. */ @@ -6046,6 +6179,18 @@ export type UserCreateInput = { isActive?: InputMaybe; /** A note about the user. */ note?: InputMaybe; + /** + * Fields required to update the user metadata. + * + * Added in Saleor 3.14. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the user private metadata. + * + * Added in Saleor 3.14. + */ + privateMetadata?: InputMaybe>; /** User language code. */ languageCode?: InputMaybe; /** @@ -6461,8 +6606,32 @@ export enum WebhookEventTypeAsyncEnum { ORDER_CREATED = 'ORDER_CREATED', /** An order is confirmed (status change unconfirmed -> unfulfilled) by a staff user using the OrderConfirm mutation. It also triggers when the user completes the checkout and the shop setting `automatically_confirm_all_new_orders` is enabled. */ ORDER_CONFIRMED = 'ORDER_CONFIRMED', + /** + * Payment has been made. The order may be partially or fully paid. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + ORDER_PAID = 'ORDER_PAID', /** Payment is made and an order is fully paid. */ ORDER_FULLY_PAID = 'ORDER_FULLY_PAID', + /** + * The order received a refund. The order may be partially or fully refunded. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + ORDER_REFUNDED = 'ORDER_REFUNDED', + /** + * The order is fully refunded. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + ORDER_FULLY_REFUNDED = 'ORDER_FULLY_REFUNDED', /** An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. */ ORDER_UPDATED = 'ORDER_UPDATED', /** An order is cancelled. */ @@ -6768,8 +6937,32 @@ export enum WebhookEventTypeEnum { ORDER_CREATED = 'ORDER_CREATED', /** An order is confirmed (status change unconfirmed -> unfulfilled) by a staff user using the OrderConfirm mutation. It also triggers when the user completes the checkout and the shop setting `automatically_confirm_all_new_orders` is enabled. */ ORDER_CONFIRMED = 'ORDER_CONFIRMED', + /** + * Payment has been made. The order may be partially or fully paid. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + ORDER_PAID = 'ORDER_PAID', /** Payment is made and an order is fully paid. */ ORDER_FULLY_PAID = 'ORDER_FULLY_PAID', + /** + * The order received a refund. The order may be partially or fully refunded. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + ORDER_REFUNDED = 'ORDER_REFUNDED', + /** + * The order is fully refunded. + * + * Added in Saleor 3.14. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + ORDER_FULLY_REFUNDED = 'ORDER_FULLY_REFUNDED', /** An order is updated; triggered for all changes related to an order; covers all other order webhooks, except for ORDER_CREATED. */ ORDER_UPDATED = 'ORDER_UPDATED', /** An order is cancelled. */ @@ -7151,7 +7344,10 @@ export enum WebhookSampleEventTypeEnum { MENU_ITEM_DELETED = 'MENU_ITEM_DELETED', ORDER_CREATED = 'ORDER_CREATED', ORDER_CONFIRMED = 'ORDER_CONFIRMED', + ORDER_PAID = 'ORDER_PAID', ORDER_FULLY_PAID = 'ORDER_FULLY_PAID', + ORDER_REFUNDED = 'ORDER_REFUNDED', + ORDER_FULLY_REFUNDED = 'ORDER_FULLY_REFUNDED', ORDER_UPDATED = 'ORDER_UPDATED', ORDER_CANCELLED = 'ORDER_CANCELLED', ORDER_EXPIRED = 'ORDER_EXPIRED', @@ -8543,7 +8739,7 @@ export type LimitInfoFragment = { __typename: 'Limits', channels?: number | null export type ShopLimitFragment = { __typename: 'Shop', limits: { __typename: 'LimitInfo', currentUsage: { __typename: 'Limits', channels?: number | null, orders?: number | null, productVariants?: number | null, staffUsers?: number | null, warehouses?: number | null }, allowedUsage: { __typename: 'Limits', channels?: number | null, orders?: number | null, productVariants?: number | null, staffUsers?: number | null, warehouses?: number | null } } }; -export type ShopFragment = { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } }; +export type ShopFragment = { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, enableAccountConfirmationByEmail: boolean | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } }; export type StaffMemberFragment = { __typename: 'User', id: string, email: string, firstName: string, isActive: boolean, lastName: string }; @@ -10129,12 +10325,12 @@ export type ShopSettingsUpdateMutationVariables = Exact<{ }>; -export type ShopSettingsUpdateMutation = { __typename: 'Mutation', shopSettingsUpdate: { __typename: 'ShopSettingsUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } } | null } | null, shopAddressUpdate: { __typename: 'ShopAddressUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null } | null } | null }; +export type ShopSettingsUpdateMutation = { __typename: 'Mutation', shopSettingsUpdate: { __typename: 'ShopSettingsUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, enableAccountConfirmationByEmail: boolean | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } } | null } | null, shopAddressUpdate: { __typename: 'ShopAddressUpdate', errors: Array<{ __typename: 'ShopError', code: ShopErrorCode, field: string | null, message: string | null }>, shop: { __typename: 'Shop', companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null } | null } | null }; export type SiteSettingsQueryVariables = Exact<{ [key: string]: never; }>; -export type SiteSettingsQuery = { __typename: 'Query', shop: { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } } }; +export type SiteSettingsQuery = { __typename: 'Query', shop: { __typename: 'Shop', customerSetPasswordUrl: string | null, defaultMailSenderAddress: string | null, defaultMailSenderName: string | null, description: string | null, name: string, reserveStockDurationAnonymousUser: number | null, reserveStockDurationAuthenticatedUser: number | null, limitQuantityPerCheckout: number | null, enableAccountConfirmationByEmail: boolean | null, companyAddress: { __typename: 'Address', city: string, cityArea: string, companyName: string, countryArea: string, firstName: string, id: string, lastName: string, phone: string | null, postalCode: string, streetAddress1: string, streetAddress2: string, country: { __typename: 'CountryDisplay', code: string, country: string } } | null, countries: Array<{ __typename: 'CountryDisplay', code: string, country: string }>, domain: { __typename: 'Domain', host: string } } }; export type StaffMemberAddMutationVariables = Exact<{ input: StaffCreateInput; diff --git a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx index 4db6a9a56..db0004c9b 100644 --- a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx +++ b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx @@ -1,9 +1,9 @@ import { createCountryHandler } from "@dashboard/components/AddressEdit/createCountryHandler"; import { TopNav } from "@dashboard/components/AppLayout/TopNav"; +import { DashboardCard } from "@dashboard/components/Card"; import CompanyAddressInput from "@dashboard/components/CompanyAddressInput"; import { ConfirmButtonTransitionState } from "@dashboard/components/ConfirmButton"; import Form from "@dashboard/components/Form"; -import Hr from "@dashboard/components/Hr"; import { DetailPageLayout } from "@dashboard/components/Layouts"; import PageSectionHeader from "@dashboard/components/PageSectionHeader"; import Savebar from "@dashboard/components/Savebar"; @@ -16,8 +16,7 @@ import useStateFromProps from "@dashboard/hooks/useStateFromProps"; import { commonMessages } from "@dashboard/intl"; import createSingleAutocompleteSelectHandler from "@dashboard/utils/handlers/singleAutocompleteSelectChangeHandler"; import { mapCountriesToChoices } from "@dashboard/utils/maps"; -import { makeStyles } from "@saleor/macaw-ui"; -import { Box } from "@saleor/macaw-ui/next"; +import { Box, Checkbox, Divider, Text } from "@saleor/macaw-ui/next"; import React from "react"; import { useIntl } from "react-intl"; @@ -41,6 +40,7 @@ export interface SiteSettingsPageFormData reserveStockDurationAnonymousUser: number; reserveStockDurationAuthenticatedUser: number; limitQuantityPerCheckout: number; + emailConfirmation: boolean; } export interface SiteSettingsPageProps { @@ -69,22 +69,8 @@ export function areAddressInputFieldsModified( .some(field => field !== ""); } -const useStyles = makeStyles( - theme => ({ - hr: { - gridColumnEnd: "span 2", - margin: theme.spacing(1, 0), - }, - }), - { - name: "SiteSettingsPage", - }, -); - const SiteSettingsPage: React.FC = props => { const { disabled, errors, saveButtonBarState, shop, onSubmit } = props; - - const classes = useStyles(props); const intl = useIntl(); const navigate = useNavigator(); @@ -105,6 +91,7 @@ const SiteSettingsPage: React.FC = props => { streetAddress1: shop?.companyAddress?.streetAddress1 || "", streetAddress2: shop?.companyAddress?.streetAddress2 || "", }; + const initialForm: SiteSettingsPageFormData = { ...initialFormAddress, description: shop?.description || "", @@ -113,6 +100,7 @@ const SiteSettingsPage: React.FC = props => { reserveStockDurationAuthenticatedUser: shop?.reserveStockDurationAuthenticatedUser ?? 0, limitQuantityPerCheckout: shop?.limitQuantityPerCheckout ?? 0, + emailConfirmation: shop?.enableAccountConfirmationByEmail ?? false, }; return ( @@ -137,6 +125,10 @@ const SiteSettingsPage: React.FC = props => { const handleCountrySelect = createCountryHandler(countrySelect, set); + const handleEmailConfirmationChange = isEnabled => { + change({ target: { name: "emailConfirmation", value: isEnabled } }); + }; + return ( = props => { title={intl.formatMessage(commonMessages.generalInformations)} /> - - + + = props => { /> -
+ - + = props => { onCountryChange={handleCountrySelect} /> + + + + + + + + {intl.formatMessage( + messages.sectionEmailConfirmationHeader, + )} + + + + + {intl.formatMessage( + messages.sectionEmailConfirmationHeader, + )} + + + + + = () => { displayLoader: true, }); - const [ - updateShopSettings, - updateShopSettingsOpts, - ] = useShopSettingsUpdateMutation({ - onCompleted: data => { - if ( - [ - ...(data?.shopAddressUpdate?.errors || []), - ...(data?.shopSettingsUpdate?.errors || []), - ].length === 0 - ) { - notify({ - status: "success", - text: intl.formatMessage(commonMessages.savedChanges), - }); - } - }, - }); + const [updateShopSettings, updateShopSettingsOpts] = + useShopSettingsUpdateMutation({ + onCompleted: data => { + if ( + [ + ...(data?.shopAddressUpdate?.errors || []), + ...(data?.shopSettingsUpdate?.errors || []), + ].length === 0 + ) { + notify({ + status: "success", + text: intl.formatMessage(commonMessages.savedChanges), + }); + } + }, + }); const errors = [ ...(updateShopSettingsOpts.data?.shopSettingsUpdate?.errors || []), @@ -79,6 +77,7 @@ export const SiteSettings: React.FC = () => { data.reserveStockDurationAnonymousUser || null, reserveStockDurationAuthenticatedUser: data.reserveStockDurationAuthenticatedUser || null, + enableAccountConfirmationByEmail: data.emailConfirmation, }, }, }), diff --git a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx index 681420369..a17768307 100644 --- a/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx +++ b/src/warehouses/components/WarehouseInfo/WarehouseInfo.tsx @@ -1,10 +1,10 @@ -import CardTitle from "@dashboard/components/CardTitle"; +import { DashboardCard } from "@dashboard/components/Card"; import { WarehouseErrorFragment } from "@dashboard/graphql"; import { FormChange } from "@dashboard/hooks/useForm"; import { commonMessages } from "@dashboard/intl"; import { getFormErrors } from "@dashboard/utils/errors"; import getWarehouseErrorMessage from "@dashboard/utils/errors/warehouse"; -import { Card, CardContent, TextField } from "@material-ui/core"; +import { TextField } from "@material-ui/core"; import React from "react"; import { useIntl } from "react-intl"; @@ -26,11 +26,11 @@ const WarehouseInfo: React.FC = ({ const formErrors = getFormErrors(["name"], errors); return ( - - - + + + {intl.formatMessage(commonMessages.generalInformations)} + + = ({ }, }} /> - - + + ); };