diff --git a/schema.graphql b/schema.graphql index bae1821a8..6d2b7f1d3 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1245,7 +1245,6 @@ type CollectionTranslation implements Node { type CollectionUpdate { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") collectionErrors: [CollectionError!]! - productErrors: [ProductError!]! collection: Collection } @@ -1799,6 +1798,7 @@ input DraftOrderCreateInput { voucher: ID customerNote: String channel: ID + redirectUrl: String lines: [OrderLineCreateInput] } @@ -1818,6 +1818,7 @@ input DraftOrderInput { voucher: ID customerNote: String channel: ID + redirectUrl: String } type DraftOrderLineDelete { @@ -2585,7 +2586,6 @@ type Mutation { productUpdate(id: ID!, input: ProductInput!): ProductUpdate productTranslate(id: ID!, input: TranslationInput!, languageCode: LanguageCodeEnum!): ProductTranslate productChannelListingUpdate(id: ID!, input: ProductChannelListingUpdateInput!): ProductChannelListingUpdate - productSetAvailabilityForPurchase(isAvailable: Boolean!, productId: ID!, startDate: Date): ProductSetAvailabilityForPurchase productImageCreate(input: ProductImageCreateInput!): ProductImageCreate productVariantReorder(moves: [ReorderInput]!, productId: ID!): ProductVariantReorder productImageDelete(id: ID!): ProductImageDelete @@ -2596,11 +2596,7 @@ type Mutation { productTypeDelete(id: ID!): ProductTypeDelete productTypeBulkDelete(ids: [ID]!): ProductTypeBulkDelete productTypeUpdate(id: ID!, input: ProductTypeInput!): ProductTypeUpdate - productTypeReorderAttributes(moves: [ReorderInput]!, productTypeId: ID!, type: AttributeTypeEnum!): ProductTypeReorderAttributes - productTypeUpdateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdateMeta @deprecated(reason: "Use the `updateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeClearMetadata(id: ID!, input: MetaPath!): ProductTypeClearMeta @deprecated(reason: "Use the `deleteMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeUpdatePrivateMetadata(id: ID!, input: MetaInput!): ProductTypeUpdatePrivateMeta @deprecated(reason: "Use the `updatePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") - productTypeClearPrivateMetadata(id: ID!, input: MetaPath!): ProductTypeClearPrivateMeta @deprecated(reason: "Use the `deletePrivateMetadata` mutation instead. This field will be removed after 2020-07-31.") + productTypeReorderAttributes(moves: [ReorderInput]!, productTypeId: ID!, type: ProductAttributeType!): ProductTypeReorderAttributes digitalContentCreate(input: DigitalContentUploadInput!, variantId: ID!): DigitalContentCreate digitalContentDelete(variantId: ID!): DigitalContentDelete digitalContentUpdate(input: DigitalContentInput!, variantId: ID!): DigitalContentUpdate @@ -2775,11 +2771,6 @@ type Mutation { userAvatarUpdate(image: Upload!): UserAvatarUpdate userAvatarDelete: UserAvatarDelete userBulkSetActive(ids: [ID]!, isActive: Boolean!): UserBulkSetActive - serviceAccountCreate(input: ServiceAccountInput!): ServiceAccountCreate @deprecated(reason: "Use the `appCreate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountUpdate(id: ID!, input: ServiceAccountInput!): ServiceAccountUpdate @deprecated(reason: "Use the `appUpdate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountDelete(id: ID!): ServiceAccountDelete @deprecated(reason: "Use the `appDelete` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountTokenCreate(input: ServiceAccountTokenInput!): ServiceAccountTokenCreate @deprecated(reason: "Use the `appTokenCreate` mutation instead. This field will be removed after 2020-07-31.") - serviceAccountTokenDelete(id: ID!): ServiceAccountTokenDelete @deprecated(reason: "Use the `appTokenDelete` mutation instead. This field will be removed after 2020-07-31.") permissionGroupCreate(input: PermissionGroupCreateInput!): PermissionGroupCreate permissionGroupUpdate(id: ID!, input: PermissionGroupUpdateInput!): PermissionGroupUpdate permissionGroupDelete(id: ID!): PermissionGroupDelete @@ -2830,6 +2821,7 @@ type Order implements Node & ObjectWithMetadata { displayGrossPrices: Boolean! customerNote: String! weight: Weight + redirectUrl: String privateMetadata: [MetadataItem]! metadata: [MetadataItem]! fulfillments: [Fulfillment]! @@ -3754,6 +3746,7 @@ type ProductChannelListing implements Node { purchaseCost: MoneyRange margin: Margin isAvailableForPurchase: Boolean + pricing: ProductPricingInfo } input ProductChannelListingAddInput { @@ -4339,7 +4332,7 @@ type Query { exportFile(id: ID!): ExportFile exportFiles(filter: ExportFileFilterInput, sortBy: ExportFileSortingInput, before: String, after: String, first: Int, last: Int): ExportFileCountableConnection taxTypes: [TaxType] - checkout(token: UUID, channel: String): Checkout + checkout(token: UUID): Checkout checkouts(channel: String, before: String, after: String, first: Int, last: Int): CheckoutCountableConnection checkoutLine(id: ID): CheckoutLine checkoutLines(before: String, after: String, first: Int, last: Int): CheckoutLineCountableConnection @@ -4546,92 +4539,6 @@ input SeoInput { description: String } -type ServiceAccount implements Node & ObjectWithMetadata { - id: ID! - name: String - created: DateTime - isActive: Boolean - permissions: [Permission] - tokens: [ServiceAccountToken] - privateMetadata: [MetadataItem]! - metadata: [MetadataItem]! -} - -type ServiceAccountCountableConnection { - pageInfo: PageInfo! - edges: [ServiceAccountCountableEdge!]! - totalCount: Int -} - -type ServiceAccountCountableEdge { - node: ServiceAccount! - cursor: String! -} - -type ServiceAccountCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - authToken: String - accountErrors: [AccountError!]! - serviceAccount: ServiceAccount -} - -type ServiceAccountDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - accountErrors: [AccountError!]! - serviceAccount: ServiceAccount -} - -input ServiceAccountFilterInput { - search: String - isActive: Boolean -} - -input ServiceAccountInput { - name: String - isActive: Boolean - permissions: [PermissionEnum] -} - -enum ServiceAccountSortField { - NAME - CREATION_DATE -} - -input ServiceAccountSortingInput { - direction: OrderDirection! - field: ServiceAccountSortField! -} - -type ServiceAccountToken implements Node { - name: String - authToken: String - id: ID! -} - -type ServiceAccountTokenCreate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - authToken: String - accountErrors: [AccountError!]! - serviceAccountToken: ServiceAccountToken -} - -type ServiceAccountTokenDelete { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - accountErrors: [AccountError!]! - serviceAccountToken: ServiceAccountToken -} - -input ServiceAccountTokenInput { - name: String - serviceAccount: ID! -} - -type ServiceAccountUpdate { - errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") - accountErrors: [AccountError!]! - serviceAccount: ServiceAccount -} - type SetPassword { errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.") token: String @@ -5255,7 +5162,8 @@ type User implements Node & ObjectWithMetadata { privateMetadata: [MetadataItem]! metadata: [MetadataItem]! addresses: [Address] - checkout: Checkout + checkout: Checkout @deprecated(reason: "Use the `checkout_tokens` field to fetch the user checkouts.") + checkoutTokens(channel: String): [UUID!] giftCards(before: String, after: String, first: Int, last: Int): GiftCardCountableConnection orders(before: String, after: String, first: Int, last: Int): OrderCountableConnection permissions: [Permission] @deprecated(reason: "Will be removed in Saleor 2.11.Use the `userPermissions` instead.") @@ -5756,8 +5664,8 @@ enum WeightUnitsEnum { scalar _Any -union _Entity = Address | User | Group | ServiceAccount | App | ProductVariant | Product | ProductType | Collection | Category | ProductImage | PageType +union _Entity = Address | User | Group | App | ProductVariant | Product | ProductType | Collection | Category | ProductImage | PageType type _Service { sdl: String -} \ No newline at end of file +} diff --git a/src/channels/types/Channel.ts b/src/channels/types/Channel.ts index 13dec0357..e0cbc55c6 100644 --- a/src/channels/types/Channel.ts +++ b/src/channels/types/Channel.ts @@ -8,10 +8,10 @@ export interface Channel_channel { __typename: "Channel"; - name: string; - slug: string; id: string; isActive: boolean; + name: string; + slug: string; currencyCode: string; } diff --git a/src/channels/types/ChannelActivate.ts b/src/channels/types/ChannelActivate.ts index ce74a8593..d011227a9 100644 --- a/src/channels/types/ChannelActivate.ts +++ b/src/channels/types/ChannelActivate.ts @@ -10,10 +10,10 @@ import { ChannelErrorCode } from "./../../types/globalTypes"; export interface ChannelActivate_channelActivate_channel { __typename: "Channel"; - name: string; - slug: string; id: string; isActive: boolean; + name: string; + slug: string; currencyCode: string; } diff --git a/src/channels/types/ChannelCreate.ts b/src/channels/types/ChannelCreate.ts index 3874c967c..5437a1d29 100644 --- a/src/channels/types/ChannelCreate.ts +++ b/src/channels/types/ChannelCreate.ts @@ -10,10 +10,10 @@ import { ChannelCreateInput, ChannelErrorCode } from "./../../types/globalTypes" export interface ChannelCreate_channelCreate_channel { __typename: "Channel"; - name: string; - slug: string; id: string; isActive: boolean; + name: string; + slug: string; currencyCode: string; } diff --git a/src/channels/types/ChannelDeactivate.ts b/src/channels/types/ChannelDeactivate.ts index 3d6dfc641..d4bee0c93 100644 --- a/src/channels/types/ChannelDeactivate.ts +++ b/src/channels/types/ChannelDeactivate.ts @@ -10,10 +10,10 @@ import { ChannelErrorCode } from "./../../types/globalTypes"; export interface ChannelDeactivate_channelDeactivate_channel { __typename: "Channel"; - name: string; - slug: string; id: string; isActive: boolean; + name: string; + slug: string; currencyCode: string; } diff --git a/src/channels/types/ChannelDelete.ts b/src/channels/types/ChannelDelete.ts index 07a5f85da..7dbcef156 100644 --- a/src/channels/types/ChannelDelete.ts +++ b/src/channels/types/ChannelDelete.ts @@ -10,10 +10,10 @@ import { ChannelDeleteInput, ChannelErrorCode } from "./../../types/globalTypes" export interface ChannelDelete_channelDelete_channel { __typename: "Channel"; - name: string; - slug: string; id: string; isActive: boolean; + name: string; + slug: string; currencyCode: string; } diff --git a/src/channels/types/ChannelUpdate.ts b/src/channels/types/ChannelUpdate.ts index c730281ed..26ef58efd 100644 --- a/src/channels/types/ChannelUpdate.ts +++ b/src/channels/types/ChannelUpdate.ts @@ -10,10 +10,10 @@ import { ChannelUpdateInput, ChannelErrorCode } from "./../../types/globalTypes" export interface ChannelUpdate_channelUpdate_channel { __typename: "Channel"; - name: string; - slug: string; id: string; isActive: boolean; + name: string; + slug: string; currencyCode: string; } diff --git a/src/channels/types/Channels.ts b/src/channels/types/Channels.ts index faff84c7f..eb551cf26 100644 --- a/src/channels/types/Channels.ts +++ b/src/channels/types/Channels.ts @@ -8,10 +8,10 @@ export interface Channels_channels { __typename: "Channel"; - name: string; - slug: string; id: string; isActive: boolean; + name: string; + slug: string; currencyCode: string; } diff --git a/src/fragments/types/MetadataFragment.ts b/src/fragments/types/MetadataFragment.ts index fe445c9b6..4c6128e0b 100644 --- a/src/fragments/types/MetadataFragment.ts +++ b/src/fragments/types/MetadataFragment.ts @@ -19,7 +19,7 @@ export interface MetadataFragment_privateMetadata { } export interface MetadataFragment { - __typename: "ServiceAccount" | "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice"; + __typename: "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice"; metadata: (MetadataFragment_metadata | null)[]; privateMetadata: (MetadataFragment_privateMetadata | null)[]; } diff --git a/src/products/types/ProductSetAvailabilityForPurchase.ts b/src/products/types/ProductSetAvailabilityForPurchase.ts deleted file mode 100644 index 8a5fdeebb..000000000 --- a/src/products/types/ProductSetAvailabilityForPurchase.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// This file was automatically generated and should not be edited. - -import { ProductErrorCode } from "./../../types/globalTypes"; - -// ==================================================== -// GraphQL mutation operation: ProductSetAvailabilityForPurchase -// ==================================================== - -export interface ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase_product { - __typename: "Product"; - id: string; - availableForPurchase: any | null; - isAvailableForPurchase: boolean | null; -} - -export interface ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase_errors { - __typename: "ProductError"; - code: ProductErrorCode; - field: string | null; - message: string | null; -} - -export interface ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase { - __typename: "ProductSetAvailabilityForPurchase"; - product: ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase_product | null; - errors: ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase_errors[]; -} - -export interface ProductSetAvailabilityForPurchase { - productSetAvailabilityForPurchase: ProductSetAvailabilityForPurchase_productSetAvailabilityForPurchase | null; -} - -export interface ProductSetAvailabilityForPurchaseVariables { - isAvailable: boolean; - productId: string; - startDate?: any | null; -} diff --git a/src/types/globalTypes.ts b/src/types/globalTypes.ts index df9a8920c..6c8982011 100644 --- a/src/types/globalTypes.ts +++ b/src/types/globalTypes.ts @@ -1210,6 +1210,7 @@ export interface DraftOrderCreateInput { voucher?: string | null; customerNote?: string | null; channel?: string | null; + redirectUrl?: string | null; lines?: (OrderLineCreateInput | null)[] | null; } @@ -1223,6 +1224,7 @@ export interface DraftOrderInput { voucher?: string | null; customerNote?: string | null; channel?: string | null; + redirectUrl?: string | null; } export interface ExportInfoInput { @@ -1367,10 +1369,6 @@ export interface PageCreateInput { pageType: string; } -export interface PageFilterInput { - search?: string | null; -} - export interface PageInput { slug?: string | null; title?: string | null; @@ -1460,6 +1458,11 @@ export interface PriceRangeInput { lte?: number | null; } +export interface ProductAttributeAssignInput { + id: string; + type: ProductAttributeType; +} + export interface ProductChannelListingAddInput { channelId: string; isPublished?: boolean | null; @@ -1474,11 +1477,6 @@ export interface ProductChannelListingUpdateInput { removeChannels?: string[] | null; } -export interface ProductAttributeAssignInput { - id: string; - type: ProductAttributeType; -} - export interface ProductCreateInput { attributes?: (AttributeValueInput | null)[] | null; category?: string | null; diff --git a/src/utils/metadata/types/UpdateMetadata.ts b/src/utils/metadata/types/UpdateMetadata.ts index 7157891d4..cd763ddc6 100644 --- a/src/utils/metadata/types/UpdateMetadata.ts +++ b/src/utils/metadata/types/UpdateMetadata.ts @@ -38,7 +38,7 @@ export interface UpdateMetadata_deleteMetadata_item_privateMetadata { } export interface UpdateMetadata_deleteMetadata_item { - __typename: "ServiceAccount" | "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice"; + __typename: "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice"; metadata: (UpdateMetadata_deleteMetadata_item_metadata | null)[]; privateMetadata: (UpdateMetadata_deleteMetadata_item_privateMetadata | null)[]; id: string; diff --git a/src/utils/metadata/types/UpdatePrivateMetadata.ts b/src/utils/metadata/types/UpdatePrivateMetadata.ts index ccb7ed723..db0b72fbe 100644 --- a/src/utils/metadata/types/UpdatePrivateMetadata.ts +++ b/src/utils/metadata/types/UpdatePrivateMetadata.ts @@ -38,7 +38,7 @@ export interface UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadat } export interface UpdatePrivateMetadata_deletePrivateMetadata_item { - __typename: "ServiceAccount" | "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice"; + __typename: "App" | "ShippingZone" | "ShippingMethod" | "Product" | "ProductType" | "Attribute" | "Category" | "ProductVariant" | "DigitalContent" | "Collection" | "Page" | "PageType" | "User" | "Checkout" | "Order" | "Fulfillment" | "Invoice"; metadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_metadata | null)[]; privateMetadata: (UpdatePrivateMetadata_deletePrivateMetadata_item_privateMetadata | null)[]; id: string;