From 23b69ec442e35ef4f27da860b5803d59a1bf561d Mon Sep 17 00:00:00 2001 From: Bel Curcio Date: Thu, 10 Jun 2021 18:09:22 -0300 Subject: [PATCH] Adding Local Provider --- framework/local/README.md | 34 +- framework/local/api/index.ts | 13 +- .../local/api/operations/get-all-pages.ts | 6 +- .../api/operations/get-all-product-paths.ts | 6 +- .../local/api/operations/get-all-products.ts | 14 +- framework/local/api/operations/get-page.ts | 4 +- .../local/api/operations/get-site-info.ts | 6 +- framework/local/api/operations/index.ts | 6 + framework/local/codegen.json | 28 - framework/local/data.json | 22 + framework/local/fetcher.ts | 40 +- framework/local/index.tsx | 19 +- framework/local/next.config.js | 2 +- framework/local/provider.ts | 6 +- framework/local/schema.d.ts | 3257 ------------- framework/local/schema.graphql | 4162 ----------------- 16 files changed, 75 insertions(+), 7550 deletions(-) create mode 100644 framework/local/api/operations/index.ts delete mode 100644 framework/local/codegen.json create mode 100644 framework/local/data.json delete mode 100644 framework/local/schema.d.ts delete mode 100644 framework/local/schema.graphql diff --git a/framework/local/README.md b/framework/local/README.md index c1bcd7b5b..a3bc1db32 100644 --- a/framework/local/README.md +++ b/framework/local/README.md @@ -1,33 +1 @@ -# Vendure Storefront Data Hooks - -UI hooks and data fetching methods built from the ground up for e-commerce applications written in React, that use [Vendure](http://vendure.io/) as a headless e-commerce platform. - -## Usage - -1. Clone this repo and install its dependencies with `yarn install` or `npm install` -2. Set the Vendure provider and API URL in your `.env.local` file: - ``` - COMMERCE_PROVIDER=vendure - NEXT_PUBLIC_VENDURE_SHOP_API_URL=https://demo.vendure.io/shop-api - NEXT_PUBLIC_VENDURE_LOCAL_URL=/vendure-shop-api - ``` -3. With the Vendure server running, start this project using `yarn dev` or `npm run dev`. - -## Known Limitations - -1. Vendure does not ship with built-in wishlist functionality. -2. Nor does it come with any kind of blog/page-building feature. Both of these can be created as Vendure plugins, however. -3. The entire Vendure customer flow is carried out via its GraphQL API. This means that there is no external, pre-existing checkout flow. The checkout flow must be created as part of the Next.js app. See https://github.com/vercel/commerce/issues/64 for further discusion. -4. By default, the sign-up flow in Vendure uses email verification. This means that using the existing "sign up" flow from this project will not grant a new user the ability to authenticate, since the new account must first be verified. Again, the necessary parts to support this flow can be created as part of the Next.js app. - -## Code generation - -This provider makes use of GraphQL code generation. The [schema.graphql](./schema.graphql) and [schema.d.ts](./schema.d.ts) files contain the generated types & schema introspection results. - -When developing the provider, changes to any GraphQL operations should be followed by re-generation of the types and schema files: - -From the project root dir, run - -```sh -graphql-codegen --config ./framework/vendure/codegen.json -``` +# Next.js Local Provider diff --git a/framework/local/api/index.ts b/framework/local/api/index.ts index 8a3081901..b1ecc3781 100644 --- a/framework/local/api/index.ts +++ b/framework/local/api/index.ts @@ -1,18 +1,19 @@ -import type { CommerceAPIConfig } from '@commerce/api' -import fetchGraphqlApi from './utils/fetch-graphql-api' +import type { APIProvider, CommerceAPIConfig } from '@commerce/api' import { CommerceAPI, getCommerceApi as commerceApi } from '@commerce/api' +import fetchGraphqlApi from './utils/fetch-graphql-api' import getAllPages from './operations/get-all-pages' import getPage from './operations/get-page' import getSiteInfo from './operations/get-site-info' +import getCustomerWishlist from './operations/get-customer-wishlist' import getAllProductPaths from './operations/get-all-product-paths' import getAllProducts from './operations/get-all-products' import getProduct from './operations/get-product' -export interface VendureConfig extends CommerceAPIConfig {} +export interface LocalConfig extends CommerceAPIConfig {} const ONE_DAY = 60 * 60 * 24 -const config: VendureConfig = { +const config: LocalConfig = { commerceUrl: '', apiToken: '', cartCookie: '', @@ -25,6 +26,7 @@ const operations = { getAllPages, getPage, getSiteInfo, + getCustomerWishlist, getAllProductPaths, getAllProducts, getProduct, @@ -33,9 +35,10 @@ const operations = { export const provider = { config, operations } export type Provider = typeof provider +export type LocalAPI

= CommerceAPI

export function getCommerceApi

( customProvider: P = provider as any -): CommerceAPI

{ +): LocalAPI

