# Represents a collection of the general settings and information about the shop.
type Shop
    implements HasMetafields&HasPublishedTranslations&Node
    @key(fields: "id") {

    # A list of the shop's active alert messages that appear in the Shopify admin.
    alerts: [ShopAlert!]!

    # A list of the shop's product categories. Limit: 1000 product categories.
    allProductCategories: [ProductCategory!]!

    # The paginated list of fulfillment orders assigned to fulfillment services.
    assignedFulfillmentOrders(
        after: String
        assignmentStatus: FulfillmentOrderAssignmentStatus
        before: String
        first: Int
        last: Int
        locationIds: [ID!]
        reverse: Boolean = false
        sortKey: FulfillmentOrderSortKeys = ID
    ): FulfillmentOrderConnection!

    # The list of sales channels not currently installed on the shop.
    availableChannelApps(
        after: String
        before: String
        first: Int
        last: Int
        reverse: Boolean = false
    ): AppConnection!

    # The shop's billing address information.
    billingAddress: MailingAddress!

    # List of all channel definitions associated with a shop.
    channelDefinitionsForInstalledChannels: [AvailableChannelDefinitionsByChannel!]!

    # Specifies whether the shop supports checkouts via Checkout API.
    checkoutApiSupported: Boolean!

    # The public-facing contact email address for the shop.
    # Customers will use this email to communicate with the shop owner.
    contactEmail: String!

    # Countries that have been defined in shipping zones for the shop.
    countriesInShippingZones: CountriesInShippingZones!

    # The three letter code for the currency that the shop sells in.
    currencyCode: CurrencyCode!

    # How currencies are displayed on your store.
    currencyFormats: CurrencyFormats!

    # The presentment currency settings for the shop excluding the shop's own currency.
    currencySettings(
        after: String
        before: String
        first: Int
        last: Int
        reverse: Boolean = false
    ): CurrencySettingConnection!

    # Whether customer accounts are required, optional, or disabled for the shop.
    customerAccounts: ShopCustomerAccountsSetting!

    # A list of tags that have been added to customer accounts.
    customerTags(first: Int!): StringConnection!

    # The shop's meta description used in search engine results.
    description: String

    # A list of tags that have been added to draft orders.
    draftOrderTags(first: Int!): StringConnection!

    # The shop owner's email address.
    # Shopify will use this email address to communicate with the shop owner.
    email: String!

    # The presentment currencies enabled for the shop.
    enabledPresentmentCurrencies: [CurrencyCode!]!

    # The set of features enabled for the shop.
    features: ShopFeatures!

    # List of the shop's installed fulfillment services.
    fulfillmentServices: [FulfillmentService!]!

    # The shop's time zone as defined by the IANA.
    ianaTimezone: String!

    # A globally-unique identifier.
    id: ID!

    # The number of pendings orders on the shop.
    # Limited to a maximum of 10000.
    limitedPendingOrderCount: LimitedPendingOrderCount!

    # The approval signals for a shop to support onboarding to channel apps.
    merchantApprovalSignals: MerchantApprovalSignals

    # Returns a metafield by namespace and key that belongs to the resource.
    metafield(key: String!namespace: String!): Metafield

    # List of metafields that belong to the resource.
    metafields(
        after: String
        before: String
        first: Int
        last: Int
        namespace: String
        reverse: Boolean = false
    ): MetafieldConnection!

    # The shop's .myshopify.com domain name.
    myshopifyDomain: String!

    # The shop's name.
    name: String!

    # The shop's settings related to navigation.
    navigationSettings: [NavigationItem!]!

    # The prefix that appears before order numbers.
    orderNumberFormatPrefix: String!

    # The suffix that appears after order numbers.
    orderNumberFormatSuffix: String!

    # A list of tags that have been added to orders.
    orderTags(first: Int!sort: ShopTagSort = ALPHABETICAL): StringConnection!

    # The shop's settings related to payments.
    paymentSettings: PaymentSettings!

    # The shop's billing plan.
    plan: ShopPlan!

    # The primary domain of the shop's online store.
    primaryDomain: Domain!

    # Returns a private metafield by namespace and key that belongs to the resource.
    privateMetafield(key: String!namespace: String!): PrivateMetafield

    # List of private metafields that belong to the resource.
    privateMetafields(
        after: String
        before: String
        first: Int
        last: Int
        namespace: String
        reverse: Boolean = false
    ): PrivateMetafieldConnection!

    # The list of all images of all products for the shop.
    productImages(
        after: String
        before: String
        first: Int
        last: Int
        reverse: Boolean = false
        sortKey: ProductImageSortKeys = CREATED_AT
    ): ImageConnection!

    # A list of tags that have been added to products.
    productTags(first: Int!): StringConnection!

    # The list of types added to products.
    productTypes(first: Int!): StringConnection!

    # The list of vendors added to products.
    productVendors(first: Int!): StringConnection!

    # The number of publications for the shop.
    publicationCount: Int!

    # The shop's limits for specific resources. For example, the maximum number ofvariants allowed per product, or the maximum number of locations allowed.
    resourceLimits: ShopResourceLimits!

    # The URL of the rich text editor that can be used for mobile devices.
    richTextEditorUrl: URL!

    # Fetches a list of admin search results by a specified query.
    search(
        after: String
        first: Int!
        query: String!
        types: [SearchResultType!]
    ): SearchResultConnection!

    # The list of search filter options for the shop. These can be used to filter productvisibility for the shop.
    searchFilters: SearchFilterOptions!

    # Whether the shop has outstanding setup steps.
    setupRequired: Boolean!

    # The list of countries that the shop ships to.
    shipsToCountries: [CountryCode!]!

    # The list of all legal policies associated with a shop.
    shopPolicies: [ShopPolicy!]!

    # The paginated list of the shop's staff members.
    staffMembers(
        after: String
        before: String
        first: Int
        last: Int
        reverse: Boolean = false
    ): StaffMemberConnection!

    # The storefront access token of a private application. These are scoped per-application.
    storefrontAccessTokens(
        after: String
        before: String
        first: Int
        last: Int
        reverse: Boolean = false
    ): StorefrontAccessTokenConnection!

    # Whether the shop charges taxes for shipping.
    taxShipping: Boolean!

    # Whether applicable taxes are included in the shop's product prices.
    taxesIncluded: Boolean!

    # The shop's time zone abbreviation.
    timezoneAbbreviation: String!

    # The shop's time zone offset.
    timezoneOffset: String!

    # The shop's time zone offset expressed as a number of minutes.
    timezoneOffsetMinutes: Int!

    # Whether transactional SMS sent by Shopify have been disabled for a shop.
    transactionalSmsDisabled: Boolean!

    # The translations associated with the resource.
    translations(locale: String!marketId: ID): [PublishedTranslation!]!

    # The shop's unit system for weights and measures.
    unitSystem: UnitSystem!

    # Fetches a list of images uploaded to the shop by their IDs.
    uploadedImagesByIds(imageIds: [ID!]!): [Image!]!

    # The URL of the shop's online store.
    url: URL!

    # The shop's primary unit of weight for products and shipping.
    weightUnit: WeightUnit!
}

