From 3a3a4a7ae6519278d95a78643fd884ca55c1c679 Mon Sep 17 00:00:00 2001 From: Dawid Date: Wed, 2 Nov 2022 13:31:17 +0100 Subject: [PATCH] Add metadata webhook events (#2375) --- introspection.json | 2060 +++++++++++++++++++++++- schema.graphql | 857 +++++++++- src/graphql/fragmentTypes.generated.ts | 12 + src/graphql/typePolicies.generated.ts | 154 +- src/graphql/types.generated.ts | 412 ++++- src/webhooks/utils.tsx | 17 + 6 files changed, 3431 insertions(+), 81 deletions(-) diff --git a/introspection.json b/introspection.json index 5bc487419..ad30f825e 100644 --- a/introspection.json +++ b/introspection.json @@ -8773,7 +8773,7 @@ }, { "name": "richText", - "description": "Represents the text of the attribute value, includes formatting.\n\nRich text format. For reference see https://editorjs.io/", + "description": "Represents the text of the attribute value, includes formatting.\n\nRich text format. For reference see https://editorjs.io/\n\nDEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute.", "type": { "kind": "SCALAR", "name": "JSONString", @@ -8785,7 +8785,7 @@ }, { "name": "plainText", - "description": "Represents the text of the attribute value, plain text without formating.", + "description": "Represents the text of the attribute value, plain text without formating.\n\nDEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute.", "type": { "kind": "SCALAR", "name": "String", @@ -9691,7 +9691,7 @@ }, { "name": "richText", - "description": "Represents the text of the attribute value, includes formatting.\n\nRich text format. For reference see https://editorjs.io/", + "description": "Represents the text of the attribute value, includes formatting.\n\nRich text format. For reference see https://editorjs.io/\n\nDEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute.", "type": { "kind": "SCALAR", "name": "JSONString", @@ -9703,7 +9703,7 @@ }, { "name": "plainText", - "description": "Represents the text of the attribute value, plain text without formating.", + "description": "Represents the text of the attribute value, plain text without formating.\n\nDEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute.", "type": { "kind": "SCALAR", "name": "String", @@ -11575,6 +11575,46 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "metadata", + "description": "Fields required to update the category metadata.\n\nAdded in Saleor 3.8.", + "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 category private metadata.\n\nAdded in Saleor 3.8.", + "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, @@ -16528,6 +16568,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "CheckoutMetadataUpdated", + "description": "Event sent when checkout metadata is updated.\n\nAdded in Saleor 3.8.\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": "checkout", + "description": "The checkout the event relates to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Checkout", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "CheckoutPaymentCreate", @@ -18263,6 +18380,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the collection metadata.\n\nAdded in Saleor 3.8.", + "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 collection private metadata.\n\nAdded in Saleor 3.8.", + "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": "products", "description": "List of products to be added to the collection.", @@ -18871,12 +19028,142 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "metadata", + "description": "Fields required to update the collection metadata.\n\nAdded in Saleor 3.8.", + "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 collection private metadata.\n\nAdded in Saleor 3.8.", + "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, "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "CollectionMetadataUpdated", + "description": "Event sent when collection metadata is updated.\n\nAdded in Saleor 3.8.\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": "collection", + "description": "The collection the event relates to.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Collection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "CollectionPublished", @@ -22299,6 +22586,26 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ids", + "description": "Filter by ids. \n\nAdded in Saleor 3.8.", + "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": "updatedAt", "description": null, @@ -22423,6 +22730,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "CustomerMetadataUpdated", + "description": "Event sent when customer user metadata is updated.\n\nAdded in Saleor 3.8.\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": "user", + "description": "The user the event relates to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "CustomerUpdate", @@ -23518,6 +23902,46 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "metadata", + "description": "Fields required to update the digital content metadata.\n\nAdded in Saleor 3.8.", + "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 digital content private metadata.\n\nAdded in Saleor 3.8.", + "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, @@ -23665,6 +24089,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the digital content metadata.\n\nAdded in Saleor 3.8.", + "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 digital content private metadata.\n\nAdded in Saleor 3.8.", + "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": "contentFile", "description": "Represents an file in a multipart request.", @@ -25321,6 +25785,11 @@ "name": "CheckoutFilterShippingMethods", "ofType": null }, + { + "kind": "OBJECT", + "name": "CheckoutMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "CheckoutUpdated", @@ -25336,6 +25805,11 @@ "name": "CollectionDeleted", "ofType": null }, + { + "kind": "OBJECT", + "name": "CollectionMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "CollectionUpdated", @@ -25346,6 +25820,11 @@ "name": "CustomerCreated", "ofType": null }, + { + "kind": "OBJECT", + "name": "CustomerMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "CustomerUpdated", @@ -25381,6 +25860,11 @@ "name": "FulfillmentCreated", "ofType": null }, + { + "kind": "OBJECT", + "name": "FulfillmentMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "GiftCardCreated", @@ -25391,6 +25875,11 @@ "name": "GiftCardDeleted", "ofType": null }, + { + "kind": "OBJECT", + "name": "GiftCardMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "GiftCardStatusChanged", @@ -25476,6 +25965,11 @@ "name": "OrderFullyPaid", "ofType": null }, + { + "kind": "OBJECT", + "name": "OrderMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "OrderUpdated", @@ -25571,6 +26065,11 @@ "name": "ProductDeleted", "ofType": null }, + { + "kind": "OBJECT", + "name": "ProductMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "ProductUpdated", @@ -25591,6 +26090,11 @@ "name": "ProductVariantDeleted", "ofType": null }, + { + "kind": "OBJECT", + "name": "ProductVariantMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "ProductVariantOutOfStock", @@ -25651,6 +26155,11 @@ "name": "ShippingZoneDeleted", "ofType": null }, + { + "kind": "OBJECT", + "name": "ShippingZoneMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "ShippingZoneUpdated", @@ -25676,6 +26185,11 @@ "name": "TransactionActionRequest", "ofType": null }, + { + "kind": "OBJECT", + "name": "TransactionItemMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "TranslationCreated", @@ -25696,6 +26210,11 @@ "name": "VoucherDeleted", "ofType": null }, + { + "kind": "OBJECT", + "name": "VoucherMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "VoucherUpdated", @@ -25711,6 +26230,11 @@ "name": "WarehouseDeleted", "ofType": null }, + { + "kind": "OBJECT", + "name": "WarehouseMetadataUpdated", + "ofType": null + }, { "kind": "OBJECT", "name": "WarehouseUpdated", @@ -29167,6 +29691,95 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "FulfillmentMetadataUpdated", + "description": "Event sent when fulfillment metadata is updated.\n\nAdded in Saleor 3.8.\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": "fulfillment", + "description": "The fulfillment the event relates to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Fulfillment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "order", + "description": "The order the fulfillment belongs 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": "FulfillmentRefundProducts", @@ -31887,6 +32500,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "GiftCardMetadataUpdated", + "description": "Event sent when gift card metadata is updated.\n\nAdded in Saleor 3.8.\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": "giftCard", + "description": "The gift card the event relates to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GiftCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "GiftCardResend", @@ -32223,19 +32913,25 @@ "enumValues": [ { "name": "PRODUCT", - "description": "Sort orders by product.", + "description": "Sort gift cards by product.", "isDeprecated": false, "deprecationReason": null }, { "name": "USED_BY", - "description": "Sort orders by used by.", + "description": "Sort gift cards by used by.", "isDeprecated": false, "deprecationReason": null }, { "name": "CURRENT_BALANCE", - "description": "Sort orders by current balance.", + "description": "Sort gift cards by current balance.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CREATED_AT", + "description": "Sort gift cards by created at.\n\nAdded in Saleor 3.8.", "isDeprecated": false, "deprecationReason": null } @@ -39416,6 +40112,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "audience", + "description": "The audience that will be included in all JWT tokens for the app.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -45881,13 +46589,21 @@ "name": "id", "description": "ID of a product variant to delete.", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sku", + "description": "SKU of a product variant to delete.\n\nAdded in Saleor 3.8.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -45963,19 +46679,35 @@ "name": "ids", "description": "List of product variant IDs to delete.", "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "skus", + "description": "List of product variant SKUs to delete.\n\nAdded in Saleor 3.8.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null } } }, @@ -46049,17 +46781,25 @@ "name": "productVariantStocksDelete", "description": "Delete stocks from product variant. \n\nRequires one of the following permissions: MANAGE_PRODUCTS.", "args": [ + { + "name": "sku", + "description": "SKU of product variant for which stocks will be deleted.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "variantId", "description": "ID of product variant for which stocks will be deleted.", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -46067,7 +46807,7 @@ }, { "name": "warehouseIds", - "description": null, + "description": "Input list of warehouse IDs.", "type": { "kind": "LIST", "name": null, @@ -46098,9 +46838,21 @@ "name": "productVariantStocksUpdate", "description": "Update stocks for product variant. \n\nRequires one of the following permissions: MANAGE_PRODUCTS.", "args": [ + { + "name": "sku", + "description": "SKU of product variant for which stocks will be updated.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "stocks", - "description": "Input list of stocks to create.", + "description": "Input list of stocks to create or update.", "type": { "kind": "NON_NULL", "name": null, @@ -46124,15 +46876,11 @@ }, { "name": "variantId", - "description": "ID of a product variant for which stocks will be created.", + "description": "ID of a product variant for which stocks will be updated.", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -46155,13 +46903,9 @@ "name": "id", "description": "ID of a product variant to update.", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -46182,6 +46926,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "sku", + "description": "SKU of a product variant to update.\n\nAdded in Saleor 3.8.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -46306,13 +47062,9 @@ "name": "id", "description": "ID of a product variant to update.", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -46341,6 +47093,18 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "sku", + "description": "SKU of a product variant to update.\n\nAdded in Saleor 3.8.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { @@ -51114,7 +51878,7 @@ }, { "name": "customerId", - "description": "ID of customer to attach to checkout. Can be used to attach customer to checkout by staff or app. Requires IMPERSONATE_USER permission.", + "description": "ID of customer to attach to checkout. Requires IMPERSONATE_USER permission when customerId is different than the logged-in user.", "type": { "kind": "SCALAR", "name": "ID", @@ -53091,6 +53855,18 @@ "name": "tokenCreate", "description": "Create JWT token.", "args": [ + { + "name": "audience", + "description": "The audience that will be included to JWT tokens with prefix `custom:`.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "email", "description": "Email of a user.", @@ -61480,6 +62256,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "OrderMetadataUpdated", + "description": "Event sent when order metadata is updated.\n\nAdded in Saleor 3.8.\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": "ENUM", "name": "OrderOriginEnum", @@ -64501,7 +65354,7 @@ }, { "name": "CREATION_DATE", - "description": "Sort pages by creation date.", + "description": "Sort pages by creation date.\n\nDEPRECATED: this field will be removed in Saleor 4.0.", "isDeprecated": false, "deprecationReason": null }, @@ -64516,6 +65369,12 @@ "description": "Sort pages by publication date.\n\nDEPRECATED: this field will be removed in Saleor 4.0.", "isDeprecated": false, "deprecationReason": null + }, + { + "name": "CREATED_AT", + "description": "Sort pages by creation date.\n\nDEPRECATED: this field will be removed in Saleor 4.0.", + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null @@ -67730,6 +68589,26 @@ "description": null, "fields": null, "inputFields": [ + { + "name": "ids", + "description": "Filter by ids. \n\nAdded in Saleor 3.8.", + "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": "checkouts", "description": null, @@ -72644,6 +73523,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the product metadata.\n\nAdded in Saleor 3.8.", + "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 product private metadata.\n\nAdded in Saleor 3.8.", + "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": "productType", "description": "ID of the type that product belongs to.", @@ -73385,6 +74304,54 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "publishedFrom", + "description": "Filter by the publication date. \n\nAdded in Saleor 3.8.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isAvailable", + "description": "Filter by availability for purchase. \n\nAdded in Saleor 3.8.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "availableFrom", + "description": "Filter by the date of availability for purchase. \n\nAdded in Saleor 3.8.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isVisibleInListing", + "description": "Filter by visibility in product listings. \n\nAdded in Saleor 3.8.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "price", "description": null, @@ -73767,6 +74734,46 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "metadata", + "description": "Fields required to update the product metadata.\n\nAdded in Saleor 3.8.", + "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 product private metadata.\n\nAdded in Saleor 3.8.", + "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, @@ -74431,6 +75438,108 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ProductMetadataUpdated", + "description": "Event sent when product metadata is updated.\n\nAdded in Saleor 3.8.\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": "product", + "description": "The product the event relates to.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Product", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "category", + "description": "The category of the product.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Category", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "ProductOrder", @@ -74579,6 +75688,12 @@ "description": "Sort products by rating.", "isDeprecated": false, "deprecationReason": null + }, + { + "name": "CREATED_AT", + "description": "Sort products by creation date.\n\nAdded in Saleor 3.8.", + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null @@ -77676,6 +78791,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the product variant metadata.\n\nAdded in Saleor 3.8.", + "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 product variant private metadata.\n\nAdded in Saleor 3.8.", + "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": "stocks", "description": "Stocks of a product available for sale.", @@ -78310,6 +79465,46 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metadata", + "description": "Fields required to update the product variant metadata.\n\nAdded in Saleor 3.8.", + "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 product variant private metadata.\n\nAdded in Saleor 3.8.", + "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": "product", "description": "Product ID of which type is the variant.", @@ -78786,12 +79981,142 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "metadata", + "description": "Fields required to update the product variant metadata.\n\nAdded in Saleor 3.8.", + "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 product variant private metadata.\n\nAdded in Saleor 3.8.", + "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, "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ProductVariantMetadataUpdated", + "description": "Event sent when product variant metadata is updated.\n\nAdded in Saleor 3.8.\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": "productVariant", + "description": "The product variant the event relates to.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ProductVariant", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "ProductVariantOutOfStock", @@ -90955,6 +92280,96 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ShippingZoneMetadataUpdated", + "description": "Event sent when shipping zone metadata is updated.\n\nAdded in Saleor 3.8.\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": "shippingZone", + "description": "The shipping zone the event relates to.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ShippingZone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "ShippingZoneUpdate", @@ -96495,6 +97910,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "TransactionItemMetadataUpdated", + "description": "Event sent when transaction item metadata is updated.\n\nAdded in Saleor 3.8.\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": "transaction", + "description": "Look up a transaction.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "TransactionItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "TransactionKind", @@ -98276,6 +99768,79 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "checkouts", + "description": "Returns checkouts assigned to this user.\n\nAdded in Saleor 3.8.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Return the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Return the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Return the first n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Return the last n elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CheckoutCountableConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "giftCards", "description": "List of the user gift cards.", @@ -101788,6 +103353,96 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "VoucherMetadataUpdated", + "description": "Event sent when voucher metadata is updated.\n\nAdded in Saleor 3.8.\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": "voucher", + "description": "The voucher the event relates to.", + "args": [ + { + "name": "channel", + "description": "Slug of a channel for which the data should be returned.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Voucher", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "VoucherRemoveCatalogues", @@ -103505,6 +105160,83 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "WarehouseMetadataUpdated", + "description": "Event sent when warehouse metadata is updated.\n\nAdded in Saleor 3.8.\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": "warehouse", + "description": "The warehouse the event relates to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Warehouse", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Event", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "WarehouseShippingZoneAssign", @@ -104880,6 +106612,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "GIFT_CARD_METADATA_UPDATED", + "description": "A gift card metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "MENU_CREATED", "description": "A new menu created.", @@ -104952,6 +106690,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_METADATA_UPDATED", + "description": "An order metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "DRAFT_ORDER_CREATED", "description": "A draft order is created.", @@ -105030,6 +106774,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "CUSTOMER_METADATA_UPDATED", + "description": "A customer account metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "COLLECTION_CREATED", "description": "A new collection is created.", @@ -105048,6 +106798,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "COLLECTION_METADATA_UPDATED", + "description": "A collection metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "PRODUCT_CREATED", "description": "A new product is created.", @@ -105066,6 +106822,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PRODUCT_METADATA_UPDATED", + "description": "A product metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "PRODUCT_VARIANT_CREATED", "description": "A new product variant is created.", @@ -105096,6 +106858,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PRODUCT_VARIANT_METADATA_UPDATED", + "description": "A product variant metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "CHECKOUT_CREATED", "description": "A new checkout is created.", @@ -105108,6 +106876,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "CHECKOUT_METADATA_UPDATED", + "description": "A checkout metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "FULFILLMENT_CREATED", "description": "A new fulfillment is created.", @@ -105126,6 +106900,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "FULFILLMENT_METADATA_UPDATED", + "description": "A fulfillment metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "NOTIFY_USER", "description": "User notification triggered.", @@ -105222,6 +107002,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "SHIPPING_ZONE_METADATA_UPDATED", + "description": "A shipping zone metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "STAFF_CREATED", "description": "A new staff user is created.", @@ -105246,6 +107032,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "TRANSACTION_ITEM_METADATA_UPDATED", + "description": "Transaction item metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "TRANSLATION_CREATED", "description": "A new translation is created.", @@ -105276,6 +107068,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "WAREHOUSE_METADATA_UPDATED", + "description": "A warehouse metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "VOUCHER_CREATED", "description": "A new voucher created.", @@ -105294,6 +107092,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "VOUCHER_METADATA_UPDATED", + "description": "A voucher metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "OBSERVABILITY", "description": "An observability event is created.", @@ -105461,6 +107265,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "GIFT_CARD_METADATA_UPDATED", + "description": "A gift card metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "MENU_CREATED", "description": "A new menu created.", @@ -105533,6 +107343,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_METADATA_UPDATED", + "description": "An order metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "DRAFT_ORDER_CREATED", "description": "A draft order is created.", @@ -105611,6 +107427,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "CUSTOMER_METADATA_UPDATED", + "description": "A customer account metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "COLLECTION_CREATED", "description": "A new collection is created.", @@ -105629,6 +107451,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "COLLECTION_METADATA_UPDATED", + "description": "A collection metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "PRODUCT_CREATED", "description": "A new product is created.", @@ -105647,6 +107475,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PRODUCT_METADATA_UPDATED", + "description": "A product metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "PRODUCT_VARIANT_CREATED", "description": "A new product variant is created.", @@ -105677,6 +107511,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PRODUCT_VARIANT_METADATA_UPDATED", + "description": "A product variant metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "CHECKOUT_CREATED", "description": "A new checkout is created.", @@ -105689,6 +107529,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "CHECKOUT_METADATA_UPDATED", + "description": "A checkout metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "FULFILLMENT_CREATED", "description": "A new fulfillment is created.", @@ -105707,6 +107553,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "FULFILLMENT_METADATA_UPDATED", + "description": "A fulfillment metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "NOTIFY_USER", "description": "User notification triggered.", @@ -105803,6 +107655,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "SHIPPING_ZONE_METADATA_UPDATED", + "description": "A shipping zone metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "STAFF_CREATED", "description": "A new staff user is created.", @@ -105827,6 +107685,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "TRANSACTION_ITEM_METADATA_UPDATED", + "description": "Transaction item metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "TRANSLATION_CREATED", "description": "A new translation is created.", @@ -105857,6 +107721,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "WAREHOUSE_METADATA_UPDATED", + "description": "A warehouse metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "VOUCHER_CREATED", "description": "A new voucher created.", @@ -105875,6 +107745,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "VOUCHER_METADATA_UPDATED", + "description": "A voucher metadata is updated.\n\nAdded in Saleor 3.8.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "OBSERVABILITY", "description": "An observability event is created.", @@ -106191,6 +108067,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "GIFT_CARD_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "MENU_CREATED", "description": null, @@ -106263,6 +108145,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ORDER_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "DRAFT_ORDER_CREATED", "description": null, @@ -106341,6 +108229,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "CUSTOMER_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "COLLECTION_CREATED", "description": null, @@ -106359,6 +108253,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "COLLECTION_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "PRODUCT_CREATED", "description": null, @@ -106377,6 +108277,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PRODUCT_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "PRODUCT_VARIANT_CREATED", "description": null, @@ -106407,6 +108313,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "PRODUCT_VARIANT_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "CHECKOUT_CREATED", "description": null, @@ -106419,6 +108331,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "CHECKOUT_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "FULFILLMENT_CREATED", "description": null, @@ -106437,6 +108355,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "FULFILLMENT_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "NOTIFY_USER", "description": null, @@ -106533,6 +108457,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "SHIPPING_ZONE_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "STAFF_CREATED", "description": null, @@ -106557,6 +108487,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "TRANSACTION_ITEM_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "TRANSLATION_CREATED", "description": null, @@ -106587,6 +108523,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "WAREHOUSE_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "VOUCHER_CREATED", "description": null, @@ -106605,6 +108547,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "VOUCHER_METADATA_UPDATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "OBSERVABILITY", "description": null, diff --git a/schema.graphql b/schema.graphql index 5bb62dc28..83bc9a454 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1739,11 +1739,15 @@ input AttributeValueCreateInput { Represents the text of the attribute value, includes formatting. Rich text format. For reference see https://editorjs.io/ + + DEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. """ richText: JSONString """ Represents the text of the attribute value, plain text without formating. + + DEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. """ plainText: String @@ -1947,11 +1951,15 @@ input AttributeValueUpdateInput { Represents the text of the attribute value, includes formatting. Rich text format. For reference see https://editorjs.io/ + + DEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. """ richText: JSONString """ Represents the text of the attribute value, plain text without formating. + + DEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. """ plainText: String @@ -2379,6 +2387,20 @@ input CategoryInput { """Alt text for a product media.""" backgroundImageAlt: String + + """ + Fields required to update the category metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the category private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] } enum CategorySortField { @@ -3507,6 +3529,30 @@ type CheckoutLinesUpdate { errors: [CheckoutError!]! } +""" +Event sent when checkout metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type CheckoutMetadataUpdated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The checkout the event relates to.""" + checkout: Checkout +} + """Create a new payment for given checkout.""" type CheckoutPaymentCreate { """Related checkout object.""" @@ -3867,6 +3913,20 @@ input CollectionCreateInput { """ publicationDate: Date + """ + Fields required to update the collection metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the collection private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] + """List of products to be added to the collection.""" products: [ID!] } @@ -4010,6 +4070,47 @@ input CollectionInput { DEPRECATED: this field will be removed in Saleor 4.0. """ publicationDate: Date + + """ + Fields required to update the collection metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the collection private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] +} + +""" +Event sent when collection metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type CollectionMetadataUpdated implements Event { + """Time of the event.""" + 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 collection the event relates to.""" + collection( + """Slug of a channel for which the data should be returned.""" + channel: String + ): Collection } enum CollectionPublished { @@ -4663,6 +4764,13 @@ input CustomerFilterInput { placedOrders: DateRangeInput search: String metadata: [MetadataFilter!] + + """ + Filter by ids. + + Added in Saleor 3.8. + """ + ids: [ID!] updatedAt: DateTimeRangeInput } @@ -4692,6 +4800,30 @@ input CustomerInput { languageCode: LanguageCodeEnum } +""" +Event sent when customer user metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type CustomerMetadataUpdated implements Event { + """Time of the event.""" + 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 user the event relates to.""" + user: User +} + """ Updates an existing customer. @@ -4911,6 +5043,20 @@ input DigitalContentInput { """Overwrite default automatic_fulfillment setting for variant.""" automaticFulfillment: Boolean + + """ + Fields required to update the digital content metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the digital content private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] } """ @@ -4942,6 +5088,20 @@ input DigitalContentUploadInput { """Overwrite default automatic_fulfillment setting for variant.""" automaticFulfillment: Boolean + """ + Fields required to update the digital content metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the digital content private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] + """Represents an file in a multipart request.""" contentFile: Upload! } @@ -5952,6 +6112,33 @@ type FulfillmentLine implements Node { orderLine: OrderLine } +""" +Event sent when fulfillment metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type FulfillmentMetadataUpdated implements Event { + """Time of the event.""" + 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 fulfillment the event relates to.""" + fulfillment: Fulfillment + + """The order the fulfillment belongs to.""" + order: Order +} + """ Refund products. @@ -6631,6 +6818,30 @@ input GiftCardFilterInput { code: String } +""" +Event sent when gift card metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type GiftCardMetadataUpdated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The gift card the event relates to.""" + giftCard: GiftCard +} + """ Resend a gift card. @@ -6712,14 +6923,21 @@ input GiftCardSettingsUpdateInput { } enum GiftCardSortField { - """Sort orders by product.""" + """Sort gift cards by product.""" PRODUCT - """Sort orders by used by.""" + """Sort gift cards by used by.""" USED_BY - """Sort orders by current balance.""" + """Sort gift cards by current balance.""" CURRENT_BALANCE + + """ + Sort gift cards by created at. + + Added in Saleor 3.8. + """ + CREATED_AT } input GiftCardSortingInput { @@ -8026,6 +8244,15 @@ type Manifest { Note: this API is currently in Feature Preview and can be subject to changes at later point. """ webhooks: [AppManifestWebhook!]! + + """ + The audience that will be included in all JWT tokens for the app. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + audience: String } type Margin { @@ -9619,7 +9846,14 @@ type Mutation { """ productVariantDelete( """ID of a product variant to delete.""" - id: ID! + id: ID + + """ + SKU of a product variant to delete. + + Added in Saleor 3.8. + """ + sku: String ): ProductVariantDelete """ @@ -9642,7 +9876,14 @@ type Mutation { """ productVariantBulkDelete( """List of product variant IDs to delete.""" - ids: [ID!]! + ids: [ID!] + + """ + List of product variant SKUs to delete. + + Added in Saleor 3.8. + """ + skus: [String!] ): ProductVariantBulkDelete """ @@ -9664,8 +9905,13 @@ type Mutation { Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantStocksDelete( + """SKU of product variant for which stocks will be deleted.""" + sku: String + """ID of product variant for which stocks will be deleted.""" - variantId: ID! + variantId: ID + + """Input list of warehouse IDs.""" warehouseIds: [ID!] ): ProductVariantStocksDelete @@ -9675,11 +9921,14 @@ type Mutation { Requires one of the following permissions: MANAGE_PRODUCTS. """ productVariantStocksUpdate( - """Input list of stocks to create.""" + """SKU of product variant for which stocks will be updated.""" + sku: String + + """Input list of stocks to create or update.""" stocks: [StockInput!]! - """ID of a product variant for which stocks will be created.""" - variantId: ID! + """ID of a product variant for which stocks will be updated.""" + variantId: ID ): ProductVariantStocksUpdate """ @@ -9689,10 +9938,17 @@ type Mutation { """ productVariantUpdate( """ID of a product variant to update.""" - id: ID! + id: ID """Fields required to update a product variant.""" input: ProductVariantInput! + + """ + SKU of a product variant to update. + + Added in Saleor 3.8. + """ + sku: String ): ProductVariantUpdate """ @@ -9729,12 +9985,19 @@ type Mutation { """ productVariantChannelListingUpdate( """ID of a product variant to update.""" - id: ID! + id: ID """ List of fields required to create or upgrade product variant channel listings. """ input: [ProductVariantChannelListingAddInput!]! + + """ + SKU of a product variant to update. + + Added in Saleor 3.8. + """ + sku: String ): ProductVariantChannelListingUpdate """ @@ -11210,7 +11473,7 @@ type Mutation { checkoutId: ID """ - ID of customer to attach to checkout. Can be used to attach customer to checkout by staff or app. Requires IMPERSONATE_USER permission. + ID of customer to attach to checkout. Requires IMPERSONATE_USER permission when customerId is different than the logged-in user. """ customerId: ID @@ -11911,6 +12174,15 @@ type Mutation { """Create JWT token.""" tokenCreate( + """ + The audience that will be included to JWT tokens with prefix `custom:`. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + audience: String + """Email of a user.""" email: String! @@ -13675,6 +13947,30 @@ type OrderMarkAsPaid { errors: [OrderError!]! } +""" +Event sent when order metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type OrderMetadataUpdated implements Event { + """Time of the event.""" + 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 +} + """An enumeration.""" enum OrderOriginEnum { CHECKOUT @@ -14340,7 +14636,11 @@ enum PageSortField { """Sort pages by visibility.""" VISIBILITY - """Sort pages by creation date.""" + """ + Sort pages by creation date. + + DEPRECATED: this field will be removed in Saleor 4.0. + """ CREATION_DATE """ @@ -14356,6 +14656,13 @@ enum PageSortField { DEPRECATED: this field will be removed in Saleor 4.0. """ PUBLISHED_AT + + """ + Sort pages by creation date. + + DEPRECATED: this field will be removed in Saleor 4.0. + """ + CREATED_AT } input PageSortingInput { @@ -15053,6 +15360,12 @@ enum PaymentErrorCode { } input PaymentFilterInput { + """ + Filter by ids. + + Added in Saleor 3.8. + """ + ids: [ID!] checkouts: [ID!] } @@ -16141,6 +16454,20 @@ input ProductCreateInput { """Defines the product rating value.""" rating: Float + """ + Fields required to update the product metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the product private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] + """ID of the type that product belongs to.""" productType: ID! } @@ -16285,6 +16612,34 @@ input ProductFilterInput { stocks: ProductStockFilterInput search: String metadata: [MetadataFilter!] + + """ + Filter by the publication date. + + Added in Saleor 3.8. + """ + publishedFrom: DateTime + + """ + Filter by availability for purchase. + + Added in Saleor 3.8. + """ + isAvailable: Boolean + + """ + Filter by the date of availability for purchase. + + Added in Saleor 3.8. + """ + availableFrom: DateTime + + """ + Filter by visibility in product listings. + + Added in Saleor 3.8. + """ + isVisibleInListing: Boolean price: PriceRangeInput """Filter by the lowest variant price after discounts.""" @@ -16374,6 +16729,20 @@ input ProductInput { """Defines the product rating value.""" rating: Float + + """ + Fields required to update the product metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the product private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] } """Represents a product media.""" @@ -16485,6 +16854,36 @@ input ProductMediaUpdateInput { alt: String } +""" +Event sent when product metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type ProductMetadataUpdated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The product the event relates to.""" + product( + """Slug of a channel for which the data should be returned.""" + channel: String + ): Product + + """The category of the product.""" + category: Category +} + input ProductOrder { """Specifies the direction in which to sort products.""" direction: OrderDirection! @@ -16571,6 +16970,13 @@ enum ProductOrderField { """Sort products by rating.""" RATING + + """ + Sort products by creation date. + + Added in Saleor 3.8. + """ + CREATED_AT } """Represents availability of a product in the storefront.""" @@ -17249,6 +17655,20 @@ input ProductVariantBulkCreateInput { """ quantityLimitPerCustomer: Int + """ + Fields required to update the product variant metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the product variant private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] + """Stocks of a product available for sale.""" stocks: [StockInput!] @@ -17390,6 +17810,20 @@ input ProductVariantCreateInput { """ quantityLimitPerCustomer: Int + """ + Fields required to update the product variant metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the product variant private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] + """Product ID of which type is the variant.""" product: ID! @@ -17505,6 +17939,47 @@ input ProductVariantInput { Note: this API is currently in Feature Preview and can be subject to changes at later point. """ quantityLimitPerCustomer: Int + + """ + Fields required to update the product variant metadata. + + Added in Saleor 3.8. + """ + metadata: [MetadataInput!] + + """ + Fields required to update the product variant private metadata. + + Added in Saleor 3.8. + """ + privateMetadata: [MetadataInput!] +} + +""" +Event sent when product variant metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type ProductVariantMetadataUpdated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The product variant the event relates to.""" + productVariant( + """Slug of a channel for which the data should be returned.""" + channel: String + ): ProductVariant } """ @@ -20465,6 +20940,33 @@ input ShippingZoneFilterInput { channels: [ID!] } +""" +Event sent when shipping zone metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type ShippingZoneMetadataUpdated implements Event { + """Time of the event.""" + 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 shipping zone the event relates to.""" + shippingZone( + """Slug of a channel for which the data should be returned.""" + channel: String + ): ShippingZone +} + """ Updates a new shipping zone. @@ -21744,6 +22246,34 @@ type TransactionItem implements Node & ObjectWithMetadata { events: [TransactionEvent!]! } +""" +Event sent when transaction item metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type TransactionItemMetadataUpdated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """ + Look up a transaction. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + transaction: TransactionItem +} + """An enumeration.""" enum TransactionKind { EXTERNAL @@ -22107,6 +22637,28 @@ type User implements Node & ObjectWithMetadata { channel: String ): [ID!] + """ + Returns checkouts assigned to this user. + + Added in Saleor 3.8. + """ + checkouts( + """Slug of a channel for which the data should be returned.""" + channel: String + + """Return the elements in the list that come before the specified cursor.""" + before: String + + """Return the elements in the list that come after the specified cursor.""" + after: String + + """Return the first n elements from the list.""" + first: Int + + """Return the last n elements from the list.""" + last: Int + ): CheckoutCountableConnection + """List of the user gift cards.""" giftCards( """Return the elements in the list that come before the specified cursor.""" @@ -22812,6 +23364,33 @@ input VoucherInput { usageLimit: Int } +""" +Event sent when voucher metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type VoucherMetadataUpdated implements Event { + """Time of the event.""" + 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 voucher the event relates to.""" + voucher( + """Slug of a channel for which the data should be returned.""" + channel: String + ): Voucher +} + """ Removes products, categories, collections from a voucher. @@ -23182,6 +23761,30 @@ input WarehouseFilterInput { slugs: [String!] } +""" +Event sent when warehouse metadata is updated. + +Added in Saleor 3.8. + +Note: this API is currently in Feature Preview and can be subject to changes at later point. +""" +type WarehouseMetadataUpdated implements Event { + """Time of the event.""" + issuedAt: DateTime + + """Saleor version that triggered the event.""" + version: String + + """The user or application that triggered the event.""" + issuingPrincipal: IssuingPrincipal + + """The application receiving the webhook.""" + recipient: App + + """The warehouse the event relates to.""" + warehouse: Warehouse +} + """ Add shipping zone to given warehouse. @@ -23524,6 +24127,15 @@ enum WebhookEventTypeAsyncEnum { """A gift card status is changed.""" GIFT_CARD_STATUS_CHANGED + """ + A gift card metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + GIFT_CARD_METADATA_UPDATED + """A new menu created.""" MENU_CREATED @@ -23564,6 +24176,15 @@ enum WebhookEventTypeAsyncEnum { """An order is fulfilled.""" ORDER_FULFILLED + """ + An order metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_METADATA_UPDATED + """A draft order is created.""" DRAFT_ORDER_CREATED @@ -23603,6 +24224,15 @@ enum WebhookEventTypeAsyncEnum { """A customer account is deleted.""" CUSTOMER_DELETED + """ + A customer account metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + CUSTOMER_METADATA_UPDATED + """A new collection is created.""" COLLECTION_CREATED @@ -23612,6 +24242,15 @@ enum WebhookEventTypeAsyncEnum { """A collection is deleted.""" COLLECTION_DELETED + """ + A collection metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + COLLECTION_METADATA_UPDATED + """A new product is created.""" PRODUCT_CREATED @@ -23621,6 +24260,15 @@ enum WebhookEventTypeAsyncEnum { """A product is deleted.""" PRODUCT_DELETED + """ + A product metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + PRODUCT_METADATA_UPDATED + """A new product variant is created.""" PRODUCT_VARIANT_CREATED @@ -23636,6 +24284,15 @@ enum WebhookEventTypeAsyncEnum { """A product variant is back in stock.""" PRODUCT_VARIANT_BACK_IN_STOCK + """ + A product variant metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + PRODUCT_VARIANT_METADATA_UPDATED + """A new checkout is created.""" CHECKOUT_CREATED @@ -23644,6 +24301,15 @@ enum WebhookEventTypeAsyncEnum { """ CHECKOUT_UPDATED + """ + A checkout metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + CHECKOUT_METADATA_UPDATED + """A new fulfillment is created.""" FULFILLMENT_CREATED @@ -23653,6 +24319,15 @@ enum WebhookEventTypeAsyncEnum { """A fulfillment is approved.""" FULFILLMENT_APPROVED + """ + A fulfillment metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + FULFILLMENT_METADATA_UPDATED + """User notification triggered.""" NOTIFY_USER @@ -23701,6 +24376,15 @@ enum WebhookEventTypeAsyncEnum { """A shipping zone is deleted.""" SHIPPING_ZONE_DELETED + """ + A shipping zone metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + SHIPPING_ZONE_METADATA_UPDATED + """A new staff user is created.""" STAFF_CREATED @@ -23713,6 +24397,15 @@ enum WebhookEventTypeAsyncEnum { """An action requested for transaction.""" TRANSACTION_ACTION_REQUEST + """ + Transaction item metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + TRANSACTION_ITEM_METADATA_UPDATED + """A new translation is created.""" TRANSLATION_CREATED @@ -23728,6 +24421,15 @@ enum WebhookEventTypeAsyncEnum { """A warehouse is deleted.""" WAREHOUSE_DELETED + """ + A warehouse metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + WAREHOUSE_METADATA_UPDATED + """A new voucher created.""" VOUCHER_CREATED @@ -23737,6 +24439,15 @@ enum WebhookEventTypeAsyncEnum { """A voucher is deleted.""" VOUCHER_DELETED + """ + A voucher metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + VOUCHER_METADATA_UPDATED + """An observability event is created.""" OBSERVABILITY } @@ -23818,6 +24529,15 @@ enum WebhookEventTypeEnum { """A gift card status is changed.""" GIFT_CARD_STATUS_CHANGED + """ + A gift card metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + GIFT_CARD_METADATA_UPDATED + """A new menu created.""" MENU_CREATED @@ -23858,6 +24578,15 @@ enum WebhookEventTypeEnum { """An order is fulfilled.""" ORDER_FULFILLED + """ + An order metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + ORDER_METADATA_UPDATED + """A draft order is created.""" DRAFT_ORDER_CREATED @@ -23897,6 +24626,15 @@ enum WebhookEventTypeEnum { """A customer account is deleted.""" CUSTOMER_DELETED + """ + A customer account metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + CUSTOMER_METADATA_UPDATED + """A new collection is created.""" COLLECTION_CREATED @@ -23906,6 +24644,15 @@ enum WebhookEventTypeEnum { """A collection is deleted.""" COLLECTION_DELETED + """ + A collection metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + COLLECTION_METADATA_UPDATED + """A new product is created.""" PRODUCT_CREATED @@ -23915,6 +24662,15 @@ enum WebhookEventTypeEnum { """A product is deleted.""" PRODUCT_DELETED + """ + A product metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + PRODUCT_METADATA_UPDATED + """A new product variant is created.""" PRODUCT_VARIANT_CREATED @@ -23930,6 +24686,15 @@ enum WebhookEventTypeEnum { """A product variant is back in stock.""" PRODUCT_VARIANT_BACK_IN_STOCK + """ + A product variant metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + PRODUCT_VARIANT_METADATA_UPDATED + """A new checkout is created.""" CHECKOUT_CREATED @@ -23938,6 +24703,15 @@ enum WebhookEventTypeEnum { """ CHECKOUT_UPDATED + """ + A checkout metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + CHECKOUT_METADATA_UPDATED + """A new fulfillment is created.""" FULFILLMENT_CREATED @@ -23947,6 +24721,15 @@ enum WebhookEventTypeEnum { """A fulfillment is approved.""" FULFILLMENT_APPROVED + """ + A fulfillment metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + FULFILLMENT_METADATA_UPDATED + """User notification triggered.""" NOTIFY_USER @@ -23995,6 +24778,15 @@ enum WebhookEventTypeEnum { """A shipping zone is deleted.""" SHIPPING_ZONE_DELETED + """ + A shipping zone metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + SHIPPING_ZONE_METADATA_UPDATED + """A new staff user is created.""" STAFF_CREATED @@ -24007,6 +24799,15 @@ enum WebhookEventTypeEnum { """An action requested for transaction.""" TRANSACTION_ACTION_REQUEST + """ + Transaction item metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + TRANSACTION_ITEM_METADATA_UPDATED + """A new translation is created.""" TRANSLATION_CREATED @@ -24022,6 +24823,15 @@ enum WebhookEventTypeEnum { """A warehouse is deleted.""" WAREHOUSE_DELETED + """ + A warehouse metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + WAREHOUSE_METADATA_UPDATED + """A new voucher created.""" VOUCHER_CREATED @@ -24031,6 +24841,15 @@ enum WebhookEventTypeEnum { """A voucher is deleted.""" VOUCHER_DELETED + """ + A voucher metadata is updated. + + Added in Saleor 3.8. + + Note: this API is currently in Feature Preview and can be subject to changes at later point. + """ + VOUCHER_METADATA_UPDATED + """An observability event is created.""" OBSERVABILITY @@ -24160,6 +24979,7 @@ enum WebhookSampleEventTypeEnum { GIFT_CARD_UPDATED GIFT_CARD_DELETED GIFT_CARD_STATUS_CHANGED + GIFT_CARD_METADATA_UPDATED MENU_CREATED MENU_UPDATED MENU_DELETED @@ -24172,6 +24992,7 @@ enum WebhookSampleEventTypeEnum { ORDER_UPDATED ORDER_CANCELLED ORDER_FULFILLED + ORDER_METADATA_UPDATED DRAFT_ORDER_CREATED DRAFT_ORDER_UPDATED DRAFT_ORDER_DELETED @@ -24185,22 +25006,28 @@ enum WebhookSampleEventTypeEnum { CUSTOMER_CREATED CUSTOMER_UPDATED CUSTOMER_DELETED + CUSTOMER_METADATA_UPDATED COLLECTION_CREATED COLLECTION_UPDATED COLLECTION_DELETED + COLLECTION_METADATA_UPDATED PRODUCT_CREATED PRODUCT_UPDATED PRODUCT_DELETED + PRODUCT_METADATA_UPDATED PRODUCT_VARIANT_CREATED PRODUCT_VARIANT_UPDATED PRODUCT_VARIANT_DELETED PRODUCT_VARIANT_OUT_OF_STOCK PRODUCT_VARIANT_BACK_IN_STOCK + PRODUCT_VARIANT_METADATA_UPDATED CHECKOUT_CREATED CHECKOUT_UPDATED + CHECKOUT_METADATA_UPDATED FULFILLMENT_CREATED FULFILLMENT_CANCELED FULFILLMENT_APPROVED + FULFILLMENT_METADATA_UPDATED NOTIFY_USER PAGE_CREATED PAGE_UPDATED @@ -24217,18 +25044,22 @@ enum WebhookSampleEventTypeEnum { SHIPPING_ZONE_CREATED SHIPPING_ZONE_UPDATED SHIPPING_ZONE_DELETED + SHIPPING_ZONE_METADATA_UPDATED STAFF_CREATED STAFF_UPDATED STAFF_DELETED TRANSACTION_ACTION_REQUEST + TRANSACTION_ITEM_METADATA_UPDATED TRANSLATION_CREATED TRANSLATION_UPDATED WAREHOUSE_CREATED WAREHOUSE_UPDATED WAREHOUSE_DELETED + WAREHOUSE_METADATA_UPDATED VOUCHER_CREATED VOUCHER_UPDATED VOUCHER_DELETED + VOUCHER_METADATA_UPDATED OBSERVABILITY } diff --git a/src/graphql/fragmentTypes.generated.ts b/src/graphql/fragmentTypes.generated.ts index 32a2ca98d..a7ace24ab 100644 --- a/src/graphql/fragmentTypes.generated.ts +++ b/src/graphql/fragmentTypes.generated.ts @@ -35,11 +35,14 @@ "ChannelUpdated", "CheckoutCreated", "CheckoutFilterShippingMethods", + "CheckoutMetadataUpdated", "CheckoutUpdated", "CollectionCreated", "CollectionDeleted", + "CollectionMetadataUpdated", "CollectionUpdated", "CustomerCreated", + "CustomerMetadataUpdated", "CustomerUpdated", "DraftOrderCreated", "DraftOrderDeleted", @@ -47,8 +50,10 @@ "FulfillmentApproved", "FulfillmentCanceled", "FulfillmentCreated", + "FulfillmentMetadataUpdated", "GiftCardCreated", "GiftCardDeleted", + "GiftCardMetadataUpdated", "GiftCardStatusChanged", "GiftCardUpdated", "InvoiceDeleted", @@ -66,6 +71,7 @@ "OrderFilterShippingMethods", "OrderFulfilled", "OrderFullyPaid", + "OrderMetadataUpdated", "OrderUpdated", "PageCreated", "PageDeleted", @@ -85,10 +91,12 @@ "PermissionGroupUpdated", "ProductCreated", "ProductDeleted", + "ProductMetadataUpdated", "ProductUpdated", "ProductVariantBackInStock", "ProductVariantCreated", "ProductVariantDeleted", + "ProductVariantMetadataUpdated", "ProductVariantOutOfStock", "ProductVariantUpdated", "SaleCreated", @@ -101,18 +109,22 @@ "ShippingPriceUpdated", "ShippingZoneCreated", "ShippingZoneDeleted", + "ShippingZoneMetadataUpdated", "ShippingZoneUpdated", "StaffCreated", "StaffDeleted", "StaffUpdated", "TransactionActionRequest", + "TransactionItemMetadataUpdated", "TranslationCreated", "TranslationUpdated", "VoucherCreated", "VoucherDeleted", + "VoucherMetadataUpdated", "VoucherUpdated", "WarehouseCreated", "WarehouseDeleted", + "WarehouseMetadataUpdated", "WarehouseUpdated" ], "IssuingPrincipal": [ diff --git a/src/graphql/typePolicies.generated.ts b/src/graphql/typePolicies.generated.ts index 250f6c433..a99063aa4 100644 --- a/src/graphql/typePolicies.generated.ts +++ b/src/graphql/typePolicies.generated.ts @@ -997,6 +997,14 @@ export type CheckoutLinesUpdateFieldPolicy = { checkoutErrors?: FieldPolicy | FieldReadFunction, errors?: FieldPolicy | FieldReadFunction }; +export type CheckoutMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'checkout' | CheckoutMetadataUpdatedKeySpecifier)[]; +export type CheckoutMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + checkout?: FieldPolicy | FieldReadFunction +}; export type CheckoutPaymentCreateKeySpecifier = ('checkout' | 'payment' | 'paymentErrors' | 'errors' | CheckoutPaymentCreateKeySpecifier)[]; export type CheckoutPaymentCreateFieldPolicy = { checkout?: FieldPolicy | FieldReadFunction, @@ -1137,6 +1145,14 @@ export type CollectionErrorFieldPolicy = { products?: FieldPolicy | FieldReadFunction, code?: FieldPolicy | FieldReadFunction }; +export type CollectionMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'collection' | CollectionMetadataUpdatedKeySpecifier)[]; +export type CollectionMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + collection?: FieldPolicy | FieldReadFunction +}; export type CollectionRemoveProductsKeySpecifier = ('collection' | 'collectionErrors' | 'errors' | CollectionRemoveProductsKeySpecifier)[]; export type CollectionRemoveProductsFieldPolicy = { collection?: FieldPolicy | FieldReadFunction, @@ -1271,6 +1287,14 @@ export type CustomerEventFieldPolicy = { order?: FieldPolicy | FieldReadFunction, orderLine?: FieldPolicy | FieldReadFunction }; +export type CustomerMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'user' | CustomerMetadataUpdatedKeySpecifier)[]; +export type CustomerMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction +}; export type CustomerUpdateKeySpecifier = ('accountErrors' | 'errors' | 'user' | CustomerUpdateKeySpecifier)[]; export type CustomerUpdateFieldPolicy = { accountErrors?: FieldPolicy | FieldReadFunction, @@ -1671,6 +1695,15 @@ export type FulfillmentLineFieldPolicy = { quantity?: FieldPolicy | FieldReadFunction, orderLine?: FieldPolicy | FieldReadFunction }; +export type FulfillmentMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'fulfillment' | 'order' | FulfillmentMetadataUpdatedKeySpecifier)[]; +export type FulfillmentMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + fulfillment?: FieldPolicy | FieldReadFunction, + order?: FieldPolicy | FieldReadFunction +}; export type FulfillmentRefundProductsKeySpecifier = ('fulfillment' | 'order' | 'orderErrors' | 'errors' | FulfillmentRefundProductsKeySpecifier)[]; export type FulfillmentRefundProductsFieldPolicy = { fulfillment?: FieldPolicy | FieldReadFunction, @@ -1839,6 +1872,14 @@ export type GiftCardEventBalanceFieldPolicy = { oldInitialBalance?: FieldPolicy | FieldReadFunction, oldCurrentBalance?: FieldPolicy | FieldReadFunction }; +export type GiftCardMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'giftCard' | GiftCardMetadataUpdatedKeySpecifier)[]; +export type GiftCardMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + giftCard?: FieldPolicy | FieldReadFunction +}; export type GiftCardResendKeySpecifier = ('giftCard' | 'errors' | GiftCardResendKeySpecifier)[]; export type GiftCardResendFieldPolicy = { giftCard?: FieldPolicy | FieldReadFunction, @@ -2031,7 +2072,7 @@ export type LimitsFieldPolicy = { staffUsers?: FieldPolicy | FieldReadFunction, warehouses?: FieldPolicy | FieldReadFunction }; -export type ManifestKeySpecifier = ('identifier' | 'version' | 'name' | 'about' | 'permissions' | 'appUrl' | 'configurationUrl' | 'tokenTargetUrl' | 'dataPrivacy' | 'dataPrivacyUrl' | 'homepageUrl' | 'supportUrl' | 'extensions' | 'webhooks' | ManifestKeySpecifier)[]; +export type ManifestKeySpecifier = ('identifier' | 'version' | 'name' | 'about' | 'permissions' | 'appUrl' | 'configurationUrl' | 'tokenTargetUrl' | 'dataPrivacy' | 'dataPrivacyUrl' | 'homepageUrl' | 'supportUrl' | 'extensions' | 'webhooks' | 'audience' | ManifestKeySpecifier)[]; export type ManifestFieldPolicy = { identifier?: FieldPolicy | FieldReadFunction, version?: FieldPolicy | FieldReadFunction, @@ -2046,7 +2087,8 @@ export type ManifestFieldPolicy = { homepageUrl?: FieldPolicy | FieldReadFunction, supportUrl?: FieldPolicy | FieldReadFunction, extensions?: FieldPolicy | FieldReadFunction, - webhooks?: FieldPolicy | FieldReadFunction + webhooks?: FieldPolicy | FieldReadFunction, + audience?: FieldPolicy | FieldReadFunction }; export type MarginKeySpecifier = ('start' | 'stop' | MarginKeySpecifier)[]; export type MarginFieldPolicy = { @@ -2897,6 +2939,14 @@ export type OrderMarkAsPaidFieldPolicy = { orderErrors?: FieldPolicy | FieldReadFunction, errors?: FieldPolicy | FieldReadFunction }; +export type OrderMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'order' | OrderMetadataUpdatedKeySpecifier)[]; +export type OrderMetadataUpdatedFieldPolicy = { + 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, @@ -3631,6 +3681,15 @@ export type ProductMediaUpdateFieldPolicy = { productErrors?: FieldPolicy | FieldReadFunction, errors?: FieldPolicy | FieldReadFunction }; +export type ProductMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'product' | 'category' | ProductMetadataUpdatedKeySpecifier)[]; +export type ProductMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + product?: FieldPolicy | FieldReadFunction, + category?: FieldPolicy | FieldReadFunction +}; export type ProductPricingInfoKeySpecifier = ('onSale' | 'discount' | 'discountLocalCurrency' | 'priceRange' | 'priceRangeUndiscounted' | 'priceRangeLocalCurrency' | ProductPricingInfoKeySpecifier)[]; export type ProductPricingInfoFieldPolicy = { onSale?: FieldPolicy | FieldReadFunction, @@ -3861,6 +3920,14 @@ export type ProductVariantDeletedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, productVariant?: FieldPolicy | FieldReadFunction }; +export type ProductVariantMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'productVariant' | ProductVariantMetadataUpdatedKeySpecifier)[]; +export type ProductVariantMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + productVariant?: FieldPolicy | FieldReadFunction +}; export type ProductVariantOutOfStockKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'productVariant' | 'warehouse' | ProductVariantOutOfStockKeySpecifier)[]; export type ProductVariantOutOfStockFieldPolicy = { issuedAt?: FieldPolicy | FieldReadFunction, @@ -4438,6 +4505,14 @@ export type ShippingZoneDeletedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, shippingZone?: FieldPolicy | FieldReadFunction }; +export type ShippingZoneMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'shippingZone' | ShippingZoneMetadataUpdatedKeySpecifier)[]; +export type ShippingZoneMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + shippingZone?: FieldPolicy | FieldReadFunction +}; export type ShippingZoneUpdateKeySpecifier = ('shippingErrors' | 'errors' | 'shippingZone' | ShippingZoneUpdateKeySpecifier)[]; export type ShippingZoneUpdateFieldPolicy = { shippingErrors?: FieldPolicy | FieldReadFunction, @@ -4776,6 +4851,14 @@ export type TransactionItemFieldPolicy = { order?: FieldPolicy | FieldReadFunction, events?: FieldPolicy | FieldReadFunction }; +export type TransactionItemMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'transaction' | TransactionItemMetadataUpdatedKeySpecifier)[]; +export type TransactionItemMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + transaction?: FieldPolicy | FieldReadFunction +}; export type TransactionRequestActionKeySpecifier = ('transaction' | 'errors' | TransactionRequestActionKeySpecifier)[]; export type TransactionRequestActionFieldPolicy = { transaction?: FieldPolicy | FieldReadFunction, @@ -4849,7 +4932,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' | 'giftCards' | 'note' | 'orders' | 'userPermissions' | 'permissionGroups' | 'editableGroups' | 'avatar' | 'events' | 'storedPaymentSources' | 'languageCode' | 'defaultShippingAddress' | 'defaultBillingAddress' | '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' | 'avatar' | 'events' | 'storedPaymentSources' | 'languageCode' | 'defaultShippingAddress' | 'defaultBillingAddress' | 'lastLogin' | 'dateJoined' | 'updatedAt' | UserKeySpecifier)[]; export type UserFieldPolicy = { id?: FieldPolicy | FieldReadFunction, privateMetadata?: FieldPolicy | FieldReadFunction, @@ -4867,6 +4950,7 @@ export type UserFieldPolicy = { checkout?: FieldPolicy | FieldReadFunction, checkoutTokens?: FieldPolicy | FieldReadFunction, checkoutIds?: FieldPolicy | FieldReadFunction, + checkouts?: FieldPolicy | FieldReadFunction, giftCards?: FieldPolicy | FieldReadFunction, note?: FieldPolicy | FieldReadFunction, orders?: FieldPolicy | FieldReadFunction, @@ -5052,6 +5136,14 @@ export type VoucherDeletedFieldPolicy = { recipient?: FieldPolicy | FieldReadFunction, voucher?: FieldPolicy | FieldReadFunction }; +export type VoucherMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'voucher' | VoucherMetadataUpdatedKeySpecifier)[]; +export type VoucherMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + voucher?: FieldPolicy | FieldReadFunction +}; export type VoucherRemoveCataloguesKeySpecifier = ('voucher' | 'discountErrors' | 'errors' | VoucherRemoveCataloguesKeySpecifier)[]; export type VoucherRemoveCataloguesFieldPolicy = { voucher?: FieldPolicy | FieldReadFunction, @@ -5155,6 +5247,14 @@ export type WarehouseErrorFieldPolicy = { code?: FieldPolicy | FieldReadFunction, shippingZones?: FieldPolicy | FieldReadFunction }; +export type WarehouseMetadataUpdatedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'warehouse' | WarehouseMetadataUpdatedKeySpecifier)[]; +export type WarehouseMetadataUpdatedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + warehouse?: FieldPolicy | FieldReadFunction +}; export type WarehouseShippingZoneAssignKeySpecifier = ('warehouseErrors' | 'errors' | 'warehouse' | WarehouseShippingZoneAssignKeySpecifier)[]; export type WarehouseShippingZoneAssignFieldPolicy = { warehouseErrors?: FieldPolicy | FieldReadFunction, @@ -5748,6 +5848,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | CheckoutLinesUpdateKeySpecifier | (() => undefined | CheckoutLinesUpdateKeySpecifier), fields?: CheckoutLinesUpdateFieldPolicy, }, + CheckoutMetadataUpdated?: Omit & { + keyFields?: false | CheckoutMetadataUpdatedKeySpecifier | (() => undefined | CheckoutMetadataUpdatedKeySpecifier), + fields?: CheckoutMetadataUpdatedFieldPolicy, + }, CheckoutPaymentCreate?: Omit & { keyFields?: false | CheckoutPaymentCreateKeySpecifier | (() => undefined | CheckoutPaymentCreateKeySpecifier), fields?: CheckoutPaymentCreateFieldPolicy, @@ -5824,6 +5928,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | CollectionErrorKeySpecifier | (() => undefined | CollectionErrorKeySpecifier), fields?: CollectionErrorFieldPolicy, }, + CollectionMetadataUpdated?: Omit & { + keyFields?: false | CollectionMetadataUpdatedKeySpecifier | (() => undefined | CollectionMetadataUpdatedKeySpecifier), + fields?: CollectionMetadataUpdatedFieldPolicy, + }, CollectionRemoveProducts?: Omit & { keyFields?: false | CollectionRemoveProductsKeySpecifier | (() => undefined | CollectionRemoveProductsKeySpecifier), fields?: CollectionRemoveProductsFieldPolicy, @@ -5896,6 +6004,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | CustomerEventKeySpecifier | (() => undefined | CustomerEventKeySpecifier), fields?: CustomerEventFieldPolicy, }, + CustomerMetadataUpdated?: Omit & { + keyFields?: false | CustomerMetadataUpdatedKeySpecifier | (() => undefined | CustomerMetadataUpdatedKeySpecifier), + fields?: CustomerMetadataUpdatedFieldPolicy, + }, CustomerUpdate?: Omit & { keyFields?: false | CustomerUpdateKeySpecifier | (() => undefined | CustomerUpdateKeySpecifier), fields?: CustomerUpdateFieldPolicy, @@ -6120,6 +6232,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | FulfillmentLineKeySpecifier | (() => undefined | FulfillmentLineKeySpecifier), fields?: FulfillmentLineFieldPolicy, }, + FulfillmentMetadataUpdated?: Omit & { + keyFields?: false | FulfillmentMetadataUpdatedKeySpecifier | (() => undefined | FulfillmentMetadataUpdatedKeySpecifier), + fields?: FulfillmentMetadataUpdatedFieldPolicy, + }, FulfillmentRefundProducts?: Omit & { keyFields?: false | FulfillmentRefundProductsKeySpecifier | (() => undefined | FulfillmentRefundProductsKeySpecifier), fields?: FulfillmentRefundProductsFieldPolicy, @@ -6204,6 +6320,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | GiftCardEventBalanceKeySpecifier | (() => undefined | GiftCardEventBalanceKeySpecifier), fields?: GiftCardEventBalanceFieldPolicy, }, + GiftCardMetadataUpdated?: Omit & { + keyFields?: false | GiftCardMetadataUpdatedKeySpecifier | (() => undefined | GiftCardMetadataUpdatedKeySpecifier), + fields?: GiftCardMetadataUpdatedFieldPolicy, + }, GiftCardResend?: Omit & { keyFields?: false | GiftCardResendKeySpecifier | (() => undefined | GiftCardResendKeySpecifier), fields?: GiftCardResendFieldPolicy, @@ -6592,6 +6712,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | OrderMarkAsPaidKeySpecifier | (() => undefined | OrderMarkAsPaidKeySpecifier), fields?: OrderMarkAsPaidFieldPolicy, }, + OrderMetadataUpdated?: Omit & { + keyFields?: false | OrderMetadataUpdatedKeySpecifier | (() => undefined | OrderMetadataUpdatedKeySpecifier), + fields?: OrderMetadataUpdatedFieldPolicy, + }, OrderRefund?: Omit & { keyFields?: false | OrderRefundKeySpecifier | (() => undefined | OrderRefundKeySpecifier), fields?: OrderRefundFieldPolicy, @@ -6976,6 +7100,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | ProductMediaUpdateKeySpecifier | (() => undefined | ProductMediaUpdateKeySpecifier), fields?: ProductMediaUpdateFieldPolicy, }, + ProductMetadataUpdated?: Omit & { + keyFields?: false | ProductMetadataUpdatedKeySpecifier | (() => undefined | ProductMetadataUpdatedKeySpecifier), + fields?: ProductMetadataUpdatedFieldPolicy, + }, ProductPricingInfo?: Omit & { keyFields?: false | ProductPricingInfoKeySpecifier | (() => undefined | ProductPricingInfoKeySpecifier), fields?: ProductPricingInfoFieldPolicy, @@ -7084,6 +7212,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | ProductVariantDeletedKeySpecifier | (() => undefined | ProductVariantDeletedKeySpecifier), fields?: ProductVariantDeletedFieldPolicy, }, + ProductVariantMetadataUpdated?: Omit & { + keyFields?: false | ProductVariantMetadataUpdatedKeySpecifier | (() => undefined | ProductVariantMetadataUpdatedKeySpecifier), + fields?: ProductVariantMetadataUpdatedFieldPolicy, + }, ProductVariantOutOfStock?: Omit & { keyFields?: false | ProductVariantOutOfStockKeySpecifier | (() => undefined | ProductVariantOutOfStockKeySpecifier), fields?: ProductVariantOutOfStockFieldPolicy, @@ -7348,6 +7480,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | ShippingZoneDeletedKeySpecifier | (() => undefined | ShippingZoneDeletedKeySpecifier), fields?: ShippingZoneDeletedFieldPolicy, }, + ShippingZoneMetadataUpdated?: Omit & { + keyFields?: false | ShippingZoneMetadataUpdatedKeySpecifier | (() => undefined | ShippingZoneMetadataUpdatedKeySpecifier), + fields?: ShippingZoneMetadataUpdatedFieldPolicy, + }, ShippingZoneUpdate?: Omit & { keyFields?: false | ShippingZoneUpdateKeySpecifier | (() => undefined | ShippingZoneUpdateKeySpecifier), fields?: ShippingZoneUpdateFieldPolicy, @@ -7524,6 +7660,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | TransactionItemKeySpecifier | (() => undefined | TransactionItemKeySpecifier), fields?: TransactionItemFieldPolicy, }, + TransactionItemMetadataUpdated?: Omit & { + keyFields?: false | TransactionItemMetadataUpdatedKeySpecifier | (() => undefined | TransactionItemMetadataUpdatedKeySpecifier), + fields?: TransactionItemMetadataUpdatedFieldPolicy, + }, TransactionRequestAction?: Omit & { keyFields?: false | TransactionRequestActionKeySpecifier | (() => undefined | TransactionRequestActionKeySpecifier), fields?: TransactionRequestActionFieldPolicy, @@ -7664,6 +7804,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | VoucherDeletedKeySpecifier | (() => undefined | VoucherDeletedKeySpecifier), fields?: VoucherDeletedFieldPolicy, }, + VoucherMetadataUpdated?: Omit & { + keyFields?: false | VoucherMetadataUpdatedKeySpecifier | (() => undefined | VoucherMetadataUpdatedKeySpecifier), + fields?: VoucherMetadataUpdatedFieldPolicy, + }, VoucherRemoveCatalogues?: Omit & { keyFields?: false | VoucherRemoveCataloguesKeySpecifier | (() => undefined | VoucherRemoveCataloguesKeySpecifier), fields?: VoucherRemoveCataloguesFieldPolicy, @@ -7720,6 +7864,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | WarehouseErrorKeySpecifier | (() => undefined | WarehouseErrorKeySpecifier), fields?: WarehouseErrorFieldPolicy, }, + WarehouseMetadataUpdated?: Omit & { + keyFields?: false | WarehouseMetadataUpdatedKeySpecifier | (() => undefined | WarehouseMetadataUpdatedKeySpecifier), + fields?: WarehouseMetadataUpdatedFieldPolicy, + }, WarehouseShippingZoneAssign?: Omit & { keyFields?: false | WarehouseShippingZoneAssignKeySpecifier | (() => undefined | WarehouseShippingZoneAssignKeySpecifier), fields?: WarehouseShippingZoneAssignFieldPolicy, diff --git a/src/graphql/types.generated.ts b/src/graphql/types.generated.ts index 76dcdc80d..805a134fe 100644 --- a/src/graphql/types.generated.ts +++ b/src/graphql/types.generated.ts @@ -468,9 +468,15 @@ export type AttributeValueCreateInput = { * Represents the text of the attribute value, includes formatting. * * Rich text format. For reference see https://editorjs.io/ + * + * DEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. */ richText?: InputMaybe; - /** Represents the text of the attribute value, plain text without formating. */ + /** + * Represents the text of the attribute value, plain text without formating. + * + * DEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. + */ plainText?: InputMaybe; /** URL of the file attribute. Every time, a new value is created. */ fileUrl?: InputMaybe; @@ -527,9 +533,15 @@ export type AttributeValueUpdateInput = { * Represents the text of the attribute value, includes formatting. * * Rich text format. For reference see https://editorjs.io/ + * + * DEPRECATED: this field will be removed in Saleor 4.0.The rich text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. */ richText?: InputMaybe; - /** Represents the text of the attribute value, plain text without formating. */ + /** + * Represents the text of the attribute value, plain text without formating. + * + * DEPRECATED: this field will be removed in Saleor 4.0.The plain text attribute hasn't got predefined value, so can be specified only from instance that supports the given attribute. + */ plainText?: InputMaybe; /** URL of the file attribute. Every time, a new value is created. */ fileUrl?: InputMaybe; @@ -596,6 +608,18 @@ export type CategoryInput = { backgroundImage?: InputMaybe; /** Alt text for a product media. */ backgroundImageAlt?: InputMaybe; + /** + * Fields required to update the category metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the category private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; }; export enum CategorySortField { @@ -898,6 +922,18 @@ export type CollectionCreateInput = { * DEPRECATED: this field will be removed in Saleor 4.0. */ publicationDate?: InputMaybe; + /** + * Fields required to update the collection metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the collection private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; /** List of products to be added to the collection. */ products?: InputMaybe>; }; @@ -952,6 +988,18 @@ export type CollectionInput = { * DEPRECATED: this field will be removed in Saleor 4.0. */ publicationDate?: InputMaybe; + /** + * Fields required to update the collection metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the collection private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; }; export enum CollectionPublished { @@ -1299,6 +1347,12 @@ export type CustomerFilterInput = { placedOrders?: InputMaybe; search?: InputMaybe; metadata?: InputMaybe>; + /** + * Filter by ids. + * + * Added in Saleor 3.8. + */ + ids?: InputMaybe>; updatedAt?: InputMaybe; }; @@ -1344,6 +1398,18 @@ export type DigitalContentInput = { urlValidDays?: InputMaybe; /** Overwrite default automatic_fulfillment setting for variant. */ automaticFulfillment?: InputMaybe; + /** + * Fields required to update the digital content metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the digital content private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; }; export type DigitalContentUploadInput = { @@ -1355,6 +1421,18 @@ export type DigitalContentUploadInput = { urlValidDays?: InputMaybe; /** Overwrite default automatic_fulfillment setting for variant. */ automaticFulfillment?: InputMaybe; + /** + * Fields required to update the digital content metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the digital content private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; /** Represents an file in a multipart request. */ contentFile: Scalars['Upload']; }; @@ -1769,12 +1847,18 @@ export type GiftCardSettingsUpdateInput = { }; export enum GiftCardSortField { - /** Sort orders by product. */ + /** Sort gift cards by product. */ PRODUCT = 'PRODUCT', - /** Sort orders by used by. */ + /** Sort gift cards by used by. */ USED_BY = 'USED_BY', - /** Sort orders by current balance. */ - CURRENT_BALANCE = 'CURRENT_BALANCE' + /** Sort gift cards by current balance. */ + CURRENT_BALANCE = 'CURRENT_BALANCE', + /** + * Sort gift cards by created at. + * + * Added in Saleor 3.8. + */ + CREATED_AT = 'CREATED_AT' } export type GiftCardSortingInput = { @@ -3349,7 +3433,11 @@ export enum PageSortField { SLUG = 'SLUG', /** Sort pages by visibility. */ VISIBILITY = 'VISIBILITY', - /** Sort pages by creation date. */ + /** + * Sort pages by creation date. + * + * DEPRECATED: this field will be removed in Saleor 4.0. + */ CREATION_DATE = 'CREATION_DATE', /** * Sort pages by publication date. @@ -3362,7 +3450,13 @@ export enum PageSortField { * * DEPRECATED: this field will be removed in Saleor 4.0. */ - PUBLISHED_AT = 'PUBLISHED_AT' + PUBLISHED_AT = 'PUBLISHED_AT', + /** + * Sort pages by creation date. + * + * DEPRECATED: this field will be removed in Saleor 4.0. + */ + CREATED_AT = 'CREATED_AT' } export type PageSortingInput = { @@ -3468,6 +3562,12 @@ export enum PaymentErrorCode { } export type PaymentFilterInput = { + /** + * Filter by ids. + * + * Added in Saleor 3.8. + */ + ids?: InputMaybe>; checkouts?: InputMaybe>; }; @@ -3746,6 +3846,18 @@ export type ProductCreateInput = { weight?: InputMaybe; /** Defines the product rating value. */ rating?: InputMaybe; + /** + * Fields required to update the product metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the product private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; /** ID of the type that product belongs to. */ productType: Scalars['ID']; }; @@ -3799,6 +3911,30 @@ export type ProductFilterInput = { stocks?: InputMaybe; search?: InputMaybe; metadata?: InputMaybe>; + /** + * Filter by the publication date. + * + * Added in Saleor 3.8. + */ + publishedFrom?: InputMaybe; + /** + * Filter by availability for purchase. + * + * Added in Saleor 3.8. + */ + isAvailable?: InputMaybe; + /** + * Filter by the date of availability for purchase. + * + * Added in Saleor 3.8. + */ + availableFrom?: InputMaybe; + /** + * Filter by visibility in product listings. + * + * Added in Saleor 3.8. + */ + isVisibleInListing?: InputMaybe; price?: InputMaybe; /** Filter by the lowest variant price after discounts. */ minimalPrice?: InputMaybe; @@ -3845,6 +3981,18 @@ export type ProductInput = { weight?: InputMaybe; /** Defines the product rating value. */ rating?: InputMaybe; + /** + * Fields required to update the product metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the product private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; }; export type ProductMediaCreateInput = { @@ -3937,7 +4085,13 @@ export enum ProductOrderField { */ COLLECTION = 'COLLECTION', /** Sort products by rating. */ - RATING = 'RATING' + RATING = 'RATING', + /** + * Sort products by creation date. + * + * Added in Saleor 3.8. + */ + CREATED_AT = 'CREATED_AT' } export type ProductStockFilterInput = { @@ -4037,6 +4191,18 @@ export type ProductVariantBulkCreateInput = { * Note: this API is currently in Feature Preview and can be subject to changes at later point. */ quantityLimitPerCustomer?: InputMaybe; + /** + * Fields required to update the product variant metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the product variant private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; /** Stocks of a product available for sale. */ stocks?: InputMaybe>; /** List of prices assigned to channels. */ @@ -4087,6 +4253,18 @@ export type ProductVariantCreateInput = { * Note: this API is currently in Feature Preview and can be subject to changes at later point. */ quantityLimitPerCustomer?: InputMaybe; + /** + * Fields required to update the product variant metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the product variant private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; /** Product ID of which type is the variant. */ product: Scalars['ID']; /** Stocks of a product available for sale. */ @@ -4128,6 +4306,18 @@ export type ProductVariantInput = { * Note: this API is currently in Feature Preview and can be subject to changes at later point. */ quantityLimitPerCustomer?: InputMaybe; + /** + * Fields required to update the product variant metadata. + * + * Added in Saleor 3.8. + */ + metadata?: InputMaybe>; + /** + * Fields required to update the product variant private metadata. + * + * Added in Saleor 3.8. + */ + privateMetadata?: InputMaybe>; }; export enum ProductVariantSortField { @@ -5118,6 +5308,14 @@ export enum WebhookEventTypeAsyncEnum { GIFT_CARD_DELETED = 'GIFT_CARD_DELETED', /** A gift card status is changed. */ GIFT_CARD_STATUS_CHANGED = 'GIFT_CARD_STATUS_CHANGED', + /** + * A gift card metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + GIFT_CARD_METADATA_UPDATED = 'GIFT_CARD_METADATA_UPDATED', /** A new menu created. */ MENU_CREATED = 'MENU_CREATED', /** A menu is updated. */ @@ -5142,6 +5340,14 @@ export enum WebhookEventTypeAsyncEnum { ORDER_CANCELLED = 'ORDER_CANCELLED', /** An order is fulfilled. */ ORDER_FULFILLED = 'ORDER_FULFILLED', + /** + * An order metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + ORDER_METADATA_UPDATED = 'ORDER_METADATA_UPDATED', /** A draft order is created. */ DRAFT_ORDER_CREATED = 'DRAFT_ORDER_CREATED', /** A draft order is updated. */ @@ -5168,18 +5374,42 @@ export enum WebhookEventTypeAsyncEnum { CUSTOMER_UPDATED = 'CUSTOMER_UPDATED', /** A customer account is deleted. */ CUSTOMER_DELETED = 'CUSTOMER_DELETED', + /** + * A customer account metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + CUSTOMER_METADATA_UPDATED = 'CUSTOMER_METADATA_UPDATED', /** A new collection is created. */ COLLECTION_CREATED = 'COLLECTION_CREATED', /** A collection is updated. */ COLLECTION_UPDATED = 'COLLECTION_UPDATED', /** A collection is deleted. */ COLLECTION_DELETED = 'COLLECTION_DELETED', + /** + * A collection metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + COLLECTION_METADATA_UPDATED = 'COLLECTION_METADATA_UPDATED', /** A new product is created. */ PRODUCT_CREATED = 'PRODUCT_CREATED', /** A product is updated. */ PRODUCT_UPDATED = 'PRODUCT_UPDATED', /** A product is deleted. */ PRODUCT_DELETED = 'PRODUCT_DELETED', + /** + * A product metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + PRODUCT_METADATA_UPDATED = 'PRODUCT_METADATA_UPDATED', /** A new product variant is created. */ PRODUCT_VARIANT_CREATED = 'PRODUCT_VARIANT_CREATED', /** A product variant is updated. */ @@ -5190,16 +5420,40 @@ export enum WebhookEventTypeAsyncEnum { PRODUCT_VARIANT_OUT_OF_STOCK = 'PRODUCT_VARIANT_OUT_OF_STOCK', /** A product variant is back in stock. */ PRODUCT_VARIANT_BACK_IN_STOCK = 'PRODUCT_VARIANT_BACK_IN_STOCK', + /** + * A product variant metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + PRODUCT_VARIANT_METADATA_UPDATED = 'PRODUCT_VARIANT_METADATA_UPDATED', /** A new checkout is created. */ CHECKOUT_CREATED = 'CHECKOUT_CREATED', /** A checkout is updated. It also triggers all updates related to the checkout. */ CHECKOUT_UPDATED = 'CHECKOUT_UPDATED', + /** + * A checkout metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + CHECKOUT_METADATA_UPDATED = 'CHECKOUT_METADATA_UPDATED', /** A new fulfillment is created. */ FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', /** A fulfillment is cancelled. */ FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', /** A fulfillment is approved. */ FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED', + /** + * A fulfillment metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + FULFILLMENT_METADATA_UPDATED = 'FULFILLMENT_METADATA_UPDATED', /** User notification triggered. */ NOTIFY_USER = 'NOTIFY_USER', /** A new page is created. */ @@ -5232,6 +5486,14 @@ export enum WebhookEventTypeAsyncEnum { SHIPPING_ZONE_UPDATED = 'SHIPPING_ZONE_UPDATED', /** A shipping zone is deleted. */ SHIPPING_ZONE_DELETED = 'SHIPPING_ZONE_DELETED', + /** + * A shipping zone metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + SHIPPING_ZONE_METADATA_UPDATED = 'SHIPPING_ZONE_METADATA_UPDATED', /** A new staff user is created. */ STAFF_CREATED = 'STAFF_CREATED', /** A staff user is updated. */ @@ -5240,6 +5502,14 @@ export enum WebhookEventTypeAsyncEnum { STAFF_DELETED = 'STAFF_DELETED', /** An action requested for transaction. */ TRANSACTION_ACTION_REQUEST = 'TRANSACTION_ACTION_REQUEST', + /** + * Transaction item metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + TRANSACTION_ITEM_METADATA_UPDATED = 'TRANSACTION_ITEM_METADATA_UPDATED', /** A new translation is created. */ TRANSLATION_CREATED = 'TRANSLATION_CREATED', /** A translation is updated. */ @@ -5250,12 +5520,28 @@ export enum WebhookEventTypeAsyncEnum { WAREHOUSE_UPDATED = 'WAREHOUSE_UPDATED', /** A warehouse is deleted. */ WAREHOUSE_DELETED = 'WAREHOUSE_DELETED', + /** + * A warehouse metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + WAREHOUSE_METADATA_UPDATED = 'WAREHOUSE_METADATA_UPDATED', /** A new voucher created. */ VOUCHER_CREATED = 'VOUCHER_CREATED', /** A voucher is updated. */ VOUCHER_UPDATED = 'VOUCHER_UPDATED', /** A voucher is deleted. */ VOUCHER_DELETED = 'VOUCHER_DELETED', + /** + * A voucher metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + VOUCHER_METADATA_UPDATED = 'VOUCHER_METADATA_UPDATED', /** An observability event is created. */ OBSERVABILITY = 'OBSERVABILITY' } @@ -5312,6 +5598,14 @@ export enum WebhookEventTypeEnum { GIFT_CARD_DELETED = 'GIFT_CARD_DELETED', /** A gift card status is changed. */ GIFT_CARD_STATUS_CHANGED = 'GIFT_CARD_STATUS_CHANGED', + /** + * A gift card metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + GIFT_CARD_METADATA_UPDATED = 'GIFT_CARD_METADATA_UPDATED', /** A new menu created. */ MENU_CREATED = 'MENU_CREATED', /** A menu is updated. */ @@ -5336,6 +5630,14 @@ export enum WebhookEventTypeEnum { ORDER_CANCELLED = 'ORDER_CANCELLED', /** An order is fulfilled. */ ORDER_FULFILLED = 'ORDER_FULFILLED', + /** + * An order metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + ORDER_METADATA_UPDATED = 'ORDER_METADATA_UPDATED', /** A draft order is created. */ DRAFT_ORDER_CREATED = 'DRAFT_ORDER_CREATED', /** A draft order is updated. */ @@ -5362,18 +5664,42 @@ export enum WebhookEventTypeEnum { CUSTOMER_UPDATED = 'CUSTOMER_UPDATED', /** A customer account is deleted. */ CUSTOMER_DELETED = 'CUSTOMER_DELETED', + /** + * A customer account metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + CUSTOMER_METADATA_UPDATED = 'CUSTOMER_METADATA_UPDATED', /** A new collection is created. */ COLLECTION_CREATED = 'COLLECTION_CREATED', /** A collection is updated. */ COLLECTION_UPDATED = 'COLLECTION_UPDATED', /** A collection is deleted. */ COLLECTION_DELETED = 'COLLECTION_DELETED', + /** + * A collection metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + COLLECTION_METADATA_UPDATED = 'COLLECTION_METADATA_UPDATED', /** A new product is created. */ PRODUCT_CREATED = 'PRODUCT_CREATED', /** A product is updated. */ PRODUCT_UPDATED = 'PRODUCT_UPDATED', /** A product is deleted. */ PRODUCT_DELETED = 'PRODUCT_DELETED', + /** + * A product metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + PRODUCT_METADATA_UPDATED = 'PRODUCT_METADATA_UPDATED', /** A new product variant is created. */ PRODUCT_VARIANT_CREATED = 'PRODUCT_VARIANT_CREATED', /** A product variant is updated. */ @@ -5384,16 +5710,40 @@ export enum WebhookEventTypeEnum { PRODUCT_VARIANT_OUT_OF_STOCK = 'PRODUCT_VARIANT_OUT_OF_STOCK', /** A product variant is back in stock. */ PRODUCT_VARIANT_BACK_IN_STOCK = 'PRODUCT_VARIANT_BACK_IN_STOCK', + /** + * A product variant metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + PRODUCT_VARIANT_METADATA_UPDATED = 'PRODUCT_VARIANT_METADATA_UPDATED', /** A new checkout is created. */ CHECKOUT_CREATED = 'CHECKOUT_CREATED', /** A checkout is updated. It also triggers all updates related to the checkout. */ CHECKOUT_UPDATED = 'CHECKOUT_UPDATED', + /** + * A checkout metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + CHECKOUT_METADATA_UPDATED = 'CHECKOUT_METADATA_UPDATED', /** A new fulfillment is created. */ FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', /** A fulfillment is cancelled. */ FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', /** A fulfillment is approved. */ FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED', + /** + * A fulfillment metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + FULFILLMENT_METADATA_UPDATED = 'FULFILLMENT_METADATA_UPDATED', /** User notification triggered. */ NOTIFY_USER = 'NOTIFY_USER', /** A new page is created. */ @@ -5426,6 +5776,14 @@ export enum WebhookEventTypeEnum { SHIPPING_ZONE_UPDATED = 'SHIPPING_ZONE_UPDATED', /** A shipping zone is deleted. */ SHIPPING_ZONE_DELETED = 'SHIPPING_ZONE_DELETED', + /** + * A shipping zone metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + SHIPPING_ZONE_METADATA_UPDATED = 'SHIPPING_ZONE_METADATA_UPDATED', /** A new staff user is created. */ STAFF_CREATED = 'STAFF_CREATED', /** A staff user is updated. */ @@ -5434,6 +5792,14 @@ export enum WebhookEventTypeEnum { STAFF_DELETED = 'STAFF_DELETED', /** An action requested for transaction. */ TRANSACTION_ACTION_REQUEST = 'TRANSACTION_ACTION_REQUEST', + /** + * Transaction item metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + TRANSACTION_ITEM_METADATA_UPDATED = 'TRANSACTION_ITEM_METADATA_UPDATED', /** A new translation is created. */ TRANSLATION_CREATED = 'TRANSLATION_CREATED', /** A translation is updated. */ @@ -5444,12 +5810,28 @@ export enum WebhookEventTypeEnum { WAREHOUSE_UPDATED = 'WAREHOUSE_UPDATED', /** A warehouse is deleted. */ WAREHOUSE_DELETED = 'WAREHOUSE_DELETED', + /** + * A warehouse metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + WAREHOUSE_METADATA_UPDATED = 'WAREHOUSE_METADATA_UPDATED', /** A new voucher created. */ VOUCHER_CREATED = 'VOUCHER_CREATED', /** A voucher is updated. */ VOUCHER_UPDATED = 'VOUCHER_UPDATED', /** A voucher is deleted. */ VOUCHER_DELETED = 'VOUCHER_DELETED', + /** + * A voucher metadata is updated. + * + * Added in Saleor 3.8. + * + * Note: this API is currently in Feature Preview and can be subject to changes at later point. + */ + VOUCHER_METADATA_UPDATED = 'VOUCHER_METADATA_UPDATED', /** An observability event is created. */ OBSERVABILITY = 'OBSERVABILITY', /** Authorize payment. */ @@ -5556,6 +5938,7 @@ export enum WebhookSampleEventTypeEnum { GIFT_CARD_UPDATED = 'GIFT_CARD_UPDATED', GIFT_CARD_DELETED = 'GIFT_CARD_DELETED', GIFT_CARD_STATUS_CHANGED = 'GIFT_CARD_STATUS_CHANGED', + GIFT_CARD_METADATA_UPDATED = 'GIFT_CARD_METADATA_UPDATED', MENU_CREATED = 'MENU_CREATED', MENU_UPDATED = 'MENU_UPDATED', MENU_DELETED = 'MENU_DELETED', @@ -5568,6 +5951,7 @@ export enum WebhookSampleEventTypeEnum { ORDER_UPDATED = 'ORDER_UPDATED', ORDER_CANCELLED = 'ORDER_CANCELLED', ORDER_FULFILLED = 'ORDER_FULFILLED', + ORDER_METADATA_UPDATED = 'ORDER_METADATA_UPDATED', DRAFT_ORDER_CREATED = 'DRAFT_ORDER_CREATED', DRAFT_ORDER_UPDATED = 'DRAFT_ORDER_UPDATED', DRAFT_ORDER_DELETED = 'DRAFT_ORDER_DELETED', @@ -5581,22 +5965,28 @@ export enum WebhookSampleEventTypeEnum { CUSTOMER_CREATED = 'CUSTOMER_CREATED', CUSTOMER_UPDATED = 'CUSTOMER_UPDATED', CUSTOMER_DELETED = 'CUSTOMER_DELETED', + CUSTOMER_METADATA_UPDATED = 'CUSTOMER_METADATA_UPDATED', COLLECTION_CREATED = 'COLLECTION_CREATED', COLLECTION_UPDATED = 'COLLECTION_UPDATED', COLLECTION_DELETED = 'COLLECTION_DELETED', + COLLECTION_METADATA_UPDATED = 'COLLECTION_METADATA_UPDATED', PRODUCT_CREATED = 'PRODUCT_CREATED', PRODUCT_UPDATED = 'PRODUCT_UPDATED', PRODUCT_DELETED = 'PRODUCT_DELETED', + PRODUCT_METADATA_UPDATED = 'PRODUCT_METADATA_UPDATED', PRODUCT_VARIANT_CREATED = 'PRODUCT_VARIANT_CREATED', PRODUCT_VARIANT_UPDATED = 'PRODUCT_VARIANT_UPDATED', PRODUCT_VARIANT_DELETED = 'PRODUCT_VARIANT_DELETED', PRODUCT_VARIANT_OUT_OF_STOCK = 'PRODUCT_VARIANT_OUT_OF_STOCK', PRODUCT_VARIANT_BACK_IN_STOCK = 'PRODUCT_VARIANT_BACK_IN_STOCK', + PRODUCT_VARIANT_METADATA_UPDATED = 'PRODUCT_VARIANT_METADATA_UPDATED', CHECKOUT_CREATED = 'CHECKOUT_CREATED', CHECKOUT_UPDATED = 'CHECKOUT_UPDATED', + CHECKOUT_METADATA_UPDATED = 'CHECKOUT_METADATA_UPDATED', FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED', + FULFILLMENT_METADATA_UPDATED = 'FULFILLMENT_METADATA_UPDATED', NOTIFY_USER = 'NOTIFY_USER', PAGE_CREATED = 'PAGE_CREATED', PAGE_UPDATED = 'PAGE_UPDATED', @@ -5613,18 +6003,22 @@ export enum WebhookSampleEventTypeEnum { SHIPPING_ZONE_CREATED = 'SHIPPING_ZONE_CREATED', SHIPPING_ZONE_UPDATED = 'SHIPPING_ZONE_UPDATED', SHIPPING_ZONE_DELETED = 'SHIPPING_ZONE_DELETED', + SHIPPING_ZONE_METADATA_UPDATED = 'SHIPPING_ZONE_METADATA_UPDATED', STAFF_CREATED = 'STAFF_CREATED', STAFF_UPDATED = 'STAFF_UPDATED', STAFF_DELETED = 'STAFF_DELETED', TRANSACTION_ACTION_REQUEST = 'TRANSACTION_ACTION_REQUEST', + TRANSACTION_ITEM_METADATA_UPDATED = 'TRANSACTION_ITEM_METADATA_UPDATED', TRANSLATION_CREATED = 'TRANSLATION_CREATED', TRANSLATION_UPDATED = 'TRANSLATION_UPDATED', WAREHOUSE_CREATED = 'WAREHOUSE_CREATED', WAREHOUSE_UPDATED = 'WAREHOUSE_UPDATED', WAREHOUSE_DELETED = 'WAREHOUSE_DELETED', + WAREHOUSE_METADATA_UPDATED = 'WAREHOUSE_METADATA_UPDATED', VOUCHER_CREATED = 'VOUCHER_CREATED', VOUCHER_UPDATED = 'VOUCHER_UPDATED', VOUCHER_DELETED = 'VOUCHER_DELETED', + VOUCHER_METADATA_UPDATED = 'VOUCHER_METADATA_UPDATED', OBSERVABILITY = 'OBSERVABILITY' } diff --git a/src/webhooks/utils.tsx b/src/webhooks/utils.tsx index eda7df09d..44e25a888 100644 --- a/src/webhooks/utils.tsx +++ b/src/webhooks/utils.tsx @@ -19,6 +19,22 @@ const isWebhookInPreview = (webhook: WebhookEventType) => WebhookEventTypeSyncEnum.ORDER_CALCULATE_TAXES, ] as WebhookEventType[]).includes(webhook); +const isAsyncWebhookInPreview = (webhook: WebhookEventType) => + ([ + WebhookEventTypeAsyncEnum.GIFT_CARD_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.ORDER_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.CUSTOMER_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.COLLECTION_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.PRODUCT_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.PRODUCT_VARIANT_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.CHECKOUT_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.FULFILLMENT_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.SHIPPING_ZONE_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.TRANSACTION_ITEM_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.WAREHOUSE_METADATA_UPDATED, + WebhookEventTypeAsyncEnum.VOUCHER_METADATA_UPDATED, + ] as WebhookEventType[]).includes(webhook); + export function mapSyncEventsToChoices( events: WebhookEventTypeSyncEnum[], ): MultiAutocompleteChoiceType[] { @@ -40,6 +56,7 @@ export function mapAsyncEventsToChoices( return events.map(event => ({ label: event, value: event, + badge: isAsyncWebhookInPreview(event) ? : undefined, disabled: event !== WebhookEventTypeAsyncEnum.ANY_EVENTS && isAnyAsyncEventSelected, }));