Fix types

This commit is contained in:
dominik-zeglen 2019-11-27 11:00:36 +01:00
parent 01b6193b3e
commit 3665daf0fc
14 changed files with 187 additions and 33 deletions

View file

@ -322,6 +322,13 @@ input AttributeSortingInput {
direction: OrderDirection! direction: OrderDirection!
} }
type AttributeTranslatableContent implements Node {
id: ID!
name: String!
translation(languageCode: LanguageCodeEnum!): AttributeTranslation
attribute: Attribute
}
type AttributeTranslate { type AttributeTranslate {
errors: [Error!] errors: [Error!]
attribute: Attribute attribute: Attribute
@ -414,6 +421,13 @@ input AttributeValueInput {
values: [String]! values: [String]!
} }
type AttributeValueTranslatableContent implements Node {
id: ID!
name: String!
translation(languageCode: LanguageCodeEnum!): AttributeValueTranslation
attributeValue: AttributeValue
}
type AttributeValueTranslate { type AttributeValueTranslate {
errors: [Error!] errors: [Error!]
attributeValue: AttributeValue attributeValue: AttributeValue
@ -486,9 +500,9 @@ type Category implements Node {
seoDescription: String seoDescription: String
id: ID! id: ID!
name: String! name: String!
slug: String!
description: String! description: String!
descriptionJson: JSONString! descriptionJson: JSONString!
slug: String!
parent: Category parent: Category
level: Int! level: Int!
privateMeta: [MetaStore]! privateMeta: [MetaStore]!
@ -556,6 +570,17 @@ input CategoryInput {
backgroundImageAlt: String backgroundImageAlt: String
} }
type CategoryTranslatableContent implements Node {
seoTitle: String
seoDescription: String
id: ID!
name: String!
description: String!
descriptionJson: JSONString!
translation(languageCode: LanguageCodeEnum!): CategoryTranslation
category: Category
}
type CategoryTranslate { type CategoryTranslate {
errors: [Error!] errors: [Error!]
category: Category category: Category
@ -809,15 +834,15 @@ type ChoiceValue {
} }
type Collection implements Node { type Collection implements Node {
publicationDate: Date
isPublished: Boolean!
seoTitle: String seoTitle: String
seoDescription: String seoDescription: String
id: ID! id: ID!
name: String! name: String!
slug: String!
description: String! description: String!
descriptionJson: JSONString! descriptionJson: JSONString!
publicationDate: Date
isPublished: Boolean!
slug: String!
privateMeta: [MetaStore]! privateMeta: [MetaStore]!
meta: [MetaStore]! meta: [MetaStore]!
products(before: String, after: String, first: Int, last: Int): ProductCountableConnection products(before: String, after: String, first: Int, last: Int): ProductCountableConnection
@ -925,6 +950,17 @@ type CollectionReorderProducts {
productErrors: [ProductError!] productErrors: [ProductError!]
} }
type CollectionTranslatableContent implements Node {
seoTitle: String
seoDescription: String
id: ID!
name: String!
description: String!
descriptionJson: JSONString!
translation(languageCode: LanguageCodeEnum!): CollectionTranslation
collection: Collection
}
type CollectionTranslate { type CollectionTranslate {
errors: [Error!] errors: [Error!]
collection: Collection collection: Collection
@ -968,7 +1004,7 @@ type ConfigurationItem {
input ConfigurationItemInput { input ConfigurationItemInput {
name: String! name: String!
value: String! value: String
} }
enum ConfigurationTypeFieldEnum { enum ConfigurationTypeFieldEnum {
@ -1483,6 +1519,7 @@ input DraftOrderCreateInput {
shippingAddress: AddressInput shippingAddress: AddressInput
shippingMethod: ID shippingMethod: ID
voucher: ID voucher: ID
customerNote: String
lines: [OrderLineCreateInput] lines: [OrderLineCreateInput]
} }
@ -1500,6 +1537,7 @@ input DraftOrderInput {
shippingAddress: AddressInput shippingAddress: AddressInput
shippingMethod: ID shippingMethod: ID
voucher: ID voucher: ID
customerNote: String
} }
type DraftOrderLineDelete { type DraftOrderLineDelete {
@ -1560,7 +1598,7 @@ type Fulfillment implements Node {
fulfillmentOrder: Int! fulfillmentOrder: Int!
status: FulfillmentStatus! status: FulfillmentStatus!
trackingNumber: String! trackingNumber: String!
shippingDate: DateTime! created: DateTime!
privateMeta: [MetaStore]! privateMeta: [MetaStore]!
meta: [MetaStore]! meta: [MetaStore]!
lines: [FulfillmentLine] lines: [FulfillmentLine]
@ -1876,9 +1914,9 @@ input MenuInput {
type MenuItem implements Node { type MenuItem implements Node {
id: ID! id: ID!
name: String!
sortOrder: Int @deprecated(reason: "Will be dropped in 2.10 and is deprecated since 2.9: use the position in list instead and relative calculus to determine shift position.") sortOrder: Int @deprecated(reason: "Will be dropped in 2.10 and is deprecated since 2.9: use the position in list instead and relative calculus to determine shift position.")
menu: Menu! menu: Menu!
name: String!
parent: MenuItem parent: MenuItem
category: Category category: Category
collection: Collection collection: Collection
@ -1952,6 +1990,13 @@ input MenuItemMoveInput {
sortOrder: Int sortOrder: Int
} }
type MenuItemTranslatableContent implements Node {
id: ID!
name: String!
translation(languageCode: LanguageCodeEnum!): MenuItemTranslation
menuItem: MenuItem
}
type MenuItemTranslate { type MenuItemTranslate {
errors: [Error!] errors: [Error!]
menuItem: MenuItem menuItem: MenuItem
@ -2006,7 +2051,7 @@ type MetaStore {
type Money { type Money {
currency: String! currency: String!
amount: Float! amount: Float!
localized: String! localized: String! @deprecated(reason: "DEPRECATED: Will be removed in Saleor 2.11. Price formatting according to the current locale should be handled by the frontend client.")
} }
type MoneyRange { type MoneyRange {
@ -2586,15 +2631,15 @@ type OrderVoid {
} }
type Page implements Node { type Page implements Node {
publicationDate: Date
isPublished: Boolean!
seoTitle: String seoTitle: String
seoDescription: String seoDescription: String
id: ID! id: ID!
slug: String!
title: String! title: String!
content: String! content: String!
contentJson: JSONString! contentJson: JSONString!
publicationDate: Date
isPublished: Boolean!
slug: String!
created: DateTime! created: DateTime!
translation(languageCode: LanguageCodeEnum!): PageTranslation translation(languageCode: LanguageCodeEnum!): PageTranslation
} }
@ -2651,9 +2696,20 @@ input PageInput {
seo: SeoInput seo: SeoInput
} }
type PageTranslatableContent implements Node {
seoTitle: String
seoDescription: String
id: ID!
title: String!
content: String!
contentJson: JSONString!
translation(languageCode: LanguageCodeEnum!): PageTranslation
page: Page
}
type PageTranslate { type PageTranslate {
errors: [Error!] errors: [Error!]
page: Page page: PageTranslatableContent
} }
type PageTranslation implements Node { type PageTranslation implements Node {
@ -2854,15 +2910,15 @@ input PriceRangeInput {
type Product implements Node { type Product implements Node {
id: ID! id: ID!
publicationDate: Date
isPublished: Boolean!
seoTitle: String seoTitle: String
seoDescription: String seoDescription: String
productType: ProductType!
name: String! name: String!
description: String! description: String!
descriptionJson: JSONString! descriptionJson: JSONString!
category: Category! publicationDate: Date
isPublished: Boolean!
productType: ProductType!
category: Category
updatedAt: DateTime updatedAt: DateTime
chargeTaxes: Boolean! chargeTaxes: Boolean!
weight: Weight weight: Weight
@ -2979,6 +3035,7 @@ input ProductFilterInput {
isPublished: Boolean isPublished: Boolean
collections: [ID] collections: [ID]
categories: [ID] categories: [ID]
hasCategory: Boolean
price: PriceRangeInput price: PriceRangeInput
attributes: [AttributeInput] attributes: [AttributeInput]
stockAvailability: StockAvailability stockAvailability: StockAvailability
@ -3082,6 +3139,17 @@ type ProductPricingInfo {
priceRangeLocalCurrency: TaxedMoneyRange priceRangeLocalCurrency: TaxedMoneyRange
} }
type ProductTranslatableContent implements Node {
id: ID!
seoTitle: String
seoDescription: String
name: String!
description: String!
descriptionJson: JSONString!
translation(languageCode: LanguageCodeEnum!): ProductTranslation
product: Product
}
type ProductTranslate { type ProductTranslate {
errors: [Error!] errors: [Error!]
product: Product product: Product
@ -3226,8 +3294,8 @@ type ProductUpdatePrivateMeta {
type ProductVariant implements Node { type ProductVariant implements Node {
id: ID! id: ID!
sku: String!
name: String! name: String!
sku: String!
product: Product! product: Product!
trackInventory: Boolean! trackInventory: Boolean!
quantityAllocated: Int! quantityAllocated: Int!
@ -3330,6 +3398,13 @@ input ProductVariantInput {
weight: WeightScalar weight: WeightScalar
} }
type ProductVariantTranslatableContent implements Node {
id: ID!
name: String!
translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation
productVariant: ProductVariant
}
type ProductVariantTranslate { type ProductVariantTranslate {
errors: [Error!] errors: [Error!]
productVariant: ProductVariant productVariant: ProductVariant
@ -3365,6 +3440,7 @@ type Query {
webhookEvents: [WebhookEvent] webhookEvents: [WebhookEvent]
webhookSamplePayload(eventType: WebhookEventTypeEnum!): JSONString webhookSamplePayload(eventType: WebhookEventTypeEnum!): JSONString
translations(kind: TranslatableKinds!, before: String, after: String, first: Int, last: Int): TranslatableItemConnection translations(kind: TranslatableKinds!, before: String, after: String, first: Int, last: Int): TranslatableItemConnection
translation(id: ID!, kind: TranslatableKinds!): TranslatableItem
shop: Shop shop: Shop
shippingZone(id: ID!): ShippingZone shippingZone(id: ID!): ShippingZone
shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection
@ -3418,7 +3494,6 @@ type Query {
serviceAccounts(filter: ServiceAccountFilterInput, before: String, after: String, first: Int, last: Int): ServiceAccountCountableConnection serviceAccounts(filter: ServiceAccountFilterInput, before: String, after: String, first: Int, last: Int): ServiceAccountCountableConnection
serviceAccount(id: ID!): ServiceAccount serviceAccount(id: ID!): ServiceAccount
user(id: ID!): User user(id: ID!): User
node(id: ID!): Node
_entities(representations: [_Any]): [_Entity] _entities(representations: [_Any]): [_Entity]
_service: _Service _service: _Service
} }
@ -3515,6 +3590,13 @@ type SaleRemoveCatalogues {
sale: Sale sale: Sale
} }
type SaleTranslatableContent implements Node {
id: ID!
name: String!
translation(languageCode: LanguageCodeEnum!): SaleTranslation
sale: Sale
}
type SaleTranslate { type SaleTranslate {
errors: [Error!] errors: [Error!]
sale: Sale sale: Sale
@ -3670,6 +3752,13 @@ type ShippingMethod implements Node {
translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation
} }
type ShippingMethodTranslatableContent implements Node {
id: ID!
name: String!
translation(languageCode: LanguageCodeEnum!): ShippingMethodTranslation
shippingMethod: ShippingMethod
}
type ShippingMethodTranslation implements Node { type ShippingMethodTranslation implements Node {
id: ID! id: ID!
name: String name: String
@ -4020,7 +4109,7 @@ enum TransactionKind {
CONFIRM CONFIRM
} }
union TranslatableItem = Product | Category | Collection | Attribute | AttributeValue | ProductVariant | Page | ShippingMethod | Sale | Voucher | MenuItem union TranslatableItem = ProductTranslatableContent | CollectionTranslatableContent | CategoryTranslatableContent | AttributeTranslatableContent | AttributeValueTranslatableContent | ProductVariantTranslatableContent | PageTranslatableContent | ShippingMethodTranslatableContent | SaleTranslatableContent | VoucherTranslatableContent | MenuItemTranslatableContent
type TranslatableItemConnection { type TranslatableItemConnection {
pageInfo: PageInfo! pageInfo: PageInfo!
@ -4190,8 +4279,8 @@ type VerifyToken {
type Voucher implements Node { type Voucher implements Node {
id: ID! id: ID!
type: VoucherTypeEnum!
name: String name: String
type: VoucherTypeEnum!
code: String! code: String!
usageLimit: Int usageLimit: Int
used: Int! used: Int!
@ -4280,6 +4369,13 @@ type VoucherRemoveCatalogues {
voucher: Voucher voucher: Voucher
} }
type VoucherTranslatableContent implements Node {
id: ID!
name: String
translation(languageCode: LanguageCodeEnum!): VoucherTranslation
voucher: Voucher
}
type VoucherTranslate { type VoucherTranslate {
errors: [Error!] errors: [Error!]
voucher: Voucher voucher: Voucher

View file

@ -49,7 +49,7 @@ export interface SearchCatalog_products_edges_node_category {
export interface SearchCatalog_products_edges_node { export interface SearchCatalog_products_edges_node {
__typename: "Product"; __typename: "Product";
id: string; id: string;
category: SearchCatalog_products_edges_node_category; category: SearchCatalog_products_edges_node_category | null;
name: string; name: string;
} }

View file

@ -153,7 +153,7 @@ export interface Product {
descriptionJson: any; descriptionJson: any;
seoTitle: string | null; seoTitle: string | null;
seoDescription: string | null; seoDescription: string | null;
category: Product_category; category: Product_category | null;
collections: (Product_collections | null)[] | null; collections: (Product_collections | null)[] | null;
basePrice: Product_basePrice | null; basePrice: Product_basePrice | null;
margin: Product_margin | null; margin: Product_margin | null;

View file

@ -159,7 +159,7 @@ export interface ProductCreate_productCreate_product {
descriptionJson: any; descriptionJson: any;
seoTitle: string | null; seoTitle: string | null;
seoDescription: string | null; seoDescription: string | null;
category: ProductCreate_productCreate_product_category; category: ProductCreate_productCreate_product_category | null;
collections: (ProductCreate_productCreate_product_collections | null)[] | null; collections: (ProductCreate_productCreate_product_collections | null)[] | null;
basePrice: ProductCreate_productCreate_product_basePrice | null; basePrice: ProductCreate_productCreate_product_basePrice | null;
margin: ProductCreate_productCreate_product_margin | null; margin: ProductCreate_productCreate_product_margin | null;

View file

@ -168,7 +168,7 @@ export interface ProductDetails_product {
descriptionJson: any; descriptionJson: any;
seoTitle: string | null; seoTitle: string | null;
seoDescription: string | null; seoDescription: string | null;
category: ProductDetails_product_category; category: ProductDetails_product_category | null;
collections: (ProductDetails_product_collections | null)[] | null; collections: (ProductDetails_product_collections | null)[] | null;
basePrice: ProductDetails_product_basePrice | null; basePrice: ProductDetails_product_basePrice | null;
margin: ProductDetails_product_margin | null; margin: ProductDetails_product_margin | null;

View file

@ -159,7 +159,7 @@ export interface ProductImageCreate_productImageCreate_product {
descriptionJson: any; descriptionJson: any;
seoTitle: string | null; seoTitle: string | null;
seoDescription: string | null; seoDescription: string | null;
category: ProductImageCreate_productImageCreate_product_category; category: ProductImageCreate_productImageCreate_product_category | null;
collections: (ProductImageCreate_productImageCreate_product_collections | null)[] | null; collections: (ProductImageCreate_productImageCreate_product_collections | null)[] | null;
basePrice: ProductImageCreate_productImageCreate_product_basePrice | null; basePrice: ProductImageCreate_productImageCreate_product_basePrice | null;
margin: ProductImageCreate_productImageCreate_product_margin | null; margin: ProductImageCreate_productImageCreate_product_margin | null;

View file

@ -159,7 +159,7 @@ export interface ProductImageUpdate_productImageUpdate_product {
descriptionJson: any; descriptionJson: any;
seoTitle: string | null; seoTitle: string | null;
seoDescription: string | null; seoDescription: string | null;
category: ProductImageUpdate_productImageUpdate_product_category; category: ProductImageUpdate_productImageUpdate_product_category | null;
collections: (ProductImageUpdate_productImageUpdate_product_collections | null)[] | null; collections: (ProductImageUpdate_productImageUpdate_product_collections | null)[] | null;
basePrice: ProductImageUpdate_productImageUpdate_product_basePrice | null; basePrice: ProductImageUpdate_productImageUpdate_product_basePrice | null;
margin: ProductImageUpdate_productImageUpdate_product_margin | null; margin: ProductImageUpdate_productImageUpdate_product_margin | null;

View file

@ -159,7 +159,7 @@ export interface ProductUpdate_productUpdate_product {
descriptionJson: any; descriptionJson: any;
seoTitle: string | null; seoTitle: string | null;
seoDescription: string | null; seoDescription: string | null;
category: ProductUpdate_productUpdate_product_category; category: ProductUpdate_productUpdate_product_category | null;
collections: (ProductUpdate_productUpdate_product_collections | null)[] | null; collections: (ProductUpdate_productUpdate_product_collections | null)[] | null;
basePrice: ProductUpdate_productUpdate_product_basePrice | null; basePrice: ProductUpdate_productUpdate_product_basePrice | null;
margin: ProductUpdate_productUpdate_product_margin | null; margin: ProductUpdate_productUpdate_product_margin | null;

View file

@ -159,7 +159,7 @@ export interface SimpleProductUpdate_productUpdate_product {
descriptionJson: any; descriptionJson: any;
seoTitle: string | null; seoTitle: string | null;
seoDescription: string | null; seoDescription: string | null;
category: SimpleProductUpdate_productUpdate_product_category; category: SimpleProductUpdate_productUpdate_product_category | null;
collections: (SimpleProductUpdate_productUpdate_product_collections | null)[] | null; collections: (SimpleProductUpdate_productUpdate_product_collections | null)[] | null;
basePrice: SimpleProductUpdate_productUpdate_product_basePrice | null; basePrice: SimpleProductUpdate_productUpdate_product_basePrice | null;
margin: SimpleProductUpdate_productUpdate_product_margin | null; margin: SimpleProductUpdate_productUpdate_product_margin | null;

View file

@ -4,7 +4,7 @@ import { TypedMutation } from "../mutations";
import { import {
categoryTranslationFragment, categoryTranslationFragment,
collectionTranslationFragment, collectionTranslationFragment,
pageTranslationFragment, pageTranslatableFragment,
productTranslationFragment, productTranslationFragment,
saleTranslationFragment, saleTranslationFragment,
voucherTranslationFragment voucherTranslationFragment
@ -112,7 +112,7 @@ export const TypedUpdateCollectionTranslations = TypedMutation<
>(updateCollectionTranslations); >(updateCollectionTranslations);
const updatePageTranslations = gql` const updatePageTranslations = gql`
${pageTranslationFragment} ${pageTranslatableFragment}
mutation UpdatePageTranslations( mutation UpdatePageTranslations(
$id: ID! $id: ID!
$input: PageTranslationInput! $input: PageTranslationInput!
@ -124,7 +124,7 @@ const updatePageTranslations = gql`
message message
} }
page { page {
...PageTranslationFragment ...PageTranslatableFragment
} }
} }
} }

View file

@ -179,6 +179,27 @@ export const pageTranslationFragment = gql`
} }
} }
`; `;
export const pageTranslatableFragment = gql`
fragment PageTranslatableFragment on PageTranslatableContent {
id
contentJson
seoDescription
seoTitle
title
translation(languageCode: $language) {
id
contentJson
seoDescription
seoTitle
title
language {
code
language
}
}
}
`;
export const productTypeTranslationFragment = gql` export const productTypeTranslationFragment = gql`
fragment AttributeTranslationFragment on Attribute { fragment AttributeTranslationFragment on Attribute {
id id

View file

@ -0,0 +1,35 @@
/* tslint:disable */
/* eslint-disable */
// This file was automatically generated and should not be edited.
import { LanguageCodeEnum } from "./../../types/globalTypes";
// ====================================================
// GraphQL fragment: PageTranslatableFragment
// ====================================================
export interface PageTranslatableFragment_translation_language {
__typename: "LanguageDisplay";
code: LanguageCodeEnum;
language: string;
}
export interface PageTranslatableFragment_translation {
__typename: "PageTranslation";
id: string;
contentJson: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;
language: PageTranslatableFragment_translation_language;
}
export interface PageTranslatableFragment {
__typename: "PageTranslatableContent";
id: string;
contentJson: any;
seoDescription: string | null;
seoTitle: string | null;
title: string;
translation: PageTranslatableFragment_translation | null;
}

View file

@ -31,7 +31,7 @@ export interface UpdatePageTranslations_pageTranslate_page_translation {
} }
export interface UpdatePageTranslations_pageTranslate_page { export interface UpdatePageTranslations_pageTranslate_page {
__typename: "Page"; __typename: "PageTranslatableContent";
id: string; id: string;
contentJson: any; contentJson: any;
seoDescription: string | null; seoDescription: string | null;

View file

@ -698,7 +698,7 @@ export interface CollectionInput {
export interface ConfigurationItemInput { export interface ConfigurationItemInput {
name: string; name: string;
value: string; value?: string | null;
} }
export interface CustomerFilterInput { export interface CustomerFilterInput {
@ -737,6 +737,7 @@ export interface DraftOrderInput {
shippingAddress?: AddressInput | null; shippingAddress?: AddressInput | null;
shippingMethod?: string | null; shippingMethod?: string | null;
voucher?: string | null; voucher?: string | null;
customerNote?: string | null;
} }
export interface FulfillmentCancelInput { export interface FulfillmentCancelInput {
@ -870,6 +871,7 @@ export interface ProductFilterInput {
isPublished?: boolean | null; isPublished?: boolean | null;
collections?: (string | null)[] | null; collections?: (string | null)[] | null;
categories?: (string | null)[] | null; categories?: (string | null)[] | null;
hasCategory?: boolean | null;
price?: PriceRangeInput | null; price?: PriceRangeInput | null;
attributes?: (AttributeInput | null)[] | null; attributes?: (AttributeInput | null)[] | null;
stockAvailability?: StockAvailability | null; stockAvailability?: StockAvailability | null;