# A Shopify application.
type App
    implements Node
    @key(fields: "id") {

    # A unique application API identifier.
    apiKey: String!

    # App store page URL of the app.
    appStoreAppUrl: URL

    # App store page URL of the developer who created the app.
    appStoreDeveloperUrl: URL

    # The access scopes available to the app.
    availableAccessScopes: [AccessScope!]!

    # Banner image for the app.
    banner: Image!

    # Description of the app.
    description: String

    # The name of the app developer.
    developerName: String

    # The type of app developer.
    developerType: AppDeveloperType!

    # Whether the app uses the Embedded App SDK.
    embedded: Boolean!

    # Requirements that must be met before the app can be installed.
    failedRequirements: [FailedRequirement!]!

    # A list of app features that are shown in the Shopify App Store listing.
    features: [String!]!

    # Feedback from this app about the store.
    feedback: AppFeedback

    # Handle of the app.
    handle: String

    # Icon that represents the app.
    icon: Image!

    # A globally-unique identifier.
    id: ID!

    # Webpage where you can install the app.
    installUrl: URL

    # Corresponding AppInstallation for this shop and App.
    # Returns null if the App is not installed.
    installation: AppInstallation

    # Whether the app is the post purchase app in use.
    isPostPurchaseAppInUse: Boolean!

    # Whether the app was previously installed on the current shop.
    previouslyInstalled: Boolean!

    # Detailed information about the app pricing.
    pricingDetails: String

    # Summary of the app pricing details.
    pricingDetailsSummary: String!

    # Link to app privacy policy.
    privacyPolicyUrl: URL

    # The public category for the app.
    publicCategory: AppPublicCategory!

    # Whether the app is published to the Shopify App Store.
    published: Boolean!

    # The access scopes requested by the app.
    requestedAccessScopes: [AccessScope!]!

    # Screenshots of the app.
    screenshots: [Image!]!

    # Whether the app was developed by Shopify.
    shopifyDeveloped: Boolean!

    # Name of the app.
    title: String!

    # Message that appears when the app is uninstalled. For example:
    # By removing this app, you will no longer be able to publish products to MySocialSite or view this app in your Shopify admin. You can re-enable this channel at any time.
    uninstallMessage: String!

    # The webhook API version for the app.
    webhookApiVersion: String!
}

