Add draft order webhook events (#1438) (#1439)

This commit is contained in:
Jakub Majorek 2021-09-27 16:06:21 +02:00 committed by GitHub
parent 2c64a966cc
commit 9c92332d3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 837 additions and 19 deletions

View file

@ -311,6 +311,9 @@
{ {
"name": "PageType" "name": "PageType"
}, },
{
"name": "Payment"
},
{ {
"name": "Product" "name": "Product"
}, },

View file

@ -7782,6 +7782,10 @@
"context": "event", "context": "event",
"string": "Product variant deleted" "string": "Product variant deleted"
}, },
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_1564545489": {
"context": "event",
"string": "Draft order deleted"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_1594316266": { "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_1594316266": {
"context": "event", "context": "event",
"string": "Fulfillment canceled" "string": "Fulfillment canceled"
@ -7806,10 +7810,6 @@
"context": "event", "context": "event",
"string": "Checkout created" "string": "Checkout created"
}, },
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2275774954": {
"context": "event",
"string": "Product Variant out of stock"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2315238863": { "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_2315238863": {
"context": "event", "context": "event",
"string": "Product variant out of stock" "string": "Product variant out of stock"
@ -7854,10 +7854,18 @@
"context": "event", "context": "event",
"string": "Order created" "string": "Order created"
}, },
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3418398751": {
"context": "event",
"string": "Draft order updated"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_36047288": { "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_36047288": {
"context": "event", "context": "event",
"string": "Translation created" "string": "Translation created"
}, },
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3610454973": {
"context": "event",
"string": "Draft order created"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3617444329": { "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3617444329": {
"context": "event", "context": "event",
"string": "Order cancelled" "string": "Order cancelled"
@ -7878,10 +7886,6 @@
"context": "event", "context": "event",
"string": "Order fulfilled" "string": "Order fulfilled"
}, },
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3951314810": {
"context": "event",
"string": "Product Variant back in stock"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3970234993": { "src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3970234993": {
"context": "event", "context": "event",
"string": "Customer created" "string": "Customer created"

View file

