# The list of all the countries from the combined shipping zones for the shop.
type CountriesInShippingZones {
    # The list of all the countries from all the combined shipping zones.
    countryCodes: [CountryCode!]!

    # Whether 'Rest of World' has been defined in any of the shipping zones.
    includeRestOfWorld: Boolean!
}

# Currency formats configured for the merchant. These formats are available to use within Liquid.
type CurrencyFormats {
    # Money without currency in HTML.
    moneyFormat: FormattedString!

    # Money without currency in emails.
    moneyInEmailsFormat: String!

    # Money with currency in HTML.
    moneyWithCurrencyFormat: FormattedString!

    # Money with currency in emails.
    moneyWithCurrencyInEmailsFormat: String!
}

# Represents the feature set available to the shop.
# Most fields specify whether a feature is enabled for a shop, and some fields return information
# related to specific features.
type ShopFeatures {
    # Whether a shop has access to Avalara AvaTax.
    avalaraAvatax: Boolean!

    # The branding of the shop, which influences its look and feel in the Shopify admin.
    branding: ShopBranding!

    # Whether a shop's online store can have CAPTCHA protection.
    captcha: Boolean!

    # Whether a shop's online store can have CAPTCHA protection for domains not managed by Shopify.
    captchaExternalDomains: Boolean!

    # Whether a shop has access to the Google Analytics dynamic remarketing feature.
    dynamicRemarketing: Boolean!

    # Whether a shop can be migrated to use Shopify subscriptions.
    eligibleForSubscriptionMigration: Boolean!

    # Whether a shop is configured properly to sell subscriptions.
    eligibleForSubscriptions: Boolean!

    # Whether a shop can create gift cards.
    giftCards: Boolean!

    # Whether a shop displays Harmonized System codes on products. This is used for customs when shipping
    # internationally.
    harmonizedSystemCode: Boolean!

    # Whether a shop can enable international domains.
    internationalDomains: Boolean!

    # Whether a shop can enable international price overrides.
    internationalPriceOverrides: Boolean!

    # Whether a shop can enable international price rules.
    internationalPriceRules: Boolean!

    # Whether a shop has enabled a legacy subscription gateway to handle older subscriptions.
    legacySubscriptionGatewayEnabled: Boolean!

    # Whether to show the Live View metrics in the Shopify admin. Live view is hidden from merchants that are on a trial
    # or don't have a storefront.
    liveView: Boolean!

    # Whether a shop has access to the onboarding visual.
    onboardingVisual: Boolean!

    # Whether a shop is configured to sell subscriptions with PayPal Express.
    paypalExpressSubscriptionGatewayStatus: PaypalExpressSubscriptionsGatewayStatus!

    # Whether a shop has access to all reporting features.
    reports: Boolean!

    # Whether a shop has ever had subscription products.
    sellsSubscriptions: Boolean!

    # Whether to show metrics in the Shopify admin. Metrics are hidden for new merchants until they become meaningful.
    showMetrics: Boolean!

    # Whether a shop has an online store.
    storefront: Boolean!

    # Whether a shop is using Shopify Balance.
    usingShopifyBalance: Boolean!
}

# The total number of pending orders on a shop if less then a maximum, or that maximum.
# The atMax field indicates when this maximum has been reached.
type LimitedPendingOrderCount {
    # This is set when the number of pending orders has reached the maximum.
    atMax: Boolean!

    # The number of pendings orders on the shop.
    # Limited to a maximum of 10000.
    count: Int!
}

# Merchant approval for accelerated onboarding to channel integration apps.
type MerchantApprovalSignals {
    # Whether the shop's Shopify Payments account identity is verified.
    # Returns false if the identity is unverified or if the shop doesn't have a Shopify Payments account.
    identityVerified: Boolean!

    # Whether Shopify has pre-verified the merchant's business for onboarding to channel integration apps.
    # Returns false if the shop is not marked for verification.
    verifiedByShopify: Boolean!
}

# Settings related to payments.
type PaymentSettings {
    # List of the digital wallets which the shop supports.
    supportedDigitalWallets: [DigitalWallet!]!
}

# The billing plan of the shop.
type ShopPlan {
    # The name of the shop's billing plan.
    displayName: String!

    # Whether the shop is a partner development shop for testing purposes.
    partnerDevelopment: Boolean!

    # Whether the shop has a Shopify Plus subscription.
    shopifyPlus: Boolean!
}

