diff --git a/CHANGELOG.md b/CHANGELOG.md index ce95e8597..c33a975df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ All notable, unreleased changes to this project will be documented in this file. - Add error tracking with Sentry adapter - #956 by @jwm0 - Add OAuth2 login with OpenID support - #963 by @orzechdev - Fix no channels crash - #984 by @dominik-zeglen +- Update webhooks - #982 by @piotrgrundas # 2.11.1 diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 7ea290962..694aeabbc 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -6767,6 +6767,10 @@ "context": "event", "string": "All events" }, + "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2745028894": { + "context": "event", + "string": "Page deleted" + }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2862596150": { "context": "event", "string": "Invoice sent" @@ -6795,6 +6799,14 @@ "context": "event", "string": "Order cancelled" }, + "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3618648517": { + "context": "event", + "string": "Page updated" + }, + "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3671033983": { + "context": "event", + "string": "Product deleted" + }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3907151399": { "context": "event", "string": "Order fulfilled" @@ -6803,10 +6815,6 @@ "context": "event", "string": "Customer created" }, - "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_40035964": { - "context": "event", - "string": "Changed quantity in checkout" - }, "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_4186057882": { "context": "event", "string": "Invoice requested" @@ -6815,6 +6823,14 @@ "context": "event", "string": "Fulfillment created" }, + "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_679080833": { + "context": "event", + "string": "Page created" + }, + "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_787792649": { + "context": "event", + "string": "Customer updated" + }, "src_dot_webhooks_dot_components_dot_WebhookInfo_dot_1690209105": { "context": "webhook", "string": "Target URL" diff --git a/schema.graphql b/schema.graphql index 2945ad6ca..e82c2e794 100644 --- a/schema.graphql +++ b/schema.graphql @@ -677,7 +677,7 @@ type Category implements Node & ObjectWithMetadata { level: Int! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") ancestors(before: String, after: String, first: Int, last: Int): CategoryCountableConnection products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection url: String @deprecated(reason: "This field will be removed after 2020-07-31.") @@ -747,7 +747,7 @@ type CategoryTranslatableContent implements Node { id: ID! name: String! description: JSONString! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") translation(languageCode: LanguageCodeEnum!): CategoryTranslation category: Category } @@ -765,7 +765,7 @@ type CategoryTranslation implements Node { name: String! description: JSONString! language: LanguageDisplay! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") } type CategoryUpdate { @@ -1054,7 +1054,7 @@ type Collection implements Node & ObjectWithMetadata { slug: String! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") products(filter: ProductFilterInput, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection backgroundImage(size: Int): Image translation(languageCode: LanguageCodeEnum!): CollectionTranslation @@ -1206,7 +1206,7 @@ type CollectionTranslatableContent implements Node { id: ID! name: String! description: JSONString! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") translation(languageCode: LanguageCodeEnum!): CollectionTranslation collection: Collection } @@ -1224,7 +1224,7 @@ type CollectionTranslation implements Node { name: String! description: JSONString! language: LanguageDisplay! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") } type CollectionUpdate { @@ -2076,10 +2076,6 @@ type GatewayConfigLine { scalar GenericScalar -type Geolocalization { - country: CountryDisplay -} - type GiftCard implements Node { code: String user: User @@ -3319,7 +3315,7 @@ type Page implements Node & ObjectWithMetadata { created: DateTime! privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - contentJson: String! @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") + contentJson: JSONString! @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") translation(languageCode: LanguageCodeEnum!): PageTranslation attributes: [SelectedAttribute!]! } @@ -3446,7 +3442,7 @@ type PageTranslatableContent implements Node { id: ID! title: String! content: JSONString! - contentJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") + contentJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") translation(languageCode: LanguageCodeEnum!): PageTranslation page: Page } @@ -3464,7 +3460,7 @@ type PageTranslation implements Node { title: String! content: JSONString! language: LanguageDisplay! - contentJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") + contentJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `content` field instead.") } input PageTranslationInput { @@ -3657,7 +3653,6 @@ input PaymentInput { gateway: String! token: String amount: PositiveDecimal - billingAddress: AddressInput returnUrl: String } @@ -3850,11 +3845,11 @@ type Product implements Node & ObjectWithMetadata { rating: Float privateMetadata: [MetadataItem]! metadata: [MetadataItem]! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") url: String! @deprecated(reason: "This field will be removed after 2020-07-31.") thumbnail(size: Int): Image - pricing: ProductPricingInfo - isAvailable: Boolean + pricing(address: AddressInput): ProductPricingInfo + isAvailable(address: AddressInput): Boolean taxType: TaxType attributes: [SelectedAttribute!]! channelListings: [ProductChannelListing!] @@ -3906,7 +3901,7 @@ type ProductChannelListing implements Node { purchaseCost: MoneyRange margin: Margin isAvailableForPurchase: Boolean - pricing: ProductPricingInfo + pricing(address: AddressInput): ProductPricingInfo } input ProductChannelListingAddInput { @@ -4109,6 +4104,7 @@ input ProductOrder { enum ProductOrderField { NAME + RANK PRICE MINIMAL_PRICE DATE @@ -4145,7 +4141,7 @@ type ProductTranslatableContent implements Node { seoDescription: String name: String! description: JSONString! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") translation(languageCode: LanguageCodeEnum!): ProductTranslation product: Product } @@ -4163,7 +4159,7 @@ type ProductTranslation implements Node { name: String! description: JSONString! language: LanguageDisplay! - descriptionJson: String @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") + descriptionJson: JSONString @deprecated(reason: "Will be removed in Saleor 4.0. Use the `description` field instead.") } type ProductType implements Node & ObjectWithMetadata { @@ -4177,7 +4173,6 @@ type ProductType implements Node & ObjectWithMetadata { privateMetadata: [MetadataItem]! metadata: [MetadataItem]! products(channel: String, before: String, after: String, first: Int, last: Int): ProductCountableConnection @deprecated(reason: "Use the top-level `products` query with the `productTypes` filter.") - taxRate: TaxRateType taxType: TaxType variantAttributes(variantSelection: VariantAttributeScope): [Attribute] productAttributes: [Attribute] @@ -4281,7 +4276,7 @@ type ProductVariant implements Node & ObjectWithMetadata { privateMetadata: [MetadataItem]! metadata: [MetadataItem]! channelListings: [ProductVariantChannelListing!] - pricing: VariantPricingInfo + pricing(address: AddressInput): VariantPricingInfo attributes(variantSelection: VariantAttributeScope): [SelectedAttribute!]! costPrice: Money margin: Int @@ -4290,8 +4285,8 @@ type ProductVariant implements Node & ObjectWithMetadata { images: [ProductImage] translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation digitalContent: DigitalContent - stocks(countryCode: CountryCode): [Stock] - quantityAvailable(countryCode: CountryCode): Int! + stocks(address: AddressInput, countryCode: CountryCode): [Stock] + quantityAvailable(address: AddressInput, countryCode: CountryCode): Int! } type ProductVariantBulkCreate { @@ -4956,7 +4951,6 @@ type Shop { availablePaymentGateways(currency: String): [PaymentGateway!]! availableExternalAuthentications: [ExternalAuthentication!]! availableShippingMethods(channel: String!, address: AddressInput): [ShippingMethod] - geolocalization: Geolocalization countries(languageCode: LanguageCodeEnum): [CountryDisplay!]! defaultCountry: CountryDisplay defaultMailSenderName: String @@ -5833,12 +5827,16 @@ enum WebhookEventTypeEnum { INVOICE_DELETED INVOICE_SENT CUSTOMER_CREATED + CUSTOMER_UPDATED PRODUCT_CREATED PRODUCT_UPDATED - CHECKOUT_QUANTITY_CHANGED + PRODUCT_DELETED CHECKOUT_CREATED CHECKOUT_UPDATED FULFILLMENT_CREATED + PAGE_CREATED + PAGE_UPDATED + PAGE_DELETED } enum WebhookSampleEventTypeEnum { @@ -5852,12 +5850,16 @@ enum WebhookSampleEventTypeEnum { INVOICE_DELETED INVOICE_SENT CUSTOMER_CREATED + CUSTOMER_UPDATED PRODUCT_CREATED PRODUCT_UPDATED - CHECKOUT_QUANTITY_CHANGED + PRODUCT_DELETED CHECKOUT_CREATED CHECKOUT_UPDATED FULFILLMENT_CREATED + PAGE_CREATED + PAGE_UPDATED + PAGE_DELETED } type WebhookUpdate { @@ -5895,4 +5897,4 @@ union _Entity = Address | User | Group | App | ProductVariant | Product | Produc type _Service { sdl: String -} \ No newline at end of file +} diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 56c382ea2..f0dac3fd8 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -21691,48 +21691,6 @@ exports[`Storyshots Views / Apps / Webhooks / Create webhook default 1`] = ` -