# The market’s web presence, which defines its SEO strategy. This can be a different domain
# (e.g. example.ca), subdomain (e.g. ca.example.com), or subfolders of the primary
# domain (e.g. example.com/en-ca). Each web presence comprises one or more language
# variants. If a market does not have its own web presence, it is accessible on the shop’s
# primary domain via country
# selectors.
#
# Note: while the domain/subfolders defined by a market’s web presence are not applicable to
# custom storefronts, which must manage their own domains and routing, the languages chosen
# here do govern the languages available on the Storefront
# API for the countries in
# this market.
type MarketWebPresence
    implements Node
    @key(fields: "id") {

    # The ISO codes for the alternate locales. When a domain is used, these locales will be
    # available as language-specific subfolders. For example, if English is an
    # alternate locale, and example.ca is the market’s domain, then
    # example.ca/en will load in English.
    alternateLocales: [String!]!

    # The ISO code for the default locale. When a domain is used, this is the locale that will
    # be used when the domain root is accessed. For example, if French is the default locale,
    # and example.ca is the market’s domian, then example.ca will load in French.
    defaultLocale: String!

    # The web presence’s domain.
    # This field will be null if subfolderSuffix isn't null.
    domain: Domain

    # A globally-unique identifier.
    id: ID!

    # The associated market.
    market: Market!

    # The list of root URLs for each of the web presence’s locales.
    rootUrls: [MarketWebPresenceRootUrl!]!

    # The market-specific suffix of the subfolders defined by the web presence. Example: in /en-us the subfolder suffix is us.
    # This field will be null if domain isn't null.
    subfolderSuffix: String
}

# A market is a group of one or more regions that you want to target for international sales.
# By creating a market, you can configure a distinct, localized shopping experience for
# customers from a specific area of the world. For example, you can
# change currency,
# configure international pricing,
# or add market-specific domains or subfolders.
type Market
    implements Node
    @key(fields: "id") {

    # The market’s currency settings.
    currencySettings: MarketCurrencySettings!

    # Whether the market is enabled to receive visitors and sales. Note: Regions in inactive
    # markets cannot be selected on the storefront or in checkout.
    enabled: Boolean!

    # A globally-unique identifier.
    id: ID!

    # The name of the market. Not shown to customers.
    name: String!

    # The market’s price list, which specifies a percentage-based price adjustment as well as
    # fixed price overrides for specific variants.
    priceList: PriceList

    # Whether the market is the shop’s primary market.
    primary: Boolean!

    # The regions that comprise the market.
    regions(
        first: Int
        after: String
        last: Int
        before: String
        reverse: Boolean = false
    ): MarketRegionConnection!

    # The market’s web presence, which defines its SEO strategy. This can be a different domain,
    # subdomain, or subfolders of the primary domain. Each web presence comprises one or more
    # language variants. If a market doesn't have its own web presence, then the market is accessible on the
    # shop’s primary domain using country
    # selectors.
    webPresence: MarketWebPresence
}

# A job corresponds to some long running task that the client should poll for status.
type Job
    @key(fields: "id") {

    # This indicates if the job is still queued or has been run.
    done: Boolean!

    # A globally-unique identifier that's returned when running an asynchronous mutation.
    id: ID!

    # This field will only resolve once the job is done. Can be used to ask for object(s) that have been changed by the job.
    # query: QueryRoot
}

extend type Customer @key(fields: "id") {
    id: ID! @external
}

extend type FulfillmentService @key(fields: "id") {
    id: ID! @external
}

extend type DraftOrder @key(fields: "id") {
    id: ID! @external
}

extend type Order @key(fields: "id") {
    id: ID! @external
}

extend type Product @key(fields: "id") {
   id: ID! @external
}

extend type ProductVariant @key(fields: "id") {
   id: ID! @external
}

extend type InventoryLevel @key(fields: "id") {
    id: ID! @external
}

extend type Collection @key(fields: "id") {
   id: ID! @external
}