# Policy that a merchant has configured for their store, such as their refund or privacy policy.
type ShopPolicy implements HasPublishedTranslations&Node {
    # The text of the policy. The maximum size is 512kb.
    body: HTML!

    # A globally-unique identifier.
    id: ID!

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

    # The shop policy type.
    type: ShopPolicyType!

    # The public URL of the policy.
    url: URL!
}

# Resource limits of a shop.
type ShopResourceLimits {
    # Maximum number of locations allowed.
    locationLimit: Int!

    # Maximum number of product options allowed.
    maxProductOptions: Int!

    # The maximum number of variants allowed per product.
    maxProductVariants: Int!

    # Whether the shop has reached the limit of the number of URL redirects it can make for resources.
    redirectLimitReached: Boolean!

    # The maximum number of variants allowed per shop.
    # If the shop has unlimited SKUs, then the quantity used cannot be retrieved.
    skuResourceLimits: ResourceLimit!
}

# A resource limit represents the limits that the resource has.
type ResourceLimit {
    # Whether the resource is available.
    available: Boolean!

    # Quantity available. If null the quantity available is unlimited.
    quantityAvailable: Int

    # Quantity limit of the resource. If null the quantity is unlimited.
    quantityLimit: Int

    # Quantity used of the resource. If null the quantity used cannot be retrieved.
    quantityUsed: Int
}

# Represents an individual result returned from a search.
type SearchResult {
    # Returns the search result description text.
    description: String

    # Returns the Image resource presented to accompany a search result.
    image: Image

    # Returns the ID of the resource returned in the search result.
    reference: Node!

    # Returns the resource title.
    title: String!

    # Returns the absolute URL to the resource in the search result.
    url: URL!
}

# A list of search filters along with their specific options in value and label pair for filtering.
type SearchFilterOptions {
    # A list of options that can be use to filter product availability.
    productAvailability: [FilterOption!]!
}

# A saved search is a representation of a search query saved in the admin.
type SavedSearch implements LegacyInteroperability&Node {
    # The filters of a saved search.
    filters: [SearchFilter!]!

    # A globally-unique identifier.
    id: ID!

    # The ID of the corresponding resource in the REST Admin API.
    legacyResourceId: UnsignedInt64!

    # The name of a saved search.
    name: String!

    # The query string of a saved search. This includes search terms and filters.
    query: String!

    # The type of resource this saved search is searching in.
    resourceType: SearchResultType!

    # The search terms of a saved search.
    searchTerms: String!
}

# A filter in a search query represented by a key value pair.
type SearchFilter {
    # The key of the search filter.
    key: String!

    # The value of the search filter.
    value: String!
}

# A filter option is one possible value in a search filter.
type FilterOption {
    # The filter option's label for display purposes.
    label: String!

    # The filter option's value.
    value: String!
}

# An auto-generated type for paginating through multiple AppRevenueAttributionRecords.
type AppRevenueAttributionRecordConnection {
    # A list of edges.
    edges: [AppRevenueAttributionRecordEdge!]!

    # A list of the nodes contained in AppRevenueAttributionRecordEdge.
    nodes: [AppRevenueAttributionRecord!]!

    # Information to aid in pagination.
    pageInfo: PageInfo!
}

# An auto-generated type which holds one AppRevenueAttributionRecord and a cursor during pagination.
type AppRevenueAttributionRecordEdge {
    # A cursor for use in pagination.
    cursor: String!

    # The item at the end of AppRevenueAttributionRecordEdge.
    node: AppRevenueAttributionRecord!
}

# An auto-generated type for paginating through multiple AppUsageRecords.
type AppUsageRecordConnection {
    # A list of edges.
    edges: [AppUsageRecordEdge!]!

    # A list of the nodes contained in AppUsageRecordEdge.
    nodes: [AppUsageRecord!]!

    # Information to aid in pagination.
    pageInfo: PageInfo!
}

# An auto-generated type which holds one AppUsageRecord and a cursor during pagination.
type AppUsageRecordEdge {
    # A cursor for use in pagination.
    cursor: String!

    # The item at the end of AppUsageRecordEdge.
    node: AppUsageRecord!
}

# The connection type for SearchResult.
type SearchResultConnection {
    # A list of edges.
    edges: [SearchResultEdge!]!

    # Information to aid in pagination.
    pageInfo: PageInfo!
}

# An auto-generated type which holds one SearchResult and a cursor during pagination.
type SearchResultEdge {
    # A cursor for use in pagination.
    cursor: String!

    # The item at the end of SearchResultEdge.
    node: SearchResult!
}