{ return commerceApi(customProvider) } diff --git a/framework/local/api/operations/get-all-pages.ts b/framework/local/api/operations/get-all-pages.ts index 22156a4a2..e524eb15f 100644 --- a/framework/local/api/operations/get-all-pages.ts +++ b/framework/local/api/operations/get-all-pages.ts @@ -2,10 +2,10 @@ export type Page = any export type GetAllPagesResult = { pages: Page[] } export default function getAllPagesOperation() { - function getAllPages(): GetAllPagesResult { - return { + function getAllPages(): Promise { + return Promise.resolve({ pages: [], - } + }) } return getAllPages } diff --git a/framework/local/api/operations/get-all-product-paths.ts b/framework/local/api/operations/get-all-product-paths.ts index ac753a59c..a9b7671e7 100644 --- a/framework/local/api/operations/get-all-product-paths.ts +++ b/framework/local/api/operations/get-all-product-paths.ts @@ -3,10 +3,10 @@ export type GetAllProductPathsResult = { } export default function getAllProductPathsOperation() { - function getAllProductPaths(): GetAllProductPathsResult { - return { + function getAllProductPaths(): Promise { + return Promise.resolve({ products: [].map((p) => ({ path: `/hello` })), - } + }) } return getAllProductPaths diff --git a/framework/local/api/operations/get-all-products.ts b/framework/local/api/operations/get-all-products.ts index 5ff11f9d9..19548908c 100644 --- a/framework/local/api/operations/get-all-products.ts +++ b/framework/local/api/operations/get-all-products.ts @@ -1,13 +1,17 @@ import { Product } from '@commerce/types/product' -import { OperationContext } from '@commerce/api/operations' + +import type { OperationContext } from '@commerce/api/operations' +import type { Provider } from '../index' export type ProductVariables = { first?: number } -export default function getAllProductsOperation() { - function getAllProducts(): { products: Product[] | any[] } { - return { +export default function getAllProductsOperation({ + commerce, +}: OperationContext) { + async function getAllProducts(): Promise<{ products: Product[] | any[] }> { + return Promise.resolve({ products: [], - } + }) } return getAllProducts } diff --git a/framework/local/api/operations/get-page.ts b/framework/local/api/operations/get-page.ts index 7bb33dfcf..ef2867fcc 100644 --- a/framework/local/api/operations/get-page.ts +++ b/framework/local/api/operations/get-page.ts @@ -5,8 +5,8 @@ export type PageVariables = { } export default function getPageOperation() { - function getPage(): GetPageResult { - return {} + function getPage(): Promise { + return Promise.resolve({}) } return getPage } diff --git a/framework/local/api/operations/get-site-info.ts b/framework/local/api/operations/get-site-info.ts index 61effe624..dbeaccbc8 100644 --- a/framework/local/api/operations/get-site-info.ts +++ b/framework/local/api/operations/get-site-info.ts @@ -9,11 +9,11 @@ export type GetSiteInfoResult< > = T export default function getSiteInfoOperation({}: OperationContext) { - function getSiteInfo(): GetSiteInfoResult { - return { + function getSiteInfo(): Promise { + return Promise.resolve({ categories: [], brands: [], - } + }) } return getSiteInfo diff --git a/framework/local/api/operations/index.ts b/framework/local/api/operations/index.ts new file mode 100644 index 000000000..086fdf83a --- /dev/null +++ b/framework/local/api/operations/index.ts @@ -0,0 +1,6 @@ +export { default as getPage } from './get-page' +export { default as getSiteInfo } from './get-site-info' +export { default as getAllPages } from './get-all-pages' +export { default as getProduct } from './get-product' +export { default as getAllProducts } from './get-all-products' +export { default as getAllProductPaths } from './get-all-product-paths' diff --git a/framework/local/codegen.json b/framework/local/codegen.json deleted file mode 100644 index 79a2b6ffa..000000000 --- a/framework/local/codegen.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "schema": { - "http://localhost:3001/shop-api": {} - }, - "documents": [ - { - "./framework/vendure/**/*.{ts,tsx}": { - "noRequire": true - } - } - ], - "generates": { - "./framework/vendure/schema.d.ts": { - "plugins": ["typescript", "typescript-operations"], - "config": { - "scalars": { - "ID": "string" - } - } - }, - "./framework/vendure/schema.graphql": { - "plugins": ["schema-ast"] - } - }, - "hooks": { - "afterAllFileWrite": ["prettier --write"] - } -} diff --git a/framework/local/data.json b/framework/local/data.json new file mode 100644 index 000000000..989dfd2d7 --- /dev/null +++ b/framework/local/data.json @@ -0,0 +1,22 @@ +{ + "products": [ + { + "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzU0NDczMjUwMjQ0MjA=", + "name": "New Short Sleeve T-Shirt", + "vendor": "Next.js", + "path": "/new-short-sleeve-t-shirt", + "slug": "new-short-sleeve-t-shirt", + "price": { "value": 25, "currencyCode": "USD" }, + "images": [ + { + "url": "/assets/drop-shirt-0", + "altText": null, + "width": 1000, + "height": 1000 + } + ], + "variants": [], + "options": [] + } + ] +} diff --git a/framework/local/fetcher.ts b/framework/local/fetcher.ts index bf8f0dcd8..d8a22a5f2 100644 --- a/framework/local/fetcher.ts +++ b/framework/local/fetcher.ts @@ -1,51 +1,19 @@ import { Fetcher } from '@commerce/utils/types' -import { FetcherError } from '@commerce/utils/errors' -async function getText(res: Response) { - try { - return (await res.text()) || res.statusText - } catch (error) { - return res.statusText - } -} - -async function getError(res: Response) { - if (res.headers.get('Content-Type')?.includes('application/json')) { - const data = await res.json() - return new FetcherError({ errors: data.errors, status: res.status }) - } - return new FetcherError({ message: await getText(res), status: res.status }) -} +const shopApiUrl = '/data.json' export const fetcher: Fetcher = async ({ url, - method = 'POST', + method = 'GET', variables, query, body: bodyObj, }) => { - const shopApiUrl = - process.env.NEXT_PUBLIC_VENDURE_LOCAL_URL || - process.env.NEXT_PUBLIC_VENDURE_SHOP_API_URL - if (!shopApiUrl) { - throw new Error( - 'The Vendure Shop API url has not been provided. Please define NEXT_PUBLIC_VENDURE_SHOP_API_URL in .env.local' - ) - } - const hasBody = Boolean(variables || query) - const body = hasBody ? JSON.stringify({ query, variables }) : undefined - const headers = hasBody ? { 'Content-Type': 'application/json' } : undefined - const res = await fetch(shopApiUrl, { - method, - body, - headers, - credentials: 'include', - }) + const res = await fetch(shopApiUrl) if (res.ok) { const { data } = await res.json() return data } - - throw await getError(res) + throw res } diff --git a/framework/local/index.tsx b/framework/local/index.tsx index 47e60c7df..2ec304f63 100644 --- a/framework/local/index.tsx +++ b/framework/local/index.tsx @@ -1,29 +1,28 @@ import * as React from 'react' import { ReactNode } from 'react' +import { localProvider } from './provider' import { CommerceConfig, CommerceProvider as CoreCommerceProvider, useCommerce as useCoreCommerce, } from '@commerce' -import { vendureProvider } from './provider' -export const vendureConfig: CommerceConfig = { +export const localConfig: CommerceConfig = { locale: 'en-us', cartCookie: 'session', } -export type VendureConfig = Partial - -export type VendureProps = { +export function CommerceProvider({ + children, + ...config +}: { children?: ReactNode locale: string -} & VendureConfig - -export function CommerceProvider({ children, ...config }: VendureProps) { +} & Partial) { return ( {children} diff --git a/framework/local/next.config.js b/framework/local/next.config.js index 96153ad1e..ce46b706f 100644 --- a/framework/local/next.config.js +++ b/framework/local/next.config.js @@ -3,6 +3,6 @@ const commerce = require('./commerce.config.json') module.exports = { commerce, images: { - domains: ['localhost', 'demo.vendure.io'], + domains: ['localhost'], }, } diff --git a/framework/local/provider.ts b/framework/local/provider.ts index f24f4be18..5be505772 100644 --- a/framework/local/provider.ts +++ b/framework/local/provider.ts @@ -10,10 +10,12 @@ import { handler as useLogout } from './auth/use-logout' import { handler as useSignup } from './auth/use-signup' import { fetcher } from './fetcher' -export const vendureProvider: Provider = { +export type Provider = typeof localProvider + +export const localProvider: Provider = { locale: 'en-us', cartCookie: 'session', - fetcher: (e) => e, + fetcher: fetcher, cart: { useCart, useAddItem, useUpdateItem, useRemoveItem }, customer: { useCustomer }, products: { useSearch }, diff --git a/framework/local/schema.d.ts b/framework/local/schema.d.ts deleted file mode 100644 index 9d6b53c52..000000000 --- a/framework/local/schema.d.ts +++ /dev/null @@ -1,3257 +0,0 @@ -export type Maybe = T | null -export type Exact = { - [K in keyof T]: T[K] -} -export type MakeOptional = Omit & - { [SubKey in K]?: Maybe } -export type MakeMaybe = Omit & - { [SubKey in K]: Maybe } -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string - String: string - Boolean: boolean - Int: number - Float: number - /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ - JSON: any - /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */ - DateTime: any - /** The `Upload` scalar type represents a file upload. */ - Upload: any -} - -export type Query = { - __typename?: 'Query' - /** The active Channel */ - activeChannel: Channel - /** The active Customer */ - activeCustomer?: Maybe - /** - * The active Order. Will be `null` until an Order is created via `addItemToOrder`. Once an Order reaches the - * state of `PaymentApproved` or `PaymentSettled`, then that Order is no longer considered "active" and this - * query will once again return `null`. - */ - activeOrder?: Maybe - /** An array of supported Countries */ - availableCountries: Array - /** A list of Collections available to the shop */ - collections: CollectionList - /** Returns a Collection either by its id or slug. If neither 'id' nor 'slug' is speicified, an error will result. */ - collection?: Maybe - /** Returns a list of eligible shipping methods based on the current active Order */ - eligibleShippingMethods: Array - /** Returns a list of payment methods and their eligibility based on the current active Order */ - eligiblePaymentMethods: Array - /** Returns information about the current authenticated User */ - me?: Maybe - /** Returns the possible next states that the activeOrder can transition to */ - nextOrderStates: Array - /** - * Returns an Order based on the id. Note that in the Shop API, only orders belonging to the - * currently-authenticated User may be queried. - */ - order?: Maybe - /** - * Returns an Order based on the order `code`. For guest Orders (i.e. Orders placed by non-authenticated Customers) - * this query will only return the Order within 2 hours of the Order being placed. This allows an Order confirmation - * screen to be shown immediately after completion of a guest checkout, yet prevents security risks of allowing - * general anonymous access to Order data. - */ - orderByCode?: Maybe - /** Get a Product either by id or slug. If neither 'id' nor 'slug' is speicified, an error will result. */ - product?: Maybe - /** Get a list of Products */ - products: ProductList - /** Search Products based on the criteria set by the `SearchInput` */ - search: SearchResponse -} - -export type QueryCollectionsArgs = { - options?: Maybe -} - -export type QueryCollectionArgs = { - id?: Maybe - slug?: Maybe -} - -export type QueryOrderArgs = { - id: Scalars['ID'] -} - -export type QueryOrderByCodeArgs = { - code: Scalars['String'] -} - -export type QueryProductArgs = { - id?: Maybe - slug?: Maybe -} - -export type QueryProductsArgs = { - options?: Maybe -} - -export type QuerySearchArgs = { - input: SearchInput -} - -export type Mutation = { - __typename?: 'Mutation' - /** Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. */ - addItemToOrder: UpdateOrderItemsResult - /** Remove an OrderLine from the Order */ - removeOrderLine: RemoveOrderItemsResult - /** Remove all OrderLine from the Order */ - removeAllOrderLines: RemoveOrderItemsResult - /** Adjusts an OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available. */ - adjustOrderLine: UpdateOrderItemsResult - /** Applies the given coupon code to the active Order */ - applyCouponCode: ApplyCouponCodeResult - /** Removes the given coupon code from the active Order */ - removeCouponCode?: Maybe - /** Transitions an Order to a new state. Valid next states can be found by querying `nextOrderStates` */ - transitionOrderToState?: Maybe - /** Sets the shipping address for this order */ - setOrderShippingAddress: ActiveOrderResult - /** Sets the billing address for this order */ - setOrderBillingAddress: ActiveOrderResult - /** Allows any custom fields to be set for the active order */ - setOrderCustomFields: ActiveOrderResult - /** Sets the shipping method by id, which can be obtained with the `eligibleShippingMethods` query */ - setOrderShippingMethod: SetOrderShippingMethodResult - /** Add a Payment to the Order */ - addPaymentToOrder: AddPaymentToOrderResult - /** Set the Customer for the Order. Required only if the Customer is not currently logged in */ - setCustomerForOrder: SetCustomerForOrderResult - /** Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` */ - login: NativeAuthenticationResult - /** Authenticates the user using a named authentication strategy */ - authenticate: AuthenticationResult - /** End the current authenticated session */ - logout: Success - /** - * Register a Customer account with the given credentials. There are three possible registration flows: - * - * _If `authOptions.requireVerification` is set to `true`:_ - * - * 1. **The Customer is registered _with_ a password**. A verificationToken will be created (and typically emailed to the Customer). That - * verificationToken would then be passed to the `verifyCustomerAccount` mutation _without_ a password. The Customer is then - * verified and authenticated in one step. - * 2. **The Customer is registered _without_ a password**. A verificationToken will be created (and typically emailed to the Customer). That - * verificationToken would then be passed to the `verifyCustomerAccount` mutation _with_ the chosed password of the Customer. The Customer is then - * verified and authenticated in one step. - * - * _If `authOptions.requireVerification` is set to `false`:_ - * - * 3. The Customer _must_ be registered _with_ a password. No further action is needed - the Customer is able to authenticate immediately. - */ - registerCustomerAccount: RegisterCustomerAccountResult - /** Regenerate and send a verification token for a new Customer registration. Only applicable if `authOptions.requireVerification` is set to true. */ - refreshCustomerVerification: RefreshCustomerVerificationResult - /** Update an existing Customer */ - updateCustomer: Customer - /** Create a new Customer Address */ - createCustomerAddress: Address - /** Update an existing Address */ - updateCustomerAddress: Address - /** Delete an existing Address */ - deleteCustomerAddress: Success - /** - * Verify a Customer email address with the token sent to that address. Only applicable if `authOptions.requireVerification` is set to true. - * - * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the a password _must_ be - * provided here. - */ - verifyCustomerAccount: VerifyCustomerAccountResult - /** Update the password of the active Customer */ - updateCustomerPassword: UpdateCustomerPasswordResult - /** - * Request to update the emailAddress of the active Customer. If `authOptions.requireVerification` is enabled - * (as is the default), then the `identifierChangeToken` will be assigned to the current User and - * a IdentifierChangeRequestEvent will be raised. This can then be used e.g. by the EmailPlugin to email - * that verification token to the Customer, which is then used to verify the change of email address. - */ - requestUpdateCustomerEmailAddress: RequestUpdateCustomerEmailAddressResult - /** - * Confirm the update of the emailAddress with the provided token, which has been generated by the - * `requestUpdateCustomerEmailAddress` mutation. - */ - updateCustomerEmailAddress: UpdateCustomerEmailAddressResult - /** Requests a password reset email to be sent */ - requestPasswordReset?: Maybe - /** Resets a Customer's password based on the provided token */ - resetPassword: ResetPasswordResult -} - -export type MutationAddItemToOrderArgs = { - productVariantId: Scalars['ID'] - quantity: Scalars['Int'] -} - -export type MutationRemoveOrderLineArgs = { - orderLineId: Scalars['ID'] -} - -export type MutationAdjustOrderLineArgs = { - orderLineId: Scalars['ID'] - quantity: Scalars['Int'] -} - -export type MutationApplyCouponCodeArgs = { - couponCode: Scalars['String'] -} - -export type MutationRemoveCouponCodeArgs = { - couponCode: Scalars['String'] -} - -export type MutationTransitionOrderToStateArgs = { - state: Scalars['String'] -} - -export type MutationSetOrderShippingAddressArgs = { - input: CreateAddressInput -} - -export type MutationSetOrderBillingAddressArgs = { - input: CreateAddressInput -} - -export type MutationSetOrderCustomFieldsArgs = { - input: UpdateOrderInput -} - -export type MutationSetOrderShippingMethodArgs = { - shippingMethodId: Scalars['ID'] -} - -export type MutationAddPaymentToOrderArgs = { - input: PaymentInput -} - -export type MutationSetCustomerForOrderArgs = { - input: CreateCustomerInput -} - -export type MutationLoginArgs = { - username: Scalars['String'] - password: Scalars['String'] - rememberMe?: Maybe -} - -export type MutationAuthenticateArgs = { - input: AuthenticationInput - rememberMe?: Maybe -} - -export type MutationRegisterCustomerAccountArgs = { - input: RegisterCustomerInput -} - -export type MutationRefreshCustomerVerificationArgs = { - emailAddress: Scalars['String'] -} - -export type MutationUpdateCustomerArgs = { - input: UpdateCustomerInput -} - -export type MutationCreateCustomerAddressArgs = { - input: CreateAddressInput -} - -export type MutationUpdateCustomerAddressArgs = { - input: UpdateAddressInput -} - -export type MutationDeleteCustomerAddressArgs = { - id: Scalars['ID'] -} - -export type MutationVerifyCustomerAccountArgs = { - token: Scalars['String'] - password?: Maybe -} - -export type MutationUpdateCustomerPasswordArgs = { - currentPassword: Scalars['String'] - newPassword: Scalars['String'] -} - -export type MutationRequestUpdateCustomerEmailAddressArgs = { - password: Scalars['String'] - newEmailAddress: Scalars['String'] -} - -export type MutationUpdateCustomerEmailAddressArgs = { - token: Scalars['String'] -} - -export type MutationRequestPasswordResetArgs = { - emailAddress: Scalars['String'] -} - -export type MutationResetPasswordArgs = { - token: Scalars['String'] - password: Scalars['String'] -} - -export type Address = Node & { - __typename?: 'Address' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - fullName?: Maybe - company?: Maybe - streetLine1: Scalars['String'] - streetLine2?: Maybe - city?: Maybe - province?: Maybe - postalCode?: Maybe - country: Country - phoneNumber?: Maybe - defaultShippingAddress?: Maybe - defaultBillingAddress?: Maybe - customFields?: Maybe -} - -export type Asset = Node & { - __typename?: 'Asset' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - name: Scalars['String'] - type: AssetType - fileSize: Scalars['Int'] - mimeType: Scalars['String'] - width: Scalars['Int'] - height: Scalars['Int'] - source: Scalars['String'] - preview: Scalars['String'] - focalPoint?: Maybe - customFields?: Maybe -} - -export type Coordinate = { - __typename?: 'Coordinate' - x: Scalars['Float'] - y: Scalars['Float'] -} - -export type AssetList = PaginatedList & { - __typename?: 'AssetList' - items: Array - totalItems: Scalars['Int'] -} - -export enum AssetType { - Image = 'IMAGE', - Video = 'VIDEO', - Binary = 'BINARY', -} - -export type CurrentUser = { - __typename?: 'CurrentUser' - id: Scalars['ID'] - identifier: Scalars['String'] - channels: Array -} - -export type CurrentUserChannel = { - __typename?: 'CurrentUserChannel' - id: Scalars['ID'] - token: Scalars['String'] - code: Scalars['String'] - permissions: Array -} - -export type Channel = Node & { - __typename?: 'Channel' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - code: Scalars['String'] - token: Scalars['String'] - defaultTaxZone?: Maybe - defaultShippingZone?: Maybe - defaultLanguageCode: LanguageCode - currencyCode: CurrencyCode - pricesIncludeTax: Scalars['Boolean'] - customFields?: Maybe -} - -export type Collection = Node & { - __typename?: 'Collection' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode?: Maybe - name: Scalars['String'] - slug: Scalars['String'] - breadcrumbs: Array - position: Scalars['Int'] - description: Scalars['String'] - featuredAsset?: Maybe - assets: Array - parent?: Maybe - children?: Maybe> - filters: Array - translations: Array - productVariants: ProductVariantList - customFields?: Maybe -} - -export type CollectionProductVariantsArgs = { - options?: Maybe -} - -export type CollectionBreadcrumb = { - __typename?: 'CollectionBreadcrumb' - id: Scalars['ID'] - name: Scalars['String'] - slug: Scalars['String'] -} - -export type CollectionTranslation = { - __typename?: 'CollectionTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] - slug: Scalars['String'] - description: Scalars['String'] -} - -export type CollectionList = PaginatedList & { - __typename?: 'CollectionList' - items: Array - totalItems: Scalars['Int'] -} - -export type ProductVariantList = PaginatedList & { - __typename?: 'ProductVariantList' - items: Array - totalItems: Scalars['Int'] -} - -export type ProductVariantListOptions = { - skip?: Maybe - take?: Maybe - sort?: Maybe - filter?: Maybe -} - -export enum GlobalFlag { - True = 'TRUE', - False = 'FALSE', - Inherit = 'INHERIT', -} - -export enum AdjustmentType { - Promotion = 'PROMOTION', - DistributedOrderPromotion = 'DISTRIBUTED_ORDER_PROMOTION', -} - -export enum DeletionResult { - /** The entity was successfully deleted */ - Deleted = 'DELETED', - /** Deletion did not take place, reason given in message */ - NotDeleted = 'NOT_DELETED', -} - -/** - * @description - * Permissions for administrators and customers. Used to control access to - * GraphQL resolvers via the {@link Allow} decorator. - * - * @docsCategory common - */ -export enum Permission { - Placeholder = 'Placeholder', - /** Authenticated means simply that the user is logged in */ - Authenticated = 'Authenticated', - /** SuperAdmin has unrestricted access to all operations */ - SuperAdmin = 'SuperAdmin', - /** Owner means the user owns this entity, e.g. a Customer's own Order */ - Owner = 'Owner', - /** Public means any unauthenticated user may perform the operation */ - Public = 'Public', - /** Grants permission to update GlobalSettings */ - UpdateGlobalSettings = 'UpdateGlobalSettings', - /** Grants permission to create Products, Facets, Assets, Collections */ - CreateCatalog = 'CreateCatalog', - /** Grants permission to read Products, Facets, Assets, Collections */ - ReadCatalog = 'ReadCatalog', - /** Grants permission to update Products, Facets, Assets, Collections */ - UpdateCatalog = 'UpdateCatalog', - /** Grants permission to delete Products, Facets, Assets, Collections */ - DeleteCatalog = 'DeleteCatalog', - /** Grants permission to create PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - CreateSettings = 'CreateSettings', - /** Grants permission to read PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - ReadSettings = 'ReadSettings', - /** Grants permission to update PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - UpdateSettings = 'UpdateSettings', - /** Grants permission to delete PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings */ - DeleteSettings = 'DeleteSettings', - /** Grants permission to create Administrator */ - CreateAdministrator = 'CreateAdministrator', - /** Grants permission to read Administrator */ - ReadAdministrator = 'ReadAdministrator', - /** Grants permission to update Administrator */ - UpdateAdministrator = 'UpdateAdministrator', - /** Grants permission to delete Administrator */ - DeleteAdministrator = 'DeleteAdministrator', - /** Grants permission to create Asset */ - CreateAsset = 'CreateAsset', - /** Grants permission to read Asset */ - ReadAsset = 'ReadAsset', - /** Grants permission to update Asset */ - UpdateAsset = 'UpdateAsset', - /** Grants permission to delete Asset */ - DeleteAsset = 'DeleteAsset', - /** Grants permission to create Channel */ - CreateChannel = 'CreateChannel', - /** Grants permission to read Channel */ - ReadChannel = 'ReadChannel', - /** Grants permission to update Channel */ - UpdateChannel = 'UpdateChannel', - /** Grants permission to delete Channel */ - DeleteChannel = 'DeleteChannel', - /** Grants permission to create Collection */ - CreateCollection = 'CreateCollection', - /** Grants permission to read Collection */ - ReadCollection = 'ReadCollection', - /** Grants permission to update Collection */ - UpdateCollection = 'UpdateCollection', - /** Grants permission to delete Collection */ - DeleteCollection = 'DeleteCollection', - /** Grants permission to create Country */ - CreateCountry = 'CreateCountry', - /** Grants permission to read Country */ - ReadCountry = 'ReadCountry', - /** Grants permission to update Country */ - UpdateCountry = 'UpdateCountry', - /** Grants permission to delete Country */ - DeleteCountry = 'DeleteCountry', - /** Grants permission to create Customer */ - CreateCustomer = 'CreateCustomer', - /** Grants permission to read Customer */ - ReadCustomer = 'ReadCustomer', - /** Grants permission to update Customer */ - UpdateCustomer = 'UpdateCustomer', - /** Grants permission to delete Customer */ - DeleteCustomer = 'DeleteCustomer', - /** Grants permission to create CustomerGroup */ - CreateCustomerGroup = 'CreateCustomerGroup', - /** Grants permission to read CustomerGroup */ - ReadCustomerGroup = 'ReadCustomerGroup', - /** Grants permission to update CustomerGroup */ - UpdateCustomerGroup = 'UpdateCustomerGroup', - /** Grants permission to delete CustomerGroup */ - DeleteCustomerGroup = 'DeleteCustomerGroup', - /** Grants permission to create Facet */ - CreateFacet = 'CreateFacet', - /** Grants permission to read Facet */ - ReadFacet = 'ReadFacet', - /** Grants permission to update Facet */ - UpdateFacet = 'UpdateFacet', - /** Grants permission to delete Facet */ - DeleteFacet = 'DeleteFacet', - /** Grants permission to create Order */ - CreateOrder = 'CreateOrder', - /** Grants permission to read Order */ - ReadOrder = 'ReadOrder', - /** Grants permission to update Order */ - UpdateOrder = 'UpdateOrder', - /** Grants permission to delete Order */ - DeleteOrder = 'DeleteOrder', - /** Grants permission to create PaymentMethod */ - CreatePaymentMethod = 'CreatePaymentMethod', - /** Grants permission to read PaymentMethod */ - ReadPaymentMethod = 'ReadPaymentMethod', - /** Grants permission to update PaymentMethod */ - UpdatePaymentMethod = 'UpdatePaymentMethod', - /** Grants permission to delete PaymentMethod */ - DeletePaymentMethod = 'DeletePaymentMethod', - /** Grants permission to create Product */ - CreateProduct = 'CreateProduct', - /** Grants permission to read Product */ - ReadProduct = 'ReadProduct', - /** Grants permission to update Product */ - UpdateProduct = 'UpdateProduct', - /** Grants permission to delete Product */ - DeleteProduct = 'DeleteProduct', - /** Grants permission to create Promotion */ - CreatePromotion = 'CreatePromotion', - /** Grants permission to read Promotion */ - ReadPromotion = 'ReadPromotion', - /** Grants permission to update Promotion */ - UpdatePromotion = 'UpdatePromotion', - /** Grants permission to delete Promotion */ - DeletePromotion = 'DeletePromotion', - /** Grants permission to create ShippingMethod */ - CreateShippingMethod = 'CreateShippingMethod', - /** Grants permission to read ShippingMethod */ - ReadShippingMethod = 'ReadShippingMethod', - /** Grants permission to update ShippingMethod */ - UpdateShippingMethod = 'UpdateShippingMethod', - /** Grants permission to delete ShippingMethod */ - DeleteShippingMethod = 'DeleteShippingMethod', - /** Grants permission to create Tag */ - CreateTag = 'CreateTag', - /** Grants permission to read Tag */ - ReadTag = 'ReadTag', - /** Grants permission to update Tag */ - UpdateTag = 'UpdateTag', - /** Grants permission to delete Tag */ - DeleteTag = 'DeleteTag', - /** Grants permission to create TaxCategory */ - CreateTaxCategory = 'CreateTaxCategory', - /** Grants permission to read TaxCategory */ - ReadTaxCategory = 'ReadTaxCategory', - /** Grants permission to update TaxCategory */ - UpdateTaxCategory = 'UpdateTaxCategory', - /** Grants permission to delete TaxCategory */ - DeleteTaxCategory = 'DeleteTaxCategory', - /** Grants permission to create TaxRate */ - CreateTaxRate = 'CreateTaxRate', - /** Grants permission to read TaxRate */ - ReadTaxRate = 'ReadTaxRate', - /** Grants permission to update TaxRate */ - UpdateTaxRate = 'UpdateTaxRate', - /** Grants permission to delete TaxRate */ - DeleteTaxRate = 'DeleteTaxRate', - /** Grants permission to create System */ - CreateSystem = 'CreateSystem', - /** Grants permission to read System */ - ReadSystem = 'ReadSystem', - /** Grants permission to update System */ - UpdateSystem = 'UpdateSystem', - /** Grants permission to delete System */ - DeleteSystem = 'DeleteSystem', - /** Grants permission to create Zone */ - CreateZone = 'CreateZone', - /** Grants permission to read Zone */ - ReadZone = 'ReadZone', - /** Grants permission to update Zone */ - UpdateZone = 'UpdateZone', - /** Grants permission to delete Zone */ - DeleteZone = 'DeleteZone', -} - -export enum SortOrder { - Asc = 'ASC', - Desc = 'DESC', -} - -export enum ErrorCode { - UnknownError = 'UNKNOWN_ERROR', - NativeAuthStrategyError = 'NATIVE_AUTH_STRATEGY_ERROR', - InvalidCredentialsError = 'INVALID_CREDENTIALS_ERROR', - OrderStateTransitionError = 'ORDER_STATE_TRANSITION_ERROR', - EmailAddressConflictError = 'EMAIL_ADDRESS_CONFLICT_ERROR', - OrderLimitError = 'ORDER_LIMIT_ERROR', - NegativeQuantityError = 'NEGATIVE_QUANTITY_ERROR', - InsufficientStockError = 'INSUFFICIENT_STOCK_ERROR', - OrderModificationError = 'ORDER_MODIFICATION_ERROR', - IneligibleShippingMethodError = 'INELIGIBLE_SHIPPING_METHOD_ERROR', - OrderPaymentStateError = 'ORDER_PAYMENT_STATE_ERROR', - IneligiblePaymentMethodError = 'INELIGIBLE_PAYMENT_METHOD_ERROR', - PaymentFailedError = 'PAYMENT_FAILED_ERROR', - PaymentDeclinedError = 'PAYMENT_DECLINED_ERROR', - CouponCodeInvalidError = 'COUPON_CODE_INVALID_ERROR', - CouponCodeExpiredError = 'COUPON_CODE_EXPIRED_ERROR', - CouponCodeLimitError = 'COUPON_CODE_LIMIT_ERROR', - AlreadyLoggedInError = 'ALREADY_LOGGED_IN_ERROR', - MissingPasswordError = 'MISSING_PASSWORD_ERROR', - PasswordAlreadySetError = 'PASSWORD_ALREADY_SET_ERROR', - VerificationTokenInvalidError = 'VERIFICATION_TOKEN_INVALID_ERROR', - VerificationTokenExpiredError = 'VERIFICATION_TOKEN_EXPIRED_ERROR', - IdentifierChangeTokenInvalidError = 'IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR', - IdentifierChangeTokenExpiredError = 'IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR', - PasswordResetTokenInvalidError = 'PASSWORD_RESET_TOKEN_INVALID_ERROR', - PasswordResetTokenExpiredError = 'PASSWORD_RESET_TOKEN_EXPIRED_ERROR', - NotVerifiedError = 'NOT_VERIFIED_ERROR', - NoActiveOrderError = 'NO_ACTIVE_ORDER_ERROR', -} - -export enum LogicalOperator { - And = 'AND', - Or = 'OR', -} - -/** Retured when attempting an operation that relies on the NativeAuthStrategy, if that strategy is not configured. */ -export type NativeAuthStrategyError = ErrorResult & { - __typename?: 'NativeAuthStrategyError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** Returned if the user authentication credentials are not valid */ -export type InvalidCredentialsError = ErrorResult & { - __typename?: 'InvalidCredentialsError' - errorCode: ErrorCode - message: Scalars['String'] - authenticationError: Scalars['String'] -} - -/** Returned if there is an error in transitioning the Order state */ -export type OrderStateTransitionError = ErrorResult & { - __typename?: 'OrderStateTransitionError' - errorCode: ErrorCode - message: Scalars['String'] - transitionError: Scalars['String'] - fromState: Scalars['String'] - toState: Scalars['String'] -} - -/** Retured when attemting to create a Customer with an email address already registered to an existing User. */ -export type EmailAddressConflictError = ErrorResult & { - __typename?: 'EmailAddressConflictError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** Retured when the maximum order size limit has been reached. */ -export type OrderLimitError = ErrorResult & { - __typename?: 'OrderLimitError' - errorCode: ErrorCode - message: Scalars['String'] - maxItems: Scalars['Int'] -} - -/** Retured when attemting to set a negative OrderLine quantity. */ -export type NegativeQuantityError = ErrorResult & { - __typename?: 'NegativeQuantityError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** Returned when attempting to add more items to the Order than are available */ -export type InsufficientStockError = ErrorResult & { - __typename?: 'InsufficientStockError' - errorCode: ErrorCode - message: Scalars['String'] - quantityAvailable: Scalars['Int'] - order: Order -} - -export type PaginatedList = { - items: Array - totalItems: Scalars['Int'] -} - -export type Node = { - id: Scalars['ID'] -} - -export type ErrorResult = { - errorCode: ErrorCode - message: Scalars['String'] -} - -export type Adjustment = { - __typename?: 'Adjustment' - adjustmentSource: Scalars['String'] - type: AdjustmentType - description: Scalars['String'] - amount: Scalars['Int'] -} - -export type TaxLine = { - __typename?: 'TaxLine' - description: Scalars['String'] - taxRate: Scalars['Float'] -} - -export type ConfigArg = { - __typename?: 'ConfigArg' - name: Scalars['String'] - value: Scalars['String'] -} - -export type ConfigArgDefinition = { - __typename?: 'ConfigArgDefinition' - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - required: Scalars['Boolean'] - defaultValue?: Maybe - label?: Maybe - description?: Maybe - ui?: Maybe -} - -export type ConfigurableOperation = { - __typename?: 'ConfigurableOperation' - code: Scalars['String'] - args: Array -} - -export type ConfigurableOperationDefinition = { - __typename?: 'ConfigurableOperationDefinition' - code: Scalars['String'] - args: Array - description: Scalars['String'] -} - -export type DeletionResponse = { - __typename?: 'DeletionResponse' - result: DeletionResult - message?: Maybe -} - -export type ConfigArgInput = { - name: Scalars['String'] - /** A JSON stringified representation of the actual value */ - value: Scalars['String'] -} - -export type ConfigurableOperationInput = { - code: Scalars['String'] - arguments: Array -} - -export type StringOperators = { - eq?: Maybe - notEq?: Maybe - contains?: Maybe - notContains?: Maybe - in?: Maybe> - notIn?: Maybe> - regex?: Maybe -} - -export type BooleanOperators = { - eq?: Maybe -} - -export type NumberRange = { - start: Scalars['Float'] - end: Scalars['Float'] -} - -export type NumberOperators = { - eq?: Maybe - lt?: Maybe - lte?: Maybe - gt?: Maybe - gte?: Maybe - between?: Maybe -} - -export type DateRange = { - start: Scalars['DateTime'] - end: Scalars['DateTime'] -} - -export type DateOperators = { - eq?: Maybe - before?: Maybe - after?: Maybe - between?: Maybe -} - -/** - * Used to construct boolean expressions for filtering search results - * by FacetValue ID. Examples: - * - * * ID=1 OR ID=2: `{ facetValueFilters: [{ or: [1,2] }] }` - * * ID=1 AND ID=2: `{ facetValueFilters: [{ and: 1 }, { and: 2 }] }` - * * ID=1 AND (ID=2 OR ID=3): `{ facetValueFilters: [{ and: 1 }, { or: [2,3] }] }` - */ -export type FacetValueFilterInput = { - and?: Maybe - or?: Maybe> -} - -export type SearchInput = { - term?: Maybe - facetValueIds?: Maybe> - facetValueOperator?: Maybe - facetValueFilters?: Maybe> - collectionId?: Maybe - collectionSlug?: Maybe - groupByProduct?: Maybe - take?: Maybe - skip?: Maybe - sort?: Maybe -} - -export type SearchResultSortParameter = { - name?: Maybe - price?: Maybe -} - -export type CreateCustomerInput = { - title?: Maybe - firstName: Scalars['String'] - lastName: Scalars['String'] - phoneNumber?: Maybe - emailAddress: Scalars['String'] - customFields?: Maybe -} - -export type CreateAddressInput = { - fullName?: Maybe - company?: Maybe - streetLine1: Scalars['String'] - streetLine2?: Maybe - city?: Maybe - province?: Maybe - postalCode?: Maybe - countryCode: Scalars['String'] - phoneNumber?: Maybe - defaultShippingAddress?: Maybe - defaultBillingAddress?: Maybe - customFields?: Maybe -} - -export type UpdateAddressInput = { - id: Scalars['ID'] - fullName?: Maybe - company?: Maybe - streetLine1?: Maybe - streetLine2?: Maybe - city?: Maybe - province?: Maybe - postalCode?: Maybe - countryCode?: Maybe - phoneNumber?: Maybe - defaultShippingAddress?: Maybe - defaultBillingAddress?: Maybe - customFields?: Maybe -} - -/** Indicates that an operation succeeded, where we do not want to return any more specific information. */ -export type Success = { - __typename?: 'Success' - success: Scalars['Boolean'] -} - -export type ShippingMethodQuote = { - __typename?: 'ShippingMethodQuote' - id: Scalars['ID'] - price: Scalars['Int'] - priceWithTax: Scalars['Int'] - code: Scalars['String'] - name: Scalars['String'] - description: Scalars['String'] - /** Any optional metadata returned by the ShippingCalculator in the ShippingCalculationResult */ - metadata?: Maybe -} - -export type PaymentMethodQuote = { - __typename?: 'PaymentMethodQuote' - id: Scalars['ID'] - code: Scalars['String'] - name: Scalars['String'] - description: Scalars['String'] - isEligible: Scalars['Boolean'] - eligibilityMessage?: Maybe -} - -export type Country = Node & { - __typename?: 'Country' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - code: Scalars['String'] - name: Scalars['String'] - enabled: Scalars['Boolean'] - translations: Array -} - -export type CountryTranslation = { - __typename?: 'CountryTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] -} - -export type CountryList = PaginatedList & { - __typename?: 'CountryList' - items: Array - totalItems: Scalars['Int'] -} - -/** - * @description - * ISO 4217 currency code - * - * @docsCategory common - */ -export enum CurrencyCode { - /** United Arab Emirates dirham */ - Aed = 'AED', - /** Afghan afghani */ - Afn = 'AFN', - /** Albanian lek */ - All = 'ALL', - /** Armenian dram */ - Amd = 'AMD', - /** Netherlands Antillean guilder */ - Ang = 'ANG', - /** Angolan kwanza */ - Aoa = 'AOA', - /** Argentine peso */ - Ars = 'ARS', - /** Australian dollar */ - Aud = 'AUD', - /** Aruban florin */ - Awg = 'AWG', - /** Azerbaijani manat */ - Azn = 'AZN', - /** Bosnia and Herzegovina convertible mark */ - Bam = 'BAM', - /** Barbados dollar */ - Bbd = 'BBD', - /** Bangladeshi taka */ - Bdt = 'BDT', - /** Bulgarian lev */ - Bgn = 'BGN', - /** Bahraini dinar */ - Bhd = 'BHD', - /** Burundian franc */ - Bif = 'BIF', - /** Bermudian dollar */ - Bmd = 'BMD', - /** Brunei dollar */ - Bnd = 'BND', - /** Boliviano */ - Bob = 'BOB', - /** Brazilian real */ - Brl = 'BRL', - /** Bahamian dollar */ - Bsd = 'BSD', - /** Bhutanese ngultrum */ - Btn = 'BTN', - /** Botswana pula */ - Bwp = 'BWP', - /** Belarusian ruble */ - Byn = 'BYN', - /** Belize dollar */ - Bzd = 'BZD', - /** Canadian dollar */ - Cad = 'CAD', - /** Congolese franc */ - Cdf = 'CDF', - /** Swiss franc */ - Chf = 'CHF', - /** Chilean peso */ - Clp = 'CLP', - /** Renminbi (Chinese) yuan */ - Cny = 'CNY', - /** Colombian peso */ - Cop = 'COP', - /** Costa Rican colon */ - Crc = 'CRC', - /** Cuban convertible peso */ - Cuc = 'CUC', - /** Cuban peso */ - Cup = 'CUP', - /** Cape Verde escudo */ - Cve = 'CVE', - /** Czech koruna */ - Czk = 'CZK', - /** Djiboutian franc */ - Djf = 'DJF', - /** Danish krone */ - Dkk = 'DKK', - /** Dominican peso */ - Dop = 'DOP', - /** Algerian dinar */ - Dzd = 'DZD', - /** Egyptian pound */ - Egp = 'EGP', - /** Eritrean nakfa */ - Ern = 'ERN', - /** Ethiopian birr */ - Etb = 'ETB', - /** Euro */ - Eur = 'EUR', - /** Fiji dollar */ - Fjd = 'FJD', - /** Falkland Islands pound */ - Fkp = 'FKP', - /** Pound sterling */ - Gbp = 'GBP', - /** Georgian lari */ - Gel = 'GEL', - /** Ghanaian cedi */ - Ghs = 'GHS', - /** Gibraltar pound */ - Gip = 'GIP', - /** Gambian dalasi */ - Gmd = 'GMD', - /** Guinean franc */ - Gnf = 'GNF', - /** Guatemalan quetzal */ - Gtq = 'GTQ', - /** Guyanese dollar */ - Gyd = 'GYD', - /** Hong Kong dollar */ - Hkd = 'HKD', - /** Honduran lempira */ - Hnl = 'HNL', - /** Croatian kuna */ - Hrk = 'HRK', - /** Haitian gourde */ - Htg = 'HTG', - /** Hungarian forint */ - Huf = 'HUF', - /** Indonesian rupiah */ - Idr = 'IDR', - /** Israeli new shekel */ - Ils = 'ILS', - /** Indian rupee */ - Inr = 'INR', - /** Iraqi dinar */ - Iqd = 'IQD', - /** Iranian rial */ - Irr = 'IRR', - /** Icelandic króna */ - Isk = 'ISK', - /** Jamaican dollar */ - Jmd = 'JMD', - /** Jordanian dinar */ - Jod = 'JOD', - /** Japanese yen */ - Jpy = 'JPY', - /** Kenyan shilling */ - Kes = 'KES', - /** Kyrgyzstani som */ - Kgs = 'KGS', - /** Cambodian riel */ - Khr = 'KHR', - /** Comoro franc */ - Kmf = 'KMF', - /** North Korean won */ - Kpw = 'KPW', - /** South Korean won */ - Krw = 'KRW', - /** Kuwaiti dinar */ - Kwd = 'KWD', - /** Cayman Islands dollar */ - Kyd = 'KYD', - /** Kazakhstani tenge */ - Kzt = 'KZT', - /** Lao kip */ - Lak = 'LAK', - /** Lebanese pound */ - Lbp = 'LBP', - /** Sri Lankan rupee */ - Lkr = 'LKR', - /** Liberian dollar */ - Lrd = 'LRD', - /** Lesotho loti */ - Lsl = 'LSL', - /** Libyan dinar */ - Lyd = 'LYD', - /** Moroccan dirham */ - Mad = 'MAD', - /** Moldovan leu */ - Mdl = 'MDL', - /** Malagasy ariary */ - Mga = 'MGA', - /** Macedonian denar */ - Mkd = 'MKD', - /** Myanmar kyat */ - Mmk = 'MMK', - /** Mongolian tögrög */ - Mnt = 'MNT', - /** Macanese pataca */ - Mop = 'MOP', - /** Mauritanian ouguiya */ - Mru = 'MRU', - /** Mauritian rupee */ - Mur = 'MUR', - /** Maldivian rufiyaa */ - Mvr = 'MVR', - /** Malawian kwacha */ - Mwk = 'MWK', - /** Mexican peso */ - Mxn = 'MXN', - /** Malaysian ringgit */ - Myr = 'MYR', - /** Mozambican metical */ - Mzn = 'MZN', - /** Namibian dollar */ - Nad = 'NAD', - /** Nigerian naira */ - Ngn = 'NGN', - /** Nicaraguan córdoba */ - Nio = 'NIO', - /** Norwegian krone */ - Nok = 'NOK', - /** Nepalese rupee */ - Npr = 'NPR', - /** New Zealand dollar */ - Nzd = 'NZD', - /** Omani rial */ - Omr = 'OMR', - /** Panamanian balboa */ - Pab = 'PAB', - /** Peruvian sol */ - Pen = 'PEN', - /** Papua New Guinean kina */ - Pgk = 'PGK', - /** Philippine peso */ - Php = 'PHP', - /** Pakistani rupee */ - Pkr = 'PKR', - /** Polish złoty */ - Pln = 'PLN', - /** Paraguayan guaraní */ - Pyg = 'PYG', - /** Qatari riyal */ - Qar = 'QAR', - /** Romanian leu */ - Ron = 'RON', - /** Serbian dinar */ - Rsd = 'RSD', - /** Russian ruble */ - Rub = 'RUB', - /** Rwandan franc */ - Rwf = 'RWF', - /** Saudi riyal */ - Sar = 'SAR', - /** Solomon Islands dollar */ - Sbd = 'SBD', - /** Seychelles rupee */ - Scr = 'SCR', - /** Sudanese pound */ - Sdg = 'SDG', - /** Swedish krona/kronor */ - Sek = 'SEK', - /** Singapore dollar */ - Sgd = 'SGD', - /** Saint Helena pound */ - Shp = 'SHP', - /** Sierra Leonean leone */ - Sll = 'SLL', - /** Somali shilling */ - Sos = 'SOS', - /** Surinamese dollar */ - Srd = 'SRD', - /** South Sudanese pound */ - Ssp = 'SSP', - /** São Tomé and Príncipe dobra */ - Stn = 'STN', - /** Salvadoran colón */ - Svc = 'SVC', - /** Syrian pound */ - Syp = 'SYP', - /** Swazi lilangeni */ - Szl = 'SZL', - /** Thai baht */ - Thb = 'THB', - /** Tajikistani somoni */ - Tjs = 'TJS', - /** Turkmenistan manat */ - Tmt = 'TMT', - /** Tunisian dinar */ - Tnd = 'TND', - /** Tongan paʻanga */ - Top = 'TOP', - /** Turkish lira */ - Try = 'TRY', - /** Trinidad and Tobago dollar */ - Ttd = 'TTD', - /** New Taiwan dollar */ - Twd = 'TWD', - /** Tanzanian shilling */ - Tzs = 'TZS', - /** Ukrainian hryvnia */ - Uah = 'UAH', - /** Ugandan shilling */ - Ugx = 'UGX', - /** United States dollar */ - Usd = 'USD', - /** Uruguayan peso */ - Uyu = 'UYU', - /** Uzbekistan som */ - Uzs = 'UZS', - /** Venezuelan bolívar soberano */ - Ves = 'VES', - /** Vietnamese đồng */ - Vnd = 'VND', - /** Vanuatu vatu */ - Vuv = 'VUV', - /** Samoan tala */ - Wst = 'WST', - /** CFA franc BEAC */ - Xaf = 'XAF', - /** East Caribbean dollar */ - Xcd = 'XCD', - /** CFA franc BCEAO */ - Xof = 'XOF', - /** CFP franc (franc Pacifique) */ - Xpf = 'XPF', - /** Yemeni rial */ - Yer = 'YER', - /** South African rand */ - Zar = 'ZAR', - /** Zambian kwacha */ - Zmw = 'ZMW', - /** Zimbabwean dollar */ - Zwl = 'ZWL', -} - -export type CustomField = { - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - label?: Maybe> - description?: Maybe> - readonly?: Maybe - internal?: Maybe -} - -export type StringCustomFieldConfig = CustomField & { - __typename?: 'StringCustomFieldConfig' - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - length?: Maybe - label?: Maybe> - description?: Maybe> - readonly?: Maybe - internal?: Maybe - pattern?: Maybe - options?: Maybe> -} - -export type StringFieldOption = { - __typename?: 'StringFieldOption' - value: Scalars['String'] - label?: Maybe> -} - -export type LocaleStringCustomFieldConfig = CustomField & { - __typename?: 'LocaleStringCustomFieldConfig' - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - length?: Maybe - label?: Maybe> - description?: Maybe> - readonly?: Maybe - internal?: Maybe - pattern?: Maybe -} - -export type IntCustomFieldConfig = CustomField & { - __typename?: 'IntCustomFieldConfig' - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - label?: Maybe> - description?: Maybe> - readonly?: Maybe - internal?: Maybe - min?: Maybe - max?: Maybe - step?: Maybe -} - -export type FloatCustomFieldConfig = CustomField & { - __typename?: 'FloatCustomFieldConfig' - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - label?: Maybe> - description?: Maybe> - readonly?: Maybe - internal?: Maybe - min?: Maybe - max?: Maybe - step?: Maybe -} - -export type BooleanCustomFieldConfig = CustomField & { - __typename?: 'BooleanCustomFieldConfig' - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - label?: Maybe> - description?: Maybe> - readonly?: Maybe - internal?: Maybe -} - -/** - * Expects the same validation formats as the `` HTML element. - * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#Additional_attributes - */ -export type DateTimeCustomFieldConfig = CustomField & { - __typename?: 'DateTimeCustomFieldConfig' - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - label?: Maybe> - description?: Maybe> - readonly?: Maybe - internal?: Maybe - min?: Maybe - max?: Maybe - step?: Maybe -} - -export type RelationCustomFieldConfig = CustomField & { - __typename?: 'RelationCustomFieldConfig' - name: Scalars['String'] - type: Scalars['String'] - list: Scalars['Boolean'] - label?: Maybe> - description?: Maybe> - readonly?: Maybe - internal?: Maybe - entity: Scalars['String'] - scalarFields: Array -} - -export type LocalizedString = { - __typename?: 'LocalizedString' - languageCode: LanguageCode - value: Scalars['String'] -} - -export type CustomFieldConfig = - | StringCustomFieldConfig - | LocaleStringCustomFieldConfig - | IntCustomFieldConfig - | FloatCustomFieldConfig - | BooleanCustomFieldConfig - | DateTimeCustomFieldConfig - | RelationCustomFieldConfig - -export type CustomerGroup = Node & { - __typename?: 'CustomerGroup' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - name: Scalars['String'] - customers: CustomerList -} - -export type CustomerGroupCustomersArgs = { - options?: Maybe -} - -export type CustomerListOptions = { - skip?: Maybe - take?: Maybe - sort?: Maybe - filter?: Maybe -} - -export type Customer = Node & { - __typename?: 'Customer' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - title?: Maybe - firstName: Scalars['String'] - lastName: Scalars['String'] - phoneNumber?: Maybe - emailAddress: Scalars['String'] - addresses?: Maybe> - orders: OrderList - user?: Maybe - customFields?: Maybe -} - -export type CustomerOrdersArgs = { - options?: Maybe -} - -export type CustomerList = PaginatedList & { - __typename?: 'CustomerList' - items: Array - totalItems: Scalars['Int'] -} - -export type FacetValue = Node & { - __typename?: 'FacetValue' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - facet: Facet - name: Scalars['String'] - code: Scalars['String'] - translations: Array - customFields?: Maybe -} - -export type FacetValueTranslation = { - __typename?: 'FacetValueTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] -} - -export type Facet = Node & { - __typename?: 'Facet' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] - code: Scalars['String'] - values: Array - translations: Array - customFields?: Maybe -} - -export type FacetTranslation = { - __typename?: 'FacetTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] -} - -export type FacetList = PaginatedList & { - __typename?: 'FacetList' - items: Array - totalItems: Scalars['Int'] -} - -export type HistoryEntry = Node & { - __typename?: 'HistoryEntry' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - type: HistoryEntryType - data: Scalars['JSON'] -} - -export enum HistoryEntryType { - CustomerRegistered = 'CUSTOMER_REGISTERED', - CustomerVerified = 'CUSTOMER_VERIFIED', - CustomerDetailUpdated = 'CUSTOMER_DETAIL_UPDATED', - CustomerAddedToGroup = 'CUSTOMER_ADDED_TO_GROUP', - CustomerRemovedFromGroup = 'CUSTOMER_REMOVED_FROM_GROUP', - CustomerAddressCreated = 'CUSTOMER_ADDRESS_CREATED', - CustomerAddressUpdated = 'CUSTOMER_ADDRESS_UPDATED', - CustomerAddressDeleted = 'CUSTOMER_ADDRESS_DELETED', - CustomerPasswordUpdated = 'CUSTOMER_PASSWORD_UPDATED', - CustomerPasswordResetRequested = 'CUSTOMER_PASSWORD_RESET_REQUESTED', - CustomerPasswordResetVerified = 'CUSTOMER_PASSWORD_RESET_VERIFIED', - CustomerEmailUpdateRequested = 'CUSTOMER_EMAIL_UPDATE_REQUESTED', - CustomerEmailUpdateVerified = 'CUSTOMER_EMAIL_UPDATE_VERIFIED', - CustomerNote = 'CUSTOMER_NOTE', - OrderStateTransition = 'ORDER_STATE_TRANSITION', - OrderPaymentTransition = 'ORDER_PAYMENT_TRANSITION', - OrderFulfillment = 'ORDER_FULFILLMENT', - OrderCancellation = 'ORDER_CANCELLATION', - OrderRefundTransition = 'ORDER_REFUND_TRANSITION', - OrderFulfillmentTransition = 'ORDER_FULFILLMENT_TRANSITION', - OrderNote = 'ORDER_NOTE', - OrderCouponApplied = 'ORDER_COUPON_APPLIED', - OrderCouponRemoved = 'ORDER_COUPON_REMOVED', - OrderModified = 'ORDER_MODIFIED', -} - -export type HistoryEntryList = PaginatedList & { - __typename?: 'HistoryEntryList' - items: Array - totalItems: Scalars['Int'] -} - -export type HistoryEntryListOptions = { - skip?: Maybe - take?: Maybe - sort?: Maybe - filter?: Maybe -} - -/** - * @description - * Languages in the form of a ISO 639-1 language code with optional - * region or script modifier (e.g. de_AT). The selection available is based - * on the [Unicode CLDR summary list](https://unicode-org.github.io/cldr-staging/charts/37/summary/root.html) - * and includes the major spoken languages of the world and any widely-used variants. - * - * @docsCategory common - */ -export enum LanguageCode { - /** Afrikaans */ - Af = 'af', - /** Akan */ - Ak = 'ak', - /** Albanian */ - Sq = 'sq', - /** Amharic */ - Am = 'am', - /** Arabic */ - Ar = 'ar', - /** Armenian */ - Hy = 'hy', - /** Assamese */ - As = 'as', - /** Azerbaijani */ - Az = 'az', - /** Bambara */ - Bm = 'bm', - /** Bangla */ - Bn = 'bn', - /** Basque */ - Eu = 'eu', - /** Belarusian */ - Be = 'be', - /** Bosnian */ - Bs = 'bs', - /** Breton */ - Br = 'br', - /** Bulgarian */ - Bg = 'bg', - /** Burmese */ - My = 'my', - /** Catalan */ - Ca = 'ca', - /** Chechen */ - Ce = 'ce', - /** Chinese */ - Zh = 'zh', - /** Simplified Chinese */ - ZhHans = 'zh_Hans', - /** Traditional Chinese */ - ZhHant = 'zh_Hant', - /** Church Slavic */ - Cu = 'cu', - /** Cornish */ - Kw = 'kw', - /** Corsican */ - Co = 'co', - /** Croatian */ - Hr = 'hr', - /** Czech */ - Cs = 'cs', - /** Danish */ - Da = 'da', - /** Dutch */ - Nl = 'nl', - /** Flemish */ - NlBe = 'nl_BE', - /** Dzongkha */ - Dz = 'dz', - /** English */ - En = 'en', - /** Australian English */ - EnAu = 'en_AU', - /** Canadian English */ - EnCa = 'en_CA', - /** British English */ - EnGb = 'en_GB', - /** American English */ - EnUs = 'en_US', - /** Esperanto */ - Eo = 'eo', - /** Estonian */ - Et = 'et', - /** Ewe */ - Ee = 'ee', - /** Faroese */ - Fo = 'fo', - /** Finnish */ - Fi = 'fi', - /** French */ - Fr = 'fr', - /** Canadian French */ - FrCa = 'fr_CA', - /** Swiss French */ - FrCh = 'fr_CH', - /** Fulah */ - Ff = 'ff', - /** Galician */ - Gl = 'gl', - /** Ganda */ - Lg = 'lg', - /** Georgian */ - Ka = 'ka', - /** German */ - De = 'de', - /** Austrian German */ - DeAt = 'de_AT', - /** Swiss High German */ - DeCh = 'de_CH', - /** Greek */ - El = 'el', - /** Gujarati */ - Gu = 'gu', - /** Haitian Creole */ - Ht = 'ht', - /** Hausa */ - Ha = 'ha', - /** Hebrew */ - He = 'he', - /** Hindi */ - Hi = 'hi', - /** Hungarian */ - Hu = 'hu', - /** Icelandic */ - Is = 'is', - /** Igbo */ - Ig = 'ig', - /** Indonesian */ - Id = 'id', - /** Interlingua */ - Ia = 'ia', - /** Irish */ - Ga = 'ga', - /** Italian */ - It = 'it', - /** Japanese */ - Ja = 'ja', - /** Javanese */ - Jv = 'jv', - /** Kalaallisut */ - Kl = 'kl', - /** Kannada */ - Kn = 'kn', - /** Kashmiri */ - Ks = 'ks', - /** Kazakh */ - Kk = 'kk', - /** Khmer */ - Km = 'km', - /** Kikuyu */ - Ki = 'ki', - /** Kinyarwanda */ - Rw = 'rw', - /** Korean */ - Ko = 'ko', - /** Kurdish */ - Ku = 'ku', - /** Kyrgyz */ - Ky = 'ky', - /** Lao */ - Lo = 'lo', - /** Latin */ - La = 'la', - /** Latvian */ - Lv = 'lv', - /** Lingala */ - Ln = 'ln', - /** Lithuanian */ - Lt = 'lt', - /** Luba-Katanga */ - Lu = 'lu', - /** Luxembourgish */ - Lb = 'lb', - /** Macedonian */ - Mk = 'mk', - /** Malagasy */ - Mg = 'mg', - /** Malay */ - Ms = 'ms', - /** Malayalam */ - Ml = 'ml', - /** Maltese */ - Mt = 'mt', - /** Manx */ - Gv = 'gv', - /** Maori */ - Mi = 'mi', - /** Marathi */ - Mr = 'mr', - /** Mongolian */ - Mn = 'mn', - /** Nepali */ - Ne = 'ne', - /** North Ndebele */ - Nd = 'nd', - /** Northern Sami */ - Se = 'se', - /** Norwegian Bokmål */ - Nb = 'nb', - /** Norwegian Nynorsk */ - Nn = 'nn', - /** Nyanja */ - Ny = 'ny', - /** Odia */ - Or = 'or', - /** Oromo */ - Om = 'om', - /** Ossetic */ - Os = 'os', - /** Pashto */ - Ps = 'ps', - /** Persian */ - Fa = 'fa', - /** Dari */ - FaAf = 'fa_AF', - /** Polish */ - Pl = 'pl', - /** Portuguese */ - Pt = 'pt', - /** Brazilian Portuguese */ - PtBr = 'pt_BR', - /** European Portuguese */ - PtPt = 'pt_PT', - /** Punjabi */ - Pa = 'pa', - /** Quechua */ - Qu = 'qu', - /** Romanian */ - Ro = 'ro', - /** Moldavian */ - RoMd = 'ro_MD', - /** Romansh */ - Rm = 'rm', - /** Rundi */ - Rn = 'rn', - /** Russian */ - Ru = 'ru', - /** Samoan */ - Sm = 'sm', - /** Sango */ - Sg = 'sg', - /** Sanskrit */ - Sa = 'sa', - /** Scottish Gaelic */ - Gd = 'gd', - /** Serbian */ - Sr = 'sr', - /** Shona */ - Sn = 'sn', - /** Sichuan Yi */ - Ii = 'ii', - /** Sindhi */ - Sd = 'sd', - /** Sinhala */ - Si = 'si', - /** Slovak */ - Sk = 'sk', - /** Slovenian */ - Sl = 'sl', - /** Somali */ - So = 'so', - /** Southern Sotho */ - St = 'st', - /** Spanish */ - Es = 'es', - /** European Spanish */ - EsEs = 'es_ES', - /** Mexican Spanish */ - EsMx = 'es_MX', - /** Sundanese */ - Su = 'su', - /** Swahili */ - Sw = 'sw', - /** Congo Swahili */ - SwCd = 'sw_CD', - /** Swedish */ - Sv = 'sv', - /** Tajik */ - Tg = 'tg', - /** Tamil */ - Ta = 'ta', - /** Tatar */ - Tt = 'tt', - /** Telugu */ - Te = 'te', - /** Thai */ - Th = 'th', - /** Tibetan */ - Bo = 'bo', - /** Tigrinya */ - Ti = 'ti', - /** Tongan */ - To = 'to', - /** Turkish */ - Tr = 'tr', - /** Turkmen */ - Tk = 'tk', - /** Ukrainian */ - Uk = 'uk', - /** Urdu */ - Ur = 'ur', - /** Uyghur */ - Ug = 'ug', - /** Uzbek */ - Uz = 'uz', - /** Vietnamese */ - Vi = 'vi', - /** Volapük */ - Vo = 'vo', - /** Welsh */ - Cy = 'cy', - /** Western Frisian */ - Fy = 'fy', - /** Wolof */ - Wo = 'wo', - /** Xhosa */ - Xh = 'xh', - /** Yiddish */ - Yi = 'yi', - /** Yoruba */ - Yo = 'yo', - /** Zulu */ - Zu = 'zu', -} - -export type Order = Node & { - __typename?: 'Order' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - /** - * The date & time that the Order was placed, i.e. the Customer - * completed the checkout and the Order is no longer "active" - */ - orderPlacedAt?: Maybe - /** A unique code for the Order */ - code: Scalars['String'] - state: Scalars['String'] - /** An order is active as long as the payment process has not been completed */ - active: Scalars['Boolean'] - customer?: Maybe - shippingAddress?: Maybe - billingAddress?: Maybe - lines: Array - /** - * Surcharges are arbitrary modifications to the Order total which are neither - * ProductVariants nor discounts resulting from applied Promotions. For example, - * one-off discounts based on customer interaction, or surcharges based on payment - * methods. - */ - surcharges: Array - discounts: Array - /** An array of all coupon codes applied to the Order */ - couponCodes: Array - /** Promotions applied to the order. Only gets populated after the payment process has completed. */ - promotions: Array - payments?: Maybe> - fulfillments?: Maybe> - totalQuantity: Scalars['Int'] - /** - * The subTotal is the total of all OrderLines in the Order. This figure also includes any Order-level - * discounts which have been prorated (proportionally distributed) amongst the OrderItems. - * To get a total of all OrderLines which does not account for prorated discounts, use the - * sum of `OrderLine.discountedLinePrice` values. - */ - subTotal: Scalars['Int'] - /** Same as subTotal, but inclusive of tax */ - subTotalWithTax: Scalars['Int'] - currencyCode: CurrencyCode - shippingLines: Array - shipping: Scalars['Int'] - shippingWithTax: Scalars['Int'] - /** Equal to subTotal plus shipping */ - total: Scalars['Int'] - /** The final payable amount. Equal to subTotalWithTax plus shippingWithTax */ - totalWithTax: Scalars['Int'] - /** A summary of the taxes being applied to this Order */ - taxSummary: Array - history: HistoryEntryList - customFields?: Maybe -} - -export type OrderHistoryArgs = { - options?: Maybe -} - -/** - * A summary of the taxes being applied to this order, grouped - * by taxRate. - */ -export type OrderTaxSummary = { - __typename?: 'OrderTaxSummary' - /** A description of this tax */ - description: Scalars['String'] - /** The taxRate as a percentage */ - taxRate: Scalars['Float'] - /** The total net price or OrderItems to which this taxRate applies */ - taxBase: Scalars['Int'] - /** The total tax being applied to the Order at this taxRate */ - taxTotal: Scalars['Int'] -} - -export type OrderAddress = { - __typename?: 'OrderAddress' - fullName?: Maybe - company?: Maybe - streetLine1?: Maybe - streetLine2?: Maybe - city?: Maybe - province?: Maybe - postalCode?: Maybe - country?: Maybe - countryCode?: Maybe - phoneNumber?: Maybe - customFields?: Maybe -} - -export type OrderList = PaginatedList & { - __typename?: 'OrderList' - items: Array - totalItems: Scalars['Int'] -} - -export type ShippingLine = { - __typename?: 'ShippingLine' - shippingMethod: ShippingMethod - price: Scalars['Int'] - priceWithTax: Scalars['Int'] - discountedPrice: Scalars['Int'] - discountedPriceWithTax: Scalars['Int'] - discounts: Array -} - -export type Discount = { - __typename?: 'Discount' - adjustmentSource: Scalars['String'] - type: AdjustmentType - description: Scalars['String'] - amount: Scalars['Int'] - amountWithTax: Scalars['Int'] -} - -export type OrderItem = Node & { - __typename?: 'OrderItem' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - cancelled: Scalars['Boolean'] - /** The price of a single unit, excluding tax and discounts */ - unitPrice: Scalars['Int'] - /** The price of a single unit, including tax but excluding discounts */ - unitPriceWithTax: Scalars['Int'] - /** - * The price of a single unit including discounts, excluding tax. - * - * If Order-level discounts have been applied, this will not be the - * actual taxable unit price (see `proratedUnitPrice`), but is generally the - * correct price to display to customers to avoid confusion - * about the internal handling of distributed Order-level discounts. - */ - discountedUnitPrice: Scalars['Int'] - /** The price of a single unit including discounts and tax */ - discountedUnitPriceWithTax: Scalars['Int'] - /** - * The actual unit price, taking into account both item discounts _and_ prorated (proportially-distributed) - * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax - * and refund calculations. - */ - proratedUnitPrice: Scalars['Int'] - /** The proratedUnitPrice including tax */ - proratedUnitPriceWithTax: Scalars['Int'] - unitTax: Scalars['Int'] - taxRate: Scalars['Float'] - adjustments: Array - taxLines: Array - fulfillment?: Maybe - refundId?: Maybe -} - -export type OrderLine = Node & { - __typename?: 'OrderLine' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - productVariant: ProductVariant - featuredAsset?: Maybe - /** The price of a single unit, excluding tax and discounts */ - unitPrice: Scalars['Int'] - /** The price of a single unit, including tax but excluding discounts */ - unitPriceWithTax: Scalars['Int'] - /** Non-zero if the unitPrice has changed since it was initially added to Order */ - unitPriceChangeSinceAdded: Scalars['Int'] - /** Non-zero if the unitPriceWithTax has changed since it was initially added to Order */ - unitPriceWithTaxChangeSinceAdded: Scalars['Int'] - /** - * The price of a single unit including discounts, excluding tax. - * - * If Order-level discounts have been applied, this will not be the - * actual taxable unit price (see `proratedUnitPrice`), but is generally the - * correct price to display to customers to avoid confusion - * about the internal handling of distributed Order-level discounts. - */ - discountedUnitPrice: Scalars['Int'] - /** The price of a single unit including discounts and tax */ - discountedUnitPriceWithTax: Scalars['Int'] - /** - * The actual unit price, taking into account both item discounts _and_ prorated (proportially-distributed) - * Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax - * and refund calculations. - */ - proratedUnitPrice: Scalars['Int'] - /** The proratedUnitPrice including tax */ - proratedUnitPriceWithTax: Scalars['Int'] - quantity: Scalars['Int'] - items: Array - taxRate: Scalars['Float'] - /** The total price of the line excluding tax and discounts. */ - linePrice: Scalars['Int'] - /** The total price of the line including tax bit excluding discounts. */ - linePriceWithTax: Scalars['Int'] - /** The price of the line including discounts, excluding tax */ - discountedLinePrice: Scalars['Int'] - /** The price of the line including discounts and tax */ - discountedLinePriceWithTax: Scalars['Int'] - /** - * The actual line price, taking into account both item discounts _and_ prorated (proportially-distributed) - * Order-level discounts. This value is the true economic value of the OrderLine, and is used in tax - * and refund calculations. - */ - proratedLinePrice: Scalars['Int'] - /** The proratedLinePrice including tax */ - proratedLinePriceWithTax: Scalars['Int'] - /** The total tax on this line */ - lineTax: Scalars['Int'] - discounts: Array - taxLines: Array - order: Order - customFields?: Maybe -} - -export type Payment = Node & { - __typename?: 'Payment' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - method: Scalars['String'] - amount: Scalars['Int'] - state: Scalars['String'] - transactionId?: Maybe - errorMessage?: Maybe - refunds: Array - metadata?: Maybe -} - -export type Refund = Node & { - __typename?: 'Refund' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - items: Scalars['Int'] - shipping: Scalars['Int'] - adjustment: Scalars['Int'] - total: Scalars['Int'] - method?: Maybe - state: Scalars['String'] - transactionId?: Maybe - reason?: Maybe - orderItems: Array - paymentId: Scalars['ID'] - metadata?: Maybe -} - -export type Fulfillment = Node & { - __typename?: 'Fulfillment' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - orderItems: Array - state: Scalars['String'] - method: Scalars['String'] - trackingCode?: Maybe - customFields?: Maybe -} - -export type Surcharge = Node & { - __typename?: 'Surcharge' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - description: Scalars['String'] - sku?: Maybe - taxLines: Array - price: Scalars['Int'] - priceWithTax: Scalars['Int'] - taxRate: Scalars['Float'] -} - -export type ProductOptionGroup = Node & { - __typename?: 'ProductOptionGroup' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - code: Scalars['String'] - name: Scalars['String'] - options: Array - translations: Array - customFields?: Maybe -} - -export type ProductOptionGroupTranslation = { - __typename?: 'ProductOptionGroupTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] -} - -export type ProductOption = Node & { - __typename?: 'ProductOption' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - code: Scalars['String'] - name: Scalars['String'] - groupId: Scalars['ID'] - group: ProductOptionGroup - translations: Array - customFields?: Maybe -} - -export type ProductOptionTranslation = { - __typename?: 'ProductOptionTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] -} - -export type SearchReindexResponse = { - __typename?: 'SearchReindexResponse' - success: Scalars['Boolean'] -} - -export type SearchResponse = { - __typename?: 'SearchResponse' - items: Array - totalItems: Scalars['Int'] - facetValues: Array -} - -/** - * Which FacetValues are present in the products returned - * by the search, and in what quantity. - */ -export type FacetValueResult = { - __typename?: 'FacetValueResult' - facetValue: FacetValue - count: Scalars['Int'] -} - -export type SearchResultAsset = { - __typename?: 'SearchResultAsset' - id: Scalars['ID'] - preview: Scalars['String'] - focalPoint?: Maybe -} - -export type SearchResult = { - __typename?: 'SearchResult' - sku: Scalars['String'] - slug: Scalars['String'] - productId: Scalars['ID'] - productName: Scalars['String'] - productAsset?: Maybe - productVariantId: Scalars['ID'] - productVariantName: Scalars['String'] - productVariantAsset?: Maybe - price: SearchResultPrice - priceWithTax: SearchResultPrice - currencyCode: CurrencyCode - description: Scalars['String'] - facetIds: Array - facetValueIds: Array - /** An array of ids of the Collections in which this result appears */ - collectionIds: Array - /** A relevence score for the result. Differs between database implementations */ - score: Scalars['Float'] -} - -/** The price of a search result product, either as a range or as a single price */ -export type SearchResultPrice = PriceRange | SinglePrice - -/** The price value where the result has a single price */ -export type SinglePrice = { - __typename?: 'SinglePrice' - value: Scalars['Int'] -} - -/** The price range where the result has more than one price */ -export type PriceRange = { - __typename?: 'PriceRange' - min: Scalars['Int'] - max: Scalars['Int'] -} - -export type Product = Node & { - __typename?: 'Product' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] - slug: Scalars['String'] - description: Scalars['String'] - featuredAsset?: Maybe - assets: Array - variants: Array - optionGroups: Array - facetValues: Array - translations: Array - collections: Array - customFields?: Maybe -} - -export type ProductTranslation = { - __typename?: 'ProductTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] - slug: Scalars['String'] - description: Scalars['String'] -} - -export type ProductList = PaginatedList & { - __typename?: 'ProductList' - items: Array - totalItems: Scalars['Int'] -} - -export type ProductVariant = Node & { - __typename?: 'ProductVariant' - id: Scalars['ID'] - product: Product - productId: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - sku: Scalars['String'] - name: Scalars['String'] - featuredAsset?: Maybe - assets: Array - price: Scalars['Int'] - currencyCode: CurrencyCode - priceWithTax: Scalars['Int'] - stockLevel: Scalars['String'] - taxRateApplied: TaxRate - taxCategory: TaxCategory - options: Array - facetValues: Array - translations: Array - customFields?: Maybe -} - -export type ProductVariantTranslation = { - __typename?: 'ProductVariantTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] -} - -export type Promotion = Node & { - __typename?: 'Promotion' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - startsAt?: Maybe - endsAt?: Maybe - couponCode?: Maybe - perCustomerUsageLimit?: Maybe - name: Scalars['String'] - enabled: Scalars['Boolean'] - conditions: Array - actions: Array -} - -export type PromotionList = PaginatedList & { - __typename?: 'PromotionList' - items: Array - totalItems: Scalars['Int'] -} - -export type Role = Node & { - __typename?: 'Role' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - code: Scalars['String'] - description: Scalars['String'] - permissions: Array - channels: Array -} - -export type RoleList = PaginatedList & { - __typename?: 'RoleList' - items: Array - totalItems: Scalars['Int'] -} - -export type ShippingMethod = Node & { - __typename?: 'ShippingMethod' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - code: Scalars['String'] - name: Scalars['String'] - description: Scalars['String'] - fulfillmentHandlerCode: Scalars['String'] - checker: ConfigurableOperation - calculator: ConfigurableOperation - translations: Array - customFields?: Maybe -} - -export type ShippingMethodTranslation = { - __typename?: 'ShippingMethodTranslation' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - languageCode: LanguageCode - name: Scalars['String'] - description: Scalars['String'] -} - -export type ShippingMethodList = PaginatedList & { - __typename?: 'ShippingMethodList' - items: Array - totalItems: Scalars['Int'] -} - -export type Tag = Node & { - __typename?: 'Tag' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - value: Scalars['String'] -} - -export type TagList = PaginatedList & { - __typename?: 'TagList' - items: Array - totalItems: Scalars['Int'] -} - -export type TaxCategory = Node & { - __typename?: 'TaxCategory' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - name: Scalars['String'] - isDefault: Scalars['Boolean'] -} - -export type TaxRate = Node & { - __typename?: 'TaxRate' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - name: Scalars['String'] - enabled: Scalars['Boolean'] - value: Scalars['Float'] - category: TaxCategory - zone: Zone - customerGroup?: Maybe -} - -export type TaxRateList = PaginatedList & { - __typename?: 'TaxRateList' - items: Array - totalItems: Scalars['Int'] -} - -export type User = Node & { - __typename?: 'User' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - identifier: Scalars['String'] - verified: Scalars['Boolean'] - roles: Array - lastLogin?: Maybe - authenticationMethods: Array - customFields?: Maybe -} - -export type AuthenticationMethod = Node & { - __typename?: 'AuthenticationMethod' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - strategy: Scalars['String'] -} - -export type Zone = Node & { - __typename?: 'Zone' - id: Scalars['ID'] - createdAt: Scalars['DateTime'] - updatedAt: Scalars['DateTime'] - name: Scalars['String'] - members: Array -} - -/** Returned when attempting to modify the contents of an Order that is not in the `AddingItems` state. */ -export type OrderModificationError = ErrorResult & { - __typename?: 'OrderModificationError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** Returned when attempting to set a ShippingMethod for which the Order is not eligible */ -export type IneligibleShippingMethodError = ErrorResult & { - __typename?: 'IneligibleShippingMethodError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** Returned when attempting to add a Payment to an Order that is not in the `ArrangingPayment` state. */ -export type OrderPaymentStateError = ErrorResult & { - __typename?: 'OrderPaymentStateError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** Returned when attempting to add a Payment using a PaymentMethod for which the Order is not eligible. */ -export type IneligiblePaymentMethodError = ErrorResult & { - __typename?: 'IneligiblePaymentMethodError' - errorCode: ErrorCode - message: Scalars['String'] - eligibilityCheckerMessage?: Maybe -} - -/** Returned when a Payment fails due to an error. */ -export type PaymentFailedError = ErrorResult & { - __typename?: 'PaymentFailedError' - errorCode: ErrorCode - message: Scalars['String'] - paymentErrorMessage: Scalars['String'] -} - -/** Returned when a Payment is declined by the payment provider. */ -export type PaymentDeclinedError = ErrorResult & { - __typename?: 'PaymentDeclinedError' - errorCode: ErrorCode - message: Scalars['String'] - paymentErrorMessage: Scalars['String'] -} - -/** Returned if the provided coupon code is invalid */ -export type CouponCodeInvalidError = ErrorResult & { - __typename?: 'CouponCodeInvalidError' - errorCode: ErrorCode - message: Scalars['String'] - couponCode: Scalars['String'] -} - -/** Returned if the provided coupon code is invalid */ -export type CouponCodeExpiredError = ErrorResult & { - __typename?: 'CouponCodeExpiredError' - errorCode: ErrorCode - message: Scalars['String'] - couponCode: Scalars['String'] -} - -/** Returned if the provided coupon code is invalid */ -export type CouponCodeLimitError = ErrorResult & { - __typename?: 'CouponCodeLimitError' - errorCode: ErrorCode - message: Scalars['String'] - couponCode: Scalars['String'] - limit: Scalars['Int'] -} - -/** Retured when attemting to set the Customer for an Order when already logged in. */ -export type AlreadyLoggedInError = ErrorResult & { - __typename?: 'AlreadyLoggedInError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** Retured when attemting to register or verify a customer account without a password, when one is required. */ -export type MissingPasswordError = ErrorResult & { - __typename?: 'MissingPasswordError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** Retured when attemting to verify a customer account with a password, when a password has already been set. */ -export type PasswordAlreadySetError = ErrorResult & { - __typename?: 'PasswordAlreadySetError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** - * Retured if the verification token (used to verify a Customer's email address) is either - * invalid or does not match any expected tokens. - */ -export type VerificationTokenInvalidError = ErrorResult & { - __typename?: 'VerificationTokenInvalidError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** - * Returned if the verification token (used to verify a Customer's email address) is valid, but has - * expired according to the `verificationTokenDuration` setting in the AuthOptions. - */ -export type VerificationTokenExpiredError = ErrorResult & { - __typename?: 'VerificationTokenExpiredError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** - * Retured if the token used to change a Customer's email address is either - * invalid or does not match any expected tokens. - */ -export type IdentifierChangeTokenInvalidError = ErrorResult & { - __typename?: 'IdentifierChangeTokenInvalidError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** - * Retured if the token used to change a Customer's email address is valid, but has - * expired according to the `verificationTokenDuration` setting in the AuthOptions. - */ -export type IdentifierChangeTokenExpiredError = ErrorResult & { - __typename?: 'IdentifierChangeTokenExpiredError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** - * Retured if the token used to reset a Customer's password is either - * invalid or does not match any expected tokens. - */ -export type PasswordResetTokenInvalidError = ErrorResult & { - __typename?: 'PasswordResetTokenInvalidError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** - * Retured if the token used to reset a Customer's password is valid, but has - * expired according to the `verificationTokenDuration` setting in the AuthOptions. - */ -export type PasswordResetTokenExpiredError = ErrorResult & { - __typename?: 'PasswordResetTokenExpiredError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** - * Returned if `authOptions.requireVerification` is set to `true` (which is the default) - * and an unverified user attempts to authenticate. - */ -export type NotVerifiedError = ErrorResult & { - __typename?: 'NotVerifiedError' - errorCode: ErrorCode - message: Scalars['String'] -} - -/** - * Returned when invoking a mutation which depends on there being an active Order on the - * current session. - */ -export type NoActiveOrderError = ErrorResult & { - __typename?: 'NoActiveOrderError' - errorCode: ErrorCode - message: Scalars['String'] -} - -export type AuthenticationInput = { - native?: Maybe -} - -export type RegisterCustomerInput = { - emailAddress: Scalars['String'] - title?: Maybe - firstName?: Maybe - lastName?: Maybe - phoneNumber?: Maybe - password?: Maybe -} - -export type UpdateCustomerInput = { - title?: Maybe - firstName?: Maybe - lastName?: Maybe - phoneNumber?: Maybe - customFields?: Maybe -} - -export type UpdateOrderInput = { - customFields?: Maybe -} - -/** Passed as input to the `addPaymentToOrder` mutation. */ -export type PaymentInput = { - /** This field should correspond to the `code` property of a PaymentMethodHandler. */ - method: Scalars['String'] - /** - * This field should contain arbitrary data passed to the specified PaymentMethodHandler's `createPayment()` method - * as the "metadata" argument. For example, it could contain an ID for the payment and other - * data generated by the payment provider. - */ - metadata: Scalars['JSON'] -} - -export type CollectionListOptions = { - skip?: Maybe - take?: Maybe - sort?: Maybe - filter?: Maybe -} - -export type OrderListOptions = { - skip?: Maybe - take?: Maybe - sort?: Maybe - filter?: Maybe -} - -export type ProductListOptions = { - skip?: Maybe - take?: Maybe - sort?: Maybe - filter?: Maybe -} - -export type UpdateOrderItemsResult = - | Order - | OrderModificationError - | OrderLimitError - | NegativeQuantityError - | InsufficientStockError - -export type RemoveOrderItemsResult = Order | OrderModificationError - -export type SetOrderShippingMethodResult = - | Order - | OrderModificationError - | IneligibleShippingMethodError - | NoActiveOrderError - -export type ApplyCouponCodeResult = - | Order - | CouponCodeExpiredError - | CouponCodeInvalidError - | CouponCodeLimitError - -export type AddPaymentToOrderResult = - | Order - | OrderPaymentStateError - | IneligiblePaymentMethodError - | PaymentFailedError - | PaymentDeclinedError - | OrderStateTransitionError - | NoActiveOrderError - -export type TransitionOrderToStateResult = Order | OrderStateTransitionError - -export type SetCustomerForOrderResult = - | Order - | AlreadyLoggedInError - | EmailAddressConflictError - | NoActiveOrderError - -export type RegisterCustomerAccountResult = - | Success - | MissingPasswordError - | NativeAuthStrategyError - -export type RefreshCustomerVerificationResult = - | Success - | NativeAuthStrategyError - -export type VerifyCustomerAccountResult = - | CurrentUser - | VerificationTokenInvalidError - | VerificationTokenExpiredError - | MissingPasswordError - | PasswordAlreadySetError - | NativeAuthStrategyError - -export type UpdateCustomerPasswordResult = - | Success - | InvalidCredentialsError - | NativeAuthStrategyError - -export type RequestUpdateCustomerEmailAddressResult = - | Success - | InvalidCredentialsError - | EmailAddressConflictError - | NativeAuthStrategyError - -export type UpdateCustomerEmailAddressResult = - | Success - | IdentifierChangeTokenInvalidError - | IdentifierChangeTokenExpiredError - | NativeAuthStrategyError - -export type RequestPasswordResetResult = Success | NativeAuthStrategyError - -export type ResetPasswordResult = - | CurrentUser - | PasswordResetTokenInvalidError - | PasswordResetTokenExpiredError - | NativeAuthStrategyError - -export type NativeAuthenticationResult = - | CurrentUser - | InvalidCredentialsError - | NotVerifiedError - | NativeAuthStrategyError - -export type AuthenticationResult = - | CurrentUser - | InvalidCredentialsError - | NotVerifiedError - -export type ActiveOrderResult = Order | NoActiveOrderError - -export type CollectionFilterParameter = { - createdAt?: Maybe - updatedAt?: Maybe - languageCode?: Maybe - name?: Maybe - slug?: Maybe - position?: Maybe - description?: Maybe -} - -export type CollectionSortParameter = { - id?: Maybe - createdAt?: Maybe - updatedAt?: Maybe - name?: Maybe - slug?: Maybe - position?: Maybe - description?: Maybe -} - -export type ProductFilterParameter = { - createdAt?: Maybe - updatedAt?: Maybe - languageCode?: Maybe - name?: Maybe - slug?: Maybe - description?: Maybe -} - -export type ProductSortParameter = { - id?: Maybe - createdAt?: Maybe - updatedAt?: Maybe - name?: Maybe - slug?: Maybe - description?: Maybe -} - -export type ProductVariantFilterParameter = { - createdAt?: Maybe - updatedAt?: Maybe - languageCode?: Maybe - sku?: Maybe - name?: Maybe - price?: Maybe - currencyCode?: Maybe - priceWithTax?: Maybe - stockLevel?: Maybe - discountPrice?: Maybe -} - -export type ProductVariantSortParameter = { - id?: Maybe - productId?: Maybe - createdAt?: Maybe - updatedAt?: Maybe - sku?: Maybe - name?: Maybe - price?: Maybe - priceWithTax?: Maybe - stockLevel?: Maybe - discountPrice?: Maybe -} - -export type CustomerFilterParameter = { - createdAt?: Maybe - updatedAt?: Maybe - title?: Maybe - firstName?: Maybe - lastName?: Maybe - phoneNumber?: Maybe - emailAddress?: Maybe -} - -export type CustomerSortParameter = { - id?: Maybe - createdAt?: Maybe - updatedAt?: Maybe - title?: Maybe - firstName?: Maybe - lastName?: Maybe - phoneNumber?: Maybe - emailAddress?: Maybe -} - -export type OrderFilterParameter = { - createdAt?: Maybe - updatedAt?: Maybe - orderPlacedAt?: Maybe - code?: Maybe - state?: Maybe - active?: Maybe - totalQuantity?: Maybe - subTotal?: Maybe - subTotalWithTax?: Maybe - currencyCode?: Maybe - shipping?: Maybe - shippingWithTax?: Maybe - total?: Maybe - totalWithTax?: Maybe -} - -export type OrderSortParameter = { - id?: Maybe - createdAt?: Maybe - updatedAt?: Maybe - orderPlacedAt?: Maybe - code?: Maybe - state?: Maybe - totalQuantity?: Maybe - subTotal?: Maybe - subTotalWithTax?: Maybe - shipping?: Maybe - shippingWithTax?: Maybe - total?: Maybe - totalWithTax?: Maybe -} - -export type HistoryEntryFilterParameter = { - createdAt?: Maybe - updatedAt?: Maybe - type?: Maybe -} - -export type HistoryEntrySortParameter = { - id?: Maybe - createdAt?: Maybe - updatedAt?: Maybe -} - -export type ProductVariantCustomFields = { - __typename?: 'ProductVariantCustomFields' - discountPrice?: Maybe -} - -export type NativeAuthInput = { - username: Scalars['String'] - password: Scalars['String'] -} - -export type CartFragment = { __typename?: 'Order' } & Pick< - Order, - | 'id' - | 'code' - | 'createdAt' - | 'totalQuantity' - | 'subTotal' - | 'subTotalWithTax' - | 'total' - | 'totalWithTax' - | 'currencyCode' -> & { - customer?: Maybe<{ __typename?: 'Customer' } & Pick> - lines: Array< - { __typename?: 'OrderLine' } & Pick< - OrderLine, - | 'id' - | 'quantity' - | 'linePriceWithTax' - | 'discountedLinePriceWithTax' - | 'unitPriceWithTax' - | 'discountedUnitPriceWithTax' - > & { - featuredAsset?: Maybe< - { __typename?: 'Asset' } & Pick - > - discounts: Array< - { __typename?: 'Discount' } & Pick< - Discount, - 'description' | 'amount' - > - > - productVariant: { __typename?: 'ProductVariant' } & Pick< - ProductVariant, - | 'id' - | 'name' - | 'sku' - | 'price' - | 'priceWithTax' - | 'stockLevel' - | 'productId' - > & { product: { __typename?: 'Product' } & Pick } - } - > - } - -export type SearchResultFragment = { __typename?: 'SearchResult' } & Pick< - SearchResult, - 'productId' | 'productName' | 'description' | 'slug' | 'sku' | 'currencyCode' -> & { - productAsset?: Maybe< - { __typename?: 'SearchResultAsset' } & Pick< - SearchResultAsset, - 'id' | 'preview' - > - > - priceWithTax: - | ({ __typename?: 'PriceRange' } & Pick) - | ({ __typename?: 'SinglePrice' } & Pick) - } - -export type AddItemToOrderMutationVariables = Exact<{ - variantId: Scalars['ID'] - quantity: Scalars['Int'] -}> - -export type AddItemToOrderMutation = { __typename?: 'Mutation' } & { - addItemToOrder: - | ({ __typename: 'Order' } & CartFragment) - | ({ __typename: 'OrderModificationError' } & Pick< - OrderModificationError, - 'errorCode' | 'message' - >) - | ({ __typename: 'OrderLimitError' } & Pick< - OrderLimitError, - 'errorCode' | 'message' - >) - | ({ __typename: 'NegativeQuantityError' } & Pick< - NegativeQuantityError, - 'errorCode' | 'message' - >) - | ({ __typename: 'InsufficientStockError' } & Pick< - InsufficientStockError, - 'errorCode' | 'message' - >) -} - -export type AdjustOrderLineMutationVariables = Exact<{ - orderLineId: Scalars['ID'] - quantity: Scalars['Int'] -}> - -export type AdjustOrderLineMutation = { __typename?: 'Mutation' } & { - adjustOrderLine: - | ({ __typename: 'Order' } & CartFragment) - | ({ __typename: 'OrderModificationError' } & Pick< - OrderModificationError, - 'errorCode' | 'message' - >) - | ({ __typename: 'OrderLimitError' } & Pick< - OrderLimitError, - 'errorCode' | 'message' - >) - | ({ __typename: 'NegativeQuantityError' } & Pick< - NegativeQuantityError, - 'errorCode' | 'message' - >) - | ({ __typename: 'InsufficientStockError' } & Pick< - InsufficientStockError, - 'errorCode' | 'message' - >) -} - -export type LoginMutationVariables = Exact<{ - username: Scalars['String'] - password: Scalars['String'] -}> - -export type LoginMutation = { __typename?: 'Mutation' } & { - login: - | ({ __typename: 'CurrentUser' } & Pick) - | ({ __typename: 'InvalidCredentialsError' } & Pick< - InvalidCredentialsError, - 'errorCode' | 'message' - >) - | ({ __typename: 'NotVerifiedError' } & Pick< - NotVerifiedError, - 'errorCode' | 'message' - >) - | ({ __typename: 'NativeAuthStrategyError' } & Pick< - NativeAuthStrategyError, - 'errorCode' | 'message' - >) -} - -export type LogoutMutationVariables = Exact<{ [key: string]: never }> - -export type LogoutMutation = { __typename?: 'Mutation' } & { - logout: { __typename?: 'Success' } & Pick -} - -export type RemoveOrderLineMutationVariables = Exact<{ - orderLineId: Scalars['ID'] -}> - -export type RemoveOrderLineMutation = { __typename?: 'Mutation' } & { - removeOrderLine: - | ({ __typename: 'Order' } & CartFragment) - | ({ __typename: 'OrderModificationError' } & Pick< - OrderModificationError, - 'errorCode' | 'message' - >) -} - -export type SignupMutationVariables = Exact<{ - input: RegisterCustomerInput -}> - -export type SignupMutation = { __typename?: 'Mutation' } & { - registerCustomerAccount: - | ({ __typename: 'Success' } & Pick) - | ({ __typename: 'MissingPasswordError' } & Pick< - MissingPasswordError, - 'errorCode' | 'message' - >) - | ({ __typename: 'NativeAuthStrategyError' } & Pick< - NativeAuthStrategyError, - 'errorCode' | 'message' - >) -} - -export type ActiveCustomerQueryVariables = Exact<{ [key: string]: never }> - -export type ActiveCustomerQuery = { __typename?: 'Query' } & { - activeCustomer?: Maybe< - { __typename?: 'Customer' } & Pick< - Customer, - 'id' | 'firstName' | 'lastName' | 'emailAddress' - > - > -} - -export type GetAllProductPathsQueryVariables = Exact<{ - first?: Maybe -}> - -export type GetAllProductPathsQuery = { __typename?: 'Query' } & { - products: { __typename?: 'ProductList' } & { - items: Array<{ __typename?: 'Product' } & Pick> - } -} - -export type GetAllProductsQueryVariables = Exact<{ - input: SearchInput -}> - -export type GetAllProductsQuery = { __typename?: 'Query' } & { - search: { __typename?: 'SearchResponse' } & { - items: Array<{ __typename?: 'SearchResult' } & SearchResultFragment> - } -} - -export type ActiveOrderQueryVariables = Exact<{ [key: string]: never }> - -export type ActiveOrderQuery = { __typename?: 'Query' } & { - activeOrder?: Maybe<{ __typename?: 'Order' } & CartFragment> -} - -export type GetCollectionsQueryVariables = Exact<{ [key: string]: never }> - -export type GetCollectionsQuery = { __typename?: 'Query' } & { - collections: { __typename?: 'CollectionList' } & { - items: Array< - { __typename?: 'Collection' } & Pick< - Collection, - 'id' | 'name' | 'description' | 'slug' - > & { - productVariants: { __typename?: 'ProductVariantList' } & Pick< - ProductVariantList, - 'totalItems' - > - parent?: Maybe<{ __typename?: 'Collection' } & Pick> - children?: Maybe< - Array<{ __typename?: 'Collection' } & Pick> - > - } - > - } -} - -export type GetProductQueryVariables = Exact<{ - slug: Scalars['String'] -}> - -export type GetProductQuery = { __typename?: 'Query' } & { - product?: Maybe< - { __typename?: 'Product' } & Pick< - Product, - 'id' | 'name' | 'slug' | 'description' - > & { - assets: Array< - { __typename?: 'Asset' } & Pick - > - variants: Array< - { __typename?: 'ProductVariant' } & Pick< - ProductVariant, - 'id' | 'priceWithTax' | 'currencyCode' - > & { - options: Array< - { __typename?: 'ProductOption' } & Pick< - ProductOption, - 'id' | 'name' | 'code' | 'groupId' - > & { - group: { __typename?: 'ProductOptionGroup' } & Pick< - ProductOptionGroup, - 'id' - > & { - options: Array< - { __typename?: 'ProductOption' } & Pick< - ProductOption, - 'name' - > - > - } - } - > - } - > - optionGroups: Array< - { __typename?: 'ProductOptionGroup' } & Pick< - ProductOptionGroup, - 'id' | 'code' | 'name' - > & { - options: Array< - { __typename?: 'ProductOption' } & Pick< - ProductOption, - 'id' | 'name' - > - > - } - > - } - > -} - -export type SearchQueryVariables = Exact<{ - input: SearchInput -}> - -export type SearchQuery = { __typename?: 'Query' } & { - search: { __typename?: 'SearchResponse' } & Pick< - SearchResponse, - 'totalItems' - > & { items: Array<{ __typename?: 'SearchResult' } & SearchResultFragment> } -} diff --git a/framework/local/schema.graphql b/framework/local/schema.graphql deleted file mode 100644 index 326e2bca5..000000000 --- a/framework/local/schema.graphql +++ /dev/null @@ -1,4162 +0,0 @@ -type Query { - """ - The active Channel - """ - activeChannel: Channel! - - """ - The active Customer - """ - activeCustomer: Customer - - """ - The active Order. Will be `null` until an Order is created via `addItemToOrder`. Once an Order reaches the - state of `PaymentApproved` or `PaymentSettled`, then that Order is no longer considered "active" and this - query will once again return `null`. - """ - activeOrder: Order - - """ - An array of supported Countries - """ - availableCountries: [Country!]! - - """ - A list of Collections available to the shop - """ - collections(options: CollectionListOptions): CollectionList! - - """ - Returns a Collection either by its id or slug. If neither 'id' nor 'slug' is speicified, an error will result. - """ - collection(id: ID, slug: String): Collection - - """ - Returns a list of eligible shipping methods based on the current active Order - """ - eligibleShippingMethods: [ShippingMethodQuote!]! - - """ - Returns a list of payment methods and their eligibility based on the current active Order - """ - eligiblePaymentMethods: [PaymentMethodQuote!]! - - """ - Returns information about the current authenticated User - """ - me: CurrentUser - - """ - Returns the possible next states that the activeOrder can transition to - """ - nextOrderStates: [String!]! - - """ - Returns an Order based on the id. Note that in the Shop API, only orders belonging to the - currently-authenticated User may be queried. - """ - order(id: ID!): Order - - """ - Returns an Order based on the order `code`. For guest Orders (i.e. Orders placed by non-authenticated Customers) - this query will only return the Order within 2 hours of the Order being placed. This allows an Order confirmation - screen to be shown immediately after completion of a guest checkout, yet prevents security risks of allowing - general anonymous access to Order data. - """ - orderByCode(code: String!): Order - - """ - Get a Product either by id or slug. If neither 'id' nor 'slug' is speicified, an error will result. - """ - product(id: ID, slug: String): Product - - """ - Get a list of Products - """ - products(options: ProductListOptions): ProductList! - - """ - Search Products based on the criteria set by the `SearchInput` - """ - search(input: SearchInput!): SearchResponse! -} - -type Mutation { - """ - Adds an item to the order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available. - """ - addItemToOrder(productVariantId: ID!, quantity: Int!): UpdateOrderItemsResult! - - """ - Remove an OrderLine from the Order - """ - removeOrderLine(orderLineId: ID!): RemoveOrderItemsResult! - - """ - Remove all OrderLine from the Order - """ - removeAllOrderLines: RemoveOrderItemsResult! - - """ - Adjusts an OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available. - """ - adjustOrderLine(orderLineId: ID!, quantity: Int!): UpdateOrderItemsResult! - - """ - Applies the given coupon code to the active Order - """ - applyCouponCode(couponCode: String!): ApplyCouponCodeResult! - - """ - Removes the given coupon code from the active Order - """ - removeCouponCode(couponCode: String!): Order - - """ - Transitions an Order to a new state. Valid next states can be found by querying `nextOrderStates` - """ - transitionOrderToState(state: String!): TransitionOrderToStateResult - - """ - Sets the shipping address for this order - """ - setOrderShippingAddress(input: CreateAddressInput!): ActiveOrderResult! - - """ - Sets the billing address for this order - """ - setOrderBillingAddress(input: CreateAddressInput!): ActiveOrderResult! - - """ - Allows any custom fields to be set for the active order - """ - setOrderCustomFields(input: UpdateOrderInput!): ActiveOrderResult! - - """ - Sets the shipping method by id, which can be obtained with the `eligibleShippingMethods` query - """ - setOrderShippingMethod(shippingMethodId: ID!): SetOrderShippingMethodResult! - - """ - Add a Payment to the Order - """ - addPaymentToOrder(input: PaymentInput!): AddPaymentToOrderResult! - - """ - Set the Customer for the Order. Required only if the Customer is not currently logged in - """ - setCustomerForOrder(input: CreateCustomerInput!): SetCustomerForOrderResult! - - """ - Authenticates the user using the native authentication strategy. This mutation is an alias for `authenticate({ native: { ... }})` - """ - login( - username: String! - password: String! - rememberMe: Boolean - ): NativeAuthenticationResult! - - """ - Authenticates the user using a named authentication strategy - """ - authenticate( - input: AuthenticationInput! - rememberMe: Boolean - ): AuthenticationResult! - - """ - End the current authenticated session - """ - logout: Success! - - """ - Register a Customer account with the given credentials. There are three possible registration flows: - - _If `authOptions.requireVerification` is set to `true`:_ - - 1. **The Customer is registered _with_ a password**. A verificationToken will be created (and typically emailed to the Customer). That - verificationToken would then be passed to the `verifyCustomerAccount` mutation _without_ a password. The Customer is then - verified and authenticated in one step. - 2. **The Customer is registered _without_ a password**. A verificationToken will be created (and typically emailed to the Customer). That - verificationToken would then be passed to the `verifyCustomerAccount` mutation _with_ the chosed password of the Customer. The Customer is then - verified and authenticated in one step. - - _If `authOptions.requireVerification` is set to `false`:_ - - 3. The Customer _must_ be registered _with_ a password. No further action is needed - the Customer is able to authenticate immediately. - """ - registerCustomerAccount( - input: RegisterCustomerInput! - ): RegisterCustomerAccountResult! - - """ - Regenerate and send a verification token for a new Customer registration. Only applicable if `authOptions.requireVerification` is set to true. - """ - refreshCustomerVerification( - emailAddress: String! - ): RefreshCustomerVerificationResult! - - """ - Update an existing Customer - """ - updateCustomer(input: UpdateCustomerInput!): Customer! - - """ - Create a new Customer Address - """ - createCustomerAddress(input: CreateAddressInput!): Address! - - """ - Update an existing Address - """ - updateCustomerAddress(input: UpdateAddressInput!): Address! - - """ - Delete an existing Address - """ - deleteCustomerAddress(id: ID!): Success! - - """ - Verify a Customer email address with the token sent to that address. Only applicable if `authOptions.requireVerification` is set to true. - - If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the a password _must_ be - provided here. - """ - verifyCustomerAccount( - token: String! - password: String - ): VerifyCustomerAccountResult! - - """ - Update the password of the active Customer - """ - updateCustomerPassword( - currentPassword: String! - newPassword: String! - ): UpdateCustomerPasswordResult! - - """ - Request to update the emailAddress of the active Customer. If `authOptions.requireVerification` is enabled - (as is the default), then the `identifierChangeToken` will be assigned to the current User and - a IdentifierChangeRequestEvent will be raised. This can then be used e.g. by the EmailPlugin to email - that verification token to the Customer, which is then used to verify the change of email address. - """ - requestUpdateCustomerEmailAddress( - password: String! - newEmailAddress: String! - ): RequestUpdateCustomerEmailAddressResult! - - """ - Confirm the update of the emailAddress with the provided token, which has been generated by the - `requestUpdateCustomerEmailAddress` mutation. - """ - updateCustomerEmailAddress(token: String!): UpdateCustomerEmailAddressResult! - - """ - Requests a password reset email to be sent - """ - requestPasswordReset(emailAddress: String!): RequestPasswordResetResult - - """ - Resets a Customer's password based on the provided token - """ - resetPassword(token: String!, password: String!): ResetPasswordResult! -} - -type Address implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - fullName: String - company: String - streetLine1: String! - streetLine2: String - city: String - province: String - postalCode: String - country: Country! - phoneNumber: String - defaultShippingAddress: Boolean - defaultBillingAddress: Boolean - customFields: JSON -} - -type Asset implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - name: String! - type: AssetType! - fileSize: Int! - mimeType: String! - width: Int! - height: Int! - source: String! - preview: String! - focalPoint: Coordinate - customFields: JSON -} - -type Coordinate { - x: Float! - y: Float! -} - -type AssetList implements PaginatedList { - items: [Asset!]! - totalItems: Int! -} - -enum AssetType { - IMAGE - VIDEO - BINARY -} - -type CurrentUser { - id: ID! - identifier: String! - channels: [CurrentUserChannel!]! -} - -type CurrentUserChannel { - id: ID! - token: String! - code: String! - permissions: [Permission!]! -} - -type Channel implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - code: String! - token: String! - defaultTaxZone: Zone - defaultShippingZone: Zone - defaultLanguageCode: LanguageCode! - currencyCode: CurrencyCode! - pricesIncludeTax: Boolean! - customFields: JSON -} - -type Collection implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode - name: String! - slug: String! - breadcrumbs: [CollectionBreadcrumb!]! - position: Int! - description: String! - featuredAsset: Asset - assets: [Asset!]! - parent: Collection - children: [Collection!] - filters: [ConfigurableOperation!]! - translations: [CollectionTranslation!]! - productVariants(options: ProductVariantListOptions): ProductVariantList! - customFields: JSON -} - -type CollectionBreadcrumb { - id: ID! - name: String! - slug: String! -} - -type CollectionTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! - slug: String! - description: String! -} - -type CollectionList implements PaginatedList { - items: [Collection!]! - totalItems: Int! -} - -type ProductVariantList implements PaginatedList { - items: [ProductVariant!]! - totalItems: Int! -} - -input ProductVariantListOptions { - skip: Int - take: Int - sort: ProductVariantSortParameter - filter: ProductVariantFilterParameter -} - -enum GlobalFlag { - TRUE - FALSE - INHERIT -} - -enum AdjustmentType { - PROMOTION - DISTRIBUTED_ORDER_PROMOTION -} - -enum DeletionResult { - """ - The entity was successfully deleted - """ - DELETED - - """ - Deletion did not take place, reason given in message - """ - NOT_DELETED -} - -""" -@description -Permissions for administrators and customers. Used to control access to -GraphQL resolvers via the {@link Allow} decorator. - -@docsCategory common -""" -enum Permission { - Placeholder - - """ - Authenticated means simply that the user is logged in - """ - Authenticated - - """ - SuperAdmin has unrestricted access to all operations - """ - SuperAdmin - - """ - Owner means the user owns this entity, e.g. a Customer's own Order - """ - Owner - - """ - Public means any unauthenticated user may perform the operation - """ - Public - - """ - Grants permission to update GlobalSettings - """ - UpdateGlobalSettings - - """ - Grants permission to create Products, Facets, Assets, Collections - """ - CreateCatalog - - """ - Grants permission to read Products, Facets, Assets, Collections - """ - ReadCatalog - - """ - Grants permission to update Products, Facets, Assets, Collections - """ - UpdateCatalog - - """ - Grants permission to delete Products, Facets, Assets, Collections - """ - DeleteCatalog - - """ - Grants permission to create PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings - """ - CreateSettings - - """ - Grants permission to read PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings - """ - ReadSettings - - """ - Grants permission to update PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings - """ - UpdateSettings - - """ - Grants permission to delete PaymentMethods, ShippingMethods, TaxCategories, TaxRates, Zones, Countries, System & GlobalSettings - """ - DeleteSettings - - """ - Grants permission to create Administrator - """ - CreateAdministrator - - """ - Grants permission to read Administrator - """ - ReadAdministrator - - """ - Grants permission to update Administrator - """ - UpdateAdministrator - - """ - Grants permission to delete Administrator - """ - DeleteAdministrator - - """ - Grants permission to create Asset - """ - CreateAsset - - """ - Grants permission to read Asset - """ - ReadAsset - - """ - Grants permission to update Asset - """ - UpdateAsset - - """ - Grants permission to delete Asset - """ - DeleteAsset - - """ - Grants permission to create Channel - """ - CreateChannel - - """ - Grants permission to read Channel - """ - ReadChannel - - """ - Grants permission to update Channel - """ - UpdateChannel - - """ - Grants permission to delete Channel - """ - DeleteChannel - - """ - Grants permission to create Collection - """ - CreateCollection - - """ - Grants permission to read Collection - """ - ReadCollection - - """ - Grants permission to update Collection - """ - UpdateCollection - - """ - Grants permission to delete Collection - """ - DeleteCollection - - """ - Grants permission to create Country - """ - CreateCountry - - """ - Grants permission to read Country - """ - ReadCountry - - """ - Grants permission to update Country - """ - UpdateCountry - - """ - Grants permission to delete Country - """ - DeleteCountry - - """ - Grants permission to create Customer - """ - CreateCustomer - - """ - Grants permission to read Customer - """ - ReadCustomer - - """ - Grants permission to update Customer - """ - UpdateCustomer - - """ - Grants permission to delete Customer - """ - DeleteCustomer - - """ - Grants permission to create CustomerGroup - """ - CreateCustomerGroup - - """ - Grants permission to read CustomerGroup - """ - ReadCustomerGroup - - """ - Grants permission to update CustomerGroup - """ - UpdateCustomerGroup - - """ - Grants permission to delete CustomerGroup - """ - DeleteCustomerGroup - - """ - Grants permission to create Facet - """ - CreateFacet - - """ - Grants permission to read Facet - """ - ReadFacet - - """ - Grants permission to update Facet - """ - UpdateFacet - - """ - Grants permission to delete Facet - """ - DeleteFacet - - """ - Grants permission to create Order - """ - CreateOrder - - """ - Grants permission to read Order - """ - ReadOrder - - """ - Grants permission to update Order - """ - UpdateOrder - - """ - Grants permission to delete Order - """ - DeleteOrder - - """ - Grants permission to create PaymentMethod - """ - CreatePaymentMethod - - """ - Grants permission to read PaymentMethod - """ - ReadPaymentMethod - - """ - Grants permission to update PaymentMethod - """ - UpdatePaymentMethod - - """ - Grants permission to delete PaymentMethod - """ - DeletePaymentMethod - - """ - Grants permission to create Product - """ - CreateProduct - - """ - Grants permission to read Product - """ - ReadProduct - - """ - Grants permission to update Product - """ - UpdateProduct - - """ - Grants permission to delete Product - """ - DeleteProduct - - """ - Grants permission to create Promotion - """ - CreatePromotion - - """ - Grants permission to read Promotion - """ - ReadPromotion - - """ - Grants permission to update Promotion - """ - UpdatePromotion - - """ - Grants permission to delete Promotion - """ - DeletePromotion - - """ - Grants permission to create ShippingMethod - """ - CreateShippingMethod - - """ - Grants permission to read ShippingMethod - """ - ReadShippingMethod - - """ - Grants permission to update ShippingMethod - """ - UpdateShippingMethod - - """ - Grants permission to delete ShippingMethod - """ - DeleteShippingMethod - - """ - Grants permission to create Tag - """ - CreateTag - - """ - Grants permission to read Tag - """ - ReadTag - - """ - Grants permission to update Tag - """ - UpdateTag - - """ - Grants permission to delete Tag - """ - DeleteTag - - """ - Grants permission to create TaxCategory - """ - CreateTaxCategory - - """ - Grants permission to read TaxCategory - """ - ReadTaxCategory - - """ - Grants permission to update TaxCategory - """ - UpdateTaxCategory - - """ - Grants permission to delete TaxCategory - """ - DeleteTaxCategory - - """ - Grants permission to create TaxRate - """ - CreateTaxRate - - """ - Grants permission to read TaxRate - """ - ReadTaxRate - - """ - Grants permission to update TaxRate - """ - UpdateTaxRate - - """ - Grants permission to delete TaxRate - """ - DeleteTaxRate - - """ - Grants permission to create System - """ - CreateSystem - - """ - Grants permission to read System - """ - ReadSystem - - """ - Grants permission to update System - """ - UpdateSystem - - """ - Grants permission to delete System - """ - DeleteSystem - - """ - Grants permission to create Zone - """ - CreateZone - - """ - Grants permission to read Zone - """ - ReadZone - - """ - Grants permission to update Zone - """ - UpdateZone - - """ - Grants permission to delete Zone - """ - DeleteZone -} - -enum SortOrder { - ASC - DESC -} - -enum ErrorCode { - UNKNOWN_ERROR - NATIVE_AUTH_STRATEGY_ERROR - INVALID_CREDENTIALS_ERROR - ORDER_STATE_TRANSITION_ERROR - EMAIL_ADDRESS_CONFLICT_ERROR - ORDER_LIMIT_ERROR - NEGATIVE_QUANTITY_ERROR - INSUFFICIENT_STOCK_ERROR - ORDER_MODIFICATION_ERROR - INELIGIBLE_SHIPPING_METHOD_ERROR - ORDER_PAYMENT_STATE_ERROR - INELIGIBLE_PAYMENT_METHOD_ERROR - PAYMENT_FAILED_ERROR - PAYMENT_DECLINED_ERROR - COUPON_CODE_INVALID_ERROR - COUPON_CODE_EXPIRED_ERROR - COUPON_CODE_LIMIT_ERROR - ALREADY_LOGGED_IN_ERROR - MISSING_PASSWORD_ERROR - PASSWORD_ALREADY_SET_ERROR - VERIFICATION_TOKEN_INVALID_ERROR - VERIFICATION_TOKEN_EXPIRED_ERROR - IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR - IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR - PASSWORD_RESET_TOKEN_INVALID_ERROR - PASSWORD_RESET_TOKEN_EXPIRED_ERROR - NOT_VERIFIED_ERROR - NO_ACTIVE_ORDER_ERROR -} - -enum LogicalOperator { - AND - OR -} - -""" -Retured when attempting an operation that relies on the NativeAuthStrategy, if that strategy is not configured. -""" -type NativeAuthStrategyError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Returned if the user authentication credentials are not valid -""" -type InvalidCredentialsError implements ErrorResult { - errorCode: ErrorCode! - message: String! - authenticationError: String! -} - -""" -Returned if there is an error in transitioning the Order state -""" -type OrderStateTransitionError implements ErrorResult { - errorCode: ErrorCode! - message: String! - transitionError: String! - fromState: String! - toState: String! -} - -""" -Retured when attemting to create a Customer with an email address already registered to an existing User. -""" -type EmailAddressConflictError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Retured when the maximum order size limit has been reached. -""" -type OrderLimitError implements ErrorResult { - errorCode: ErrorCode! - message: String! - maxItems: Int! -} - -""" -Retured when attemting to set a negative OrderLine quantity. -""" -type NegativeQuantityError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Returned when attempting to add more items to the Order than are available -""" -type InsufficientStockError implements ErrorResult { - errorCode: ErrorCode! - message: String! - quantityAvailable: Int! - order: Order! -} - -""" -The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). -""" -scalar JSON - -""" -A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. -""" -scalar DateTime - -""" -The `Upload` scalar type represents a file upload. -""" -scalar Upload - -interface PaginatedList { - items: [Node!]! - totalItems: Int! -} - -interface Node { - id: ID! -} - -interface ErrorResult { - errorCode: ErrorCode! - message: String! -} - -type Adjustment { - adjustmentSource: String! - type: AdjustmentType! - description: String! - amount: Int! -} - -type TaxLine { - description: String! - taxRate: Float! -} - -type ConfigArg { - name: String! - value: String! -} - -type ConfigArgDefinition { - name: String! - type: String! - list: Boolean! - required: Boolean! - defaultValue: JSON - label: String - description: String - ui: JSON -} - -type ConfigurableOperation { - code: String! - args: [ConfigArg!]! -} - -type ConfigurableOperationDefinition { - code: String! - args: [ConfigArgDefinition!]! - description: String! -} - -type DeletionResponse { - result: DeletionResult! - message: String -} - -input ConfigArgInput { - name: String! - - """ - A JSON stringified representation of the actual value - """ - value: String! -} - -input ConfigurableOperationInput { - code: String! - arguments: [ConfigArgInput!]! -} - -input StringOperators { - eq: String - notEq: String - contains: String - notContains: String - in: [String!] - notIn: [String!] - regex: String -} - -input BooleanOperators { - eq: Boolean -} - -input NumberRange { - start: Float! - end: Float! -} - -input NumberOperators { - eq: Float - lt: Float - lte: Float - gt: Float - gte: Float - between: NumberRange -} - -input DateRange { - start: DateTime! - end: DateTime! -} - -input DateOperators { - eq: DateTime - before: DateTime - after: DateTime - between: DateRange -} - -""" -Used to construct boolean expressions for filtering search results -by FacetValue ID. Examples: - -* ID=1 OR ID=2: `{ facetValueFilters: [{ or: [1,2] }] }` -* ID=1 AND ID=2: `{ facetValueFilters: [{ and: 1 }, { and: 2 }] }` -* ID=1 AND (ID=2 OR ID=3): `{ facetValueFilters: [{ and: 1 }, { or: [2,3] }] }` -""" -input FacetValueFilterInput { - and: ID - or: [ID!] -} - -input SearchInput { - term: String - facetValueIds: [ID!] - facetValueOperator: LogicalOperator - facetValueFilters: [FacetValueFilterInput!] - collectionId: ID - collectionSlug: String - groupByProduct: Boolean - take: Int - skip: Int - sort: SearchResultSortParameter -} - -input SearchResultSortParameter { - name: SortOrder - price: SortOrder -} - -input CreateCustomerInput { - title: String - firstName: String! - lastName: String! - phoneNumber: String - emailAddress: String! - customFields: JSON -} - -input CreateAddressInput { - fullName: String - company: String - streetLine1: String! - streetLine2: String - city: String - province: String - postalCode: String - countryCode: String! - phoneNumber: String - defaultShippingAddress: Boolean - defaultBillingAddress: Boolean - customFields: JSON -} - -input UpdateAddressInput { - id: ID! - fullName: String - company: String - streetLine1: String - streetLine2: String - city: String - province: String - postalCode: String - countryCode: String - phoneNumber: String - defaultShippingAddress: Boolean - defaultBillingAddress: Boolean - customFields: JSON -} - -""" -Indicates that an operation succeeded, where we do not want to return any more specific information. -""" -type Success { - success: Boolean! -} - -type ShippingMethodQuote { - id: ID! - price: Int! - priceWithTax: Int! - code: String! - name: String! - description: String! - - """ - Any optional metadata returned by the ShippingCalculator in the ShippingCalculationResult - """ - metadata: JSON -} - -type PaymentMethodQuote { - id: ID! - code: String! - name: String! - description: String! - isEligible: Boolean! - eligibilityMessage: String -} - -type Country implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - code: String! - name: String! - enabled: Boolean! - translations: [CountryTranslation!]! -} - -type CountryTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! -} - -type CountryList implements PaginatedList { - items: [Country!]! - totalItems: Int! -} - -""" -@description -ISO 4217 currency code - -@docsCategory common -""" -enum CurrencyCode { - """ - United Arab Emirates dirham - """ - AED - - """ - Afghan afghani - """ - AFN - - """ - Albanian lek - """ - ALL - - """ - Armenian dram - """ - AMD - - """ - Netherlands Antillean guilder - """ - ANG - - """ - Angolan kwanza - """ - AOA - - """ - Argentine peso - """ - ARS - - """ - Australian dollar - """ - AUD - - """ - Aruban florin - """ - AWG - - """ - Azerbaijani manat - """ - AZN - - """ - Bosnia and Herzegovina convertible mark - """ - BAM - - """ - Barbados dollar - """ - BBD - - """ - Bangladeshi taka - """ - BDT - - """ - Bulgarian lev - """ - BGN - - """ - Bahraini dinar - """ - BHD - - """ - Burundian franc - """ - BIF - - """ - Bermudian dollar - """ - BMD - - """ - Brunei dollar - """ - BND - - """ - Boliviano - """ - BOB - - """ - Brazilian real - """ - BRL - - """ - Bahamian dollar - """ - BSD - - """ - Bhutanese ngultrum - """ - BTN - - """ - Botswana pula - """ - BWP - - """ - Belarusian ruble - """ - BYN - - """ - Belize dollar - """ - BZD - - """ - Canadian dollar - """ - CAD - - """ - Congolese franc - """ - CDF - - """ - Swiss franc - """ - CHF - - """ - Chilean peso - """ - CLP - - """ - Renminbi (Chinese) yuan - """ - CNY - - """ - Colombian peso - """ - COP - - """ - Costa Rican colon - """ - CRC - - """ - Cuban convertible peso - """ - CUC - - """ - Cuban peso - """ - CUP - - """ - Cape Verde escudo - """ - CVE - - """ - Czech koruna - """ - CZK - - """ - Djiboutian franc - """ - DJF - - """ - Danish krone - """ - DKK - - """ - Dominican peso - """ - DOP - - """ - Algerian dinar - """ - DZD - - """ - Egyptian pound - """ - EGP - - """ - Eritrean nakfa - """ - ERN - - """ - Ethiopian birr - """ - ETB - - """ - Euro - """ - EUR - - """ - Fiji dollar - """ - FJD - - """ - Falkland Islands pound - """ - FKP - - """ - Pound sterling - """ - GBP - - """ - Georgian lari - """ - GEL - - """ - Ghanaian cedi - """ - GHS - - """ - Gibraltar pound - """ - GIP - - """ - Gambian dalasi - """ - GMD - - """ - Guinean franc - """ - GNF - - """ - Guatemalan quetzal - """ - GTQ - - """ - Guyanese dollar - """ - GYD - - """ - Hong Kong dollar - """ - HKD - - """ - Honduran lempira - """ - HNL - - """ - Croatian kuna - """ - HRK - - """ - Haitian gourde - """ - HTG - - """ - Hungarian forint - """ - HUF - - """ - Indonesian rupiah - """ - IDR - - """ - Israeli new shekel - """ - ILS - - """ - Indian rupee - """ - INR - - """ - Iraqi dinar - """ - IQD - - """ - Iranian rial - """ - IRR - - """ - Icelandic króna - """ - ISK - - """ - Jamaican dollar - """ - JMD - - """ - Jordanian dinar - """ - JOD - - """ - Japanese yen - """ - JPY - - """ - Kenyan shilling - """ - KES - - """ - Kyrgyzstani som - """ - KGS - - """ - Cambodian riel - """ - KHR - - """ - Comoro franc - """ - KMF - - """ - North Korean won - """ - KPW - - """ - South Korean won - """ - KRW - - """ - Kuwaiti dinar - """ - KWD - - """ - Cayman Islands dollar - """ - KYD - - """ - Kazakhstani tenge - """ - KZT - - """ - Lao kip - """ - LAK - - """ - Lebanese pound - """ - LBP - - """ - Sri Lankan rupee - """ - LKR - - """ - Liberian dollar - """ - LRD - - """ - Lesotho loti - """ - LSL - - """ - Libyan dinar - """ - LYD - - """ - Moroccan dirham - """ - MAD - - """ - Moldovan leu - """ - MDL - - """ - Malagasy ariary - """ - MGA - - """ - Macedonian denar - """ - MKD - - """ - Myanmar kyat - """ - MMK - - """ - Mongolian tögrög - """ - MNT - - """ - Macanese pataca - """ - MOP - - """ - Mauritanian ouguiya - """ - MRU - - """ - Mauritian rupee - """ - MUR - - """ - Maldivian rufiyaa - """ - MVR - - """ - Malawian kwacha - """ - MWK - - """ - Mexican peso - """ - MXN - - """ - Malaysian ringgit - """ - MYR - - """ - Mozambican metical - """ - MZN - - """ - Namibian dollar - """ - NAD - - """ - Nigerian naira - """ - NGN - - """ - Nicaraguan córdoba - """ - NIO - - """ - Norwegian krone - """ - NOK - - """ - Nepalese rupee - """ - NPR - - """ - New Zealand dollar - """ - NZD - - """ - Omani rial - """ - OMR - - """ - Panamanian balboa - """ - PAB - - """ - Peruvian sol - """ - PEN - - """ - Papua New Guinean kina - """ - PGK - - """ - Philippine peso - """ - PHP - - """ - Pakistani rupee - """ - PKR - - """ - Polish złoty - """ - PLN - - """ - Paraguayan guaraní - """ - PYG - - """ - Qatari riyal - """ - QAR - - """ - Romanian leu - """ - RON - - """ - Serbian dinar - """ - RSD - - """ - Russian ruble - """ - RUB - - """ - Rwandan franc - """ - RWF - - """ - Saudi riyal - """ - SAR - - """ - Solomon Islands dollar - """ - SBD - - """ - Seychelles rupee - """ - SCR - - """ - Sudanese pound - """ - SDG - - """ - Swedish krona/kronor - """ - SEK - - """ - Singapore dollar - """ - SGD - - """ - Saint Helena pound - """ - SHP - - """ - Sierra Leonean leone - """ - SLL - - """ - Somali shilling - """ - SOS - - """ - Surinamese dollar - """ - SRD - - """ - South Sudanese pound - """ - SSP - - """ - São Tomé and Príncipe dobra - """ - STN - - """ - Salvadoran colón - """ - SVC - - """ - Syrian pound - """ - SYP - - """ - Swazi lilangeni - """ - SZL - - """ - Thai baht - """ - THB - - """ - Tajikistani somoni - """ - TJS - - """ - Turkmenistan manat - """ - TMT - - """ - Tunisian dinar - """ - TND - - """ - Tongan paʻanga - """ - TOP - - """ - Turkish lira - """ - TRY - - """ - Trinidad and Tobago dollar - """ - TTD - - """ - New Taiwan dollar - """ - TWD - - """ - Tanzanian shilling - """ - TZS - - """ - Ukrainian hryvnia - """ - UAH - - """ - Ugandan shilling - """ - UGX - - """ - United States dollar - """ - USD - - """ - Uruguayan peso - """ - UYU - - """ - Uzbekistan som - """ - UZS - - """ - Venezuelan bolívar soberano - """ - VES - - """ - Vietnamese đồng - """ - VND - - """ - Vanuatu vatu - """ - VUV - - """ - Samoan tala - """ - WST - - """ - CFA franc BEAC - """ - XAF - - """ - East Caribbean dollar - """ - XCD - - """ - CFA franc BCEAO - """ - XOF - - """ - CFP franc (franc Pacifique) - """ - XPF - - """ - Yemeni rial - """ - YER - - """ - South African rand - """ - ZAR - - """ - Zambian kwacha - """ - ZMW - - """ - Zimbabwean dollar - """ - ZWL -} - -interface CustomField { - name: String! - type: String! - list: Boolean! - label: [LocalizedString!] - description: [LocalizedString!] - readonly: Boolean - internal: Boolean -} - -type StringCustomFieldConfig implements CustomField { - name: String! - type: String! - list: Boolean! - length: Int - label: [LocalizedString!] - description: [LocalizedString!] - readonly: Boolean - internal: Boolean - pattern: String - options: [StringFieldOption!] -} - -type StringFieldOption { - value: String! - label: [LocalizedString!] -} - -type LocaleStringCustomFieldConfig implements CustomField { - name: String! - type: String! - list: Boolean! - length: Int - label: [LocalizedString!] - description: [LocalizedString!] - readonly: Boolean - internal: Boolean - pattern: String -} - -type IntCustomFieldConfig implements CustomField { - name: String! - type: String! - list: Boolean! - label: [LocalizedString!] - description: [LocalizedString!] - readonly: Boolean - internal: Boolean - min: Int - max: Int - step: Int -} - -type FloatCustomFieldConfig implements CustomField { - name: String! - type: String! - list: Boolean! - label: [LocalizedString!] - description: [LocalizedString!] - readonly: Boolean - internal: Boolean - min: Float - max: Float - step: Float -} - -type BooleanCustomFieldConfig implements CustomField { - name: String! - type: String! - list: Boolean! - label: [LocalizedString!] - description: [LocalizedString!] - readonly: Boolean - internal: Boolean -} - -""" -Expects the same validation formats as the `` HTML element. -See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#Additional_attributes -""" -type DateTimeCustomFieldConfig implements CustomField { - name: String! - type: String! - list: Boolean! - label: [LocalizedString!] - description: [LocalizedString!] - readonly: Boolean - internal: Boolean - min: String - max: String - step: Int -} - -type RelationCustomFieldConfig implements CustomField { - name: String! - type: String! - list: Boolean! - label: [LocalizedString!] - description: [LocalizedString!] - readonly: Boolean - internal: Boolean - entity: String! - scalarFields: [String!]! -} - -type LocalizedString { - languageCode: LanguageCode! - value: String! -} - -union CustomFieldConfig = - StringCustomFieldConfig - | LocaleStringCustomFieldConfig - | IntCustomFieldConfig - | FloatCustomFieldConfig - | BooleanCustomFieldConfig - | DateTimeCustomFieldConfig - | RelationCustomFieldConfig - -type CustomerGroup implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - name: String! - customers(options: CustomerListOptions): CustomerList! -} - -input CustomerListOptions { - skip: Int - take: Int - sort: CustomerSortParameter - filter: CustomerFilterParameter -} - -type Customer implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - title: String - firstName: String! - lastName: String! - phoneNumber: String - emailAddress: String! - addresses: [Address!] - orders(options: OrderListOptions): OrderList! - user: User - customFields: JSON -} - -type CustomerList implements PaginatedList { - items: [Customer!]! - totalItems: Int! -} - -type FacetValue implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - facet: Facet! - name: String! - code: String! - translations: [FacetValueTranslation!]! - customFields: JSON -} - -type FacetValueTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! -} - -type Facet implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! - code: String! - values: [FacetValue!]! - translations: [FacetTranslation!]! - customFields: JSON -} - -type FacetTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! -} - -type FacetList implements PaginatedList { - items: [Facet!]! - totalItems: Int! -} - -type HistoryEntry implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - type: HistoryEntryType! - data: JSON! -} - -enum HistoryEntryType { - CUSTOMER_REGISTERED - CUSTOMER_VERIFIED - CUSTOMER_DETAIL_UPDATED - CUSTOMER_ADDED_TO_GROUP - CUSTOMER_REMOVED_FROM_GROUP - CUSTOMER_ADDRESS_CREATED - CUSTOMER_ADDRESS_UPDATED - CUSTOMER_ADDRESS_DELETED - CUSTOMER_PASSWORD_UPDATED - CUSTOMER_PASSWORD_RESET_REQUESTED - CUSTOMER_PASSWORD_RESET_VERIFIED - CUSTOMER_EMAIL_UPDATE_REQUESTED - CUSTOMER_EMAIL_UPDATE_VERIFIED - CUSTOMER_NOTE - ORDER_STATE_TRANSITION - ORDER_PAYMENT_TRANSITION - ORDER_FULFILLMENT - ORDER_CANCELLATION - ORDER_REFUND_TRANSITION - ORDER_FULFILLMENT_TRANSITION - ORDER_NOTE - ORDER_COUPON_APPLIED - ORDER_COUPON_REMOVED - ORDER_MODIFIED -} - -type HistoryEntryList implements PaginatedList { - items: [HistoryEntry!]! - totalItems: Int! -} - -input HistoryEntryListOptions { - skip: Int - take: Int - sort: HistoryEntrySortParameter - filter: HistoryEntryFilterParameter -} - -""" -@description -Languages in the form of a ISO 639-1 language code with optional -region or script modifier (e.g. de_AT). The selection available is based -on the [Unicode CLDR summary list](https://unicode-org.github.io/cldr-staging/charts/37/summary/root.html) -and includes the major spoken languages of the world and any widely-used variants. - -@docsCategory common -""" -enum LanguageCode { - """ - Afrikaans - """ - af - - """ - Akan - """ - ak - - """ - Albanian - """ - sq - - """ - Amharic - """ - am - - """ - Arabic - """ - ar - - """ - Armenian - """ - hy - - """ - Assamese - """ - as - - """ - Azerbaijani - """ - az - - """ - Bambara - """ - bm - - """ - Bangla - """ - bn - - """ - Basque - """ - eu - - """ - Belarusian - """ - be - - """ - Bosnian - """ - bs - - """ - Breton - """ - br - - """ - Bulgarian - """ - bg - - """ - Burmese - """ - my - - """ - Catalan - """ - ca - - """ - Chechen - """ - ce - - """ - Chinese - """ - zh - - """ - Simplified Chinese - """ - zh_Hans - - """ - Traditional Chinese - """ - zh_Hant - - """ - Church Slavic - """ - cu - - """ - Cornish - """ - kw - - """ - Corsican - """ - co - - """ - Croatian - """ - hr - - """ - Czech - """ - cs - - """ - Danish - """ - da - - """ - Dutch - """ - nl - - """ - Flemish - """ - nl_BE - - """ - Dzongkha - """ - dz - - """ - English - """ - en - - """ - Australian English - """ - en_AU - - """ - Canadian English - """ - en_CA - - """ - British English - """ - en_GB - - """ - American English - """ - en_US - - """ - Esperanto - """ - eo - - """ - Estonian - """ - et - - """ - Ewe - """ - ee - - """ - Faroese - """ - fo - - """ - Finnish - """ - fi - - """ - French - """ - fr - - """ - Canadian French - """ - fr_CA - - """ - Swiss French - """ - fr_CH - - """ - Fulah - """ - ff - - """ - Galician - """ - gl - - """ - Ganda - """ - lg - - """ - Georgian - """ - ka - - """ - German - """ - de - - """ - Austrian German - """ - de_AT - - """ - Swiss High German - """ - de_CH - - """ - Greek - """ - el - - """ - Gujarati - """ - gu - - """ - Haitian Creole - """ - ht - - """ - Hausa - """ - ha - - """ - Hebrew - """ - he - - """ - Hindi - """ - hi - - """ - Hungarian - """ - hu - - """ - Icelandic - """ - is - - """ - Igbo - """ - ig - - """ - Indonesian - """ - id - - """ - Interlingua - """ - ia - - """ - Irish - """ - ga - - """ - Italian - """ - it - - """ - Japanese - """ - ja - - """ - Javanese - """ - jv - - """ - Kalaallisut - """ - kl - - """ - Kannada - """ - kn - - """ - Kashmiri - """ - ks - - """ - Kazakh - """ - kk - - """ - Khmer - """ - km - - """ - Kikuyu - """ - ki - - """ - Kinyarwanda - """ - rw - - """ - Korean - """ - ko - - """ - Kurdish - """ - ku - - """ - Kyrgyz - """ - ky - - """ - Lao - """ - lo - - """ - Latin - """ - la - - """ - Latvian - """ - lv - - """ - Lingala - """ - ln - - """ - Lithuanian - """ - lt - - """ - Luba-Katanga - """ - lu - - """ - Luxembourgish - """ - lb - - """ - Macedonian - """ - mk - - """ - Malagasy - """ - mg - - """ - Malay - """ - ms - - """ - Malayalam - """ - ml - - """ - Maltese - """ - mt - - """ - Manx - """ - gv - - """ - Maori - """ - mi - - """ - Marathi - """ - mr - - """ - Mongolian - """ - mn - - """ - Nepali - """ - ne - - """ - North Ndebele - """ - nd - - """ - Northern Sami - """ - se - - """ - Norwegian Bokmål - """ - nb - - """ - Norwegian Nynorsk - """ - nn - - """ - Nyanja - """ - ny - - """ - Odia - """ - or - - """ - Oromo - """ - om - - """ - Ossetic - """ - os - - """ - Pashto - """ - ps - - """ - Persian - """ - fa - - """ - Dari - """ - fa_AF - - """ - Polish - """ - pl - - """ - Portuguese - """ - pt - - """ - Brazilian Portuguese - """ - pt_BR - - """ - European Portuguese - """ - pt_PT - - """ - Punjabi - """ - pa - - """ - Quechua - """ - qu - - """ - Romanian - """ - ro - - """ - Moldavian - """ - ro_MD - - """ - Romansh - """ - rm - - """ - Rundi - """ - rn - - """ - Russian - """ - ru - - """ - Samoan - """ - sm - - """ - Sango - """ - sg - - """ - Sanskrit - """ - sa - - """ - Scottish Gaelic - """ - gd - - """ - Serbian - """ - sr - - """ - Shona - """ - sn - - """ - Sichuan Yi - """ - ii - - """ - Sindhi - """ - sd - - """ - Sinhala - """ - si - - """ - Slovak - """ - sk - - """ - Slovenian - """ - sl - - """ - Somali - """ - so - - """ - Southern Sotho - """ - st - - """ - Spanish - """ - es - - """ - European Spanish - """ - es_ES - - """ - Mexican Spanish - """ - es_MX - - """ - Sundanese - """ - su - - """ - Swahili - """ - sw - - """ - Congo Swahili - """ - sw_CD - - """ - Swedish - """ - sv - - """ - Tajik - """ - tg - - """ - Tamil - """ - ta - - """ - Tatar - """ - tt - - """ - Telugu - """ - te - - """ - Thai - """ - th - - """ - Tibetan - """ - bo - - """ - Tigrinya - """ - ti - - """ - Tongan - """ - to - - """ - Turkish - """ - tr - - """ - Turkmen - """ - tk - - """ - Ukrainian - """ - uk - - """ - Urdu - """ - ur - - """ - Uyghur - """ - ug - - """ - Uzbek - """ - uz - - """ - Vietnamese - """ - vi - - """ - Volapük - """ - vo - - """ - Welsh - """ - cy - - """ - Western Frisian - """ - fy - - """ - Wolof - """ - wo - - """ - Xhosa - """ - xh - - """ - Yiddish - """ - yi - - """ - Yoruba - """ - yo - - """ - Zulu - """ - zu -} - -type Order implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - - """ - The date & time that the Order was placed, i.e. the Customer - completed the checkout and the Order is no longer "active" - """ - orderPlacedAt: DateTime - - """ - A unique code for the Order - """ - code: String! - state: String! - - """ - An order is active as long as the payment process has not been completed - """ - active: Boolean! - customer: Customer - shippingAddress: OrderAddress - billingAddress: OrderAddress - lines: [OrderLine!]! - - """ - Surcharges are arbitrary modifications to the Order total which are neither - ProductVariants nor discounts resulting from applied Promotions. For example, - one-off discounts based on customer interaction, or surcharges based on payment - methods. - """ - surcharges: [Surcharge!]! - discounts: [Discount!]! - - """ - An array of all coupon codes applied to the Order - """ - couponCodes: [String!]! - - """ - Promotions applied to the order. Only gets populated after the payment process has completed. - """ - promotions: [Promotion!]! - payments: [Payment!] - fulfillments: [Fulfillment!] - totalQuantity: Int! - - """ - The subTotal is the total of all OrderLines in the Order. This figure also includes any Order-level - discounts which have been prorated (proportionally distributed) amongst the OrderItems. - To get a total of all OrderLines which does not account for prorated discounts, use the - sum of `OrderLine.discountedLinePrice` values. - """ - subTotal: Int! - - """ - Same as subTotal, but inclusive of tax - """ - subTotalWithTax: Int! - currencyCode: CurrencyCode! - shippingLines: [ShippingLine!]! - shipping: Int! - shippingWithTax: Int! - - """ - Equal to subTotal plus shipping - """ - total: Int! - - """ - The final payable amount. Equal to subTotalWithTax plus shippingWithTax - """ - totalWithTax: Int! - - """ - A summary of the taxes being applied to this Order - """ - taxSummary: [OrderTaxSummary!]! - history(options: HistoryEntryListOptions): HistoryEntryList! - customFields: JSON -} - -""" -A summary of the taxes being applied to this order, grouped -by taxRate. -""" -type OrderTaxSummary { - """ - A description of this tax - """ - description: String! - - """ - The taxRate as a percentage - """ - taxRate: Float! - - """ - The total net price or OrderItems to which this taxRate applies - """ - taxBase: Int! - - """ - The total tax being applied to the Order at this taxRate - """ - taxTotal: Int! -} - -type OrderAddress { - fullName: String - company: String - streetLine1: String - streetLine2: String - city: String - province: String - postalCode: String - country: String - countryCode: String - phoneNumber: String - customFields: JSON -} - -type OrderList implements PaginatedList { - items: [Order!]! - totalItems: Int! -} - -type ShippingLine { - shippingMethod: ShippingMethod! - price: Int! - priceWithTax: Int! - discountedPrice: Int! - discountedPriceWithTax: Int! - discounts: [Discount!]! -} - -type Discount { - adjustmentSource: String! - type: AdjustmentType! - description: String! - amount: Int! - amountWithTax: Int! -} - -type OrderItem implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - cancelled: Boolean! - - """ - The price of a single unit, excluding tax and discounts - """ - unitPrice: Int! - - """ - The price of a single unit, including tax but excluding discounts - """ - unitPriceWithTax: Int! - - """ - The price of a single unit including discounts, excluding tax. - - If Order-level discounts have been applied, this will not be the - actual taxable unit price (see `proratedUnitPrice`), but is generally the - correct price to display to customers to avoid confusion - about the internal handling of distributed Order-level discounts. - """ - discountedUnitPrice: Int! - - """ - The price of a single unit including discounts and tax - """ - discountedUnitPriceWithTax: Int! - - """ - The actual unit price, taking into account both item discounts _and_ prorated (proportially-distributed) - Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax - and refund calculations. - """ - proratedUnitPrice: Int! - - """ - The proratedUnitPrice including tax - """ - proratedUnitPriceWithTax: Int! - unitTax: Int! - taxRate: Float! - adjustments: [Adjustment!]! - taxLines: [TaxLine!]! - fulfillment: Fulfillment - refundId: ID -} - -type OrderLine implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - productVariant: ProductVariant! - featuredAsset: Asset - - """ - The price of a single unit, excluding tax and discounts - """ - unitPrice: Int! - - """ - The price of a single unit, including tax but excluding discounts - """ - unitPriceWithTax: Int! - - """ - Non-zero if the unitPrice has changed since it was initially added to Order - """ - unitPriceChangeSinceAdded: Int! - - """ - Non-zero if the unitPriceWithTax has changed since it was initially added to Order - """ - unitPriceWithTaxChangeSinceAdded: Int! - - """ - The price of a single unit including discounts, excluding tax. - - If Order-level discounts have been applied, this will not be the - actual taxable unit price (see `proratedUnitPrice`), but is generally the - correct price to display to customers to avoid confusion - about the internal handling of distributed Order-level discounts. - """ - discountedUnitPrice: Int! - - """ - The price of a single unit including discounts and tax - """ - discountedUnitPriceWithTax: Int! - - """ - The actual unit price, taking into account both item discounts _and_ prorated (proportially-distributed) - Order-level discounts. This value is the true economic value of the OrderItem, and is used in tax - and refund calculations. - """ - proratedUnitPrice: Int! - - """ - The proratedUnitPrice including tax - """ - proratedUnitPriceWithTax: Int! - quantity: Int! - items: [OrderItem!]! - taxRate: Float! - - """ - The total price of the line excluding tax and discounts. - """ - linePrice: Int! - - """ - The total price of the line including tax bit excluding discounts. - """ - linePriceWithTax: Int! - - """ - The price of the line including discounts, excluding tax - """ - discountedLinePrice: Int! - - """ - The price of the line including discounts and tax - """ - discountedLinePriceWithTax: Int! - - """ - The actual line price, taking into account both item discounts _and_ prorated (proportially-distributed) - Order-level discounts. This value is the true economic value of the OrderLine, and is used in tax - and refund calculations. - """ - proratedLinePrice: Int! - - """ - The proratedLinePrice including tax - """ - proratedLinePriceWithTax: Int! - - """ - The total tax on this line - """ - lineTax: Int! - discounts: [Discount!]! - taxLines: [TaxLine!]! - order: Order! - customFields: JSON -} - -type Payment implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - method: String! - amount: Int! - state: String! - transactionId: String - errorMessage: String - refunds: [Refund!]! - metadata: JSON -} - -type Refund implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - items: Int! - shipping: Int! - adjustment: Int! - total: Int! - method: String - state: String! - transactionId: String - reason: String - orderItems: [OrderItem!]! - paymentId: ID! - metadata: JSON -} - -type Fulfillment implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - orderItems: [OrderItem!]! - state: String! - method: String! - trackingCode: String - customFields: JSON -} - -type Surcharge implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - description: String! - sku: String - taxLines: [TaxLine!]! - price: Int! - priceWithTax: Int! - taxRate: Float! -} - -type ProductOptionGroup implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - code: String! - name: String! - options: [ProductOption!]! - translations: [ProductOptionGroupTranslation!]! - customFields: JSON -} - -type ProductOptionGroupTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! -} - -type ProductOption implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - code: String! - name: String! - groupId: ID! - group: ProductOptionGroup! - translations: [ProductOptionTranslation!]! - customFields: JSON -} - -type ProductOptionTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! -} - -type SearchReindexResponse { - success: Boolean! -} - -type SearchResponse { - items: [SearchResult!]! - totalItems: Int! - facetValues: [FacetValueResult!]! -} - -""" -Which FacetValues are present in the products returned -by the search, and in what quantity. -""" -type FacetValueResult { - facetValue: FacetValue! - count: Int! -} - -type SearchResultAsset { - id: ID! - preview: String! - focalPoint: Coordinate -} - -type SearchResult { - sku: String! - slug: String! - productId: ID! - productName: String! - productAsset: SearchResultAsset - productVariantId: ID! - productVariantName: String! - productVariantAsset: SearchResultAsset - price: SearchResultPrice! - priceWithTax: SearchResultPrice! - currencyCode: CurrencyCode! - description: String! - facetIds: [ID!]! - facetValueIds: [ID!]! - - """ - An array of ids of the Collections in which this result appears - """ - collectionIds: [ID!]! - - """ - A relevence score for the result. Differs between database implementations - """ - score: Float! -} - -""" -The price of a search result product, either as a range or as a single price -""" -union SearchResultPrice = PriceRange | SinglePrice - -""" -The price value where the result has a single price -""" -type SinglePrice { - value: Int! -} - -""" -The price range where the result has more than one price -""" -type PriceRange { - min: Int! - max: Int! -} - -type Product implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! - slug: String! - description: String! - featuredAsset: Asset - assets: [Asset!]! - variants: [ProductVariant!]! - optionGroups: [ProductOptionGroup!]! - facetValues: [FacetValue!]! - translations: [ProductTranslation!]! - collections: [Collection!]! - customFields: JSON -} - -type ProductTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! - slug: String! - description: String! -} - -type ProductList implements PaginatedList { - items: [Product!]! - totalItems: Int! -} - -type ProductVariant implements Node { - id: ID! - product: Product! - productId: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - sku: String! - name: String! - featuredAsset: Asset - assets: [Asset!]! - price: Int! - currencyCode: CurrencyCode! - priceWithTax: Int! - stockLevel: String! - taxRateApplied: TaxRate! - taxCategory: TaxCategory! - options: [ProductOption!]! - facetValues: [FacetValue!]! - translations: [ProductVariantTranslation!]! - customFields: ProductVariantCustomFields -} - -type ProductVariantTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! -} - -type Promotion implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - startsAt: DateTime - endsAt: DateTime - couponCode: String - perCustomerUsageLimit: Int - name: String! - enabled: Boolean! - conditions: [ConfigurableOperation!]! - actions: [ConfigurableOperation!]! -} - -type PromotionList implements PaginatedList { - items: [Promotion!]! - totalItems: Int! -} - -type Role implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - code: String! - description: String! - permissions: [Permission!]! - channels: [Channel!]! -} - -type RoleList implements PaginatedList { - items: [Role!]! - totalItems: Int! -} - -type ShippingMethod implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - code: String! - name: String! - description: String! - fulfillmentHandlerCode: String! - checker: ConfigurableOperation! - calculator: ConfigurableOperation! - translations: [ShippingMethodTranslation!]! - customFields: JSON -} - -type ShippingMethodTranslation { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - languageCode: LanguageCode! - name: String! - description: String! -} - -type ShippingMethodList implements PaginatedList { - items: [ShippingMethod!]! - totalItems: Int! -} - -type Tag implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - value: String! -} - -type TagList implements PaginatedList { - items: [Tag!]! - totalItems: Int! -} - -type TaxCategory implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - name: String! - isDefault: Boolean! -} - -type TaxRate implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - name: String! - enabled: Boolean! - value: Float! - category: TaxCategory! - zone: Zone! - customerGroup: CustomerGroup -} - -type TaxRateList implements PaginatedList { - items: [TaxRate!]! - totalItems: Int! -} - -type User implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - identifier: String! - verified: Boolean! - roles: [Role!]! - lastLogin: DateTime - authenticationMethods: [AuthenticationMethod!]! - customFields: JSON -} - -type AuthenticationMethod implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - strategy: String! -} - -type Zone implements Node { - id: ID! - createdAt: DateTime! - updatedAt: DateTime! - name: String! - members: [Country!]! -} - -""" -Returned when attempting to modify the contents of an Order that is not in the `AddingItems` state. -""" -type OrderModificationError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Returned when attempting to set a ShippingMethod for which the Order is not eligible -""" -type IneligibleShippingMethodError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Returned when attempting to add a Payment to an Order that is not in the `ArrangingPayment` state. -""" -type OrderPaymentStateError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Returned when attempting to add a Payment using a PaymentMethod for which the Order is not eligible. -""" -type IneligiblePaymentMethodError implements ErrorResult { - errorCode: ErrorCode! - message: String! - eligibilityCheckerMessage: String -} - -""" -Returned when a Payment fails due to an error. -""" -type PaymentFailedError implements ErrorResult { - errorCode: ErrorCode! - message: String! - paymentErrorMessage: String! -} - -""" -Returned when a Payment is declined by the payment provider. -""" -type PaymentDeclinedError implements ErrorResult { - errorCode: ErrorCode! - message: String! - paymentErrorMessage: String! -} - -""" -Returned if the provided coupon code is invalid -""" -type CouponCodeInvalidError implements ErrorResult { - errorCode: ErrorCode! - message: String! - couponCode: String! -} - -""" -Returned if the provided coupon code is invalid -""" -type CouponCodeExpiredError implements ErrorResult { - errorCode: ErrorCode! - message: String! - couponCode: String! -} - -""" -Returned if the provided coupon code is invalid -""" -type CouponCodeLimitError implements ErrorResult { - errorCode: ErrorCode! - message: String! - couponCode: String! - limit: Int! -} - -""" -Retured when attemting to set the Customer for an Order when already logged in. -""" -type AlreadyLoggedInError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Retured when attemting to register or verify a customer account without a password, when one is required. -""" -type MissingPasswordError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Retured when attemting to verify a customer account with a password, when a password has already been set. -""" -type PasswordAlreadySetError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Retured if the verification token (used to verify a Customer's email address) is either -invalid or does not match any expected tokens. -""" -type VerificationTokenInvalidError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Returned if the verification token (used to verify a Customer's email address) is valid, but has -expired according to the `verificationTokenDuration` setting in the AuthOptions. -""" -type VerificationTokenExpiredError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Retured if the token used to change a Customer's email address is either -invalid or does not match any expected tokens. -""" -type IdentifierChangeTokenInvalidError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Retured if the token used to change a Customer's email address is valid, but has -expired according to the `verificationTokenDuration` setting in the AuthOptions. -""" -type IdentifierChangeTokenExpiredError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Retured if the token used to reset a Customer's password is either -invalid or does not match any expected tokens. -""" -type PasswordResetTokenInvalidError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Retured if the token used to reset a Customer's password is valid, but has -expired according to the `verificationTokenDuration` setting in the AuthOptions. -""" -type PasswordResetTokenExpiredError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Returned if `authOptions.requireVerification` is set to `true` (which is the default) -and an unverified user attempts to authenticate. -""" -type NotVerifiedError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -""" -Returned when invoking a mutation which depends on there being an active Order on the -current session. -""" -type NoActiveOrderError implements ErrorResult { - errorCode: ErrorCode! - message: String! -} - -input AuthenticationInput { - native: NativeAuthInput -} - -input RegisterCustomerInput { - emailAddress: String! - title: String - firstName: String - lastName: String - phoneNumber: String - password: String -} - -input UpdateCustomerInput { - title: String - firstName: String - lastName: String - phoneNumber: String - customFields: JSON -} - -input UpdateOrderInput { - customFields: JSON -} - -""" -Passed as input to the `addPaymentToOrder` mutation. -""" -input PaymentInput { - """ - This field should correspond to the `code` property of a PaymentMethodHandler. - """ - method: String! - - """ - This field should contain arbitrary data passed to the specified PaymentMethodHandler's `createPayment()` method - as the "metadata" argument. For example, it could contain an ID for the payment and other - data generated by the payment provider. - """ - metadata: JSON! -} - -input CollectionListOptions { - skip: Int - take: Int - sort: CollectionSortParameter - filter: CollectionFilterParameter -} - -input OrderListOptions { - skip: Int - take: Int - sort: OrderSortParameter - filter: OrderFilterParameter -} - -input ProductListOptions { - skip: Int - take: Int - sort: ProductSortParameter - filter: ProductFilterParameter -} - -union UpdateOrderItemsResult = - Order - | OrderModificationError - | OrderLimitError - | NegativeQuantityError - | InsufficientStockError - -union RemoveOrderItemsResult = Order | OrderModificationError - -union SetOrderShippingMethodResult = - Order - | OrderModificationError - | IneligibleShippingMethodError - | NoActiveOrderError - -union ApplyCouponCodeResult = - Order - | CouponCodeExpiredError - | CouponCodeInvalidError - | CouponCodeLimitError - -union AddPaymentToOrderResult = - Order - | OrderPaymentStateError - | IneligiblePaymentMethodError - | PaymentFailedError - | PaymentDeclinedError - | OrderStateTransitionError - | NoActiveOrderError - -union TransitionOrderToStateResult = Order | OrderStateTransitionError - -union SetCustomerForOrderResult = - Order - | AlreadyLoggedInError - | EmailAddressConflictError - | NoActiveOrderError - -union RegisterCustomerAccountResult = - Success - | MissingPasswordError - | NativeAuthStrategyError - -union RefreshCustomerVerificationResult = Success | NativeAuthStrategyError - -union VerifyCustomerAccountResult = - CurrentUser - | VerificationTokenInvalidError - | VerificationTokenExpiredError - | MissingPasswordError - | PasswordAlreadySetError - | NativeAuthStrategyError - -union UpdateCustomerPasswordResult = - Success - | InvalidCredentialsError - | NativeAuthStrategyError - -union RequestUpdateCustomerEmailAddressResult = - Success - | InvalidCredentialsError - | EmailAddressConflictError - | NativeAuthStrategyError - -union UpdateCustomerEmailAddressResult = - Success - | IdentifierChangeTokenInvalidError - | IdentifierChangeTokenExpiredError - | NativeAuthStrategyError - -union RequestPasswordResetResult = Success | NativeAuthStrategyError - -union ResetPasswordResult = - CurrentUser - | PasswordResetTokenInvalidError - | PasswordResetTokenExpiredError - | NativeAuthStrategyError - -union NativeAuthenticationResult = - CurrentUser - | InvalidCredentialsError - | NotVerifiedError - | NativeAuthStrategyError - -union AuthenticationResult = - CurrentUser - | InvalidCredentialsError - | NotVerifiedError - -union ActiveOrderResult = Order | NoActiveOrderError - -input CollectionFilterParameter { - createdAt: DateOperators - updatedAt: DateOperators - languageCode: StringOperators - name: StringOperators - slug: StringOperators - position: NumberOperators - description: StringOperators -} - -input CollectionSortParameter { - id: SortOrder - createdAt: SortOrder - updatedAt: SortOrder - name: SortOrder - slug: SortOrder - position: SortOrder - description: SortOrder -} - -input ProductFilterParameter { - createdAt: DateOperators - updatedAt: DateOperators - languageCode: StringOperators - name: StringOperators - slug: StringOperators - description: StringOperators -} - -input ProductSortParameter { - id: SortOrder - createdAt: SortOrder - updatedAt: SortOrder - name: SortOrder - slug: SortOrder - description: SortOrder -} - -input ProductVariantFilterParameter { - createdAt: DateOperators - updatedAt: DateOperators - languageCode: StringOperators - sku: StringOperators - name: StringOperators - price: NumberOperators - currencyCode: StringOperators - priceWithTax: NumberOperators - stockLevel: StringOperators - discountPrice: NumberOperators -} - -input ProductVariantSortParameter { - id: SortOrder - productId: SortOrder - createdAt: SortOrder - updatedAt: SortOrder - sku: SortOrder - name: SortOrder - price: SortOrder - priceWithTax: SortOrder - stockLevel: SortOrder - discountPrice: SortOrder -} - -input CustomerFilterParameter { - createdAt: DateOperators - updatedAt: DateOperators - title: StringOperators - firstName: StringOperators - lastName: StringOperators - phoneNumber: StringOperators - emailAddress: StringOperators -} - -input CustomerSortParameter { - id: SortOrder - createdAt: SortOrder - updatedAt: SortOrder - title: SortOrder - firstName: SortOrder - lastName: SortOrder - phoneNumber: SortOrder - emailAddress: SortOrder -} - -input OrderFilterParameter { - createdAt: DateOperators - updatedAt: DateOperators - orderPlacedAt: DateOperators - code: StringOperators - state: StringOperators - active: BooleanOperators - totalQuantity: NumberOperators - subTotal: NumberOperators - subTotalWithTax: NumberOperators - currencyCode: StringOperators - shipping: NumberOperators - shippingWithTax: NumberOperators - total: NumberOperators - totalWithTax: NumberOperators -} - -input OrderSortParameter { - id: SortOrder - createdAt: SortOrder - updatedAt: SortOrder - orderPlacedAt: SortOrder - code: SortOrder - state: SortOrder - totalQuantity: SortOrder - subTotal: SortOrder - subTotalWithTax: SortOrder - shipping: SortOrder - shippingWithTax: SortOrder - total: SortOrder - totalWithTax: SortOrder -} - -input HistoryEntryFilterParameter { - createdAt: DateOperators - updatedAt: DateOperators - type: StringOperators -} - -input HistoryEntrySortParameter { - id: SortOrder - createdAt: SortOrder - updatedAt: SortOrder -} - -type ProductVariantCustomFields { - discountPrice: Int -} - -input NativeAuthInput { - username: String! - password: String! -}