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:
parent
204dfac29f
commit
80f3af4e5e
67 changed files with 420 additions and 316 deletions
|
@ -227,6 +227,9 @@
|
|||
{
|
||||
"name": "ShippingMethodTranslation"
|
||||
},
|
||||
{
|
||||
"name": "ShippingMethodType"
|
||||
},
|
||||
{
|
||||
"name": "ShippingZone"
|
||||
},
|
||||
|
@ -329,6 +332,9 @@
|
|||
{
|
||||
"name": "ShippingMethod"
|
||||
},
|
||||
{
|
||||
"name": "ShippingMethodType"
|
||||
},
|
||||
{
|
||||
"name": "ShippingZone"
|
||||
},
|
||||
|
|
|
@ -1022,10 +1022,11 @@ type Checkout implements Node & ObjectWithMetadata {
|
|||
id: ID!
|
||||
privateMetadata: [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!]!
|
||||
availablePaymentGateways: [PaymentGateway!]!
|
||||
email: String!
|
||||
email: String
|
||||
isShippingRequired: Boolean!
|
||||
quantity: Int!
|
||||
stockReservationExpires: DateTime
|
||||
|
@ -1144,6 +1145,7 @@ enum CheckoutErrorCode {
|
|||
MISSING_CHANNEL_SLUG
|
||||
CHANNEL_INACTIVE
|
||||
UNAVAILABLE_VARIANT_IN_CHANNEL
|
||||
EMAIL_NOT_SET
|
||||
}
|
||||
|
||||
input CheckoutFilterInput {
|
||||
|
@ -4076,7 +4078,8 @@ type Order implements Node & ObjectWithMetadata {
|
|||
fulfillments: [Fulfillment]!
|
||||
lines: [OrderLine]!
|
||||
actions: [OrderAction]!
|
||||
availableShippingMethods: [ShippingMethod]
|
||||
availableShippingMethods: [ShippingMethod] @deprecated(reason: "Use `shippingMethods`, this field will be removed in 4.0")
|
||||
shippingMethods: [ShippingMethod]
|
||||
availableCollectionPoints: [Warehouse!]!
|
||||
invoices: [Invoice]
|
||||
number: String
|
||||
|
@ -4966,6 +4969,7 @@ enum PaymentErrorCode {
|
|||
NOT_SUPPORTED_GATEWAY
|
||||
CHANNEL_INACTIVE
|
||||
BALANCE_CHECK_ERROR
|
||||
CHECKOUT_EMAIL_NOT_SET
|
||||
}
|
||||
|
||||
input PaymentFilterInput {
|
||||
|
@ -6200,20 +6204,19 @@ type ShippingMethod implements Node & ObjectWithMetadata {
|
|||
id: ID!
|
||||
privateMetadata: [MetadataItem]!
|
||||
metadata: [MetadataItem]!
|
||||
type: ShippingMethodTypeEnum @deprecated(reason: "This field will be removed in Saleor 4.0.")
|
||||
name: String!
|
||||
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
|
||||
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 {
|
||||
|
@ -6237,7 +6240,7 @@ input ShippingMethodChannelListingInput {
|
|||
}
|
||||
|
||||
type ShippingMethodChannelListingUpdate {
|
||||
shippingMethod: ShippingMethod
|
||||
shippingMethod: ShippingMethodType
|
||||
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
|
||||
errors: [ShippingError!]!
|
||||
}
|
||||
|
@ -6254,7 +6257,7 @@ type ShippingMethodTranslatableContent implements Node {
|
|||
name: String!
|
||||
description: JSONString
|
||||
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 {
|
||||
|
@ -6264,6 +6267,25 @@ type ShippingMethodTranslation implements Node {
|
|||
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 {
|
||||
PRICE
|
||||
WEIGHT
|
||||
|
@ -6282,20 +6304,20 @@ type ShippingPriceBulkDelete {
|
|||
|
||||
type ShippingPriceCreate {
|
||||
shippingZone: ShippingZone
|
||||
shippingMethod: ShippingMethod
|
||||
shippingMethod: ShippingMethodType
|
||||
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
|
||||
errors: [ShippingError!]!
|
||||
}
|
||||
|
||||
type ShippingPriceDelete {
|
||||
shippingMethod: ShippingMethod
|
||||
shippingMethod: ShippingMethodType
|
||||
shippingZone: ShippingZone
|
||||
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
|
||||
errors: [ShippingError!]!
|
||||
}
|
||||
|
||||
type ShippingPriceExcludeProducts {
|
||||
shippingMethod: ShippingMethod
|
||||
shippingMethod: ShippingMethodType
|
||||
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
|
||||
errors: [ShippingError!]!
|
||||
}
|
||||
|
@ -6319,7 +6341,7 @@ input ShippingPriceInput {
|
|||
}
|
||||
|
||||
type ShippingPriceRemoveProductFromExclude {
|
||||
shippingMethod: ShippingMethod
|
||||
shippingMethod: ShippingMethodType
|
||||
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
|
||||
errors: [ShippingError!]!
|
||||
}
|
||||
|
@ -6327,7 +6349,7 @@ type ShippingPriceRemoveProductFromExclude {
|
|||
type ShippingPriceTranslate {
|
||||
translationErrors: [TranslationError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
|
||||
errors: [TranslationError!]!
|
||||
shippingMethod: ShippingMethod
|
||||
shippingMethod: ShippingMethodType
|
||||
}
|
||||
|
||||
input ShippingPriceTranslationInput {
|
||||
|
@ -6337,7 +6359,7 @@ input ShippingPriceTranslationInput {
|
|||
|
||||
type ShippingPriceUpdate {
|
||||
shippingZone: ShippingZone
|
||||
shippingMethod: ShippingMethod
|
||||
shippingMethod: ShippingMethodType
|
||||
shippingErrors: [ShippingError!]! @deprecated(reason: "This field will be removed in Saleor 4.0. Use `errors` field instead.")
|
||||
errors: [ShippingError!]!
|
||||
}
|
||||
|
@ -6350,7 +6372,7 @@ type ShippingZone implements Node & ObjectWithMetadata {
|
|||
metadata: [MetadataItem]!
|
||||
priceRange: MoneyRange
|
||||
countries: [CountryDisplay]
|
||||
shippingMethods: [ShippingMethod]
|
||||
shippingMethods: [ShippingMethodType]
|
||||
warehouses: [Warehouse!]!
|
||||
channels: [Channel!]!
|
||||
description: String
|
||||
|
|
|
@ -34,6 +34,7 @@ const useStyles = makeStyles(
|
|||
export interface Choice<T = string, L = string | React.ReactNode> {
|
||||
value: T;
|
||||
label: L;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export type Choices = Choice[];
|
||||
|
@ -114,6 +115,7 @@ export const SingleSelectField: React.FC<SingleSelectFieldProps> = props => {
|
|||
{choices.length > 0 ? (
|
||||
choices.map(choice => (
|
||||
<MenuItem
|
||||
disabled={choice.disabled}
|
||||
data-test="selectFieldOption"
|
||||
data-test-id={choice.value}
|
||||
value={choice.value}
|
||||
|
|
|
@ -297,12 +297,14 @@ export const fragmentOrderDetails = gql`
|
|||
email
|
||||
}
|
||||
userEmail
|
||||
availableShippingMethods {
|
||||
shippingMethods {
|
||||
id
|
||||
name
|
||||
price {
|
||||
...Money
|
||||
}
|
||||
active
|
||||
message
|
||||
}
|
||||
invoices {
|
||||
...InvoiceFragment
|
||||
|
|
|
@ -18,7 +18,7 @@ export const shippingZoneFragment = gql`
|
|||
`;
|
||||
|
||||
export const shippingMethodWithPostalCodesFragment = gql`
|
||||
fragment ShippingMethodWithPostalCodesFragment on ShippingMethod {
|
||||
fragment ShippingMethodWithPostalCodesFragment on ShippingMethodType {
|
||||
id
|
||||
postalCodeRules {
|
||||
id
|
||||
|
@ -28,11 +28,11 @@ export const shippingMethodWithPostalCodesFragment = gql`
|
|||
}
|
||||
}
|
||||
`;
|
||||
export const shippingMethodFragment = gql`
|
||||
export const shippingMethodTypeFragment = gql`
|
||||
${metadataFragment}
|
||||
${fragmentMoney}
|
||||
${shippingMethodWithPostalCodesFragment}
|
||||
fragment ShippingMethodFragment on ShippingMethod {
|
||||
fragment ShippingMethodTypeFragment on ShippingMethodType {
|
||||
...ShippingMethodWithPostalCodesFragment
|
||||
...MetadataFragment
|
||||
minimumOrderWeight {
|
||||
|
@ -69,9 +69,9 @@ export const shippingMethodFragment = gql`
|
|||
`;
|
||||
export const shippingMethodWithExcludedProductsFragment = gql`
|
||||
${fragmentMoney}
|
||||
${shippingMethodFragment}
|
||||
fragment ShippingMethodWithExcludedProductsFragment on ShippingMethod {
|
||||
...ShippingMethodFragment
|
||||
${shippingMethodTypeFragment}
|
||||
fragment ShippingMethodWithExcludedProductsFragment on ShippingMethodType {
|
||||
...ShippingMethodTypeFragment
|
||||
excludedProducts(
|
||||
before: $before
|
||||
after: $after
|
||||
|
@ -99,12 +99,12 @@ export const shippingMethodWithExcludedProductsFragment = gql`
|
|||
|
||||
export const shippingZoneDetailsFragment = gql`
|
||||
${shippingZoneFragment}
|
||||
${shippingMethodFragment}
|
||||
${shippingMethodTypeFragment}
|
||||
fragment ShippingZoneDetailsFragment on ShippingZone {
|
||||
...ShippingZoneFragment
|
||||
default
|
||||
shippingMethods {
|
||||
...ShippingMethodFragment
|
||||
...ShippingMethodTypeFragment
|
||||
}
|
||||
warehouses {
|
||||
id
|
||||
|
|
|
@ -20,7 +20,7 @@ export interface MetadataFragment_privateMetadata {
|
|||
}
|
||||
|
||||
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)[];
|
||||
privateMetadata: (MetadataFragment_privateMetadata | null)[];
|
||||
}
|
||||
|
|
|
@ -517,17 +517,19 @@ export interface OrderDetailsFragment_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderDetailsFragment_availableShippingMethods_price {
|
||||
export interface OrderDetailsFragment_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderDetailsFragment_availableShippingMethods {
|
||||
export interface OrderDetailsFragment_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: string;
|
||||
name: string;
|
||||
price: OrderDetailsFragment_availableShippingMethods_price | null;
|
||||
price: OrderDetailsFragment_shippingMethods_price;
|
||||
active: boolean;
|
||||
message: string | null;
|
||||
}
|
||||
|
||||
export interface OrderDetailsFragment_invoices {
|
||||
|
@ -588,7 +590,7 @@ export interface OrderDetailsFragment {
|
|||
undiscountedTotal: OrderDetailsFragment_undiscountedTotal;
|
||||
user: OrderDetailsFragment_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderDetailsFragment_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderDetailsFragment_shippingMethods[];
|
||||
invoices: (OrderDetailsFragment_invoices | null)[] | null;
|
||||
channel: OrderDetailsFragment_channel;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -10,7 +10,7 @@ import { LanguageCodeEnum } from "./../../types/globalTypes";
|
|||
// ====================================================
|
||||
|
||||
export interface ShippingMethodTranslationFragment_shippingMethod {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
}
|
||||
|
||||
|
|
92
src/fragments/types/ShippingMethodTypeFragment.ts
Normal file
92
src/fragments/types/ShippingMethodTypeFragment.ts
Normal 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;
|
||||
}
|
|
@ -107,7 +107,7 @@ export interface ShippingMethodWithExcludedProductsFragment_excludedProducts {
|
|||
}
|
||||
|
||||
export interface ShippingMethodWithExcludedProductsFragment {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (ShippingMethodWithExcludedProductsFragment_postalCodeRules | null)[] | null;
|
||||
metadata: (ShippingMethodWithExcludedProductsFragment_metadata | null)[];
|
||||
|
|
|
@ -18,7 +18,7 @@ export interface ShippingMethodWithPostalCodesFragment_postalCodeRules {
|
|||
}
|
||||
|
||||
export interface ShippingMethodWithPostalCodesFragment {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (ShippingMethodWithPostalCodesFragment_postalCodeRules | null)[] | null;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ export interface ShippingZoneDetailsFragment_shippingMethods_channelListings {
|
|||
}
|
||||
|
||||
export interface ShippingZoneDetailsFragment_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (ShippingZoneDetailsFragment_shippingMethods_postalCodeRules | null)[] | null;
|
||||
metadata: (ShippingZoneDetailsFragment_shippingMethods_metadata | null)[];
|
||||
|
|
|
@ -84,7 +84,7 @@ const OrderDraftDetailsSummary: React.FC<OrderDraftDetailsSummaryProps> = props
|
|||
total,
|
||||
shippingMethod,
|
||||
shippingMethodName,
|
||||
availableShippingMethods,
|
||||
shippingMethods,
|
||||
shippingPrice,
|
||||
shippingAddress,
|
||||
isShippingRequired
|
||||
|
@ -93,8 +93,7 @@ const OrderDraftDetailsSummary: React.FC<OrderDraftDetailsSummaryProps> = props
|
|||
const hasChosenShippingMethod =
|
||||
shippingMethod !== null && shippingMethodName !== null;
|
||||
|
||||
const hasAvailableShippingMethods =
|
||||
!!availableShippingMethods?.length || isShippingRequired;
|
||||
const hasShippingMethods = !!shippingMethods?.length || isShippingRequired;
|
||||
|
||||
const discountTitle = orderDiscount
|
||||
? messages.discount
|
||||
|
@ -194,11 +193,9 @@ const OrderDraftDetailsSummary: React.FC<OrderDraftDetailsSummaryProps> = props
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{hasAvailableShippingMethods && (
|
||||
<td>{getShippingMethodComponent()}</td>
|
||||
)}
|
||||
{hasShippingMethods && <td>{getShippingMethodComponent()}</td>}
|
||||
|
||||
{!hasAvailableShippingMethods && (
|
||||
{!hasShippingMethods && (
|
||||
<td>{intl.formatMessage(messages.noShippingCarriers)}</td>
|
||||
)}
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ import {
|
|||
DialogActions,
|
||||
DialogContent,
|
||||
DialogContentText,
|
||||
DialogTitle
|
||||
DialogTitle,
|
||||
Typography
|
||||
} from "@material-ui/core";
|
||||
import ConfirmButton, {
|
||||
ConfirmButtonTransitionState
|
||||
|
@ -22,7 +23,7 @@ import getOrderErrorMessage from "@saleor/utils/errors/order";
|
|||
import React from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { OrderDetails_order_availableShippingMethods } from "../../types/OrderDetails";
|
||||
import { OrderDetails_order_shippingMethods } from "../../types/OrderDetails";
|
||||
|
||||
export interface FormData {
|
||||
shippingMethod: string;
|
||||
|
@ -35,7 +36,8 @@ const useStyles = makeStyles(
|
|||
},
|
||||
menuItem: {
|
||||
display: "flex",
|
||||
width: "100%"
|
||||
width: "100%",
|
||||
flexWrap: "wrap"
|
||||
},
|
||||
price: {
|
||||
marginRight: theme.spacing(3)
|
||||
|
@ -50,6 +52,9 @@ const useStyles = makeStyles(
|
|||
flex: 1,
|
||||
overflowX: "hidden",
|
||||
textOverflow: "ellipsis"
|
||||
},
|
||||
message: {
|
||||
width: "100%"
|
||||
}
|
||||
}),
|
||||
{ name: "OrderShippingMethodEditDialog" }
|
||||
|
@ -60,7 +65,7 @@ export interface OrderShippingMethodEditDialogProps {
|
|||
errors: OrderErrorFragment[];
|
||||
open: boolean;
|
||||
shippingMethod: string;
|
||||
shippingMethods?: OrderDetails_order_availableShippingMethods[];
|
||||
shippingMethods?: OrderDetails_order_shippingMethods[];
|
||||
onClose();
|
||||
onSubmit?(data: FormData);
|
||||
}
|
||||
|
@ -84,18 +89,26 @@ const OrderShippingMethodEditDialog: React.FC<OrderShippingMethodEditDialogProps
|
|||
const nonFieldErrors = errors.filter(err => !formFields.includes(err.field));
|
||||
|
||||
const choices = shippingMethods
|
||||
? shippingMethods.map(s => ({
|
||||
label: (
|
||||
<div className={classes.menuItem}>
|
||||
<span className={classes.shippingMethodName}>{s.name}</span>
|
||||
|
||||
<span className={classes.price}>
|
||||
<Money money={s.price} />
|
||||
</span>
|
||||
</div>
|
||||
),
|
||||
value: s.id
|
||||
}))
|
||||
? shippingMethods
|
||||
.map(s => ({
|
||||
label: (
|
||||
<div className={classes.menuItem}>
|
||||
<span className={classes.shippingMethodName}>{s.name}</span>
|
||||
|
||||
<span className={classes.price}>
|
||||
<Money money={s.price} />
|
||||
</span>
|
||||
{!s.active && (
|
||||
<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 = {
|
||||
shippingMethod
|
||||
|
|
|
@ -779,7 +779,7 @@ export const order = (placeholder: string): OrderDetails_order => ({
|
|||
OrderAction.REFUND,
|
||||
OrderAction.VOID
|
||||
],
|
||||
availableShippingMethods: [
|
||||
shippingMethods: [
|
||||
{
|
||||
__typename: "ShippingMethod",
|
||||
id: "U2hpcHBpbmdNZXRob2Q6NQ==",
|
||||
|
@ -788,7 +788,9 @@ export const order = (placeholder: string): OrderDetails_order => ({
|
|||
__typename: "Money",
|
||||
amount: 12.41,
|
||||
currency: "USD"
|
||||
}
|
||||
},
|
||||
active: false,
|
||||
message: "shipping method is disactive"
|
||||
},
|
||||
{
|
||||
__typename: "ShippingMethod",
|
||||
|
@ -798,7 +800,9 @@ export const order = (placeholder: string): OrderDetails_order => ({
|
|||
__typename: "Money",
|
||||
amount: 9.12,
|
||||
currency: "USD"
|
||||
}
|
||||
},
|
||||
active: true,
|
||||
message: null
|
||||
},
|
||||
{
|
||||
__typename: "ShippingMethod",
|
||||
|
@ -808,7 +812,9 @@ export const order = (placeholder: string): OrderDetails_order => ({
|
|||
__typename: "Money",
|
||||
amount: 7.6,
|
||||
currency: "USD"
|
||||
}
|
||||
},
|
||||
active: true,
|
||||
message: null
|
||||
}
|
||||
],
|
||||
billingAddress: {
|
||||
|
@ -1419,7 +1425,7 @@ export const draftOrder = (placeholder: string): OrderDetails_order => ({
|
|||
__typename: "Order" as "Order",
|
||||
giftCards: [],
|
||||
actions: [OrderAction.CAPTURE],
|
||||
availableShippingMethods: null,
|
||||
shippingMethods: null,
|
||||
billingAddress: null,
|
||||
canFinalize: true,
|
||||
channel: {
|
||||
|
|
|
@ -577,7 +577,7 @@ const orderShippingMethodUpdateMutation = gql`
|
|||
...OrderErrorFragment
|
||||
}
|
||||
order {
|
||||
availableShippingMethods {
|
||||
shippingMethods {
|
||||
id
|
||||
name
|
||||
}
|
||||
|
|
|
@ -526,17 +526,19 @@ export interface FulfillOrder_orderFulfill_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface FulfillOrder_orderFulfill_order_availableShippingMethods_price {
|
||||
export interface FulfillOrder_orderFulfill_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface FulfillOrder_orderFulfill_order_availableShippingMethods {
|
||||
export interface FulfillOrder_orderFulfill_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -597,7 +599,7 @@ export interface FulfillOrder_orderFulfill_order {
|
|||
undiscountedTotal: FulfillOrder_orderFulfill_order_undiscountedTotal;
|
||||
user: FulfillOrder_orderFulfill_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (FulfillOrder_orderFulfill_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: FulfillOrder_orderFulfill_order_shippingMethods[];
|
||||
invoices: (FulfillOrder_orderFulfill_order_invoices | null)[] | null;
|
||||
channel: FulfillOrder_orderFulfill_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderCancel_orderCancel_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderCancel_orderCancel_order_availableShippingMethods_price {
|
||||
export interface OrderCancel_orderCancel_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderCancel_orderCancel_order_availableShippingMethods {
|
||||
export interface OrderCancel_orderCancel_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderCancel_orderCancel_order {
|
|||
undiscountedTotal: OrderCancel_orderCancel_order_undiscountedTotal;
|
||||
user: OrderCancel_orderCancel_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderCancel_orderCancel_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderCancel_orderCancel_order_shippingMethods[];
|
||||
invoices: (OrderCancel_orderCancel_order_invoices | null)[] | null;
|
||||
channel: OrderCancel_orderCancel_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderCapture_orderCapture_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderCapture_orderCapture_order_availableShippingMethods_price {
|
||||
export interface OrderCapture_orderCapture_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderCapture_orderCapture_order_availableShippingMethods {
|
||||
export interface OrderCapture_orderCapture_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderCapture_orderCapture_order {
|
|||
undiscountedTotal: OrderCapture_orderCapture_order_undiscountedTotal;
|
||||
user: OrderCapture_orderCapture_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderCapture_orderCapture_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderCapture_orderCapture_order_shippingMethods[];
|
||||
invoices: (OrderCapture_orderCapture_order_invoices | null)[] | null;
|
||||
channel: OrderCapture_orderCapture_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderConfirm_orderConfirm_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderConfirm_orderConfirm_order_availableShippingMethods_price {
|
||||
export interface OrderConfirm_orderConfirm_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderConfirm_orderConfirm_order_availableShippingMethods {
|
||||
export interface OrderConfirm_orderConfirm_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderConfirm_orderConfirm_order {
|
|||
undiscountedTotal: OrderConfirm_orderConfirm_order_undiscountedTotal;
|
||||
user: OrderConfirm_orderConfirm_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderConfirm_orderConfirm_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderConfirm_orderConfirm_order_shippingMethods[];
|
||||
invoices: (OrderConfirm_orderConfirm_order_invoices | null)[] | null;
|
||||
channel: OrderConfirm_orderConfirm_order_channel;
|
||||
}
|
||||
|
|
|
@ -517,17 +517,19 @@ export interface OrderDetails_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderDetails_order_availableShippingMethods_price {
|
||||
export interface OrderDetails_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderDetails_order_availableShippingMethods {
|
||||
export interface OrderDetails_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: string;
|
||||
name: string;
|
||||
price: OrderDetails_order_availableShippingMethods_price | null;
|
||||
price: OrderDetails_order_shippingMethods_price;
|
||||
active: boolean;
|
||||
message: string | null;
|
||||
}
|
||||
|
||||
export interface OrderDetails_order_invoices {
|
||||
|
@ -588,7 +590,7 @@ export interface OrderDetails_order {
|
|||
undiscountedTotal: OrderDetails_order_undiscountedTotal;
|
||||
user: OrderDetails_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderDetails_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderDetails_order_shippingMethods[];
|
||||
invoices: (OrderDetails_order_invoices | null)[] | null;
|
||||
channel: OrderDetails_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderDiscountAdd_orderDiscountAdd_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderDiscountAdd_orderDiscountAdd_order_availableShippingMethods_price {
|
||||
export interface OrderDiscountAdd_orderDiscountAdd_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderDiscountAdd_orderDiscountAdd_order_availableShippingMethods {
|
||||
export interface OrderDiscountAdd_orderDiscountAdd_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderDiscountAdd_orderDiscountAdd_order {
|
|||
undiscountedTotal: OrderDiscountAdd_orderDiscountAdd_order_undiscountedTotal;
|
||||
user: OrderDiscountAdd_orderDiscountAdd_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderDiscountAdd_orderDiscountAdd_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderDiscountAdd_orderDiscountAdd_order_shippingMethods[];
|
||||
invoices: (OrderDiscountAdd_orderDiscountAdd_order_invoices | null)[] | null;
|
||||
channel: OrderDiscountAdd_orderDiscountAdd_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderDiscountDelete_orderDiscountDelete_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderDiscountDelete_orderDiscountDelete_order_availableShippingMethods_price {
|
||||
export interface OrderDiscountDelete_orderDiscountDelete_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderDiscountDelete_orderDiscountDelete_order_availableShippingMethods {
|
||||
export interface OrderDiscountDelete_orderDiscountDelete_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderDiscountDelete_orderDiscountDelete_order {
|
|||
undiscountedTotal: OrderDiscountDelete_orderDiscountDelete_order_undiscountedTotal;
|
||||
user: OrderDiscountDelete_orderDiscountDelete_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderDiscountDelete_orderDiscountDelete_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderDiscountDelete_orderDiscountDelete_order_shippingMethods[];
|
||||
invoices: (OrderDiscountDelete_orderDiscountDelete_order_invoices | null)[] | null;
|
||||
channel: OrderDiscountDelete_orderDiscountDelete_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderDiscountUpdate_orderDiscountUpdate_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderDiscountUpdate_orderDiscountUpdate_order_availableShippingMethods_price {
|
||||
export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderDiscountUpdate_orderDiscountUpdate_order_availableShippingMethods {
|
||||
export interface OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderDiscountUpdate_orderDiscountUpdate_order {
|
|||
undiscountedTotal: OrderDiscountUpdate_orderDiscountUpdate_order_undiscountedTotal;
|
||||
user: OrderDiscountUpdate_orderDiscountUpdate_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderDiscountUpdate_orderDiscountUpdate_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderDiscountUpdate_orderDiscountUpdate_order_shippingMethods[];
|
||||
invoices: (OrderDiscountUpdate_orderDiscountUpdate_order_invoices | null)[] | null;
|
||||
channel: OrderDiscountUpdate_orderDiscountUpdate_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderDraftCancel_draftOrderDelete_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderDraftCancel_draftOrderDelete_order_availableShippingMethods_price {
|
||||
export interface OrderDraftCancel_draftOrderDelete_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderDraftCancel_draftOrderDelete_order_availableShippingMethods {
|
||||
export interface OrderDraftCancel_draftOrderDelete_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderDraftCancel_draftOrderDelete_order {
|
|||
undiscountedTotal: OrderDraftCancel_draftOrderDelete_order_undiscountedTotal;
|
||||
user: OrderDraftCancel_draftOrderDelete_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderDraftCancel_draftOrderDelete_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderDraftCancel_draftOrderDelete_order_shippingMethods[];
|
||||
invoices: (OrderDraftCancel_draftOrderDelete_order_invoices | null)[] | null;
|
||||
channel: OrderDraftCancel_draftOrderDelete_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderDraftFinalize_draftOrderComplete_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderDraftFinalize_draftOrderComplete_order_availableShippingMethods_price {
|
||||
export interface OrderDraftFinalize_draftOrderComplete_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderDraftFinalize_draftOrderComplete_order_availableShippingMethods {
|
||||
export interface OrderDraftFinalize_draftOrderComplete_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderDraftFinalize_draftOrderComplete_order {
|
|||
undiscountedTotal: OrderDraftFinalize_draftOrderComplete_order_undiscountedTotal;
|
||||
user: OrderDraftFinalize_draftOrderComplete_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderDraftFinalize_draftOrderComplete_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderDraftFinalize_draftOrderComplete_order_shippingMethods[];
|
||||
invoices: (OrderDraftFinalize_draftOrderComplete_order_invoices | null)[] | null;
|
||||
channel: OrderDraftFinalize_draftOrderComplete_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderDraftUpdate_draftOrderUpdate_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderDraftUpdate_draftOrderUpdate_order_availableShippingMethods_price {
|
||||
export interface OrderDraftUpdate_draftOrderUpdate_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderDraftUpdate_draftOrderUpdate_order_availableShippingMethods {
|
||||
export interface OrderDraftUpdate_draftOrderUpdate_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderDraftUpdate_draftOrderUpdate_order {
|
|||
undiscountedTotal: OrderDraftUpdate_draftOrderUpdate_order_undiscountedTotal;
|
||||
user: OrderDraftUpdate_draftOrderUpdate_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderDraftUpdate_draftOrderUpdate_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderDraftUpdate_draftOrderUpdate_order_shippingMethods[];
|
||||
invoices: (OrderDraftUpdate_draftOrderUpdate_order_invoices | null)[] | null;
|
||||
channel: OrderDraftUpdate_draftOrderUpdate_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,17 @@ export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_availableShippingMethods_price {
|
||||
export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_availableShippingMethods {
|
||||
export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: string;
|
||||
name: string;
|
||||
price: OrderFulfillmentApprove_orderFulfillmentApprove_order_availableShippingMethods_price | null;
|
||||
price: OrderFulfillmentApprove_orderFulfillmentApprove_order_shippingMethods_price;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentApprove_orderFulfillmentApprove_order_invoices {
|
||||
|
@ -595,7 +595,7 @@ export interface OrderFulfillmentApprove_orderFulfillmentApprove_order {
|
|||
undiscountedTotal: OrderFulfillmentApprove_orderFulfillmentApprove_order_undiscountedTotal;
|
||||
user: OrderFulfillmentApprove_orderFulfillmentApprove_order_user | 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;
|
||||
channel: OrderFulfillmentApprove_orderFulfillmentApprove_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_availableShippingMethods_price {
|
||||
export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_availableShippingMethods {
|
||||
export interface OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderFulfillmentCancel_orderFulfillmentCancel_order {
|
|||
undiscountedTotal: OrderFulfillmentCancel_orderFulfillmentCancel_order_undiscountedTotal;
|
||||
user: OrderFulfillmentCancel_orderFulfillmentCancel_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderFulfillmentCancel_orderFulfillmentCancel_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderFulfillmentCancel_orderFulfillmentCancel_order_shippingMethods[];
|
||||
invoices: (OrderFulfillmentCancel_orderFulfillmentCancel_order_invoices | null)[] | null;
|
||||
channel: OrderFulfillmentCancel_orderFulfillmentCancel_order_channel;
|
||||
}
|
||||
|
|
|
@ -626,17 +626,19 @@ export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_o
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_availableShippingMethods_price {
|
||||
export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_availableShippingMethods {
|
||||
export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -697,7 +699,7 @@ export interface OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_o
|
|||
undiscountedTotal: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_undiscountedTotal;
|
||||
user: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_shippingMethods[];
|
||||
invoices: (OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_invoices | null)[] | null;
|
||||
channel: OrderFulfillmentRefundProducts_orderFulfillmentRefundProducts_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_o
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_availableShippingMethods_price {
|
||||
export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_availableShippingMethods {
|
||||
export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_o
|
|||
undiscountedTotal: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_undiscountedTotal;
|
||||
user: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_shippingMethods[];
|
||||
invoices: (OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_invoices | null)[] | null;
|
||||
channel: OrderFulfillmentUpdateTracking_orderFulfillmentUpdateTracking_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderLineDelete_orderLineDelete_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDelete_orderLineDelete_order_availableShippingMethods_price {
|
||||
export interface OrderLineDelete_orderLineDelete_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDelete_orderLineDelete_order_availableShippingMethods {
|
||||
export interface OrderLineDelete_orderLineDelete_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderLineDelete_orderLineDelete_order {
|
|||
undiscountedTotal: OrderLineDelete_orderLineDelete_order_undiscountedTotal;
|
||||
user: OrderLineDelete_orderLineDelete_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderLineDelete_orderLineDelete_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderLineDelete_orderLineDelete_order_shippingMethods[];
|
||||
invoices: (OrderLineDelete_orderLineDelete_order_invoices | null)[] | null;
|
||||
channel: OrderLineDelete_orderLineDelete_order_channel;
|
||||
}
|
||||
|
|
|
@ -287,17 +287,17 @@ export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_availableShippingMethods_price {
|
||||
export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_availableShippingMethods {
|
||||
export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: string;
|
||||
name: string;
|
||||
price: OrderLineDiscountAdd_orderLineDiscountAdd_order_availableShippingMethods_price | null;
|
||||
price: OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods_price | null;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountAdd_orderLineDiscountAdd_order_discount {
|
||||
|
@ -349,7 +349,7 @@ export interface OrderLineDiscountAdd_orderLineDiscountAdd_order {
|
|||
totalCaptured: OrderLineDiscountAdd_orderLineDiscountAdd_order_totalCaptured;
|
||||
user: OrderLineDiscountAdd_orderLineDiscountAdd_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderLineDiscountAdd_orderLineDiscountAdd_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: (OrderLineDiscountAdd_orderLineDiscountAdd_order_shippingMethods | null)[] | null;
|
||||
discount: OrderLineDiscountAdd_orderLineDiscountAdd_order_discount | null;
|
||||
invoices: (OrderLineDiscountAdd_orderLineDiscountAdd_order_invoices | null)[] | null;
|
||||
channel: OrderLineDiscountAdd_orderLineDiscountAdd_order_channel;
|
||||
|
|
|
@ -287,17 +287,17 @@ export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_availableShippingMethods_price {
|
||||
export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_availableShippingMethods {
|
||||
export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: string;
|
||||
name: string;
|
||||
price: OrderLineDiscountDelete_orderLineDiscountDelete_order_availableShippingMethods_price | null;
|
||||
price: OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods_price | null;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountDelete_orderLineDiscountDelete_order_discount {
|
||||
|
@ -349,7 +349,7 @@ export interface OrderLineDiscountDelete_orderLineDiscountDelete_order {
|
|||
totalCaptured: OrderLineDiscountDelete_orderLineDiscountDelete_order_totalCaptured;
|
||||
user: OrderLineDiscountDelete_orderLineDiscountDelete_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderLineDiscountDelete_orderLineDiscountDelete_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: (OrderLineDiscountDelete_orderLineDiscountDelete_order_shippingMethods | null)[] | null;
|
||||
discount: OrderLineDiscountDelete_orderLineDiscountDelete_order_discount | null;
|
||||
invoices: (OrderLineDiscountDelete_orderLineDiscountDelete_order_invoices | null)[] | null;
|
||||
channel: OrderLineDiscountDelete_orderLineDiscountDelete_order_channel;
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_availableShippingMethods_price {
|
||||
export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_availableShippingMethods {
|
||||
export interface OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderLineDiscountRemove_orderLineDiscountRemove_order {
|
|||
undiscountedTotal: OrderLineDiscountRemove_orderLineDiscountRemove_order_undiscountedTotal;
|
||||
user: OrderLineDiscountRemove_orderLineDiscountRemove_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderLineDiscountRemove_orderLineDiscountRemove_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderLineDiscountRemove_orderLineDiscountRemove_order_shippingMethods[];
|
||||
invoices: (OrderLineDiscountRemove_orderLineDiscountRemove_order_invoices | null)[] | null;
|
||||
channel: OrderLineDiscountRemove_orderLineDiscountRemove_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_availableShippingMethods_price {
|
||||
export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_availableShippingMethods {
|
||||
export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderLineDiscountUpdate_orderLineDiscountUpdate_order {
|
|||
undiscountedTotal: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_undiscountedTotal;
|
||||
user: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_shippingMethods[];
|
||||
invoices: (OrderLineDiscountUpdate_orderLineDiscountUpdate_order_invoices | null)[] | null;
|
||||
channel: OrderLineDiscountUpdate_orderLineDiscountUpdate_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderLineUpdate_orderLineUpdate_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderLineUpdate_orderLineUpdate_order_availableShippingMethods_price {
|
||||
export interface OrderLineUpdate_orderLineUpdate_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderLineUpdate_orderLineUpdate_order_availableShippingMethods {
|
||||
export interface OrderLineUpdate_orderLineUpdate_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderLineUpdate_orderLineUpdate_order {
|
|||
undiscountedTotal: OrderLineUpdate_orderLineUpdate_order_undiscountedTotal;
|
||||
user: OrderLineUpdate_orderLineUpdate_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderLineUpdate_orderLineUpdate_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderLineUpdate_orderLineUpdate_order_shippingMethods[];
|
||||
invoices: (OrderLineUpdate_orderLineUpdate_order_invoices | null)[] | null;
|
||||
channel: OrderLineUpdate_orderLineUpdate_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderLinesAdd_orderLinesCreate_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderLinesAdd_orderLinesCreate_order_availableShippingMethods_price {
|
||||
export interface OrderLinesAdd_orderLinesCreate_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderLinesAdd_orderLinesCreate_order_availableShippingMethods {
|
||||
export interface OrderLinesAdd_orderLinesCreate_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderLinesAdd_orderLinesCreate_order {
|
|||
undiscountedTotal: OrderLinesAdd_orderLinesCreate_order_undiscountedTotal;
|
||||
user: OrderLinesAdd_orderLinesCreate_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderLinesAdd_orderLinesCreate_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderLinesAdd_orderLinesCreate_order_shippingMethods[];
|
||||
invoices: (OrderLinesAdd_orderLinesCreate_order_invoices | null)[] | null;
|
||||
channel: OrderLinesAdd_orderLinesCreate_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderMarkAsPaid_orderMarkAsPaid_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderMarkAsPaid_orderMarkAsPaid_order_availableShippingMethods_price {
|
||||
export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderMarkAsPaid_orderMarkAsPaid_order_availableShippingMethods {
|
||||
export interface OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderMarkAsPaid_orderMarkAsPaid_order {
|
|||
undiscountedTotal: OrderMarkAsPaid_orderMarkAsPaid_order_undiscountedTotal;
|
||||
user: OrderMarkAsPaid_orderMarkAsPaid_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderMarkAsPaid_orderMarkAsPaid_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderMarkAsPaid_orderMarkAsPaid_order_shippingMethods[];
|
||||
invoices: (OrderMarkAsPaid_orderMarkAsPaid_order_invoices | null)[] | null;
|
||||
channel: OrderMarkAsPaid_orderMarkAsPaid_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderRefund_orderRefund_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderRefund_orderRefund_order_availableShippingMethods_price {
|
||||
export interface OrderRefund_orderRefund_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderRefund_orderRefund_order_availableShippingMethods {
|
||||
export interface OrderRefund_orderRefund_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderRefund_orderRefund_order {
|
|||
undiscountedTotal: OrderRefund_orderRefund_order_undiscountedTotal;
|
||||
user: OrderRefund_orderRefund_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderRefund_orderRefund_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderRefund_orderRefund_order_shippingMethods[];
|
||||
invoices: (OrderRefund_orderRefund_order_invoices | null)[] | null;
|
||||
channel: OrderRefund_orderRefund_order_channel;
|
||||
}
|
||||
|
|
|
@ -16,17 +16,19 @@ export interface OrderShippingMethodUpdate_orderUpdateShipping_errors {
|
|||
addressType: AddressTypeEnum | null;
|
||||
}
|
||||
|
||||
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_availableShippingMethods_price {
|
||||
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_availableShippingMethods {
|
||||
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -64,7 +66,7 @@ export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMet
|
|||
__typename: "ShippingMethod";
|
||||
id: string;
|
||||
name: string;
|
||||
price: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod_price | null;
|
||||
price: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod_price;
|
||||
}
|
||||
|
||||
export interface OrderShippingMethodUpdate_orderUpdateShipping_order_shippingPrice_gross {
|
||||
|
@ -571,7 +573,7 @@ export interface OrderShippingMethodUpdate_orderUpdateShipping_order_channel {
|
|||
|
||||
export interface OrderShippingMethodUpdate_orderUpdateShipping_order {
|
||||
__typename: "Order";
|
||||
availableShippingMethods: (OrderShippingMethodUpdate_orderUpdateShipping_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethods[];
|
||||
total: OrderShippingMethodUpdate_orderUpdateShipping_order_total;
|
||||
id: string;
|
||||
shippingMethod: OrderShippingMethodUpdate_orderUpdateShipping_order_shippingMethod | null;
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderUpdate_orderUpdate_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderUpdate_orderUpdate_order_availableShippingMethods_price {
|
||||
export interface OrderUpdate_orderUpdate_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderUpdate_orderUpdate_order_availableShippingMethods {
|
||||
export interface OrderUpdate_orderUpdate_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderUpdate_orderUpdate_order {
|
|||
undiscountedTotal: OrderUpdate_orderUpdate_order_undiscountedTotal;
|
||||
user: OrderUpdate_orderUpdate_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderUpdate_orderUpdate_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderUpdate_orderUpdate_order_shippingMethods[];
|
||||
invoices: (OrderUpdate_orderUpdate_order_invoices | null)[] | null;
|
||||
channel: OrderUpdate_orderUpdate_order_channel;
|
||||
}
|
||||
|
|
|
@ -524,17 +524,19 @@ export interface OrderVoid_orderVoid_order_user {
|
|||
email: string;
|
||||
}
|
||||
|
||||
export interface OrderVoid_orderVoid_order_availableShippingMethods_price {
|
||||
export interface OrderVoid_orderVoid_order_shippingMethods_price {
|
||||
__typename: "Money";
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface OrderVoid_orderVoid_order_availableShippingMethods {
|
||||
export interface OrderVoid_orderVoid_order_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
id: 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 {
|
||||
|
@ -595,7 +597,7 @@ export interface OrderVoid_orderVoid_order {
|
|||
undiscountedTotal: OrderVoid_orderVoid_order_undiscountedTotal;
|
||||
user: OrderVoid_orderVoid_order_user | null;
|
||||
userEmail: string | null;
|
||||
availableShippingMethods: (OrderVoid_orderVoid_order_availableShippingMethods | null)[] | null;
|
||||
shippingMethods: OrderVoid_orderVoid_order_shippingMethods[];
|
||||
invoices: (OrderVoid_orderVoid_order_invoices | null)[] | null;
|
||||
channel: OrderVoid_orderVoid_order_channel;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import {
|
|||
const orderBase: OrderDetails_order = {
|
||||
__typename: "Order",
|
||||
actions: [],
|
||||
availableShippingMethods: [],
|
||||
shippingMethods: [],
|
||||
canFinalize: true,
|
||||
channel: null,
|
||||
billingAddress: {
|
||||
|
|
|
@ -222,7 +222,7 @@ export const OrderDraftDetails: React.FC<OrderDraftDetailsProps> = ({
|
|||
}
|
||||
open={params.action === "edit-shipping"}
|
||||
shippingMethod={order?.shippingMethod?.id}
|
||||
shippingMethods={order?.availableShippingMethods}
|
||||
shippingMethods={order?.shippingMethods}
|
||||
onClose={closeModal}
|
||||
onSubmit={variables =>
|
||||
orderShippingMethodUpdate.mutate({
|
||||
|
|
|
@ -133,7 +133,7 @@ export const OrderNormalDetails: React.FC<OrderNormalDetailsProps> = ({
|
|||
[])
|
||||
]
|
||||
)}
|
||||
shippingMethods={data?.order?.availableShippingMethods || []}
|
||||
shippingMethods={data?.order?.shippingMethods || []}
|
||||
userPermissions={user?.userPermissions || []}
|
||||
onOrderCancel={() => openModal("cancel")}
|
||||
onOrderFulfill={() => navigate(orderFulfillUrl(id))}
|
||||
|
|
|
@ -165,7 +165,7 @@ export const OrderUnconfirmedDetails: React.FC<OrderUnconfirmedDetailsProps> = (
|
|||
.errors || [])
|
||||
]
|
||||
)}
|
||||
shippingMethods={data?.order?.availableShippingMethods || []}
|
||||
shippingMethods={data?.order?.shippingMethods || []}
|
||||
userPermissions={user?.userPermissions || []}
|
||||
onOrderCancel={() => openModal("cancel")}
|
||||
onOrderFulfill={() => navigate(orderFulfillUrl(id))}
|
||||
|
@ -245,7 +245,7 @@ export const OrderUnconfirmedDetails: React.FC<OrderUnconfirmedDetailsProps> = (
|
|||
}
|
||||
open={params.action === "edit-shipping"}
|
||||
shippingMethod={order?.shippingMethod?.id}
|
||||
shippingMethods={order?.availableShippingMethods}
|
||||
shippingMethods={order?.shippingMethods}
|
||||
onClose={closeModal}
|
||||
onSubmit={variables =>
|
||||
orderShippingMethodUpdate.mutate({
|
||||
|
|
|
@ -14,7 +14,7 @@ import CardTitle from "@saleor/components/CardTitle";
|
|||
import RadioGroupField from "@saleor/components/RadioGroupField";
|
||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||
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 { makeStyles } from "@saleor/macaw-ui";
|
||||
import { renderCollection } from "@saleor/misc";
|
||||
|
@ -26,11 +26,13 @@ import { FormattedMessage, useIntl } from "react-intl";
|
|||
export interface ShippingZonePostalCodesProps {
|
||||
disabled: boolean;
|
||||
initialExpanded?: boolean;
|
||||
postalCodes: ShippingMethodFragment_postalCodeRules[] | undefined;
|
||||
postalCodes: ShippingMethodTypeFragment_postalCodeRules[] | undefined;
|
||||
onPostalCodeInclusionChange: (
|
||||
inclusion: PostalCodeRuleInclusionTypeEnum
|
||||
) => void;
|
||||
onPostalCodeDelete: (code: ShippingMethodFragment_postalCodeRules) => void;
|
||||
onPostalCodeDelete: (
|
||||
code: ShippingMethodTypeFragment_postalCodeRules
|
||||
) => void;
|
||||
onPostalCodeRangeAdd: () => void;
|
||||
}
|
||||
|
||||
|
@ -91,7 +93,7 @@ const ShippingZonePostalCodes: React.FC<ShippingZonePostalCodesProps> = ({
|
|||
};
|
||||
|
||||
const getPostalCodeRangeLabel = (
|
||||
postalCodeRange: ShippingMethodFragment_postalCodeRules
|
||||
postalCodeRange: ShippingMethodTypeFragment_postalCodeRules
|
||||
) => {
|
||||
if (!postalCodeRange?.start) {
|
||||
return <Skeleton />;
|
||||
|
|
|
@ -10,7 +10,7 @@ import PageHeader from "@saleor/components/PageHeader";
|
|||
import Savebar from "@saleor/components/Savebar";
|
||||
import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment";
|
||||
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 { validatePrice } from "@saleor/products/utils/validation";
|
||||
import OrderValue from "@saleor/shipping/components/OrderValue";
|
||||
|
@ -34,7 +34,7 @@ export interface ShippingZoneRatesCreatePageProps {
|
|||
shippingChannels: ChannelShippingData[];
|
||||
disabled: boolean;
|
||||
hasChannelChanged?: boolean;
|
||||
postalCodes?: ShippingMethodFragment_postalCodeRules[];
|
||||
postalCodes?: ShippingMethodTypeFragment_postalCodeRules[];
|
||||
channelErrors: ShippingChannelsErrorFragment[];
|
||||
errors: ShippingErrorFragment[];
|
||||
saveButtonBarState: ConfirmButtonTransitionState;
|
||||
|
|
|
@ -11,7 +11,7 @@ import PageHeader from "@saleor/components/PageHeader";
|
|||
import Savebar from "@saleor/components/Savebar";
|
||||
import { ShippingChannelsErrorFragment } from "@saleor/fragments/types/ShippingChannelsErrorFragment";
|
||||
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 { validatePrice } from "@saleor/products/utils/validation";
|
||||
import OrderValue from "@saleor/shipping/components/OrderValue";
|
||||
|
@ -58,7 +58,9 @@ export interface ShippingZoneRatesPageProps
|
|||
inclusion: PostalCodeRuleInclusionTypeEnum
|
||||
) => void;
|
||||
onPostalCodeAssign: () => void;
|
||||
onPostalCodeUnassign: (code: ShippingMethodFragment_postalCodeRules) => void;
|
||||
onPostalCodeUnassign: (
|
||||
code: ShippingMethodTypeFragment_postalCodeRules
|
||||
) => void;
|
||||
onChannelsChange: (data: ChannelShippingData[]) => void;
|
||||
openChannelsModal: () => void;
|
||||
onProductAssign: () => void;
|
||||
|
|
|
@ -1574,7 +1574,7 @@ export const shippingZone: ShippingZone_shippingZone = {
|
|||
privateMetadata: [],
|
||||
shippingMethods: [
|
||||
{
|
||||
__typename: "ShippingMethod",
|
||||
__typename: "ShippingMethodType",
|
||||
channelListings: [
|
||||
{
|
||||
__typename: "ShippingMethodChannelListing",
|
||||
|
@ -1669,7 +1669,7 @@ export const shippingZone: ShippingZone_shippingZone = {
|
|||
type: ShippingMethodTypeEnum.WEIGHT
|
||||
},
|
||||
{
|
||||
__typename: "ShippingMethod",
|
||||
__typename: "ShippingMethodType",
|
||||
channelListings: [],
|
||||
excludedProducts: {
|
||||
__typename: "ProductCountableConnection",
|
||||
|
@ -1734,7 +1734,7 @@ export const shippingZone: ShippingZone_shippingZone = {
|
|||
type: ShippingMethodTypeEnum.WEIGHT
|
||||
},
|
||||
{
|
||||
__typename: "ShippingMethod",
|
||||
__typename: "ShippingMethodType",
|
||||
channelListings: [],
|
||||
excludedProducts: {
|
||||
__typename: "ProductCountableConnection",
|
||||
|
@ -1799,7 +1799,7 @@ export const shippingZone: ShippingZone_shippingZone = {
|
|||
type: ShippingMethodTypeEnum.PRICE
|
||||
},
|
||||
{
|
||||
__typename: "ShippingMethod",
|
||||
__typename: "ShippingMethodType",
|
||||
channelListings: [],
|
||||
excludedProducts: {
|
||||
__typename: "ProductCountableConnection",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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 useNotifier from "@saleor/hooks/useNotifier";
|
||||
import { commonMessages } from "@saleor/intl";
|
||||
|
@ -48,7 +48,7 @@ export const createChannelsChangeHandler = (
|
|||
};
|
||||
|
||||
const getPostalCodeRulesToAdd = (
|
||||
rules: ShippingMethodFragment_postalCodeRules[]
|
||||
rules: ShippingMethodTypeFragment_postalCodeRules[]
|
||||
) =>
|
||||
rules
|
||||
.filter(code => !code.id || code.id === "0")
|
||||
|
@ -63,7 +63,7 @@ const getPostalCodeRulesToAdd = (
|
|||
export function getCreateShippingPriceRateVariables(
|
||||
data: ShippingZoneRateCommonFormData,
|
||||
id: string,
|
||||
addPostalCodeRules: ShippingMethodFragment_postalCodeRules[],
|
||||
addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[],
|
||||
inclusionType: PostalCodeRuleInclusionTypeEnum
|
||||
): CreateShippingRateVariables {
|
||||
const parsedMinDays = parseInt(data.minDays, 10);
|
||||
|
@ -86,7 +86,7 @@ export function getCreateShippingPriceRateVariables(
|
|||
export function getCreateShippingWeightRateVariables(
|
||||
data: ShippingZoneRateCommonFormData,
|
||||
id: string,
|
||||
addPostalCodeRules: ShippingMethodFragment_postalCodeRules[],
|
||||
addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[],
|
||||
inclusionType: PostalCodeRuleInclusionTypeEnum
|
||||
): CreateShippingRateVariables {
|
||||
const parsedMinValue = parseFloat(data.minValue);
|
||||
|
@ -115,7 +115,7 @@ export function getUpdateShippingPriceRateVariables(
|
|||
data: ShippingZoneRateCommonFormData,
|
||||
id: string,
|
||||
rateId: string,
|
||||
addPostalCodeRules: ShippingMethodFragment_postalCodeRules[],
|
||||
addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[],
|
||||
deletePostalCodeRules: string[]
|
||||
): UpdateShippingRateVariables {
|
||||
const parsedMinDays = parseInt(data.minDays, 10);
|
||||
|
@ -143,7 +143,7 @@ export function getUpdateShippingWeightRateVariables(
|
|||
data: ShippingZoneRateCommonFormData,
|
||||
id: string,
|
||||
rateId: string,
|
||||
addPostalCodeRules: ShippingMethodFragment_postalCodeRules[],
|
||||
addPostalCodeRules: ShippingMethodTypeFragment_postalCodeRules[],
|
||||
deletePostalCodeRules: string[]
|
||||
): UpdateShippingRateVariables {
|
||||
const parsedMinValue = parseFloat(data.minValue);
|
||||
|
@ -201,7 +201,7 @@ export function getShippingMethodChannelVariables(
|
|||
export function useShippingRateCreator(
|
||||
shippingZoneId: string,
|
||||
type: ShippingMethodTypeEnum,
|
||||
postalCodes: ShippingMethodFragment_postalCodeRules[],
|
||||
postalCodes: ShippingMethodTypeFragment_postalCodeRules[],
|
||||
inclusionType: PostalCodeRuleInclusionTypeEnum
|
||||
) {
|
||||
const intl = useIntl();
|
||||
|
|
|
@ -3,7 +3,7 @@ import {
|
|||
shippingErrorFragment
|
||||
} from "@saleor/fragments/errors";
|
||||
import {
|
||||
shippingMethodFragment,
|
||||
shippingMethodTypeFragment,
|
||||
shippingZoneDetailsFragment
|
||||
} from "@saleor/fragments/shipping";
|
||||
import { countryFragment } from "@saleor/fragments/taxes";
|
||||
|
@ -157,14 +157,14 @@ export const useShippingZoneUpdate = makeMutation<
|
|||
|
||||
const updateShippingRate = gql`
|
||||
${shippingErrorFragment}
|
||||
${shippingMethodFragment}
|
||||
${shippingMethodTypeFragment}
|
||||
mutation UpdateShippingRate($id: ID!, $input: ShippingPriceInput!) {
|
||||
shippingPriceUpdate(id: $id, input: $input) {
|
||||
errors {
|
||||
...ShippingErrorFragment
|
||||
}
|
||||
shippingMethod {
|
||||
...ShippingMethodFragment
|
||||
...ShippingMethodTypeFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ export const useShippingRateUpdate = makeMutation<
|
|||
|
||||
const createShippingRate = gql`
|
||||
${shippingErrorFragment}
|
||||
${shippingMethodFragment}
|
||||
${shippingMethodTypeFragment}
|
||||
${shippingZoneDetailsFragment}
|
||||
mutation CreateShippingRate($input: ShippingPriceInput!) {
|
||||
shippingPriceCreate(input: $input) {
|
||||
|
@ -187,7 +187,7 @@ const createShippingRate = gql`
|
|||
...ShippingZoneDetailsFragment
|
||||
}
|
||||
shippingMethod {
|
||||
...ShippingMethodFragment
|
||||
...ShippingMethodTypeFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -233,14 +233,14 @@ export const useShippingRateBulkDelete = makeMutation<
|
|||
|
||||
export const shippingMethodChannelListingUpdate = gql`
|
||||
${shippingChannelsErrorFragment}
|
||||
${shippingMethodFragment}
|
||||
${shippingMethodTypeFragment}
|
||||
mutation ShippingMethodChannelListingUpdate(
|
||||
$id: ID!
|
||||
$input: ShippingMethodChannelListingInput!
|
||||
) {
|
||||
shippingMethodChannelListingUpdate(id: $id, input: $input) {
|
||||
shippingMethod {
|
||||
...ShippingMethodFragment
|
||||
...ShippingMethodTypeFragment
|
||||
}
|
||||
errors {
|
||||
...ShippingChannelsErrorFragment
|
||||
|
|
|
@ -100,7 +100,7 @@ export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMet
|
|||
}
|
||||
|
||||
export interface CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_postalCodeRules | null)[] | null;
|
||||
metadata: (CreateShippingRate_shippingPriceCreate_shippingZone_shippingMethods_metadata | null)[];
|
||||
|
@ -201,7 +201,7 @@ export interface CreateShippingRate_shippingPriceCreate_shippingMethod_channelLi
|
|||
}
|
||||
|
||||
export interface CreateShippingRate_shippingPriceCreate_shippingMethod {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (CreateShippingRate_shippingPriceCreate_shippingMethod_postalCodeRules | null)[] | null;
|
||||
metadata: (CreateShippingRate_shippingPriceCreate_shippingMethod_metadata | null)[];
|
||||
|
|
|
@ -100,7 +100,7 @@ export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMet
|
|||
}
|
||||
|
||||
export interface DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_postalCodeRules | null)[] | null;
|
||||
metadata: (DeleteShippingRate_shippingPriceDelete_shippingZone_shippingMethods_metadata | null)[];
|
||||
|
|
|
@ -76,7 +76,7 @@ export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListing
|
|||
}
|
||||
|
||||
export interface ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_postalCodeRules | null)[] | null;
|
||||
metadata: (ShippingMethodChannelListingUpdate_shippingMethodChannelListingUpdate_shippingMethod_metadata | null)[];
|
||||
|
|
|
@ -125,7 +125,7 @@ export interface ShippingZone_shippingZone_shippingMethods_excludedProducts {
|
|||
}
|
||||
|
||||
export interface ShippingZone_shippingZone_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (ShippingZone_shippingZone_shippingMethods_postalCodeRules | null)[] | null;
|
||||
metadata: (ShippingZone_shippingZone_shippingMethods_metadata | null)[];
|
||||
|
|
|
@ -125,7 +125,7 @@ export interface ShippingZoneDetails_shippingZone_shippingMethods_excludedProduc
|
|||
}
|
||||
|
||||
export interface ShippingZoneDetails_shippingZone_shippingMethods {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (ShippingZoneDetails_shippingZone_shippingMethods_postalCodeRules | null)[] | null;
|
||||
metadata: (ShippingZoneDetails_shippingZone_shippingMethods_metadata | null)[];
|
||||
|
|
|
@ -82,7 +82,7 @@ export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod_channelLi
|
|||
}
|
||||
|
||||
export interface UpdateShippingRate_shippingPriceUpdate_shippingMethod {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
postalCodeRules: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_postalCodeRules | null)[] | null;
|
||||
metadata: (UpdateShippingRate_shippingPriceUpdate_shippingMethod_metadata | null)[];
|
||||
|
|
|
@ -16,7 +16,7 @@ const props: OrderShippingMethodEditDialogProps = {
|
|||
onSubmit: () => undefined,
|
||||
open: true,
|
||||
shippingMethod: null,
|
||||
shippingMethods: order.availableShippingMethods
|
||||
shippingMethods: order.shippingMethods
|
||||
};
|
||||
|
||||
storiesOf("Orders / OrderShippingMethodEditDialog", module)
|
||||
|
|
|
@ -14,7 +14,7 @@ export interface ShippingMethodTranslationDetails_translation_ProductTranslatabl
|
|||
}
|
||||
|
||||
export interface ShippingMethodTranslationDetails_translation_ShippingMethodTranslatableContent_shippingMethod {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ export interface ShippingMethodTranslations_translations_edges_node_ProductTrans
|
|||
}
|
||||
|
||||
export interface ShippingMethodTranslations_translations_edges_node_ShippingMethodTranslatableContent_shippingMethod {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ export interface UpdateShippingMethodTranslations_shippingPriceTranslate_shippin
|
|||
}
|
||||
|
||||
export interface UpdateShippingMethodTranslations_shippingPriceTranslate_shippingMethod {
|
||||
__typename: "ShippingMethod";
|
||||
__typename: "ShippingMethodType";
|
||||
id: string;
|
||||
name: string;
|
||||
description: any | null;
|
||||
|
|
|
@ -1860,6 +1860,7 @@ export enum WebhookEventTypeAsyncEnum {
|
|||
export enum WebhookEventTypeEnum {
|
||||
ANY_EVENTS = "ANY_EVENTS",
|
||||
CHECKOUT_CREATED = "CHECKOUT_CREATED",
|
||||
CHECKOUT_FILTER_SHIPPING_METHODS = "CHECKOUT_FILTER_SHIPPING_METHODS",
|
||||
CHECKOUT_UPDATED = "CHECKOUT_UPDATED",
|
||||
CUSTOMER_CREATED = "CUSTOMER_CREATED",
|
||||
CUSTOMER_UPDATED = "CUSTOMER_UPDATED",
|
||||
|
@ -1875,6 +1876,7 @@ export enum WebhookEventTypeEnum {
|
|||
ORDER_CANCELLED = "ORDER_CANCELLED",
|
||||
ORDER_CONFIRMED = "ORDER_CONFIRMED",
|
||||
ORDER_CREATED = "ORDER_CREATED",
|
||||
ORDER_FILTER_SHIPPING_METHODS = "ORDER_FILTER_SHIPPING_METHODS",
|
||||
ORDER_FULFILLED = "ORDER_FULFILLED",
|
||||
ORDER_FULLY_PAID = "ORDER_FULLY_PAID",
|
||||
ORDER_UPDATED = "ORDER_UPDATED",
|
||||
|
|
|
@ -28,7 +28,7 @@ export interface UpdateMetadata_updateMetadata_item_privateMetadata {
|
|||
}
|
||||
|
||||
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)[];
|
||||
privateMetadata: (UpdateMetadata_updateMetadata_item_privateMetadata | null)[];
|
||||
id: string;
|
||||
|
@ -59,7 +59,7 @@ export interface UpdateMetadata_deleteMetadata_item_privateMetadata {
|
|||
}
|
||||
|
||||
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)[];
|
||||
privateMetadata: (UpdateMetadata_deleteMetadata_item_privateMetadata | null)[];
|
||||
id: string;
|
||||
|
|
|
@ -28,7 +28,7 @@ export interface UpdatePrivateMetadata_updatePrivateMetadata_item_privateMetadat
|
|||
}
|
||||
|
||||
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)[];
|
||||
privateMetadata: (UpdatePrivateMetadata_updatePrivateMetadata_item_privateMetadata | null)[];
|
||||
id: string;
|
||||
|
@ -59,7 +59,7 @@ export interface UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadat
|
|||
}
|
||||
|
||||
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)[];
|
||||
privateMetadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadata | null)[];
|
||||
id: string;
|
||||
|
|
Loading…
Reference in a new issue