@ -75,9 +75,9 @@ enum AccountErrorCode {
input AccountInput { input AccountInput {
firstName: String firstName: String
lastName: String lastName: String
languageCode: LanguageCodeEnum
defaultBillingAddress: AddressInput defaultBillingAddress: AddressInput
defaultShippingAddress: AddressInput defaultShippingAddress: AddressInput
languageCode: LanguageCodeEnum
} }
type AccountRegister { type AccountRegister {
@ -88,10 +88,12 @@ type AccountRegister {
} }
input AccountRegisterInput { input AccountRegisterInput {
firstName: String
lastName: String
languageCode: LanguageCodeEnum
email: String! email: String!
password: String! password: String!
redirectUrl: String redirectUrl: String
languageCode: LanguageCodeEnum
metadata: [MetadataInput!] metadata: [MetadataInput!]
channel: String channel: String
} }
@ -1216,6 +1218,7 @@ type Collection implements Node & ObjectWithMetadata {
slug: String! slug: String!
privateMetadata: [MetadataItem]! privateMetadata: [MetadataItem]!
metadata: [MetadataItem]! metadata: [MetadataItem]!
channel: String
descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")
products(filter: ProductFilterInput, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection products(filter: ProductFilterInput, sortBy: ProductOrder, before: String, after: String, first: Int, last: Int): ProductCountableConnection
backgroundImage(size: Int): Image backgroundImage(size: Int): Image
@ -2407,6 +2410,7 @@ enum GiftCardEventsEnum {
DEACTIVATED DEACTIVATED
BALANCE_RESET BALANCE_RESET
EXPIRY_DATE_UPDATED EXPIRY_DATE_UPDATED
TAG_UPDATED
SENT_TO_CUSTOMER SENT_TO_CUSTOMER
RESENT RESENT
NOTE_ADDED NOTE_ADDED
@ -3822,7 +3826,7 @@ type Mutation {
orderConfirm(id: ID!): OrderConfirm orderConfirm(id: ID!): OrderConfirm
orderFulfill(input: OrderFulfillInput!, order: ID): OrderFulfill orderFulfill(input: OrderFulfillInput!, order: ID): OrderFulfill
orderFulfillmentCancel(id: ID!, input: FulfillmentCancelInput): FulfillmentCancel orderFulfillmentCancel(id: ID!, input: FulfillmentCancelInput): FulfillmentCancel
orderFulfillmentApprove(id: ID!, notifyCustomer: Boolean!): FulfillmentApprove orderFulfillmentApprove(allowStockToBeExceeded: Boolean = false, id: ID!, notifyCustomer: Boolean!): FulfillmentApprove
orderFulfillmentUpdateTracking(id: ID!, input: FulfillmentUpdateTrackingInput!): FulfillmentUpdateTracking orderFulfillmentUpdateTracking(id: ID!, input: FulfillmentUpdateTrackingInput!): FulfillmentUpdateTracking
orderFulfillmentRefundProducts(input: OrderRefundProductsInput!, order: ID!): FulfillmentRefundProducts orderFulfillmentRefundProducts(input: OrderRefundProductsInput!, order: ID!): FulfillmentRefundProducts
orderFulfillmentReturnProducts(input: OrderReturnProductsInput!, order: ID!): FulfillmentReturnProducts orderFulfillmentReturnProducts(input: OrderReturnProductsInput!, order: ID!): FulfillmentReturnProducts
@ -4178,6 +4182,7 @@ enum OrderErrorCode {
CANNOT_REFUND CANNOT_REFUND
CANNOT_FULFILL_UNPAID_ORDER CANNOT_FULFILL_UNPAID_ORDER
CAPTURE_INACTIVE_PAYMENT CAPTURE_INACTIVE_PAYMENT
GIFT_CARD_LINE
NOT_EDITABLE NOT_EDITABLE
FULFILL_ORDER_LINE FULFILL_ORDER_LINE
GRAPHQL_ERROR GRAPHQL_ERROR
@ -4333,6 +4338,7 @@ type OrderFulfill {
input OrderFulfillInput { input OrderFulfillInput {
lines: [OrderFulfillLineInput!]! lines: [OrderFulfillLineInput!]!
notifyCustomer: Boolean notifyCustomer: Boolean
allowStockToBeExceeded: Boolean = false
} }
input OrderFulfillLineInput { input OrderFulfillLineInput {
@ -4820,7 +4826,7 @@ type PasswordChange {
errors: [AccountError!]! errors: [AccountError!]!
} }
type Payment implements Node { type Payment implements Node & ObjectWithMetadata {
id: ID! id: ID!
gateway: String! gateway: String!
isActive: Boolean! isActive: Boolean!
@ -4831,6 +4837,8 @@ type Payment implements Node {
order: Order order: Order
paymentMethodType: String! paymentMethodType: String!
customerIpAddress: String customerIpAddress: String
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
chargeStatus: PaymentChargeStatusEnum! chargeStatus: PaymentChargeStatusEnum!
actions: [OrderAction]! actions: [OrderAction]!
total: Money total: Money
@ -4919,6 +4927,8 @@ input PaymentInput {
token: String token: String
amount: PositiveDecimal amount: PositiveDecimal
returnUrl: String returnUrl: String
storePaymentMethod: StorePaymentMethodEnum = none
metadata: [MetadataInput!]
} }
type PaymentRefund { type PaymentRefund {
@ -4931,6 +4941,7 @@ type PaymentSource {
gateway: String! gateway: String!
paymentMethodId: String paymentMethodId: String
creditCardInfo: CreditCard creditCardInfo: CreditCard
metadata: [MetadataItem]!
} }
type PaymentVoid { type PaymentVoid {
@ -5140,6 +5151,7 @@ type Product implements Node & ObjectWithMetadata {
rating: Float rating: Float
privateMetadata: [MetadataItem]! privateMetadata: [MetadataItem]!
metadata: [MetadataItem]! metadata: [MetadataItem]!
channel: String
descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.") descriptionJson: JSONString @deprecated(reason: "This field will be removed in Saleor 4.0. Use the `description` field instead.")
thumbnail(size: Int): Image thumbnail(size: Int): Image
pricing(address: AddressInput): ProductPricingInfo pricing(address: AddressInput): ProductPricingInfo
@ -5600,6 +5612,7 @@ type ProductVariant implements Node & ObjectWithMetadata {
weight: Weight weight: Weight
privateMetadata: [MetadataItem]! privateMetadata: [MetadataItem]!
metadata: [MetadataItem]! metadata: [MetadataItem]!
channel: String
channelListings: [ProductVariantChannelListing!] channelListings: [ProductVariantChannelListing!]
pricing(address: AddressInput): VariantPricingInfo pricing(address: AddressInput): VariantPricingInfo
attributes(variantSelection: VariantAttributeScope): [SelectedAttribute!]! attributes(variantSelection: VariantAttributeScope): [SelectedAttribute!]!
@ -6542,6 +6555,12 @@ input StockInput {
quantity: Int! quantity: Int!
} }
enum StorePaymentMethodEnum {
ON_SESSION
OFF_SESSION
NONE
}
type TaxType { type TaxType {
description: String description: String
taxCode: String taxCode: String
@ -7165,6 +7184,9 @@ enum WebhookEventTypeEnum {
ORDER_UPDATED ORDER_UPDATED
ORDER_CANCELLED ORDER_CANCELLED
ORDER_FULFILLED ORDER_FULFILLED
DRAFT_ORDER_CREATED
DRAFT_ORDER_UPDATED
DRAFT_ORDER_DELETED
INVOICE_REQUESTED INVOICE_REQUESTED
INVOICE_DELETED INVOICE_DELETED
INVOICE_SENT INVOICE_SENT
@ -7204,6 +7226,9 @@ enum WebhookSampleEventTypeEnum {
ORDER_UPDATED ORDER_UPDATED
ORDER_CANCELLED ORDER_CANCELLED
ORDER_FULFILLED ORDER_FULFILLED
DRAFT_ORDER_CREATED
DRAFT_ORDER_UPDATED
DRAFT_ORDER_DELETED
INVOICE_REQUESTED INVOICE_REQUESTED
INVOICE_DELETED INVOICE_DELETED
INVOICE_SENT INVOICE_SENT

View file

@ -20,7 +20,7 @@ export interface MetadataFragment_privateMetadata {
} }
export interface MetadataFragment { export interface MetadataFragment {
__typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingZone" | "User" | "Voucher" | "Warehouse"; __typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Payment" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingZone" | "User" | "Voucher" | "Warehouse";
metadata: (MetadataFragment_metadata | null)[]; metadata: (MetadataFragment_metadata | null)[];
privateMetadata: (MetadataFragment_privateMetadata | null)[]; privateMetadata: (MetadataFragment_privateMetadata | null)[];
} }

View file

@ -5,9 +5,9 @@
import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes"; import { AttributeInputTypeEnum, AttributeEntityTypeEnum, MeasurementUnitsEnum, ProductMediaType, WeightUnitsEnum } from "./../../types/globalTypes";
//=== // ====================================================
// GraphQL fragment: ProductVariant // GraphQL fragment: ProductVariant
//=== // ====================================================
export interface ProductVariant_metadata { export interface ProductVariant_metadata {
__typename: "MetadataItem"; __typename: "MetadataItem";

View file

@ -25828,6 +25828,114 @@ exports[`Storyshots Views / Apps / Webhooks / Create webhook default 1`] = `
</span> </span>
</label> </label>
</div> </div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_CREATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order created
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_DELETED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order deleted
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_UPDATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order updated
</span>
</label>
</div>
<div> <div>
<label <label
class="MuiFormControlLabel-root-id" class="MuiFormControlLabel-root-id"
@ -27463,6 +27571,114 @@ exports[`Storyshots Views / Apps / Webhooks / Create webhook form errors 1`] = `
</span> </span>
</label> </label>
</div> </div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_CREATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order created
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_DELETED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order deleted
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_UPDATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order updated
</span>
</label>
</div>
<div> <div>
<label <label
class="MuiFormControlLabel-root-id" class="MuiFormControlLabel-root-id"
@ -29106,6 +29322,120 @@ exports[`Storyshots Views / Apps / Webhooks / Create webhook loading 1`] = `
</span> </span>
</label> </label>
</div> </div>
<div>
<label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
>
<span
aria-disabled="true"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id PrivateSwitchBase-disabled-id MuiCheckbox-disabled-id MuiIconButton-colorPrimary-id MuiIconButton-disabled-id MuiButtonBase-disabled-id"
tabindex="-1"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
disabled=""
name="DRAFT_ORDER_CREATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
>
Draft order created
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
>
<span
aria-disabled="true"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id PrivateSwitchBase-disabled-id MuiCheckbox-disabled-id MuiIconButton-colorPrimary-id MuiIconButton-disabled-id MuiButtonBase-disabled-id"
tabindex="-1"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
disabled=""
name="DRAFT_ORDER_DELETED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
>
Draft order deleted
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
>
<span
aria-disabled="true"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id PrivateSwitchBase-disabled-id MuiCheckbox-disabled-id MuiIconButton-colorPrimary-id MuiIconButton-disabled-id MuiButtonBase-disabled-id"
tabindex="-1"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
disabled=""
name="DRAFT_ORDER_UPDATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
>
Draft order updated
</span>
</label>
</div>
<div> <div>
<label <label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id" class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
@ -30814,6 +31144,114 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details default 1`] = `
</span> </span>
</label> </label>
</div> </div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_CREATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order created
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_DELETED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order deleted
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_UPDATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order updated
</span>
</label>
</div>
<div> <div>
<label <label
class="MuiFormControlLabel-root-id" class="MuiFormControlLabel-root-id"
@ -32450,6 +32888,114 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details form errors 1`] =
</span> </span>
</label> </label>
</div> </div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_CREATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order created
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_DELETED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order deleted
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_UPDATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order updated
</span>
</label>
</div>
<div> <div>
<label <label
class="MuiFormControlLabel-root-id" class="MuiFormControlLabel-root-id"
@ -34094,6 +34640,120 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details loading 1`] = `
</span> </span>
</label> </label>
</div> </div>
<div>
<label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
>
<span
aria-disabled="true"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id PrivateSwitchBase-disabled-id MuiCheckbox-disabled-id MuiIconButton-colorPrimary-id MuiIconButton-disabled-id MuiButtonBase-disabled-id"
tabindex="-1"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
disabled=""
name="DRAFT_ORDER_CREATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
>
Draft order created
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
>
<span
aria-disabled="true"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id PrivateSwitchBase-disabled-id MuiCheckbox-disabled-id MuiIconButton-colorPrimary-id MuiIconButton-disabled-id MuiButtonBase-disabled-id"
tabindex="-1"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
disabled=""
name="DRAFT_ORDER_DELETED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
>
Draft order deleted
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
>
<span
aria-disabled="true"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id PrivateSwitchBase-disabled-id MuiCheckbox-disabled-id MuiIconButton-colorPrimary-id MuiIconButton-disabled-id MuiButtonBase-disabled-id"
tabindex="-1"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
disabled=""
name="DRAFT_ORDER_UPDATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
>
Draft order updated
</span>
</label>
</div>
<div> <div>
<label <label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id" class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
@ -35790,6 +36450,114 @@ exports[`Storyshots Views / Apps / Webhooks / Webhook details unnamed 1`] = `
</span> </span>
</label> </label>
</div> </div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_CREATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order created
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_DELETED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order deleted
</span>
</label>
</div>
<div>
<label
class="MuiFormControlLabel-root-id"
>
<span
aria-disabled="false"
class="MuiButtonBase-root-id MuiIconButton-root-id PrivateSwitchBase-root-id MuiCheckbox-root-id MuiCheckbox-colorPrimary-id MuiIconButton-colorPrimary-id"
>
<span
class="MuiIconButton-label-id"
>
<input
class="PrivateSwitchBase-input-id"
data-indeterminate="false"
name="DRAFT_ORDER_UPDATED"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root-id"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
/>
</svg>
</span>
</span>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Draft order updated
</span>
</label>
</div>
<div> <div>
<label <label
class="MuiFormControlLabel-root-id" class="MuiFormControlLabel-root-id"

View file

@ -503,6 +503,7 @@ export enum GiftCardEventsEnum {
NOTE_ADDED = "NOTE_ADDED", NOTE_ADDED = "NOTE_ADDED",
RESENT = "RESENT", RESENT = "RESENT",
SENT_TO_CUSTOMER = "SENT_TO_CUSTOMER", SENT_TO_CUSTOMER = "SENT_TO_CUSTOMER",
TAG_UPDATED = "TAG_UPDATED",
UPDATED = "UPDATED", UPDATED = "UPDATED",
USED_IN_ORDER = "USED_IN_ORDER", USED_IN_ORDER = "USED_IN_ORDER",
} }
@ -1403,6 +1404,7 @@ export enum OrderErrorCode {
CHANNEL_INACTIVE = "CHANNEL_INACTIVE", CHANNEL_INACTIVE = "CHANNEL_INACTIVE",
DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM", DUPLICATED_INPUT_ITEM = "DUPLICATED_INPUT_ITEM",
FULFILL_ORDER_LINE = "FULFILL_ORDER_LINE", FULFILL_ORDER_LINE = "FULFILL_ORDER_LINE",
GIFT_CARD_LINE = "GIFT_CARD_LINE",
GRAPHQL_ERROR = "GRAPHQL_ERROR", GRAPHQL_ERROR = "GRAPHQL_ERROR",
INSUFFICIENT_STOCK = "INSUFFICIENT_STOCK", INSUFFICIENT_STOCK = "INSUFFICIENT_STOCK",
INVALID = "INVALID", INVALID = "INVALID",
@ -1818,6 +1820,9 @@ export enum WebhookEventTypeEnum {
CHECKOUT_UPDATED = "CHECKOUT_UPDATED", CHECKOUT_UPDATED = "CHECKOUT_UPDATED",
CUSTOMER_CREATED = "CUSTOMER_CREATED", CUSTOMER_CREATED = "CUSTOMER_CREATED",
CUSTOMER_UPDATED = "CUSTOMER_UPDATED", CUSTOMER_UPDATED = "CUSTOMER_UPDATED",
DRAFT_ORDER_CREATED = "DRAFT_ORDER_CREATED",
DRAFT_ORDER_DELETED = "DRAFT_ORDER_DELETED",
DRAFT_ORDER_UPDATED = "DRAFT_ORDER_UPDATED",
FULFILLMENT_CANCELED = "FULFILLMENT_CANCELED", FULFILLMENT_CANCELED = "FULFILLMENT_CANCELED",
FULFILLMENT_CREATED = "FULFILLMENT_CREATED", FULFILLMENT_CREATED = "FULFILLMENT_CREATED",
INVOICE_DELETED = "INVOICE_DELETED", INVOICE_DELETED = "INVOICE_DELETED",
@ -2302,6 +2307,7 @@ export interface OrderFilterInput {
export interface OrderFulfillInput { export interface OrderFulfillInput {
lines: OrderFulfillLineInput[]; lines: OrderFulfillLineInput[];
notifyCustomer?: boolean | null; notifyCustomer?: boolean | null;
allowStockToBeExceeded?: boolean | null;
} }
export interface OrderFulfillLineInput { export interface OrderFulfillLineInput {

View file

@ -39,7 +39,7 @@ export interface UpdateMetadata_deleteMetadata_item_privateMetadata {
} }
export interface UpdateMetadata_deleteMetadata_item { export interface UpdateMetadata_deleteMetadata_item {
__typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingZone" | "User" | "Voucher" | "Warehouse"; __typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Payment" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingZone" | "User" | "Voucher" | "Warehouse";
metadata: (UpdateMetadata_deleteMetadata_item_metadata | null)[]; metadata: (UpdateMetadata_deleteMetadata_item_metadata | null)[];
privateMetadata: (UpdateMetadata_deleteMetadata_item_privateMetadata | null)[]; privateMetadata: (UpdateMetadata_deleteMetadata_item_privateMetadata | null)[];
id: string; id: string;

View file

@ -39,7 +39,7 @@ export interface UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadat
} }
export interface UpdatePrivateMetadata_deletePrivateMetadata_item { export interface UpdatePrivateMetadata_deletePrivateMetadata_item {
__typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingZone" | "User" | "Voucher" | "Warehouse"; __typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Payment" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingZone" | "User" | "Voucher" | "Warehouse";
metadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_metadata | null)[]; metadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_metadata | null)[];
privateMetadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadata | null)[]; privateMetadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadata | null)[];
id: string; id: string;

View file

@ -78,6 +78,18 @@ const WebhookEvents: React.FC<WebhookEventsProps> = ({
defaultMessage: "Order updated", defaultMessage: "Order updated",
description: "event" description: "event"
}), }),
[WebhookEventTypeEnum.DRAFT_ORDER_CREATED]: intl.formatMessage({
defaultMessage: "Draft order created",
description: "event"
}),
[WebhookEventTypeEnum.DRAFT_ORDER_DELETED]: intl.formatMessage({
defaultMessage: "Draft order deleted",
description: "event"
}),
[WebhookEventTypeEnum.DRAFT_ORDER_UPDATED]: intl.formatMessage({
defaultMessage: "Draft order updated",
description: "event"
}),
[WebhookEventTypeEnum.PAGE_CREATED]: intl.formatMessage({ [WebhookEventTypeEnum.PAGE_CREATED]: intl.formatMessage({
defaultMessage: "Page created", defaultMessage: "Page created",
description: "event" description: "event"
@ -131,11 +143,11 @@ const WebhookEvents: React.FC<WebhookEventsProps> = ({
description: "event" description: "event"
}), }),
[WebhookEventTypeEnum.PRODUCT_VARIANT_BACK_IN_STOCK]: intl.formatMessage({ [WebhookEventTypeEnum.PRODUCT_VARIANT_BACK_IN_STOCK]: intl.formatMessage({
defaultMessage: "Product Variant back in stock", defaultMessage: "Product variant back in stock",
description: "event" description: "event"
}), }),
[WebhookEventTypeEnum.PRODUCT_VARIANT_OUT_OF_STOCK]: intl.formatMessage({ [WebhookEventTypeEnum.PRODUCT_VARIANT_OUT_OF_STOCK]: intl.formatMessage({
defaultMessage: "Product Variant out of stock", defaultMessage: "Product variant out of stock",
description: "event" description: "event"
}), }),
[WebhookEventTypeEnum.PRODUCT_VARIANT_CREATED]: intl.formatMessage({ [WebhookEventTypeEnum.PRODUCT_VARIANT_CREATED]: intl.formatMessage({