From 96f79e348c97f26ebdc73cdf40270a0545c004d8 Mon Sep 17 00:00:00 2001 From: Zaiste Date: Thu, 13 May 2021 13:40:33 +0200 Subject: [PATCH] saleor: update the schema --- framework/saleor/schema.d.ts | 209 ++++++++++++++++++--- framework/saleor/schema.graphql | 321 +++++++++++++++++++++++++++----- 2 files changed, 457 insertions(+), 73 deletions(-) diff --git a/framework/saleor/schema.d.ts b/framework/saleor/schema.d.ts index 07fdccf6b..d1df0a113 100644 --- a/framework/saleor/schema.d.ts +++ b/framework/saleor/schema.d.ts @@ -102,6 +102,8 @@ export type AccountError = { message?: Maybe /** The error code. */ code: AccountErrorCode + /** A type of address that causes the error. */ + addressType?: Maybe } /** An enumeration. */ @@ -136,6 +138,8 @@ export enum AccountErrorCode { JwtDecodeError = 'JWT_DECODE_ERROR', JwtMissingToken = 'JWT_MISSING_TOKEN', JwtInvalidCsrfToken = 'JWT_INVALID_CSRF_TOKEN', + ChannelInactive = 'CHANNEL_INACTIVE', + MissingChannelSlug = 'MISSING_CHANNEL_SLUG', } export type AccountInput = { @@ -173,6 +177,8 @@ export type AccountRegisterInput = { languageCode?: Maybe /** User public metadata. */ metadata?: Maybe> + /** Slug of a channel which will be used to notify users. Optional when only one channel exists. */ + channel?: Maybe } /** Sends an email with the account removal link for the logged-in user. */ @@ -616,6 +622,16 @@ export type AppUpdate = { app?: Maybe } +/** An enumeration. */ +export enum AreaUnitsEnum { + SqCm = 'SQ_CM', + SqM = 'SQ_M', + SqKm = 'SQ_KM', + SqFt = 'SQ_FT', + SqYd = 'SQ_YD', + SqInch = 'SQ_INCH', +} + /** Assigns storefront's navigation menus. */ export type AssignNavigation = { __typename?: 'AssignNavigation' @@ -648,6 +664,8 @@ export type Attribute = Node & slug?: Maybe /** The attribute type. */ type?: Maybe + /** The unit of attribute values. */ + unit?: Maybe /** List of attribute's values. */ values?: Maybe>> /** Whether the attribute requires values to be passed or not. */ @@ -734,6 +752,8 @@ export type AttributeCreateInput = { slug?: Maybe /** The attribute type. */ type: AttributeTypeEnum + /** The unit of attribute values. */ + unit?: Maybe /** List of attribute's values. */ values?: Maybe>> /** Whether the attribute requires values to be passed or not. */ @@ -809,6 +829,8 @@ export type AttributeInput = { slug: Scalars['String'] /** Internal representation of a value (unique per attribute). */ values?: Maybe>> + /** The range that the returned values should be in. */ + valuesRange?: Maybe } /** An enumeration. */ @@ -817,6 +839,7 @@ export enum AttributeInputTypeEnum { Multiselect = 'MULTISELECT', File = 'FILE', Reference = 'REFERENCE', + Numeric = 'NUMERIC', RichText = 'RICH_TEXT', } @@ -911,6 +934,8 @@ export type AttributeUpdateInput = { name?: Maybe /** Internal representation of an attribute name. */ slug?: Maybe + /** The unit of attribute values. */ + unit?: Maybe /** IDs of values to be removed from this attribute. */ removeValues?: Maybe>> /** New values to be created for this attribute. */ @@ -1121,10 +1146,10 @@ export type CatalogueInput = { export type Category = Node & ObjectWithMetadata & { __typename?: 'Category' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe name: Scalars['String'] description?: Maybe slug: Scalars['String'] @@ -1271,10 +1296,10 @@ export type CategorySortingInput = { export type CategoryTranslatableContent = Node & { __typename?: 'CategoryTranslatableContent' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe name: Scalars['String'] description?: Maybe /** @@ -1303,10 +1328,10 @@ export type CategoryTranslate = { export type CategoryTranslation = Node & { __typename?: 'CategoryTranslation' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe name: Scalars['String'] description?: Maybe /** Translation language. */ @@ -1338,8 +1363,6 @@ export type Channel = Node & { currencyCode: Scalars['String'] /** Whether a channel has associated orders. */ hasOrders: Scalars['Boolean'] - /** List of channel shipping zones. */ - shippingZones: Array } /** Activate a channel. */ @@ -1453,7 +1476,6 @@ export type Checkout = Node & created: Scalars['DateTime'] lastChange: Scalars['DateTime'] user?: Maybe - quantity: Scalars['Int'] channel: Channel billingAddress?: Maybe
shippingAddress?: Maybe
@@ -1478,6 +1500,8 @@ export type Checkout = Node & email: Scalars['String'] /** Returns True, if checkout requires shipping. */ isShippingRequired: Scalars['Boolean'] + /** The number of items purchased. */ + quantity: Scalars['Int'] /** A list of checkout lines, each containing information about an item in the checkout. */ lines?: Maybe>> /** The price of the shipping, with all the taxes included. */ @@ -1548,7 +1572,7 @@ export type CheckoutCountableEdge = { /** Create a new checkout. */ export type CheckoutCreate = { __typename?: 'CheckoutCreate' - /** Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout. */ + /** Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout.DEPRECATED: Will be removed in Saleor 4.0. Always returns True. */ created?: Maybe /** @deprecated Use errors field instead. This field will be removed in Saleor 4.0. */ checkoutErrors: Array @@ -1611,6 +1635,8 @@ export type CheckoutError = { code: CheckoutErrorCode /** List of varint IDs which causes the error. */ variants?: Maybe> + /** A type of address that causes the error. */ + addressType?: Maybe } /** An enumeration. */ @@ -1769,10 +1795,10 @@ export type ChoiceValue = { export type Collection = Node & ObjectWithMetadata & { __typename?: 'Collection' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe name: Scalars['String'] description?: Maybe slug: Scalars['String'] @@ -1837,10 +1863,10 @@ export type CollectionBulkDelete = { /** Represents collection channel listing. */ export type CollectionChannelListing = Node & { __typename?: 'CollectionChannelListing' - publicationDate?: Maybe - isPublished: Scalars['Boolean'] /** The ID of the object. */ id: Scalars['ID'] + publicationDate?: Maybe + isPublished: Scalars['Boolean'] channel: Channel } @@ -2031,10 +2057,10 @@ export type CollectionSortingInput = { export type CollectionTranslatableContent = Node & { __typename?: 'CollectionTranslatableContent' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe name: Scalars['String'] description?: Maybe /** @@ -2063,10 +2089,10 @@ export type CollectionTranslate = { export type CollectionTranslation = Node & { __typename?: 'CollectionTranslation' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe name: Scalars['String'] description?: Maybe /** Translation language. */ @@ -2117,6 +2143,7 @@ export enum ConfigurationTypeFieldEnum { Secret = 'SECRET', Password = 'PASSWORD', Secretmultiline = 'SECRETMULTILINE', + Output = 'OUTPUT', } /** Confirm user account with token sent by email during registration. */ @@ -2728,6 +2755,16 @@ export enum DiscountValueTypeEnum { Percentage = 'PERCENTAGE', } +/** An enumeration. */ +export enum DistanceUnitsEnum { + Cm = 'CM', + M = 'M', + Km = 'KM', + Ft = 'FT', + Yd = 'YD', + Inch = 'INCH', +} + /** Represents shop's domain. */ export type Domain = { __typename?: 'Domain' @@ -3604,6 +3641,40 @@ export type Margin = { stop?: Maybe } +/** An enumeration. */ +export enum MeasurementUnitsEnum { + Cm = 'CM', + M = 'M', + Km = 'KM', + Ft = 'FT', + Yd = 'YD', + Inch = 'INCH', + SqCm = 'SQ_CM', + SqM = 'SQ_M', + SqKm = 'SQ_KM', + SqFt = 'SQ_FT', + SqYd = 'SQ_YD', + SqInch = 'SQ_INCH', + CubicMillimeter = 'CUBIC_MILLIMETER', + CubicCentimeter = 'CUBIC_CENTIMETER', + CubicDecimeter = 'CUBIC_DECIMETER', + CubicMeter = 'CUBIC_METER', + Liter = 'LITER', + CubicFoot = 'CUBIC_FOOT', + CubicInch = 'CUBIC_INCH', + CubicYard = 'CUBIC_YARD', + Qt = 'QT', + Pint = 'PINT', + FlOz = 'FL_OZ', + AcreIn = 'ACRE_IN', + AcreFt = 'ACRE_FT', + G = 'G', + Lb = 'LB', + Oz = 'OZ', + Kg = 'KG', + Tonne = 'TONNE', +} + /** Represents a single menu - an object that is used to help navigate through the store. */ export type Menu = Node & ObjectWithMetadata & { @@ -4876,6 +4947,7 @@ export type MutationPaymentVoidArgs = { } export type MutationPaymentInitializeArgs = { + channel?: Maybe gateway: Scalars['String'] paymentData?: Maybe } @@ -5194,6 +5266,7 @@ export type MutationGiftCardUpdateArgs = { } export type MutationPluginUpdateArgs = { + channel?: Maybe id: Scalars['ID'] input: PluginUpdateInput } @@ -5520,6 +5593,7 @@ export type MutationExternalVerifyArgs = { } export type MutationRequestPasswordResetArgs = { + channel?: Maybe email: Scalars['String'] redirectUrl: Scalars['String'] } @@ -5541,12 +5615,14 @@ export type MutationPasswordChangeArgs = { } export type MutationRequestEmailChangeArgs = { + channel?: Maybe newEmail: Scalars['String'] password: Scalars['String'] redirectUrl: Scalars['String'] } export type MutationConfirmEmailChangeArgs = { + channel?: Maybe token: Scalars['String'] } @@ -5578,6 +5654,7 @@ export type MutationAccountUpdateArgs = { } export type MutationAccountRequestDeletionArgs = { + channel?: Maybe redirectUrl: Scalars['String'] } @@ -5727,6 +5804,10 @@ export type Order = Node & invoices?: Maybe>> /** User-friendly number of an order. */ number?: Maybe + /** The ID of the order that was the base for this order. */ + original?: Maybe + /** The order origin. */ + origin: OrderOriginEnum /** Informs if an order is fully paid. */ isPaid: Scalars['Boolean'] /** Internal payment status. */ @@ -5958,6 +6039,8 @@ export type OrderError = { orderLine?: Maybe /** List of product variants that are associated with the error */ variants?: Maybe> + /** A type of address that causes the error. */ + addressType?: Maybe } /** An enumeration. */ @@ -6312,6 +6395,13 @@ export type OrderMarkAsPaid = { errors: Array } +/** An enumeration. */ +export enum OrderOriginEnum { + Checkout = 'CHECKOUT', + Draft = 'DRAFT', + Reissue = 'REISSUE', +} + /** Refund an order. */ export type OrderRefund = { __typename?: 'OrderRefund' @@ -6511,10 +6601,10 @@ export type OrderVoid = { export type Page = Node & ObjectWithMetadata & { __typename?: 'Page' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe title: Scalars['String'] content?: Maybe publicationDate?: Maybe @@ -6664,6 +6754,7 @@ export enum PageErrorCode { export type PageFilterInput = { search?: Maybe metadata?: Maybe>> + pageTypes?: Maybe>> } /** The Relay compliant `PageInfo` type, containing data necessary to paginate this connection. */ @@ -6728,10 +6819,10 @@ export type PageSortingInput = { export type PageTranslatableContent = Node & { __typename?: 'PageTranslatableContent' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe title: Scalars['String'] content?: Maybe /** @@ -6760,10 +6851,10 @@ export type PageTranslate = { export type PageTranslation = Node & { __typename?: 'PageTranslation' - seoTitle?: Maybe - seoDescription?: Maybe /** The ID of the object. */ id: Scalars['ID'] + seoTitle?: Maybe + seoDescription?: Maybe title: Scalars['String'] content?: Maybe /** Translation language. */ @@ -7027,6 +7118,7 @@ export enum PaymentErrorCode { ShippingMethodNotSet = 'SHIPPING_METHOD_NOT_SET', PaymentError = 'PAYMENT_ERROR', NotSupportedGateway = 'NOT_SUPPORTED_GATEWAY', + ChannelInactive = 'CHANNEL_INACTIVE', } export type PaymentFilterInput = { @@ -7228,15 +7320,36 @@ export type PermissionGroupUpdateInput = { } /** Plugin. */ -export type Plugin = Node & { +export type Plugin = { __typename?: 'Plugin' + /** Identifier of the plugin. */ id: Scalars['ID'] + /** Name of the plugin. */ name: Scalars['String'] + /** Description of the plugin. */ description: Scalars['String'] + /** Global configuration of the plugin (not channel-specific). */ + globalConfiguration?: Maybe + /** Channel-specific plugin configuration. */ + channelConfigurations: Array +} + +/** Stores information about a configuration of plugin. */ +export type PluginConfiguration = { + __typename?: 'PluginConfiguration' + /** Determines if plugin is active or not. */ active: Scalars['Boolean'] + /** The channel to which the plugin configuration is assigned to. */ + channel?: Maybe + /** Configuration of the plugin. */ configuration?: Maybe>> } +export enum PluginConfigurationType { + PerChannel = 'PER_CHANNEL', + Global = 'GLOBAL', +} + export type PluginCountableConnection = { __typename?: 'PluginCountableConnection' /** Pagination data for this connection. */ @@ -7275,8 +7388,9 @@ export enum PluginErrorCode { } export type PluginFilterInput = { - active?: Maybe + statusInChannels?: Maybe search?: Maybe + type?: Maybe } export enum PluginSortField { @@ -7291,6 +7405,11 @@ export type PluginSortingInput = { field: PluginSortField } +export type PluginStatusInChannelsInput = { + active: Scalars['Boolean'] + channels: Array +} + /** Update plugin configuration. */ export type PluginUpdate = { __typename?: 'PluginUpdate' @@ -9708,6 +9827,7 @@ export type ShippingZoneDelete = { export type ShippingZoneFilterInput = { search?: Maybe + channels?: Maybe>> } /** Updates a new shipping zone. */ @@ -9802,6 +9922,7 @@ export type Shop = { /** Represents a shop resource containing general shop data and configuration. */ export type ShopAvailablePaymentGatewaysArgs = { currency?: Maybe + channel?: Maybe } /** Represents a shop resource containing general shop data and configuration. */ @@ -9995,6 +10116,8 @@ export type StaffError = { message?: Maybe /** The error code. */ code: AccountErrorCode + /** A type of address that causes the error. */ + addressType?: Maybe /** List of permissions which causes the error. */ permissions?: Maybe> /** List of permission group IDs which cause the error. */ @@ -10440,6 +10563,11 @@ export type UserAvatarArgs = { size?: Maybe } +/** Represents user data. */ +export type UserStoredPaymentSourcesArgs = { + channel?: Maybe +} + /** Deletes a user avatar. Only for staff members. */ export type UserAvatarDelete = { __typename?: 'UserAvatarDelete' @@ -10506,6 +10634,8 @@ export type UserCreateInput = { languageCode?: Maybe /** URL of a view where users should be redirected to set the password. URL in RFC 1808 format. */ redirectUrl?: Maybe + /** Slug of a channel which will be used for notify user. Optional when only one channel exists. */ + channel?: Maybe } export type UserPermission = { @@ -10608,6 +10738,23 @@ export type VerifyToken = { errors: Array } +/** An enumeration. */ +export enum VolumeUnitsEnum { + CubicMillimeter = 'CUBIC_MILLIMETER', + CubicCentimeter = 'CUBIC_CENTIMETER', + CubicDecimeter = 'CUBIC_DECIMETER', + CubicMeter = 'CUBIC_METER', + Liter = 'LITER', + CubicFoot = 'CUBIC_FOOT', + CubicInch = 'CUBIC_INCH', + CubicYard = 'CUBIC_YARD', + Qt = 'QT', + Pint = 'PINT', + FlOz = 'FL_OZ', + AcreIn = 'ACRE_IN', + AcreFt = 'ACRE_FT', +} + /** Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. */ export type Voucher = Node & { __typename?: 'Voucher' @@ -11260,10 +11407,11 @@ export type Weight = { /** An enumeration. */ export enum WeightUnitsEnum { - Kg = 'KG', + G = 'G', Lb = 'LB', Oz = 'OZ', - G = 'G', + Kg = 'KG', + Tonne = 'TONNE', } export type _Entity = @@ -11308,7 +11456,7 @@ export type GetAllProductPathsQuery = { __typename?: 'Query' } & { > } -export type ProductConnnectionFragment = { +export type ProductConnectionFragment = { __typename?: 'ProductCountableConnection' } & { pageInfo: { __typename?: 'PageInfo' } & Pick< @@ -11350,11 +11498,12 @@ export type ProductConnnectionFragment = { export type GetAllProductsQueryVariables = Exact<{ first?: Maybe filter?: Maybe + sortBy?: Maybe channel?: Maybe }> export type GetAllProductsQuery = { __typename?: 'Query' } & { products?: Maybe< - { __typename?: 'ProductCountableConnection' } & ProductConnnectionFragment + { __typename?: 'ProductCountableConnection' } & ProductConnectionFragment > } diff --git a/framework/saleor/schema.graphql b/framework/saleor/schema.graphql index aef45dd46..aa5c7c263 100644 --- a/framework/saleor/schema.graphql +++ b/framework/saleor/schema.graphql @@ -73,6 +73,11 @@ type AccountError { The error code. """ code: AccountErrorCode! + + """ + A type of address that causes the error. + """ + addressType: AddressTypeEnum } """ @@ -109,6 +114,8 @@ enum AccountErrorCode { JWT_DECODE_ERROR JWT_MISSING_TOKEN JWT_INVALID_CSRF_TOKEN + CHANNEL_INACTIVE + MISSING_CHANNEL_SLUG } input AccountInput { @@ -179,6 +186,11 @@ input AccountRegisterInput { User public metadata. """ metadata: [MetadataInput!] + + """ + Slug of a channel which will be used to notify users. Optional when only one channel exists. + """ + channel: String } """ @@ -887,6 +899,18 @@ type AppUpdate { app: App } +""" +An enumeration. +""" +enum AreaUnitsEnum { + SQ_CM + SQ_M + SQ_KM + SQ_FT + SQ_YD + SQ_INCH +} + """ Assigns storefront's navigation menus. """ @@ -958,6 +982,11 @@ type Attribute implements Node & ObjectWithMetadata { """ type: AttributeTypeEnum + """ + The unit of attribute values. + """ + unit: MeasurementUnitsEnum + """ List of attribute's values. """ @@ -1082,6 +1111,11 @@ input AttributeCreateInput { """ type: AttributeTypeEnum! + """ + The unit of attribute values. + """ + unit: MeasurementUnitsEnum + """ List of attribute's values. """ @@ -1202,6 +1236,11 @@ input AttributeInput { Internal representation of a value (unique per attribute). """ values: [String] + + """ + The range that the returned values should be in. + """ + valuesRange: IntRangeInput } """ @@ -1212,6 +1251,7 @@ enum AttributeInputTypeEnum { MULTISELECT FILE REFERENCE + NUMERIC RICH_TEXT } @@ -1368,6 +1408,11 @@ input AttributeUpdateInput { """ slug: String + """ + The unit of attribute values. + """ + unit: MeasurementUnitsEnum + """ IDs of values to be removed from this attribute. """ @@ -1742,13 +1787,12 @@ input CatalogueInput { Represents a single category of products. Categories allow to organize products in a tree-hierarchies which can be used for navigation in the storefront. """ type Category implements Node & ObjectWithMetadata { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String name: String! description: JSONString slug: String! @@ -2007,13 +2051,12 @@ input CategorySortingInput { } type CategoryTranslatableContent implements Node { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String name: String! description: JSONString @@ -2054,13 +2097,12 @@ type CategoryTranslate { } type CategoryTranslation implements Node { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String name: String! description: JSONString @@ -2107,11 +2149,6 @@ type Channel implements Node { Whether a channel has associated orders. """ hasOrders: Boolean! - - """ - List of channel shipping zones. - """ - shippingZones: [ShippingZone!]! } """ @@ -2286,7 +2323,6 @@ type Checkout implements Node & ObjectWithMetadata { created: DateTime! lastChange: DateTime! user: User - quantity: Int! channel: Channel! billingAddress: Address shippingAddress: Address @@ -2336,6 +2372,11 @@ type Checkout implements Node & ObjectWithMetadata { """ isShippingRequired: Boolean! + """ + The number of items purchased. + """ + quantity: Int! + """ A list of checkout lines, each containing information about an item in the checkout. """ @@ -2457,7 +2498,7 @@ Create a new checkout. """ type CheckoutCreate { """ - Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout. + Whether the checkout was created or the current active one was returned. Refer to checkoutLinesAdd and checkoutLinesUpdate to merge a cart with an active checkout.DEPRECATED: Will be removed in Saleor 4.0. Always returns True. """ created: Boolean checkoutErrors: [CheckoutError!]! @@ -2565,6 +2606,11 @@ type CheckoutError { List of varint IDs which causes the error. """ variants: [ID!] + + """ + A type of address that causes the error. + """ + addressType: AddressTypeEnum } """ @@ -2789,13 +2835,12 @@ type ChoiceValue { Represents a collection of products. """ type Collection implements Node & ObjectWithMetadata { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String name: String! description: JSONString slug: String! @@ -2909,13 +2954,12 @@ type CollectionBulkDelete { Represents collection channel listing. """ type CollectionChannelListing implements Node { - publicationDate: Date - isPublished: Boolean! - """ The ID of the object. """ id: ID! + publicationDate: Date + isPublished: Boolean! channel: Channel! } @@ -3238,13 +3282,12 @@ input CollectionSortingInput { } type CollectionTranslatableContent implements Node { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String name: String! description: JSONString @@ -3285,13 +3328,12 @@ type CollectionTranslate { } type CollectionTranslation implements Node { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String name: String! description: JSONString @@ -3373,6 +3415,7 @@ enum ConfigurationTypeFieldEnum { SECRET PASSWORD SECRETMULTILINE + OUTPUT } """ @@ -4209,6 +4252,18 @@ enum DiscountValueTypeEnum { PERCENTAGE } +""" +An enumeration. +""" +enum DistanceUnitsEnum { + CM + M + KM + FT + YD + INCH +} + """ Represents shop's domain. """ @@ -5627,6 +5682,42 @@ type Margin { stop: Int } +""" +An enumeration. +""" +enum MeasurementUnitsEnum { + CM + M + KM + FT + YD + INCH + SQ_CM + SQ_M + SQ_KM + SQ_FT + SQ_YD + SQ_INCH + CUBIC_MILLIMETER + CUBIC_CENTIMETER + CUBIC_DECIMETER + CUBIC_METER + LITER + CUBIC_FOOT + CUBIC_INCH + CUBIC_YARD + QT + PINT + FL_OZ + ACRE_IN + ACRE_FT + G + LB + OZ + KG + TONNE +} + """ Represents a single menu - an object that is used to help navigate through the store. """ @@ -7288,6 +7379,11 @@ type Mutation { Initializes payment process when it is required by gateway. """ paymentInitialize( + """ + Slug of a channel for which the data should be returned. + """ + channel: String + """ A gateway name used to initialize the payment. """ @@ -8180,6 +8276,11 @@ type Mutation { Update plugin configuration. """ pluginUpdate( + """ + ID of a channel for which the data should be modified. + """ + channel: ID + """ ID of plugin to update. """ @@ -9094,6 +9195,11 @@ type Mutation { Sends an email with the account password modification link. """ requestPasswordReset( + """ + Slug of a channel which will be used for notify user. Optional when only one channel exists. + """ + channel: String + """ Email of the user that will be used for password recovery. """ @@ -9159,6 +9265,11 @@ type Mutation { Request email change of the logged in user. """ requestEmailChange( + """ + Slug of a channel which will be used to notify users. Optional when only one channel exists. + """ + channel: String + """ New user email. """ @@ -9179,6 +9290,11 @@ type Mutation { Confirm the email change of the logged-in user. """ confirmEmailChange( + """ + Slug of a channel which will be used to notify users. Optional when only one channel exists. + """ + channel: String + """ A one-time token required to change the email. """ @@ -9264,6 +9380,11 @@ type Mutation { Sends an email with the account removal link for the logged-in user. """ accountRequestDeletion( + """ + Slug of a channel which will be used to notify users. Optional when only one channel exists. + """ + channel: String + """ URL of a view where users should be redirected to delete their account. URL in RFC 1808 format. """ @@ -9609,6 +9730,16 @@ type Order implements Node & ObjectWithMetadata { """ number: String + """ + The ID of the order that was the base for this order. + """ + original: ID + + """ + The order origin. + """ + origin: OrderOriginEnum! + """ Informs if an order is fully paid. """ @@ -10014,6 +10145,11 @@ type OrderError { List of product variants that are associated with the error """ variants: [ID!] + + """ + A type of address that causes the error. + """ + addressType: AddressTypeEnum } """ @@ -10585,6 +10721,15 @@ type OrderMarkAsPaid { errors: [OrderError!]! } +""" +An enumeration. +""" +enum OrderOriginEnum { + CHECKOUT + DRAFT + REISSUE +} + """ Refund an order. """ @@ -10924,13 +11069,12 @@ type OrderVoid { A static page that can be manually added by a shop operator through the dashboard. """ type Page implements Node & ObjectWithMetadata { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String title: String! content: JSONString publicationDate: Date @@ -11167,6 +11311,7 @@ enum PageErrorCode { input PageFilterInput { search: String metadata: [MetadataInput] + pageTypes: [ID] } """ @@ -11286,13 +11431,12 @@ input PageSortingInput { } type PageTranslatableContent implements Node { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String title: String! content: JSONString @@ -11333,13 +11477,12 @@ type PageTranslate { } type PageTranslation implements Node { - seoTitle: String - seoDescription: String - """ The ID of the object. """ id: ID! + seoTitle: String + seoDescription: String title: String! content: JSONString @@ -11754,6 +11897,7 @@ enum PaymentErrorCode { SHIPPING_METHOD_NOT_SET PAYMENT_ERROR NOT_SUPPORTED_GATEWAY + CHANNEL_INACTIVE } input PaymentFilterInput { @@ -12069,14 +12213,58 @@ input PermissionGroupUpdateInput { """ Plugin. """ -type Plugin implements Node { +type Plugin { + """ + Identifier of the plugin. + """ id: ID! + + """ + Name of the plugin. + """ name: String! + + """ + Description of the plugin. + """ description: String! + + """ + Global configuration of the plugin (not channel-specific). + """ + globalConfiguration: PluginConfiguration + + """ + Channel-specific plugin configuration. + """ + channelConfigurations: [PluginConfiguration!]! +} + +""" +Stores information about a configuration of plugin. +""" +type PluginConfiguration { + """ + Determines if plugin is active or not. + """ active: Boolean! + + """ + The channel to which the plugin configuration is assigned to. + """ + channel: Channel + + """ + Configuration of the plugin. + """ configuration: [ConfigurationItem] } +enum PluginConfigurationType { + PER_CHANNEL + GLOBAL +} + type PluginCountableConnection { """ Pagination data for this connection. @@ -12132,8 +12320,9 @@ enum PluginErrorCode { } input PluginFilterInput { - active: Boolean + statusInChannels: PluginStatusInChannelsInput search: String + type: PluginConfigurationType } enum PluginSortField { @@ -12153,6 +12342,11 @@ input PluginSortingInput { field: PluginSortField! } +input PluginStatusInChannelsInput { + active: Boolean! + channels: [ID!]! +} + """ Update plugin configuration. """ @@ -16732,6 +16926,7 @@ type ShippingZoneDelete { input ShippingZoneFilterInput { search: String + channels: [ID] } """ @@ -16797,9 +16992,14 @@ type Shop { """ availablePaymentGateways( """ - A currency for which gateways will be returned. + DEPRECATED: use `channel` argument instead. This argument will be removed in Saleor 4.0.A currency for which gateways will be returned. """ currency: String + + """ + Slug of a channel for which the data should be returned. + """ + channel: String ): [PaymentGateway!]! """ @@ -17253,6 +17453,11 @@ type StaffError { """ code: AccountErrorCode! + """ + A type of address that causes the error. + """ + addressType: AddressTypeEnum + """ List of permissions which causes the error. """ @@ -17962,7 +18167,12 @@ type User implements Node & ObjectWithMetadata { """ List of stored payment sources. """ - storedPaymentSources: [PaymentSource] + storedPaymentSources( + """ + Slug of a channel for which the data should be returned. + """ + channel: String + ): [PaymentSource] """ User language code. @@ -18085,6 +18295,11 @@ input UserCreateInput { URL of a view where users should be redirected to set the password. URL in RFC 1808 format. """ redirectUrl: String + + """ + Slug of a channel which will be used for notify user. Optional when only one channel exists. + """ + channel: String } type UserPermission { @@ -18255,6 +18470,25 @@ type VerifyToken { errors: [AccountError!]! } +""" +An enumeration. +""" +enum VolumeUnitsEnum { + CUBIC_MILLIMETER + CUBIC_CENTIMETER + CUBIC_DECIMETER + CUBIC_METER + LITER + CUBIC_FOOT + CUBIC_INCH + CUBIC_YARD + QT + PINT + FL_OZ + ACRE_IN + ACRE_FT +} + """ Vouchers allow giving discounts to particular customers on categories, collections or specific products. They can be used during checkout by providing valid voucher codes. """ @@ -19367,10 +19601,11 @@ scalar WeightScalar An enumeration. """ enum WeightUnitsEnum { - KG + G LB OZ - G + KG + TONNE } """