Port new shipping method schema to 3.1 (#1768)

* Update schema

* refactor(shippingMethods): change name from availableShippingMethods to shippingMethod

* refactor(shippingMethods): change shippingMethod to shippingMethodType

* Add missing files

* refactor(order): add active and message prop to the shippingMethod field

* Add support for new webhook types

* refactor(OrderShippingMethodEditDialog): show inactive shipping method as disabled

* refactor(SingleSelectField): change the disabled prop strictly boolean

Co-authored-by: Dominik Żegleń <flesz3@o2.pl>

* refactor(OrderShippingMethodEditDialog): remove unused style

Co-authored-by: Michal Zajac <michal.99.zajac@gmail.com>
Co-authored-by: Michal Zajac <50200782+Michal99Zajac@users.noreply.github.com>
Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
This commit is contained in:
Krzysztof Kulig 2022-01-24 14:50:17 +01:00 committed by GitHub
parent 204dfac29f
commit 80f3af4e5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 420 additions and 316 deletions

View file

@ -227,6 +227,9 @@
{ {
"name": "ShippingMethodTranslation" "name": "ShippingMethodTranslation"
}, },
{
"name": "ShippingMethodType"
},
{ {
"name": "ShippingZone" "name": "ShippingZone"
}, },
@ -329,6 +332,9 @@
{ {
"name": "ShippingMethod" "name": "ShippingMethod"
}, },
{
"name": "ShippingMethodType"
},
{ {
"name": "ShippingZone" "name": "ShippingZone"
}, },

View file

@ -1022,10 +1022,11 @@ type Checkout implements Node & ObjectWithMetadata {
id: ID! id: ID!
privateMetadata: [MetadataItem]! privateMetadata: [MetadataItem]!
metadata: [MetadataItem]! metadata: [MetadataItem]!
availableShippingMethods: [ShippingMethod]! availableShippingMethods: [ShippingMethod]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `shippingMethods` instead.")
shippingMethods: [ShippingMethod]!
availableCollectionPoints: [Warehouse!]! availableCollectionPoints: [Warehouse!]!
availablePaymentGateways: [PaymentGateway!]! availablePaymentGateways: [PaymentGateway!]!
email: String! email: String
isShippingRequired: Boolean! isShippingRequired: Boolean!
quantity: Int! quantity: Int!
stockReservationExpires: DateTime stockReservationExpires: DateTime
@ -1144,6 +1145,7 @@ enum CheckoutErrorCode {
MISSING_CHANNEL_SLUG MISSING_CHANNEL_SLUG
CHANNEL_INACTIVE CHANNEL_INACTIVE
UNAVAILABLE_VARIANT_IN_CHANNEL UNAVAILABLE_VARIANT_IN_CHANNEL
EMAIL_NOT_SET
} }
input CheckoutFilterInput { input CheckoutFilterInput {
@ -4076,7 +4078,8 @@ type Order implements Node & ObjectWithMetadata {
fulfillments: [Fulfillment]! fulfillments: [Fulfillment]!
lines: [OrderLine]! lines: [OrderLine]!
actions: [OrderAction]! actions: [OrderAction]!
availableShippingMethods: [ShippingMethod] availableShippingMethods: [ShippingMethod] @deprecated(reason: "Use `shippingMethods`, this field will be removed in 4.0")
shippingMethods: [ShippingMethod]
availableCollectionPoints: [Warehouse!]! availableCollectionPoints: [Warehouse!]!
invoices: [Invoice] invoices: [Invoice]
number: String number: String
@ -4966,6 +4969,7 @@ enum PaymentErrorCode {
NOT_SUPPORTED_GATEWAY NOT_SUPPORTED_GATEWAY
CHANNEL_INACTIVE CHANNEL_INACTIVE
BALANCE_CHECK_ERROR BALANCE_CHECK_ERROR
CHECKOUT_EMAIL_NOT_SET
} }
input PaymentFilterInput { input PaymentFilterInput {
@ -6200,20 +6204,19 @@ type ShippingMethod implements Node & ObjectWithMetadata {
id: ID! id: ID!
privateMetadata: [MetadataItem]! privateMetadata: [MetadataItem]!
metadata: [MetadataItem]! metadata: [MetadataItem]!
type: ShippingMethodTypeEnum @deprecated(reason: "This field will be removed in Saleor 4.0.")
name: String! name: String!
description: JSONString description: JSONString
type: ShippingMethodTypeEnum
translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation
channelListings: [ShippingMethodChannelListing!]
price: Money
maximumOrderPrice: Money
minimumOrderPrice: Money
postalCodeRules: [ShippingMethodPostalCodeRule]
excludedProducts(before: String, after: String, first: Int, last: Int): ProductCountableConnection
minimumOrderWeight: Weight
maximumOrderWeight: Weight
maximumDeliveryDays: Int maximumDeliveryDays: Int
minimumDeliveryDays: Int minimumDeliveryDays: Int
maximumOrderWeight: Weight @deprecated(reason: "This field will be removed in Saleor 4.0.")
minimumOrderWeight: Weight @deprecated(reason: "This field will be removed in Saleor 4.0.")
translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation
price: Money!
maximumOrderPrice: Money
minimumOrderPrice: Money
active: Boolean!
message: String
} }
type ShippingMethodChannelListing implements Node { type ShippingMethodChannelListing implements Node {
@ -6237,7 +6240,7 @@ input ShippingMethodChannelListingInput {
} }
type ShippingMethodChannelListingUpdate { type ShippingMethodChannelListingUpdate {
shippingMethod: ShippingMethod shippingMethod: ShippingMethodType
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]! errors: [ShippingError!]!
} }
@ -6254,7 +6257,7 @@ type ShippingMethodTranslatableContent implements Node {
name: String! name: String!
description: JSONString description: JSONString
translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation
shippingMethod: ShippingMethod @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.") shippingMethod: ShippingMethodType @deprecated(reason: "This field will be removed in Saleor 4.0. Get model fields from the root level queries.")
} }
type ShippingMethodTranslation implements Node { type ShippingMethodTranslation implements Node {
@ -6264,6 +6267,25 @@ type ShippingMethodTranslation implements Node {
language: LanguageDisplay! language: LanguageDisplay!
} }
type ShippingMethodType implements Node & ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
name: String!
description: JSONString
type: ShippingMethodTypeEnum
translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation
channelListings: [ShippingMethodChannelListing!]
maximumOrderPrice: Money
minimumOrderPrice: Money
postalCodeRules: [ShippingMethodPostalCodeRule]
excludedProducts(before: String, after: String, first: Int, last: Int): ProductCountableConnection
minimumOrderWeight: Weight
maximumOrderWeight: Weight
maximumDeliveryDays: Int
minimumDeliveryDays: Int
}
enum ShippingMethodTypeEnum { enum ShippingMethodTypeEnum {
PRICE PRICE
WEIGHT WEIGHT
@ -6282,20 +6304,20 @@ type ShippingPriceBulkDelete {
type ShippingPriceCreate { type ShippingPriceCreate {
shippingZone: ShippingZone shippingZone: ShippingZone
shippingMethod: ShippingMethod shippingMethod: ShippingMethodType
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]! errors: [ShippingError!]!
} }
type ShippingPriceDelete { type ShippingPriceDelete {
shippingMethod: ShippingMethod shippingMethod: ShippingMethodType
shippingZone: ShippingZone shippingZone: ShippingZone
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]! errors: [ShippingError!]!
} }
type ShippingPriceExcludeProducts { type ShippingPriceExcludeProducts {
shippingMethod: ShippingMethod shippingMethod: ShippingMethodType
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]! errors: [ShippingError!]!
} }
@ -6319,7 +6341,7 @@ input ShippingPriceInput {
} }
type ShippingPriceRemoveProductFromExclude { type ShippingPriceRemoveProductFromExclude {
shippingMethod: ShippingMethod shippingMethod: ShippingMethodType
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]! errors: [ShippingError!]!
} }
@ -6327,7 +6349,7 @@ type ShippingPriceRemoveProductFromExclude {
type ShippingPriceTranslate { type ShippingPriceTranslate {
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [TranslationError!]! errors: [TranslationError!]!
shippingMethod: ShippingMethod shippingMethod: ShippingMethodType
} }
input ShippingPriceTranslationInput { input ShippingPriceTranslationInput {
@ -6337,7 +6359,7 @@ input ShippingPriceTranslationInput {
type ShippingPriceUpdate { type ShippingPriceUpdate {
shippingZone: ShippingZone shippingZone: ShippingZone
shippingMethod: ShippingMethod shippingMethod: ShippingMethodType
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.") shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
errors: [ShippingError!]! errors: [ShippingError!]!
} }
@ -6350,7 +6372,7 @@ type ShippingZone implements Node & ObjectWithMetadata {
metadata: [MetadataItem]! metadata: [MetadataItem]!
priceRange: MoneyRange priceRange: MoneyRange
countries: [CountryDisplay] countries: [CountryDisplay]
shippingMethods: [ShippingMethod] shippingMethods: [ShippingMethodType]
warehouses: [Warehouse!]! warehouses: [Warehouse!]!
channels: [Channel!]! channels: [Channel!]!
description: String description: String

View file

@ -34,6 +34,7 @@ const useStyles = makeStyles(
export interface Choice<T = string, L = string | React.ReactNode> { export interface Choice<T = string, L = string | React.ReactNode> {
value: T; value: T;
label: L; label: L;
disabled?: boolean;
} }
export type Choices = Choice[]; export type Choices = Choice[];
@ -114,6 +115,7 @@ export const SingleSelectField: React.FC<SingleSelectFieldProps> = props => {
{choices.length > 0 ? ( {choices.length > 0 ? (
choices.map(choice => ( choices.map(choice => (
<MenuItem <MenuItem
disabled={choice.disabled}
data-test="selectFieldOption" data-test="selectFieldOption"
data-test-id={choice.value} data-test-id={choice.value}
value={choice.value} value={choice.value}

View file

@ -297,12 +297,14 @@ export const fragmentOrderDetails = gql`
email email
} }
userEmail userEmail
availableShippingMethods { shippingMethods {
id id
name name
price { price {
...Money ...Money
} }
active
message
} }
invoices { invoices {
...InvoiceFragment ...InvoiceFragment

View file

@ -18,7 +18,7 @@ export const shippingZoneFragment = gql`
`; `;
export const shippingMethodWithPostalCodesFragment = gql` export const shippingMethodWithPostalCodesFragment = gql`
fragment ShippingMethodWithPostalCodesFragment on ShippingMethod { fragment ShippingMethodWithPostalCodesFragment on ShippingMethodType {
id id
postalCodeRules { postalCodeRules {
id id
@ -28,11 +28,11 @@ export const shippingMethodWithPostalCodesFragment = gql`
} }
} }
`; `;
export const shippingMethodFragment = gql` export const shippingMethodTypeFragment = gql`
${metadataFragment} ${metadataFragment}
${fragmentMoney} ${fragmentMoney}
${shippingMethodWithPostalCodesFragment} ${shippingMethodWithPostalCodesFragment}
fragment ShippingMethodFragment on ShippingMethod { fragment ShippingMethodTypeFragment on ShippingMethodType {
...ShippingMethodWithPostalCodesFragment ...ShippingMethodWithPostalCodesFragment
...MetadataFragment ...MetadataFragment
minimumOrderWeight { minimumOrderWeight {
@ -69,9 +69,9 @@ export const shippingMethodFragment = gql`
`; `;
export const shippingMethodWithExcludedProductsFragment = gql` export const shippingMethodWithExcludedProductsFragment = gql`
${fragmentMoney} ${fragmentMoney}
${shippingMethodFragment} ${shippingMethodTypeFragment}
fragment ShippingMethodWithExcludedProductsFragment on ShippingMethod { fragment ShippingMethodWithExcludedProductsFragment on ShippingMethodType {
...ShippingMethodFragment ...ShippingMethodTypeFragment
excludedProducts( excludedProducts(
before: $before before: $before
after: $after after: $after
@ -99,12 +99,12 @@ export const shippingMethodWithExcludedProductsFragment = gql`
export const shippingZoneDetailsFragment = gql` export const shippingZoneDetailsFragment = gql`
${shippingZoneFragment} ${shippingZoneFragment}
${shippingMethodFragment} ${shippingMethodTypeFragment}
fragment ShippingZoneDetailsFragment on ShippingZone { fragment ShippingZoneDetailsFragment on ShippingZone {
...ShippingZoneFragment ...ShippingZoneFragment
default default
shippingMethods { shippingMethods {
...ShippingMethodFragment ...ShippingMethodTypeFragment
} }
warehouses { warehouses {
id id

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" | "Payment" | "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" | "ShippingMethodType" | "ShippingZone" | "User" | "Voucher" | "Warehouse";
metadata: (MetadataFragment_metadata | null)[]; metadata: (MetadataFragment_metadata | null)[];
privateMetadata: (MetadataFragment_privateMetadata | null)[]; privateMetadata: (MetadataFragment_privateMetadata | null)[];
} }

View file

@ -517,17 +517,19 @@ export interface OrderDetailsFragment_user {
email: string; email: string;
} }
export interface OrderDetailsFragment_availableShippingMethods_price { export interface OrderDetailsFragment_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderDetailsFragment_availableShippingMethods { export interface OrderDetailsFragment_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderDetailsFragment_availableShippingMethods_price | null; price: OrderDetailsFragment_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderDetailsFragment_invoices { export interface OrderDetailsFragment_invoices {
@ -588,7 +590,7 @@ export interface OrderDetailsFragment {
undiscountedTotal: OrderDetailsFragment_undiscountedTotal; undiscountedTotal: OrderDetailsFragment_undiscountedTotal;
user: OrderDetailsFragment_user | null; user: OrderDetailsFragment_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderDetailsFragment_availableShippingMethods | null)[] | null; shippingMethods: OrderDetailsFragment_shippingMethods[];
invoices: (OrderDetailsFragment_invoices | null)[] | null; invoices: (OrderDetailsFragment_invoices | null)[] | null;
channel: OrderDetailsFragment_channel; channel: OrderDetailsFragment_channel;
} }

View file

@ -1,92 +0,0 @@
/* tslint:disable */
/* eslint-disable */
// @generated
// This file was automatically generated and should not be edited.
import { PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes";
// ====================================================
// GraphQL fragment: ShippingMethodFragment
// ====================================================
export interface ShippingMethodFragment_postalCodeRules {
__typename: "ShippingMethodPostalCodeRule";
id: string;
inclusionType: PostalCodeRuleInclusionTypeEnum | null;
start: string | null;
end: string | null;
}
export interface ShippingMethodFragment_metadata {
__typename: "MetadataItem";
key: string;
value: string;
}
export interface ShippingMethodFragment_privateMetadata {
__typename: "MetadataItem";
key: string;
value: string;
}
export interface ShippingMethodFragment_minimumOrderWeight {
__typename: "Weight";
unit: WeightUnitsEnum;
value: number;
}
export interface ShippingMethodFragment_maximumOrderWeight {
__typename: "Weight";
unit: WeightUnitsEnum;
value: number;
}
export interface ShippingMethodFragment_channelListings_channel {
__typename: "Channel";
id: string;
name: string;
currencyCode: string;
}
export interface ShippingMethodFragment_channelListings_price {
__typename: "Money";
amount: number;
currency: string;
}
export interface ShippingMethodFragment_channelListings_minimumOrderPrice {
__typename: "Money";
amount: number;
currency: string;
}
export interface ShippingMethodFragment_channelListings_maximumOrderPrice {
__typename: "Money";
amount: number;
currency: string;
}
export interface ShippingMethodFragment_channelListings {
__typename: "ShippingMethodChannelListing";
id: string;
channel: ShippingMethodFragment_channelListings_channel;
price: ShippingMethodFragment_channelListings_price | null;
minimumOrderPrice: ShippingMethodFragment_channelListings_minimumOrderPrice | null;
maximumOrderPrice: ShippingMethodFragment_channelListings_maximumOrderPrice | null;
}
export interface ShippingMethodFragment {
__typename: "ShippingMethod";
id: string;
postalCodeRules: (ShippingMethodFragment_postalCodeRules | null)[] | null;
metadata: (ShippingMethodFragment_metadata | null)[];
privateMetadata: (ShippingMethodFragment_privateMetadata | null)[];
minimumOrderWeight: ShippingMethodFragment_minimumOrderWeight | null;
maximumOrderWeight: ShippingMethodFragment_maximumOrderWeight | null;
minimumDeliveryDays: number | null;
maximumDeliveryDays: number | null;
name: string;
description: any | null;
type: ShippingMethodTypeEnum | null;
channelListings: ShippingMethodFragment_channelListings[] | null;
}

View file

@ -10,7 +10,7 @@ import { LanguageCodeEnum } from "./../../types/globalTypes";
// ==================================================== // ====================================================
export interface ShippingMethodTranslationFragment_shippingMethod { export interface ShippingMethodTranslationFragment_shippingMethod {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
} }

View file

@ -0,0 +1,92 @@
/* tslint:disable */
/* eslint-disable */
// @generated
// This file was automatically generated and should not be edited.
import { PostalCodeRuleInclusionTypeEnum, WeightUnitsEnum, ShippingMethodTypeEnum } from "./../../types/globalTypes";
// ====================================================
// GraphQL fragment: ShippingMethodTypeFragment
// ====================================================
export interface ShippingMethodTypeFragment_postalCodeRules {
__typename: "ShippingMethodPostalCodeRule";
id: string;
inclusionType: PostalCodeRuleInclusionTypeEnum | null;
start: string | null;
end: string | null;
}
export interface ShippingMethodTypeFragment_metadata {
__typename: "MetadataItem";
key: string;
value: string;
}
export interface ShippingMethodTypeFragment_privateMetadata {
__typename: "MetadataItem";
key: string;
value: string;
}
export interface ShippingMethodTypeFragment_minimumOrderWeight {
__typename: "Weight";
unit: WeightUnitsEnum;
value: number;
}
export interface ShippingMethodTypeFragment_maximumOrderWeight {
__typename: "Weight";
unit: WeightUnitsEnum;
value: number;
}
export interface ShippingMethodTypeFragment_channelListings_channel {
__typename: "Channel";
id: string;
name: string;
currencyCode: string;
}
export interface ShippingMethodTypeFragment_channelListings_price {
__typename: "Money";
amount: number;
currency: string;
}
export interface ShippingMethodTypeFragment_channelListings_minimumOrderPrice {
__typename: "Money";
amount: number;
currency: string;
}
export interface ShippingMethodTypeFragment_channelListings_maximumOrderPrice {
__typename: "Money";
amount: number;
currency: string;
}
export interface ShippingMethodTypeFragment_channelListings {
__typename: "ShippingMethodChannelListing";
id: string;
channel: ShippingMethodTypeFragment_channelListings_channel;
price: ShippingMethodTypeFragment_channelListings_price | null;
minimumOrderPrice: ShippingMethodTypeFragment_channelListings_minimumOrderPrice | null;
maximumOrderPrice: ShippingMethodTypeFragment_channelListings_maximumOrderPrice | null;
}
export interface ShippingMethodTypeFragment {
__typename: "ShippingMethodType";
id: string;
postalCodeRules: (ShippingMethodTypeFragment_postalCodeRules | null)[] | null;
metadata: (ShippingMethodTypeFragment_metadata | null)[];
privateMetadata: (ShippingMethodTypeFragment_privateMetadata | null)[];
minimumOrderWeight: ShippingMethodTypeFragment_minimumOrderWeight | null;
maximumOrderWeight: ShippingMethodTypeFragment_maximumOrderWeight | null;
minimumDeliveryDays: number | null;
maximumDeliveryDays: number | null;
name: string;
description: any | null;
type: ShippingMethodTypeEnum | null;
channelListings: ShippingMethodTypeFragment_channelListings[] | null;
}

View file

@ -107,7 +107,7 @@ export interface ShippingMethodWithExcludedProductsFragment_excludedProducts {
} }
export interface ShippingMethodWithExcludedProductsFragment { export interface ShippingMethodWithExcludedProductsFragment {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (ShippingMethodWithExcludedProductsFragment_postalCodeRules | null)[] | null; postalCodeRules: (ShippingMethodWithExcludedProductsFragment_postalCodeRules | null)[] | null;
metadata: (ShippingMethodWithExcludedProductsFragment_metadata | null)[]; metadata: (ShippingMethodWithExcludedProductsFragment_metadata | null)[];

View file

@ -18,7 +18,7 @@ export interface ShippingMethodWithPostalCodesFragment_postalCodeRules {
} }
export interface ShippingMethodWithPostalCodesFragment { export interface ShippingMethodWithPostalCodesFragment {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (ShippingMethodWithPostalCodesFragment_postalCodeRules | null)[] | null; postalCodeRules: (ShippingMethodWithPostalCodesFragment_postalCodeRules | null)[] | null;
} }

View file

@ -94,7 +94,7 @@ export interface ShippingZoneDetailsFragment_shippingMethods_channelListings {
} }
export interface ShippingZoneDetailsFragment_shippingMethods { export interface ShippingZoneDetailsFragment_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (ShippingZoneDetailsFragment_shippingMethods_postalCodeRules | null)[] | null; postalCodeRules: (ShippingZoneDetailsFragment_shippingMethods_postalCodeRules | null)[] | null;
metadata: (ShippingZoneDetailsFragment_shippingMethods_metadata | null)[]; metadata: (ShippingZoneDetailsFragment_shippingMethods_metadata | null)[];

View file

@ -84,7 +84,7 @@ const OrderDraftDetailsSummary: React.FC<OrderDraftDetailsSummaryProps> = props
total, total,
shippingMethod, shippingMethod,
shippingMethodName, shippingMethodName,
availableShippingMethods, shippingMethods,
shippingPrice, shippingPrice,
shippingAddress, shippingAddress,
isShippingRequired isShippingRequired
@ -93,8 +93,7 @@ const OrderDraftDetailsSummary: React.FC<OrderDraftDetailsSummaryProps> = props
const hasChosenShippingMethod = const hasChosenShippingMethod =
shippingMethod !== null && shippingMethodName !== null; shippingMethod !== null && shippingMethodName !== null;
const hasAvailableShippingMethods = const hasShippingMethods = !!shippingMethods?.length || isShippingRequired;
!!availableShippingMethods?.length || isShippingRequired;
const discountTitle = orderDiscount const discountTitle = orderDiscount
? messages.discount ? messages.discount
@ -194,11 +193,9 @@ const OrderDraftDetailsSummary: React.FC<OrderDraftDetailsSummaryProps> = props
</td> </td>
</tr> </tr>
<tr> <tr>
{hasAvailableShippingMethods && ( {hasShippingMethods && <td>{getShippingMethodComponent()}</td>}
<td>{getShippingMethodComponent()}</td>
)}
{!hasAvailableShippingMethods && ( {!hasShippingMethods && (
<td>{intl.formatMessage(messages.noShippingCarriers)}</td> <td>{intl.formatMessage(messages.noShippingCarriers)}</td>
)} )}

View file

@ -4,7 +4,8 @@ import {
DialogActions, DialogActions,
DialogContent, DialogContent,
DialogContentText, DialogContentText,
DialogTitle DialogTitle,
Typography
} from "@material-ui/core"; } from "@material-ui/core";
import ConfirmButton, { import ConfirmButton, {
ConfirmButtonTransitionState ConfirmButtonTransitionState
@ -22,7 +23,7 @@ import getOrderErrorMessage from "@saleor/utils/errors/order";
import React from "react"; import React from "react";
import { FormattedMessage, useIntl } from "react-intl"; import { FormattedMessage, useIntl } from "react-intl";
import { OrderDetails_order_availableShippingMethods } from "../../types/OrderDetails"; import { OrderDetails_order_shippingMethods } from "../../types/OrderDetails";
export interface FormData { export interface FormData {
shippingMethod: string; shippingMethod: string;
@ -35,7 +36,8 @@ const useStyles = makeStyles(
}, },
menuItem: { menuItem: {
display: "flex", display: "flex",
width: "100%" width: "100%",
flexWrap: "wrap"
}, },
price: { price: {
marginRight: theme.spacing(3) marginRight: theme.spacing(3)
@ -50,6 +52,9 @@ const useStyles = makeStyles(
flex: 1, flex: 1,
overflowX: "hidden", overflowX: "hidden",
textOverflow: "ellipsis" textOverflow: "ellipsis"
},
message: {
width: "100%"
} }
}), }),
{ name: "OrderShippingMethodEditDialog" } { name: "OrderShippingMethodEditDialog" }
@ -60,7 +65,7 @@ export interface OrderShippingMethodEditDialogProps {
errors: OrderErrorFragment[]; errors: OrderErrorFragment[];
open: boolean; open: boolean;
shippingMethod: string; shippingMethod: string;
shippingMethods?: OrderDetails_order_availableShippingMethods[]; shippingMethods?: OrderDetails_order_shippingMethods[];
onClose(); onClose();
onSubmit?(data: FormData); onSubmit?(data: FormData);
} }
@ -84,18 +89,26 @@ const OrderShippingMethodEditDialog: React.FC<OrderShippingMethodEditDialogProps
const nonFieldErrors = errors.filter(err => !formFields.includes(err.field)); const nonFieldErrors = errors.filter(err => !formFields.includes(err.field));
const choices = shippingMethods const choices = shippingMethods
? shippingMethods.map(s => ({ ? shippingMethods
label: ( .map(s => ({
<div className={classes.menuItem}> label: (
<span className={classes.shippingMethodName}>{s.name}</span> <div className={classes.menuItem}>
&nbsp; <span className={classes.shippingMethodName}>{s.name}</span>
<span className={classes.price}> &nbsp;
<Money money={s.price} /> <span className={classes.price}>
</span> <Money money={s.price} />
</div> </span>
), {!s.active && (
value: s.id <Typography className={classes.message} variant="caption">
})) {s.message}
</Typography>
)}
</div>
),
disabled: !s.active,
value: s.id
}))
.sort((x, y) => (x.disabled === y.disabled ? 0 : x.disabled ? 1 : -1))
: []; : [];
const initialForm: FormData = { const initialForm: FormData = {
shippingMethod shippingMethod

View file

@ -779,7 +779,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
OrderAction.REFUND, OrderAction.REFUND,
OrderAction.VOID OrderAction.VOID
], ],
availableShippingMethods: [ shippingMethods: [
{ {
__typename: "ShippingMethod", __typename: "ShippingMethod",
id: "U2hpcHBpbmdNZXRob2Q6NQ==", id: "U2hpcHBpbmdNZXRob2Q6NQ==",
@ -788,7 +788,9 @@ export const order = (placeholder: string): OrderDetails_order => ({
__typename: "Money", __typename: "Money",
amount: 12.41, amount: 12.41,
currency: "USD" currency: "USD"
} },
active: false,
message: "shipping method is disactive"
}, },
{ {
__typename: "ShippingMethod", __typename: "ShippingMethod",
@ -798,7 +800,9 @@ export const order = (placeholder: string): OrderDetails_order => ({
__typename: "Money", __typename: "Money",
amount: 9.12, amount: 9.12,
currency: "USD" currency: "USD"
} },
active: true,
message: null
}, },
{ {
__typename: "ShippingMethod", __typename: "ShippingMethod",
@ -808,7 +812,9 @@ export const order = (placeholder: string): OrderDetails_order => ({
__typename: "Money", __typename: "Money",
amount: 7.6, amount: 7.6,
currency: "USD" currency: "USD"
} },
active: true,
message: null
} }
], ],
billingAddress: { billingAddress: {
@ -1419,7 +1425,7 @@ export const draftOrder = (placeholder: string): OrderDetails_order => ({
__typename: "Order" as "Order", __typename: "Order" as "Order",
giftCards: [], giftCards: [],
actions: [OrderAction.CAPTURE], actions: [OrderAction.CAPTURE],
availableShippingMethods: null, shippingMethods: null,
billingAddress: null, billingAddress: null,
canFinalize: true, canFinalize: true,
channel: { channel: {

View file

@ -577,7 +577,7 @@ const orderShippingMethodUpdateMutation = gql`
...OrderErrorFragment ...OrderErrorFragment
} }
order { order {
availableShippingMethods { shippingMethods {
id id
name name
} }

View file

@ -526,17 +526,19 @@ export interface FulfillOrder_orderFulfill_order_user {
email: string; email: string;
} }
export interface FulfillOrder_orderFulfill_order_availableShippingMethods_price { export interface FulfillOrder_orderFulfill_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface FulfillOrder_orderFulfill_order_availableShippingMethods { export interface FulfillOrder_orderFulfill_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: FulfillOrder_orderFulfill_order_availableShippingMethods_price | null; price: FulfillOrder_orderFulfill_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface FulfillOrder_orderFulfill_order_invoices { export interface FulfillOrder_orderFulfill_order_invoices {
@ -597,7 +599,7 @@ export interface FulfillOrder_orderFulfill_order {
undiscountedTotal: FulfillOrder_orderFulfill_order_undiscountedTotal; undiscountedTotal: FulfillOrder_orderFulfill_order_undiscountedTotal;
user: FulfillOrder_orderFulfill_order_user | null; user: FulfillOrder_orderFulfill_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (FulfillOrder_orderFulfill_order_availableShippingMethods | null)[] | null; shippingMethods: FulfillOrder_orderFulfill_order_shippingMethods[];
invoices: (FulfillOrder_orderFulfill_order_invoices | null)[] | null; invoices: (FulfillOrder_orderFulfill_order_invoices | null)[] | null;
channel: FulfillOrder_orderFulfill_order_channel; channel: FulfillOrder_orderFulfill_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderCancel_orderCancel_order_user {
email: string; email: string;
} }
export interface OrderCancel_orderCancel_order_availableShippingMethods_price { export interface OrderCancel_orderCancel_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderCancel_orderCancel_order_availableShippingMethods { export interface OrderCancel_orderCancel_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderCancel_orderCancel_order_availableShippingMethods_price | null; price: OrderCancel_orderCancel_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderCancel_orderCancel_order_invoices { export interface OrderCancel_orderCancel_order_invoices {
@ -595,7 +597,7 @@ export interface OrderCancel_orderCancel_order {
undiscountedTotal: OrderCancel_orderCancel_order_undiscountedTotal; undiscountedTotal: OrderCancel_orderCancel_order_undiscountedTotal;
user: OrderCancel_orderCancel_order_user | null; user: OrderCancel_orderCancel_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderCancel_orderCancel_order_availableShippingMethods | null)[] | null; shippingMethods: OrderCancel_orderCancel_order_shippingMethods[];
invoices: (OrderCancel_orderCancel_order_invoices | null)[] | null; invoices: (OrderCancel_orderCancel_order_invoices | null)[] | null;
channel: OrderCancel_orderCancel_order_channel; channel: OrderCancel_orderCancel_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderCapture_orderCapture_order_user {
email: string; email: string;
} }
export interface OrderCapture_orderCapture_order_availableShippingMethods_price { export interface OrderCapture_orderCapture_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderCapture_orderCapture_order_availableShippingMethods { export interface OrderCapture_orderCapture_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderCapture_orderCapture_order_availableShippingMethods_price | null; price: OrderCapture_orderCapture_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderCapture_orderCapture_order_invoices { export interface OrderCapture_orderCapture_order_invoices {
@ -595,7 +597,7 @@ export interface OrderCapture_orderCapture_order {
undiscountedTotal: OrderCapture_orderCapture_order_undiscountedTotal; undiscountedTotal: OrderCapture_orderCapture_order_undiscountedTotal;
user: OrderCapture_orderCapture_order_user | null; user: OrderCapture_orderCapture_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderCapture_orderCapture_order_availableShippingMethods | null)[] | null; shippingMethods: OrderCapture_orderCapture_order_shippingMethods[];
invoices: (OrderCapture_orderCapture_order_invoices | null)[] | null; invoices: (OrderCapture_orderCapture_order_invoices | null)[] | null;
channel: OrderCapture_orderCapture_order_channel; channel: OrderCapture_orderCapture_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderConfirm_orderConfirm_order_user {
email: string; email: string;
} }
export interface OrderConfirm_orderConfirm_order_availableShippingMethods_price { export interface OrderConfirm_orderConfirm_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderConfirm_orderConfirm_order_availableShippingMethods { export interface OrderConfirm_orderConfirm_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderConfirm_orderConfirm_order_availableShippingMethods_price | null; price: OrderConfirm_orderConfirm_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderConfirm_orderConfirm_order_invoices { export interface OrderConfirm_orderConfirm_order_invoices {
@ -595,7 +597,7 @@ export interface OrderConfirm_orderConfirm_order {
undiscountedTotal: OrderConfirm_orderConfirm_order_undiscountedTotal; undiscountedTotal: OrderConfirm_orderConfirm_order_undiscountedTotal;
user: OrderConfirm_orderConfirm_order_user | null; user: OrderConfirm_orderConfirm_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderConfirm_orderConfirm_order_availableShippingMethods | null)[] | null; shippingMethods: OrderConfirm_orderConfirm_order_shippingMethods[];
invoices: (OrderConfirm_orderConfirm_order_invoices | null)[] | null; invoices: (OrderConfirm_orderConfirm_order_invoices | null)[] | null;
channel: OrderConfirm_orderConfirm_order_channel; channel: OrderConfirm_orderConfirm_order_channel;
} }

View file

@ -517,17 +517,19 @@ export interface OrderDetails_order_user {
email: string; email: string;
} }
export interface OrderDetails_order_availableShippingMethods_price { export interface OrderDetails_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderDetails_order_availableShippingMethods { export interface OrderDetails_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderDetails_order_availableShippingMethods_price | null; price: OrderDetails_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderDetails_order_invoices { export interface OrderDetails_order_invoices {
@ -588,7 +590,7 @@ export interface OrderDetails_order {
undiscountedTotal: OrderDetails_order_undiscountedTotal; undiscountedTotal: OrderDetails_order_undiscountedTotal;
user: OrderDetails_order_user | null; user: OrderDetails_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderDetails_order_availableShippingMethods | null)[] | null; shippingMethods: OrderDetails_order_shippingMethods[];
invoices: (OrderDetails_order_invoices | null)[] | null; invoices: (OrderDetails_order_invoices | null)[] | null;
channel: OrderDetails_order_channel; channel: OrderDetails_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderDiscountAdd_orderDiscountAdd_order_user {
email: string; email: string;
} }
export interface OrderDiscountAdd_orderDiscountAdd_order_availableShippingMethods_price { export interface OrderDiscountAdd_orderDiscountAdd_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderDiscountAdd_orderDiscountAdd_order_availableShippingMethods { export interface OrderDiscountAdd_orderDiscountAdd_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderDiscountAdd_orderDiscountAdd_order_availableShippingMethods_price | null; price: OrderDiscountAdd_orderDiscountAdd_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderDiscountAdd_orderDiscountAdd_order_invoices { export interface OrderDiscountAdd_orderDiscountAdd_order_invoices {
@ -595,7 +597,7 @@ export interface OrderDiscountAdd_orderDiscountAdd_order {
undiscountedTotal: OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal; undiscountedTotal: OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal;
user: OrderDiscountAdd_orderDiscountAdd_order_user | null; user: OrderDiscountAdd_orderDiscountAdd_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderDiscountAdd_orderDiscountAdd_order_availableShippingMethods | null)[] | null; shippingMethods: OrderDiscountAdd_orderDiscountAdd_order_shippingMethods[];
invoices: (OrderDiscountAdd_orderDiscountAdd_order_invoices | null)[] | null; invoices: (OrderDiscountAdd_orderDiscountAdd_order_invoices | null)[] | null;
channel: OrderDiscountAdd_orderDiscountAdd_order_channel; channel: OrderDiscountAdd_orderDiscountAdd_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderDiscountDelete_orderDiscountDelete_order_user {
email: string; email: string;
} }
export interface OrderDiscountDelete_orderDiscountDelete_order_availableShippingMethods_price { export interface OrderDiscountDelete_orderDiscountDelete_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderDiscountDelete_orderDiscountDelete_order_availableShippingMethods { export interface OrderDiscountDelete_orderDiscountDelete_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderDiscountDelete_orderDiscountDelete_order_availableShippingMethods_price | null; price: OrderDiscountDelete_orderDiscountDelete_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderDiscountDelete_orderDiscountDelete_order_invoices { export interface OrderDiscountDelete_orderDiscountDelete_order_invoices {
@ -595,7 +597,7 @@ export interface OrderDiscountDelete_orderDiscountDelete_order {
undiscountedTotal: OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal; undiscountedTotal: OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal;
user: OrderDiscountDelete_orderDiscountDelete_order_user | null; user: OrderDiscountDelete_orderDiscountDelete_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderDiscountDelete_orderDiscountDelete_order_availableShippingMethods | null)[] | null; shippingMethods: OrderDiscountDelete_orderDiscountDelete_order_shippingMethods[];
invoices: (OrderDiscountDelete_orderDiscountDelete_order_invoices | null)[] | null; invoices: (OrderDiscountDelete_orderDiscountDelete_order_invoices | null)[] | null;
channel: OrderDiscountDelete_orderDiscountDelete_order_channel; channel: OrderDiscountDelete_orderDiscountDelete_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderDiscountUpdate_orderDiscountUpdate_order_user {
email: string; email: string;
} }
export interface OrderDiscountUpdate_orderDiscountUpdate_order_availableShippingMethods_price { export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderDiscountUpdate_orderDiscountUpdate_order_availableShippingMethods { export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderDiscountUpdate_orderDiscountUpdate_order_availableShippingMethods_price | null; price: OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderDiscountUpdate_orderDiscountUpdate_order_invoices { export interface OrderDiscountUpdate_orderDiscountUpdate_order_invoices {
@ -595,7 +597,7 @@ export interface OrderDiscountUpdate_orderDiscountUpdate_order {
undiscountedTotal: OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal; undiscountedTotal: OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal;
user: OrderDiscountUpdate_orderDiscountUpdate_order_user | null; user: OrderDiscountUpdate_orderDiscountUpdate_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderDiscountUpdate_orderDiscountUpdate_order_availableShippingMethods | null)[] | null; shippingMethods: OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods[];
invoices: (OrderDiscountUpdate_orderDiscountUpdate_order_invoices | null)[] | null; invoices: (OrderDiscountUpdate_orderDiscountUpdate_order_invoices | null)[] | null;
channel: OrderDiscountUpdate_orderDiscountUpdate_order_channel; channel: OrderDiscountUpdate_orderDiscountUpdate_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderDraftCancel_draftOrderDelete_order_user {
email: string; email: string;
} }
export interface OrderDraftCancel_draftOrderDelete_order_availableShippingMethods_price { export interface OrderDraftCancel_draftOrderDelete_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderDraftCancel_draftOrderDelete_order_availableShippingMethods { export interface OrderDraftCancel_draftOrderDelete_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderDraftCancel_draftOrderDelete_order_availableShippingMethods_price | null; price: OrderDraftCancel_draftOrderDelete_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderDraftCancel_draftOrderDelete_order_invoices { export interface OrderDraftCancel_draftOrderDelete_order_invoices {
@ -595,7 +597,7 @@ export interface OrderDraftCancel_draftOrderDelete_order {
undiscountedTotal: OrderDraftCancel_draftOrderDelete_order_undiscountedTotal; undiscountedTotal: OrderDraftCancel_draftOrderDelete_order_undiscountedTotal;
user: OrderDraftCancel_draftOrderDelete_order_user | null; user: OrderDraftCancel_draftOrderDelete_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderDraftCancel_draftOrderDelete_order_availableShippingMethods | null)[] | null; shippingMethods: OrderDraftCancel_draftOrderDelete_order_shippingMethods[];
invoices: (OrderDraftCancel_draftOrderDelete_order_invoices | null)[] | null; invoices: (OrderDraftCancel_draftOrderDelete_order_invoices | null)[] | null;
channel: OrderDraftCancel_draftOrderDelete_order_channel; channel: OrderDraftCancel_draftOrderDelete_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderDraftFinalize_draftOrderComplete_order_user {
email: string; email: string;
} }
export interface OrderDraftFinalize_draftOrderComplete_order_availableShippingMethods_price { export interface OrderDraftFinalize_draftOrderComplete_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderDraftFinalize_draftOrderComplete_order_availableShippingMethods { export interface OrderDraftFinalize_draftOrderComplete_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderDraftFinalize_draftOrderComplete_order_availableShippingMethods_price | null; price: OrderDraftFinalize_draftOrderComplete_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderDraftFinalize_draftOrderComplete_order_invoices { export interface OrderDraftFinalize_draftOrderComplete_order_invoices {
@ -595,7 +597,7 @@ export interface OrderDraftFinalize_draftOrderComplete_order {
undiscountedTotal: OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal; undiscountedTotal: OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal;
user: OrderDraftFinalize_draftOrderComplete_order_user | null; user: OrderDraftFinalize_draftOrderComplete_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderDraftFinalize_draftOrderComplete_order_availableShippingMethods | null)[] | null; shippingMethods: OrderDraftFinalize_draftOrderComplete_order_shippingMethods[];
invoices: (OrderDraftFinalize_draftOrderComplete_order_invoices | null)[] | null; invoices: (OrderDraftFinalize_draftOrderComplete_order_invoices | null)[] | null;
channel: OrderDraftFinalize_draftOrderComplete_order_channel; channel: OrderDraftFinalize_draftOrderComplete_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderDraftUpdate_draftOrderUpdate_order_user {
email: string; email: string;
} }
export interface OrderDraftUpdate_draftOrderUpdate_order_availableShippingMethods_price { export interface OrderDraftUpdate_draftOrderUpdate_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderDraftUpdate_draftOrderUpdate_order_availableShippingMethods { export interface OrderDraftUpdate_draftOrderUpdate_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderDraftUpdate_draftOrderUpdate_order_availableShippingMethods_price | null; price: OrderDraftUpdate_draftOrderUpdate_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderDraftUpdate_draftOrderUpdate_order_invoices { export interface OrderDraftUpdate_draftOrderUpdate_order_invoices {
@ -595,7 +597,7 @@ export interface OrderDraftUpdate_draftOrderUpdate_order {
undiscountedTotal: OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal; undiscountedTotal: OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal;
user: OrderDraftUpdate_draftOrderUpdate_order_user | null; user: OrderDraftUpdate_draftOrderUpdate_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderDraftUpdate_draftOrderUpdate_order_availableShippingMethods | null)[] | null; shippingMethods: OrderDraftUpdate_draftOrderUpdate_order_shippingMethods[];
invoices: (OrderDraftUpdate_draftOrderUpdate_order_invoices | null)[] | null; invoices: (OrderDraftUpdate_draftOrderUpdate_order_invoices | null)[] | null;
channel: OrderDraftUpdate_draftOrderUpdate_order_channel; channel: OrderDraftUpdate_draftOrderUpdate_order_channel;
} }

View file

@ -524,17 +524,17 @@ export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_user {
email: string; email: string;
} }
export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_availableShippingMethods_price { export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_availableShippingMethods { export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderFulfillmentApprove_orderFulfillmentApprove_order_availableShippingMethods_price | null; price: OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods_price;
} }
export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_invoices { export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_invoices {
@ -595,7 +595,7 @@ export interface OrderFulfillmentApprove_orderFulfillmentApprove_order {
undiscountedTotal: OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal; undiscountedTotal: OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal;
user: OrderFulfillmentApprove_orderFulfillmentApprove_order_user | null; user: OrderFulfillmentApprove_orderFulfillmentApprove_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderFulfillmentApprove_orderFulfillmentApprove_order_availableShippingMethods | null)[] | null; shippingMethods: (OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods | null)[] | null;
invoices: (OrderFulfillmentApprove_orderFulfillmentApprove_order_invoices | null)[] | null; invoices: (OrderFulfillmentApprove_orderFulfillmentApprove_order_invoices | null)[] | null;
channel: OrderFulfillmentApprove_orderFulfillmentApprove_order_channel; channel: OrderFulfillmentApprove_orderFulfillmentApprove_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_user {
email: string; email: string;
} }
export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_availableShippingMethods_price { export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_availableShippingMethods { export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderFulfillmentCancel_orderFulfillmentCancel_order_availableShippingMethods_price | null; price: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_invoices { export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_invoices {
@ -595,7 +597,7 @@ export interface OrderFulfillmentCancel_orderFulfillmentCancel_order {
undiscountedTotal: OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal; undiscountedTotal: OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal;
user: OrderFulfillmentCancel_orderFulfillmentCancel_order_user | null; user: OrderFulfillmentCancel_orderFulfillmentCancel_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderFulfillmentCancel_orderFulfillmentCancel_order_availableShippingMethods | null)[] | null; shippingMethods: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods[];
invoices: (OrderFulfillmentCancel_orderFulfillmentCancel_order_invoices | null)[] | null; invoices: (OrderFulfillmentCancel_orderFulfillmentCancel_order_invoices | null)[] | null;
channel: OrderFulfillmentCancel_orderFulfillmentCancel_order_channel; channel: OrderFulfillmentCancel_orderFulfillmentCancel_order_channel;
} }

View file

@ -626,17 +626,19 @@ export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_o
email: string; email: string;
} }
export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_availableShippingMethods_price { export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_availableShippingMethods { export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_availableShippingMethods_price | null; price: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_invoices { export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_invoices {
@ -697,7 +699,7 @@ export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_o
undiscountedTotal: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal; undiscountedTotal: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal;
user: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_user | null; user: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_availableShippingMethods | null)[] | null; shippingMethods: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods[];
invoices: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_invoices | null)[] | null; invoices: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_invoices | null)[] | null;
channel: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_channel; channel: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_o
email: string; email: string;
} }
export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_availableShippingMethods_price { export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_availableShippingMethods { export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_availableShippingMethods_price | null; price: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_invoices { export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_invoices {
@ -595,7 +597,7 @@ export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_o
undiscountedTotal: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal; undiscountedTotal: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal;
user: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_user | null; user: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_availableShippingMethods | null)[] | null; shippingMethods: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods[];
invoices: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_invoices | null)[] | null; invoices: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_invoices | null)[] | null;
channel: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_channel; channel: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderLineDelete_orderLineDelete_order_user {
email: string; email: string;
} }
export interface OrderLineDelete_orderLineDelete_order_availableShippingMethods_price { export interface OrderLineDelete_orderLineDelete_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderLineDelete_orderLineDelete_order_availableShippingMethods { export interface OrderLineDelete_orderLineDelete_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderLineDelete_orderLineDelete_order_availableShippingMethods_price | null; price: OrderLineDelete_orderLineDelete_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderLineDelete_orderLineDelete_order_invoices { export interface OrderLineDelete_orderLineDelete_order_invoices {
@ -595,7 +597,7 @@ export interface OrderLineDelete_orderLineDelete_order {
undiscountedTotal: OrderLineDelete_orderLineDelete_order_undiscountedTotal; undiscountedTotal: OrderLineDelete_orderLineDelete_order_undiscountedTotal;
user: OrderLineDelete_orderLineDelete_order_user | null; user: OrderLineDelete_orderLineDelete_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderLineDelete_orderLineDelete_order_availableShippingMethods | null)[] | null; shippingMethods: OrderLineDelete_orderLineDelete_order_shippingMethods[];
invoices: (OrderLineDelete_orderLineDelete_order_invoices | null)[] | null; invoices: (OrderLineDelete_orderLineDelete_order_invoices | null)[] | null;
channel: OrderLineDelete_orderLineDelete_order_channel; channel: OrderLineDelete_orderLineDelete_order_channel;
} }

View file

@ -287,17 +287,17 @@ export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_user {
email: string; email: string;
} }
export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_availableShippingMethods_price { export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_availableShippingMethods { export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderLineDiscountAdd_orderLineDiscountAdd_order_availableShippingMethods_price | null; price: OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods_price | null;
} }
export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_discount { export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_discount {
@ -349,7 +349,7 @@ export interface OrderLineDiscountAdd_orderLineDiscountAdd_order {
totalCaptured: OrderLineDiscountAdd_orderLineDiscountAdd_order_totalCaptured; totalCaptured: OrderLineDiscountAdd_orderLineDiscountAdd_order_totalCaptured;
user: OrderLineDiscountAdd_orderLineDiscountAdd_order_user | null; user: OrderLineDiscountAdd_orderLineDiscountAdd_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderLineDiscountAdd_orderLineDiscountAdd_order_availableShippingMethods | null)[] | null; shippingMethods: (OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods | null)[] | null;
discount: OrderLineDiscountAdd_orderLineDiscountAdd_order_discount | null; discount: OrderLineDiscountAdd_orderLineDiscountAdd_order_discount | null;
invoices: (OrderLineDiscountAdd_orderLineDiscountAdd_order_invoices | null)[] | null; invoices: (OrderLineDiscountAdd_orderLineDiscountAdd_order_invoices | null)[] | null;
channel: OrderLineDiscountAdd_orderLineDiscountAdd_order_channel; channel: OrderLineDiscountAdd_orderLineDiscountAdd_order_channel;

View file

@ -287,17 +287,17 @@ export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_user {
email: string; email: string;
} }
export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_availableShippingMethods_price { export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_availableShippingMethods { export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderLineDiscountDelete_orderLineDiscountDelete_order_availableShippingMethods_price | null; price: OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods_price | null;
} }
export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_discount { export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_discount {
@ -349,7 +349,7 @@ export interface OrderLineDiscountDelete_orderLineDiscountDelete_order {
totalCaptured: OrderLineDiscountDelete_orderLineDiscountDelete_order_totalCaptured; totalCaptured: OrderLineDiscountDelete_orderLineDiscountDelete_order_totalCaptured;
user: OrderLineDiscountDelete_orderLineDiscountDelete_order_user | null; user: OrderLineDiscountDelete_orderLineDiscountDelete_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderLineDiscountDelete_orderLineDiscountDelete_order_availableShippingMethods | null)[] | null; shippingMethods: (OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods | null)[] | null;
discount: OrderLineDiscountDelete_orderLineDiscountDelete_order_discount | null; discount: OrderLineDiscountDelete_orderLineDiscountDelete_order_discount | null;
invoices: (OrderLineDiscountDelete_orderLineDiscountDelete_order_invoices | null)[] | null; invoices: (OrderLineDiscountDelete_orderLineDiscountDelete_order_invoices | null)[] | null;
channel: OrderLineDiscountDelete_orderLineDiscountDelete_order_channel; channel: OrderLineDiscountDelete_orderLineDiscountDelete_order_channel;

View file

@ -524,17 +524,19 @@ export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_user {
email: string; email: string;
} }
export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_availableShippingMethods_price { export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_availableShippingMethods { export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderLineDiscountRemove_orderLineDiscountRemove_order_availableShippingMethods_price | null; price: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_invoices { export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_invoices {
@ -595,7 +597,7 @@ export interface OrderLineDiscountRemove_orderLineDiscountRemove_order {
undiscountedTotal: OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal; undiscountedTotal: OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal;
user: OrderLineDiscountRemove_orderLineDiscountRemove_order_user | null; user: OrderLineDiscountRemove_orderLineDiscountRemove_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderLineDiscountRemove_orderLineDiscountRemove_order_availableShippingMethods | null)[] | null; shippingMethods: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods[];
invoices: (OrderLineDiscountRemove_orderLineDiscountRemove_order_invoices | null)[] | null; invoices: (OrderLineDiscountRemove_orderLineDiscountRemove_order_invoices | null)[] | null;
channel: OrderLineDiscountRemove_orderLineDiscountRemove_order_channel; channel: OrderLineDiscountRemove_orderLineDiscountRemove_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_user {
email: string; email: string;
} }
export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_availableShippingMethods_price { export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_availableShippingMethods { export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_availableShippingMethods_price | null; price: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_invoices { export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_invoices {
@ -595,7 +597,7 @@ export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order {
undiscountedTotal: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal; undiscountedTotal: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal;
user: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_user | null; user: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_availableShippingMethods | null)[] | null; shippingMethods: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods[];
invoices: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_invoices | null)[] | null; invoices: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_invoices | null)[] | null;
channel: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_channel; channel: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderLineUpdate_orderLineUpdate_order_user {
email: string; email: string;
} }
export interface OrderLineUpdate_orderLineUpdate_order_availableShippingMethods_price { export interface OrderLineUpdate_orderLineUpdate_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderLineUpdate_orderLineUpdate_order_availableShippingMethods { export interface OrderLineUpdate_orderLineUpdate_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderLineUpdate_orderLineUpdate_order_availableShippingMethods_price | null; price: OrderLineUpdate_orderLineUpdate_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderLineUpdate_orderLineUpdate_order_invoices { export interface OrderLineUpdate_orderLineUpdate_order_invoices {
@ -595,7 +597,7 @@ export interface OrderLineUpdate_orderLineUpdate_order {
undiscountedTotal: OrderLineUpdate_orderLineUpdate_order_undiscountedTotal; undiscountedTotal: OrderLineUpdate_orderLineUpdate_order_undiscountedTotal;
user: OrderLineUpdate_orderLineUpdate_order_user | null; user: OrderLineUpdate_orderLineUpdate_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderLineUpdate_orderLineUpdate_order_availableShippingMethods | null)[] | null; shippingMethods: OrderLineUpdate_orderLineUpdate_order_shippingMethods[];
invoices: (OrderLineUpdate_orderLineUpdate_order_invoices | null)[] | null; invoices: (OrderLineUpdate_orderLineUpdate_order_invoices | null)[] | null;
channel: OrderLineUpdate_orderLineUpdate_order_channel; channel: OrderLineUpdate_orderLineUpdate_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderLinesAdd_orderLinesCreate_order_user {
email: string; email: string;
} }
export interface OrderLinesAdd_orderLinesCreate_order_availableShippingMethods_price { export interface OrderLinesAdd_orderLinesCreate_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderLinesAdd_orderLinesCreate_order_availableShippingMethods { export interface OrderLinesAdd_orderLinesCreate_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderLinesAdd_orderLinesCreate_order_availableShippingMethods_price | null; price: OrderLinesAdd_orderLinesCreate_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderLinesAdd_orderLinesCreate_order_invoices { export interface OrderLinesAdd_orderLinesCreate_order_invoices {
@ -595,7 +597,7 @@ export interface OrderLinesAdd_orderLinesCreate_order {
undiscountedTotal: OrderLinesAdd_orderLinesCreate_order_undiscountedTotal; undiscountedTotal: OrderLinesAdd_orderLinesCreate_order_undiscountedTotal;
user: OrderLinesAdd_orderLinesCreate_order_user | null; user: OrderLinesAdd_orderLinesCreate_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderLinesAdd_orderLinesCreate_order_availableShippingMethods | null)[] | null; shippingMethods: OrderLinesAdd_orderLinesCreate_order_shippingMethods[];
invoices: (OrderLinesAdd_orderLinesCreate_order_invoices | null)[] | null; invoices: (OrderLinesAdd_orderLinesCreate_order_invoices | null)[] | null;
channel: OrderLinesAdd_orderLinesCreate_order_channel; channel: OrderLinesAdd_orderLinesCreate_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderMarkAsPaid_orderMarkAsPaid_order_user {
email: string; email: string;
} }
export interface OrderMarkAsPaid_orderMarkAsPaid_order_availableShippingMethods_price { export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderMarkAsPaid_orderMarkAsPaid_order_availableShippingMethods { export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderMarkAsPaid_orderMarkAsPaid_order_availableShippingMethods_price | null; price: OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderMarkAsPaid_orderMarkAsPaid_order_invoices { export interface OrderMarkAsPaid_orderMarkAsPaid_order_invoices {
@ -595,7 +597,7 @@ export interface OrderMarkAsPaid_orderMarkAsPaid_order {
undiscountedTotal: OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal; undiscountedTotal: OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal;
user: OrderMarkAsPaid_orderMarkAsPaid_order_user | null; user: OrderMarkAsPaid_orderMarkAsPaid_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderMarkAsPaid_orderMarkAsPaid_order_availableShippingMethods | null)[] | null; shippingMethods: OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods[];
invoices: (OrderMarkAsPaid_orderMarkAsPaid_order_invoices | null)[] | null; invoices: (OrderMarkAsPaid_orderMarkAsPaid_order_invoices | null)[] | null;
channel: OrderMarkAsPaid_orderMarkAsPaid_order_channel; channel: OrderMarkAsPaid_orderMarkAsPaid_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderRefund_orderRefund_order_user {
email: string; email: string;
} }
export interface OrderRefund_orderRefund_order_availableShippingMethods_price { export interface OrderRefund_orderRefund_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderRefund_orderRefund_order_availableShippingMethods { export interface OrderRefund_orderRefund_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderRefund_orderRefund_order_availableShippingMethods_price | null; price: OrderRefund_orderRefund_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderRefund_orderRefund_order_invoices { export interface OrderRefund_orderRefund_order_invoices {
@ -595,7 +597,7 @@ export interface OrderRefund_orderRefund_order {
undiscountedTotal: OrderRefund_orderRefund_order_undiscountedTotal; undiscountedTotal: OrderRefund_orderRefund_order_undiscountedTotal;
user: OrderRefund_orderRefund_order_user | null; user: OrderRefund_orderRefund_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderRefund_orderRefund_order_availableShippingMethods | null)[] | null; shippingMethods: OrderRefund_orderRefund_order_shippingMethods[];
invoices: (OrderRefund_orderRefund_order_invoices | null)[] | null; invoices: (OrderRefund_orderRefund_order_invoices | null)[] | null;
channel: OrderRefund_orderRefund_order_channel; channel: OrderRefund_orderRefund_order_channel;
} }

View file

@ -16,17 +16,19 @@ export interface OrderShippingMethodUpdate_orderUpdateShipping_errors {
addressType: AddressTypeEnum | null; addressType: AddressTypeEnum | null;
} }
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_availableShippingMethods_price { export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_availableShippingMethods { export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderShippingMethodUpdate_orderUpdateShipping_order_availableShippingMethods_price | null; price: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_total_tax { export interface OrderShippingMethodUpdate_orderUpdateShipping_order_total_tax {
@ -64,7 +66,7 @@ export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMet
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod_price | null; price: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod_price;
} }
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingPrice_gross { export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingPrice_gross {
@ -571,7 +573,7 @@ export interface OrderShippingMethodUpdate_orderUpdateShipping_order_channel {
export interface OrderShippingMethodUpdate_orderUpdateShipping_order { export interface OrderShippingMethodUpdate_orderUpdateShipping_order {
__typename: "Order"; __typename: "Order";
availableShippingMethods: (OrderShippingMethodUpdate_orderUpdateShipping_order_availableShippingMethods | null)[] | null; shippingMethods: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods[];
total: OrderShippingMethodUpdate_orderUpdateShipping_order_total; total: OrderShippingMethodUpdate_orderUpdateShipping_order_total;
id: string; id: string;
shippingMethod: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod | null; shippingMethod: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod | null;

View file

@ -524,17 +524,19 @@ export interface OrderUpdate_orderUpdate_order_user {
email: string; email: string;
} }
export interface OrderUpdate_orderUpdate_order_availableShippingMethods_price { export interface OrderUpdate_orderUpdate_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderUpdate_orderUpdate_order_availableShippingMethods { export interface OrderUpdate_orderUpdate_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderUpdate_orderUpdate_order_availableShippingMethods_price | null; price: OrderUpdate_orderUpdate_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderUpdate_orderUpdate_order_invoices { export interface OrderUpdate_orderUpdate_order_invoices {
@ -595,7 +597,7 @@ export interface OrderUpdate_orderUpdate_order {
undiscountedTotal: OrderUpdate_orderUpdate_order_undiscountedTotal; undiscountedTotal: OrderUpdate_orderUpdate_order_undiscountedTotal;
user: OrderUpdate_orderUpdate_order_user | null; user: OrderUpdate_orderUpdate_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderUpdate_orderUpdate_order_availableShippingMethods | null)[] | null; shippingMethods: OrderUpdate_orderUpdate_order_shippingMethods[];
invoices: (OrderUpdate_orderUpdate_order_invoices | null)[] | null; invoices: (OrderUpdate_orderUpdate_order_invoices | null)[] | null;
channel: OrderUpdate_orderUpdate_order_channel; channel: OrderUpdate_orderUpdate_order_channel;
} }

View file

@ -524,17 +524,19 @@ export interface OrderVoid_orderVoid_order_user {
email: string; email: string;
} }
export interface OrderVoid_orderVoid_order_availableShippingMethods_price { export interface OrderVoid_orderVoid_order_shippingMethods_price {
__typename: "Money"; __typename: "Money";
amount: number; amount: number;
currency: string; currency: string;
} }
export interface OrderVoid_orderVoid_order_availableShippingMethods { export interface OrderVoid_orderVoid_order_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethod";
id: string; id: string;
name: string; name: string;
price: OrderVoid_orderVoid_order_availableShippingMethods_price | null; price: OrderVoid_orderVoid_order_shippingMethods_price;
active: boolean;
message: string | null;
} }
export interface OrderVoid_orderVoid_order_invoices { export interface OrderVoid_orderVoid_order_invoices {
@ -595,7 +597,7 @@ export interface OrderVoid_orderVoid_order {
undiscountedTotal: OrderVoid_orderVoid_order_undiscountedTotal; undiscountedTotal: OrderVoid_orderVoid_order_undiscountedTotal;
user: OrderVoid_orderVoid_order_user | null; user: OrderVoid_orderVoid_order_user | null;
userEmail: string | null; userEmail: string | null;
availableShippingMethods: (OrderVoid_orderVoid_order_availableShippingMethods | null)[] | null; shippingMethods: OrderVoid_orderVoid_order_shippingMethods[];
invoices: (OrderVoid_orderVoid_order_invoices | null)[] | null; invoices: (OrderVoid_orderVoid_order_invoices | null)[] | null;
channel: OrderVoid_orderVoid_order_channel; channel: OrderVoid_orderVoid_order_channel;
} }

View file

@ -31,7 +31,7 @@ import {
const orderBase: OrderDetails_order = { const orderBase: OrderDetails_order = {
__typename: "Order", __typename: "Order",
actions: [], actions: [],
availableShippingMethods: [], shippingMethods: [],
canFinalize: true, canFinalize: true,
channel: null, channel: null,
billingAddress: { billingAddress: {

View file

@ -222,7 +222,7 @@ export const OrderDraftDetails: React.FC<OrderDraftDetailsProps> = ({
} }
open={params.action === "edit-shipping"} open={params.action === "edit-shipping"}
shippingMethod={order?.shippingMethod?.id} shippingMethod={order?.shippingMethod?.id}
shippingMethods={order?.availableShippingMethods} shippingMethods={order?.shippingMethods}
onClose={closeModal} onClose={closeModal}
onSubmit={variables => onSubmit={variables =>
orderShippingMethodUpdate.mutate({ orderShippingMethodUpdate.mutate({

View file

@ -133,7 +133,7 @@ export const OrderNormalDetails: React.FC<OrderNormalDetailsProps> = ({
[]) [])
] ]
)} )}
shippingMethods={data?.order?.availableShippingMethods || []} shippingMethods={data?.order?.shippingMethods || []}
userPermissions={user?.userPermissions || []} userPermissions={user?.userPermissions || []}
onOrderCancel={() => openModal("cancel")} onOrderCancel={() => openModal("cancel")}
onOrderFulfill={() => navigate(orderFulfillUrl(id))} onOrderFulfill={() => navigate(orderFulfillUrl(id))}

View file

@ -165,7 +165,7 @@ export const OrderUnconfirmedDetails: React.FC<OrderUnconfirmedDetailsProps> = (
.errors || []) .errors || [])
] ]
)} )}
shippingMethods={data?.order?.availableShippingMethods || []} shippingMethods={data?.order?.shippingMethods || []}
userPermissions={user?.userPermissions || []} userPermissions={user?.userPermissions || []}
onOrderCancel={() => openModal("cancel")} onOrderCancel={() => openModal("cancel")}
onOrderFulfill={() => navigate(orderFulfillUrl(id))} onOrderFulfill={() => navigate(orderFulfillUrl(id))}
@ -245,7 +245,7 @@ export const OrderUnconfirmedDetails: React.FC<OrderUnconfirmedDetailsProps> = (
} }
open={params.action === "edit-shipping"} open={params.action === "edit-shipping"}
shippingMethod={order?.shippingMethod?.id} shippingMethod={order?.shippingMethod?.id}
shippingMethods={order?.availableShippingMethods} shippingMethods={order?.shippingMethods}
onClose={closeModal} onClose={closeModal}
onSubmit={variables => onSubmit={variables =>
orderShippingMethodUpdate.mutate({ orderShippingMethodUpdate.mutate({

View file

@ -14,7 +14,7 @@ import CardTitle from "@saleor/components/CardTitle";
import RadioGroupField from "@saleor/components/RadioGroupField"; import RadioGroupField from "@saleor/components/RadioGroupField";
import ResponsiveTable from "@saleor/components/ResponsiveTable"; import ResponsiveTable from "@saleor/components/ResponsiveTable";
import Skeleton from "@saleor/components/Skeleton"; import Skeleton from "@saleor/components/Skeleton";
import { ShippingMethodFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodFragment"; import { ShippingMethodTypeFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodTypeFragment";
import ArrowDropdown from "@saleor/icons/ArrowDropdown"; import ArrowDropdown from "@saleor/icons/ArrowDropdown";
import { makeStyles } from "@saleor/macaw-ui"; import { makeStyles } from "@saleor/macaw-ui";
import { renderCollection } from "@saleor/misc"; import { renderCollection } from "@saleor/misc";
@ -26,11 +26,13 @@ import { FormattedMessage, useIntl } from "react-intl";
export interface ShippingZonePostalCodesProps { export interface ShippingZonePostalCodesProps {
disabled: boolean; disabled: boolean;
initialExpanded?: boolean; initialExpanded?: boolean;
postalCodes: ShippingMethodFragment_postalCodeRules[] | undefined; postalCodes: ShippingMethodTypeFragment_postalCodeRules[] | undefined;
onPostalCodeInclusionChange: ( onPostalCodeInclusionChange: (
inclusion: PostalCodeRuleInclusionTypeEnum inclusion: PostalCodeRuleInclusionTypeEnum
) => void; ) => void;
onPostalCodeDelete: (code: ShippingMethodFragment_postalCodeRules) => void; onPostalCodeDelete: (
code: ShippingMethodTypeFragment_postalCodeRules
) => void;
onPostalCodeRangeAdd: () => void; onPostalCodeRangeAdd: () => void;
} }
@ -91,7 +93,7 @@ const ShippingZonePostalCodes: React.FC<ShippingZonePostalCodesProps> = ({
}; };
const getPostalCodeRangeLabel = ( const getPostalCodeRangeLabel = (
postalCodeRange: ShippingMethodFragment_postalCodeRules postalCodeRange: ShippingMethodTypeFragment_postalCodeRules
) => { ) => {
if (!postalCodeRange?.start) { if (!postalCodeRange?.start) {
return <Skeleton />; return <Skeleton />;

View file

@ -10,7 +10,7 @@ import PageHeader from "@saleor/components/PageHeader";
import Savebar from "@saleor/components/Savebar"; import Savebar from "@saleor/components/Savebar";
import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment"; import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment";
import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment";
import { ShippingMethodFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodFragment"; import { ShippingMethodTypeFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodTypeFragment";
import { Backlink } from "@saleor/macaw-ui"; import { Backlink } from "@saleor/macaw-ui";
import { validatePrice } from "@saleor/products/utils/validation"; import { validatePrice } from "@saleor/products/utils/validation";
import OrderValue from "@saleor/shipping/components/OrderValue"; import OrderValue from "@saleor/shipping/components/OrderValue";
@ -34,7 +34,7 @@ export interface ShippingZoneRatesCreatePageProps {
shippingChannels: ChannelShippingData[]; shippingChannels: ChannelShippingData[];
disabled: boolean; disabled: boolean;
hasChannelChanged?: boolean; hasChannelChanged?: boolean;
postalCodes?: ShippingMethodFragment_postalCodeRules[]; postalCodes?: ShippingMethodTypeFragment_postalCodeRules[];
channelErrors: ShippingChannelsErrorFragment[]; channelErrors: ShippingChannelsErrorFragment[];
errors: ShippingErrorFragment[]; errors: ShippingErrorFragment[];
saveButtonBarState: ConfirmButtonTransitionState; saveButtonBarState: ConfirmButtonTransitionState;

View file

@ -11,7 +11,7 @@ import PageHeader from "@saleor/components/PageHeader";
import Savebar from "@saleor/components/Savebar"; import Savebar from "@saleor/components/Savebar";
import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment"; import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment";
import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment"; import { ShippingErrorFragment } from "@saleor/fragments/types/ShippingErrorFragment";
import { ShippingMethodFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodFragment"; import { ShippingMethodTypeFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodTypeFragment";
import { Backlink } from "@saleor/macaw-ui"; import { Backlink } from "@saleor/macaw-ui";
import { validatePrice } from "@saleor/products/utils/validation"; import { validatePrice } from "@saleor/products/utils/validation";
import OrderValue from "@saleor/shipping/components/OrderValue"; import OrderValue from "@saleor/shipping/components/OrderValue";
@ -58,7 +58,9 @@ export interface ShippingZoneRatesPageProps
inclusion: PostalCodeRuleInclusionTypeEnum inclusion: PostalCodeRuleInclusionTypeEnum
) => void; ) => void;
onPostalCodeAssign: () => void; onPostalCodeAssign: () => void;
onPostalCodeUnassign: (code: ShippingMethodFragment_postalCodeRules) => void; onPostalCodeUnassign: (
code: ShippingMethodTypeFragment_postalCodeRules
) => void;
onChannelsChange: (data: ChannelShippingData[]) => void; onChannelsChange: (data: ChannelShippingData[]) => void;
openChannelsModal: () => void; openChannelsModal: () => void;
onProductAssign: () => void; onProductAssign: () => void;

View file

@ -1574,7 +1574,7 @@ export const shippingZone: ShippingZone_shippingZone = {
privateMetadata: [], privateMetadata: [],
shippingMethods: [ shippingMethods: [
{ {
__typename: "ShippingMethod", __typename: "ShippingMethodType",
channelListings: [ channelListings: [
{ {
__typename: "ShippingMethodChannelListing", __typename: "ShippingMethodChannelListing",
@ -1669,7 +1669,7 @@ export const shippingZone: ShippingZone_shippingZone = {
type: ShippingMethodTypeEnum.WEIGHT type: ShippingMethodTypeEnum.WEIGHT
}, },
{ {
__typename: "ShippingMethod", __typename: "ShippingMethodType",
channelListings: [], channelListings: [],
excludedProducts: { excludedProducts: {
__typename: "ProductCountableConnection", __typename: "ProductCountableConnection",
@ -1734,7 +1734,7 @@ export const shippingZone: ShippingZone_shippingZone = {
type: ShippingMethodTypeEnum.WEIGHT type: ShippingMethodTypeEnum.WEIGHT
}, },
{ {
__typename: "ShippingMethod", __typename: "ShippingMethodType",
channelListings: [], channelListings: [],
excludedProducts: { excludedProducts: {
__typename: "ProductCountableConnection", __typename: "ProductCountableConnection",
@ -1799,7 +1799,7 @@ export const shippingZone: ShippingZone_shippingZone = {
type: ShippingMethodTypeEnum.PRICE type: ShippingMethodTypeEnum.PRICE
}, },
{ {
__typename: "ShippingMethod", __typename: "ShippingMethodType",
channelListings: [], channelListings: [],
excludedProducts: { excludedProducts: {
__typename: "ProductCountableConnection", __typename: "ProductCountableConnection",

View file

@ -1,5 +1,5 @@
import { ChannelShippingData } from "@saleor/channels/utils"; import { ChannelShippingData } from "@saleor/channels/utils";
import { ShippingMethodFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodFragment"; import { ShippingMethodTypeFragment_postalCodeRules } from "@saleor/fragments/types/ShippingMethodTypeFragment";
import useNavigator from "@saleor/hooks/useNavigator"; import useNavigator from "@saleor/hooks/useNavigator";
import useNotifier from "@saleor/hooks/useNotifier"; import useNotifier from "@saleor/hooks/useNotifier";
import { commonMessages } from "@saleor/intl"; import { commonMessages } from "@saleor/intl";
@ -48,7 +48,7 @@ export const createChannelsChangeHandler = (
}; };
const getPostalCodeRulesToAdd = ( const getPostalCodeRulesToAdd = (
rules: ShippingMethodFragment_postalCodeRules[] rules: ShippingMethodTypeFragment_postalCodeRules[]
) => ) =>
rules rules
.filter(code => !code.id || code.id === "0") .filter(code => !code.id || code.id === "0")
@ -63,7 +63,7 @@ const getPostalCodeRulesToAdd = (
export function getCreateShippingPriceRateVariables( export function getCreateShippingPriceRateVariables(
data: ShippingZoneRateCommonFormData, data: ShippingZoneRateCommonFormData,
id: string, id: string,
addPostalCodeRules: ShippingMethodFragment_postalCodeRules[], addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[],
inclusionType: PostalCodeRuleInclusionTypeEnum inclusionType: PostalCodeRuleInclusionTypeEnum
): CreateShippingRateVariables { ): CreateShippingRateVariables {
const parsedMinDays = parseInt(data.minDays, 10); const parsedMinDays = parseInt(data.minDays, 10);
@ -86,7 +86,7 @@ export function getCreateShippingPriceRateVariables(
export function getCreateShippingWeightRateVariables( export function getCreateShippingWeightRateVariables(
data: ShippingZoneRateCommonFormData, data: ShippingZoneRateCommonFormData,
id: string, id: string,
addPostalCodeRules: ShippingMethodFragment_postalCodeRules[], addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[],
inclusionType: PostalCodeRuleInclusionTypeEnum inclusionType: PostalCodeRuleInclusionTypeEnum
): CreateShippingRateVariables { ): CreateShippingRateVariables {
const parsedMinValue = parseFloat(data.minValue); const parsedMinValue = parseFloat(data.minValue);
@ -115,7 +115,7 @@ export function getUpdateShippingPriceRateVariables(
data: ShippingZoneRateCommonFormData, data: ShippingZoneRateCommonFormData,
id: string, id: string,
rateId: string, rateId: string,
addPostalCodeRules: ShippingMethodFragment_postalCodeRules[], addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[],
deletePostalCodeRules: string[] deletePostalCodeRules: string[]
): UpdateShippingRateVariables { ): UpdateShippingRateVariables {
const parsedMinDays = parseInt(data.minDays, 10); const parsedMinDays = parseInt(data.minDays, 10);
@ -143,7 +143,7 @@ export function getUpdateShippingWeightRateVariables(
data: ShippingZoneRateCommonFormData, data: ShippingZoneRateCommonFormData,
id: string, id: string,
rateId: string, rateId: string,
addPostalCodeRules: ShippingMethodFragment_postalCodeRules[], addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[],
deletePostalCodeRules: string[] deletePostalCodeRules: string[]
): UpdateShippingRateVariables { ): UpdateShippingRateVariables {
const parsedMinValue = parseFloat(data.minValue); const parsedMinValue = parseFloat(data.minValue);
@ -201,7 +201,7 @@ export function getShippingMethodChannelVariables(
export function useShippingRateCreator( export function useShippingRateCreator(
shippingZoneId: string, shippingZoneId: string,
type: ShippingMethodTypeEnum, type: ShippingMethodTypeEnum,
postalCodes: ShippingMethodFragment_postalCodeRules[], postalCodes: ShippingMethodTypeFragment_postalCodeRules[],
inclusionType: PostalCodeRuleInclusionTypeEnum inclusionType: PostalCodeRuleInclusionTypeEnum
) { ) {
const intl = useIntl(); const intl = useIntl();

View file

@ -3,7 +3,7 @@ import {
shippingErrorFragment shippingErrorFragment
} from "@saleor/fragments/errors"; } from "@saleor/fragments/errors";
import { import {
shippingMethodFragment, shippingMethodTypeFragment,
shippingZoneDetailsFragment shippingZoneDetailsFragment
} from "@saleor/fragments/shipping"; } from "@saleor/fragments/shipping";
import { countryFragment } from "@saleor/fragments/taxes"; import { countryFragment } from "@saleor/fragments/taxes";
@ -157,14 +157,14 @@ export const useShippingZoneUpdate = makeMutation<
const updateShippingRate = gql` const updateShippingRate = gql`
${shippingErrorFragment} ${shippingErrorFragment}
${shippingMethodFragment} ${shippingMethodTypeFragment}
mutation UpdateShippingRate($id: ID!, $input: ShippingPriceInput!) { mutation UpdateShippingRate($id: ID!, $input: ShippingPriceInput!) {
shippingPriceUpdate(id: $id, input: $input) { shippingPriceUpdate(id: $id, input: $input) {
errors { errors {
...ShippingErrorFragment ...ShippingErrorFragment
} }
shippingMethod { shippingMethod {
...ShippingMethodFragment ...ShippingMethodTypeFragment
} }
} }
} }
@ -176,7 +176,7 @@ export const useShippingRateUpdate = makeMutation<
const createShippingRate = gql` const createShippingRate = gql`
${shippingErrorFragment} ${shippingErrorFragment}
${shippingMethodFragment} ${shippingMethodTypeFragment}
${shippingZoneDetailsFragment} ${shippingZoneDetailsFragment}
mutation CreateShippingRate($input: ShippingPriceInput!) { mutation CreateShippingRate($input: ShippingPriceInput!) {
shippingPriceCreate(input: $input) { shippingPriceCreate(input: $input) {
@ -187,7 +187,7 @@ const createShippingRate = gql`
...ShippingZoneDetailsFragment ...ShippingZoneDetailsFragment
} }
shippingMethod { shippingMethod {
...ShippingMethodFragment ...ShippingMethodTypeFragment
} }
} }
} }
@ -233,14 +233,14 @@ export const useShippingRateBulkDelete = makeMutation<
export const shippingMethodChannelListingUpdate = gql` export const shippingMethodChannelListingUpdate = gql`
${shippingChannelsErrorFragment} ${shippingChannelsErrorFragment}
${shippingMethodFragment} ${shippingMethodTypeFragment}
mutation ShippingMethodChannelListingUpdate( mutation ShippingMethodChannelListingUpdate(
$id: ID! $id: ID!
$input: ShippingMethodChannelListingInput! $input: ShippingMethodChannelListingInput!
) { ) {
shippingMethodChannelListingUpdate(id: $id, input: $input) { shippingMethodChannelListingUpdate(id: $id, input: $input) {
shippingMethod { shippingMethod {
...ShippingMethodFragment ...ShippingMethodTypeFragment
} }
errors { errors {
...ShippingChannelsErrorFragment ...ShippingChannelsErrorFragment

View file

@ -100,7 +100,7 @@ export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMet
} }
export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods { export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_postalCodeRules | null)[] | null; postalCodeRules: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_postalCodeRules | null)[] | null;
metadata: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_metadata | null)[]; metadata: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_metadata | null)[];
@ -201,7 +201,7 @@ export interface CreateShippingRate_shippingPriceCreate_shippingMethod_channelLi
} }
export interface CreateShippingRate_shippingPriceCreate_shippingMethod { export interface CreateShippingRate_shippingPriceCreate_shippingMethod {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (CreateShippingRate_shippingPriceCreate_shippingMethod_postalCodeRules | null)[] | null; postalCodeRules: (CreateShippingRate_shippingPriceCreate_shippingMethod_postalCodeRules | null)[] | null;
metadata: (CreateShippingRate_shippingPriceCreate_shippingMethod_metadata | null)[]; metadata: (CreateShippingRate_shippingPriceCreate_shippingMethod_metadata | null)[];

View file

@ -100,7 +100,7 @@ export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMet
} }
export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods { export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_postalCodeRules | null)[] | null; postalCodeRules: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_postalCodeRules | null)[] | null;
metadata: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_metadata | null)[]; metadata: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_metadata | null)[];

View file

@ -76,7 +76,7 @@ export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListing
} }
export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod { export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_postalCodeRules | null)[] | null; postalCodeRules: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_postalCodeRules | null)[] | null;
metadata: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_metadata | null)[]; metadata: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_metadata | null)[];

View file

@ -125,7 +125,7 @@ export interface ShippingZone_shippingZone_shippingMethods_excludedProducts {
} }
export interface ShippingZone_shippingZone_shippingMethods { export interface ShippingZone_shippingZone_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (ShippingZone_shippingZone_shippingMethods_postalCodeRules | null)[] | null; postalCodeRules: (ShippingZone_shippingZone_shippingMethods_postalCodeRules | null)[] | null;
metadata: (ShippingZone_shippingZone_shippingMethods_metadata | null)[]; metadata: (ShippingZone_shippingZone_shippingMethods_metadata | null)[];

View file

@ -125,7 +125,7 @@ export interface ShippingZoneDetails_shippingZone_shippingMethods_excludedProduc
} }
export interface ShippingZoneDetails_shippingZone_shippingMethods { export interface ShippingZoneDetails_shippingZone_shippingMethods {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (ShippingZoneDetails_shippingZone_shippingMethods_postalCodeRules | null)[] | null; postalCodeRules: (ShippingZoneDetails_shippingZone_shippingMethods_postalCodeRules | null)[] | null;
metadata: (ShippingZoneDetails_shippingZone_shippingMethods_metadata | null)[]; metadata: (ShippingZoneDetails_shippingZone_shippingMethods_metadata | null)[];

View file

@ -82,7 +82,7 @@ export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelLi
} }
export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod { export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
postalCodeRules: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_postalCodeRules | null)[] | null; postalCodeRules: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_postalCodeRules | null)[] | null;
metadata: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_metadata | null)[]; metadata: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_metadata | null)[];

View file

@ -16,7 +16,7 @@ const props: OrderShippingMethodEditDialogProps = {
onSubmit: () => undefined, onSubmit: () => undefined,
open: true, open: true,
shippingMethod: null, shippingMethod: null,
shippingMethods: order.availableShippingMethods shippingMethods: order.shippingMethods
}; };
storiesOf("Orders / OrderShippingMethodEditDialog", module) storiesOf("Orders / OrderShippingMethodEditDialog", module)

View file

@ -14,7 +14,7 @@ export interface ShippingMethodTranslationDetails_translation_ProductTranslatabl
} }
export interface ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_shippingMethod { export interface ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_shippingMethod {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
} }

View file

@ -14,7 +14,7 @@ export interface ShippingMethodTranslations_translations_edges_node_ProductTrans
} }
export interface ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_shippingMethod { export interface ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_shippingMethod {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
} }

View file

@ -29,7 +29,7 @@ export interface UpdateShippingMethodTranslations_shippingPriceTranslate_shippin
} }
export interface UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod { export interface UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod {
__typename: "ShippingMethod"; __typename: "ShippingMethodType";
id: string; id: string;
name: string; name: string;
description: any | null; description: any | null;

View file

@ -1860,6 +1860,7 @@ export enum WebhookEventTypeAsyncEnum {
export enum WebhookEventTypeEnum { export enum WebhookEventTypeEnum {
ANY_EVENTS = "ANY_EVENTS", ANY_EVENTS = "ANY_EVENTS",
CHECKOUT_CREATED = "CHECKOUT_CREATED", CHECKOUT_CREATED = "CHECKOUT_CREATED",
CHECKOUT_FILTER_SHIPPING_METHODS = "CHECKOUT_FILTER_SHIPPING_METHODS",
CHECKOUT_UPDATED = "CHECKOUT_UPDATED", CHECKOUT_UPDATED = "CHECKOUT_UPDATED",
CUSTOMER_CREATED = "CUSTOMER_CREATED", CUSTOMER_CREATED = "CUSTOMER_CREATED",
CUSTOMER_UPDATED = "CUSTOMER_UPDATED", CUSTOMER_UPDATED = "CUSTOMER_UPDATED",
@ -1875,6 +1876,7 @@ export enum WebhookEventTypeEnum {
ORDER_CANCELLED = "ORDER_CANCELLED", ORDER_CANCELLED = "ORDER_CANCELLED",
ORDER_CONFIRMED = "ORDER_CONFIRMED", ORDER_CONFIRMED = "ORDER_CONFIRMED",
ORDER_CREATED = "ORDER_CREATED", ORDER_CREATED = "ORDER_CREATED",
ORDER_FILTER_SHIPPING_METHODS = "ORDER_FILTER_SHIPPING_METHODS",
ORDER_FULFILLED = "ORDER_FULFILLED", ORDER_FULFILLED = "ORDER_FULFILLED",
ORDER_FULLY_PAID = "ORDER_FULLY_PAID", ORDER_FULLY_PAID = "ORDER_FULLY_PAID",
ORDER_UPDATED = "ORDER_UPDATED", ORDER_UPDATED = "ORDER_UPDATED",

View file

@ -28,7 +28,7 @@ export interface UpdateMetadata_updateMetadata_item_privateMetadata {
} }
export interface UpdateMetadata_updateMetadata_item { export interface UpdateMetadata_updateMetadata_item {
__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"; __typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Payment" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingMethodType" | "ShippingZone" | "User" | "Voucher" | "Warehouse";
metadata: (UpdateMetadata_updateMetadata_item_metadata | null)[]; metadata: (UpdateMetadata_updateMetadata_item_metadata | null)[];
privateMetadata: (UpdateMetadata_updateMetadata_item_privateMetadata | null)[]; privateMetadata: (UpdateMetadata_updateMetadata_item_privateMetadata | null)[];
id: string; id: string;
@ -59,7 +59,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" | "Payment" | "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" | "ShippingMethodType" | "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

@ -28,7 +28,7 @@ export interface UpdatePrivateMetadata_updatePrivateMetadata_item_privateMetadat
} }
export interface UpdatePrivateMetadata_updatePrivateMetadata_item { export interface UpdatePrivateMetadata_updatePrivateMetadata_item {
__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"; __typename: "App" | "Attribute" | "Category" | "Checkout" | "Collection" | "DigitalContent" | "Fulfillment" | "GiftCard" | "Invoice" | "Menu" | "MenuItem" | "Order" | "Page" | "PageType" | "Payment" | "Product" | "ProductType" | "ProductVariant" | "Sale" | "ShippingMethod" | "ShippingMethodType" | "ShippingZone" | "User" | "Voucher" | "Warehouse";
metadata: (UpdatePrivateMetadata_updatePrivateMetadata_item_metadata | null)[]; metadata: (UpdatePrivateMetadata_updatePrivateMetadata_item_metadata | null)[];
privateMetadata: (UpdatePrivateMetadata_updatePrivateMetadata_item_privateMetadata | null)[]; privateMetadata: (UpdatePrivateMetadata_updatePrivateMetadata_item_privateMetadata | null)[];
id: string; id: string;
@ -59,7 +59,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" | "Payment" | "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" | "ShippingMethodType" | "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;