UNPKG

shopify-admin-api-typings

Version:
2,659 lines (2,199 loc) 1.4 MB
/* tslint:disable */ /* eslint-disable */ import { GraphQLResolveInfo, GraphQLScalarType } from 'graphql'; /** * This file is auto-generated by graphql-schema-typescript * Please note that any changes in this file may be overwritten */ /******************************* * * * TYPE DEFS * * * *******************************/ /** * The schema's entry-point for queries. This acts as the public, top-level API from which all queries must start. */ export interface QueryRoot { /** * Lookup an App by ID or return the currently authenticated App. */ app?: App; /** * Fetches app by handle. * Returns null if the app doesn't exist. * */ appByHandle?: App; /** * Fetches app by apiKey. * Returns null if the app doesn't exist. * */ appByKey?: App; /** * Lookup an AppInstallation by ID or return the AppInstallation for the currently authenticated App. */ appInstallation?: AppInstallation; /** * List of app installations. */ appInstallations: AppInstallationConnection; /** * Returns an automatic discount resource by ID. * @deprecated Use `automaticDiscountNode` instead */ automaticDiscount?: DiscountAutomatic; /** * Returns an automatic discount resource by ID. */ automaticDiscountNode?: DiscountAutomaticNode; /** * List of automatic discounts. */ automaticDiscountNodes: DiscountAutomaticNodeConnection; /** * List of the shop's automatic discount saved searches. */ automaticDiscountSavedSearches: SavedSearchConnection; /** * List of automatic discounts. * @deprecated Use `automaticDiscountNodes` instead */ automaticDiscounts: DiscountAutomaticConnection; /** * List of activated carrier services and which shop locations support them. */ availableCarrierServices: Array<DeliveryCarrierServiceAndLocations>; /** * List of available locales. */ availableLocales: Array<Locale>; /** * Lookup a carrier service by ID. */ carrierService?: DeliveryCarrierService; /** * Lookup a channel by ID. * @deprecated Use `publication` instead */ channel?: Channel; /** * List of the active sales channels. * @deprecated Use `publications` instead */ channels: ChannelConnection; /** * Returns a code discount resource by ID. */ codeDiscountNode?: DiscountCodeNode; /** * Returns a code discount identified by its code. */ codeDiscountNodeByCode?: DiscountCodeNode; /** * List of code discounts. Special fields for query params: * * status: active, expired, scheduled * * type: bxgy, fixed_amount, free_shipping, percentage. */ codeDiscountNodes: DiscountCodeNodeConnection; /** * List of the shop's code discount saved searches. */ codeDiscountSavedSearches: SavedSearchConnection; /** * Returns a Collection resource by ID. */ collection?: Collection; /** * Return a collection by its handle. */ collectionByHandle?: Collection; /** * A list of rule conditions to define how collections with rules can be created. */ collectionRulesConditions: Array<CollectionRuleConditions>; /** * List of the shop's collection saved searches. */ collectionSavedSearches: SavedSearchConnection; /** * List of collections. */ collections: CollectionConnection; /** * Return the AppInstallation for the currently authenticated App. */ currentAppInstallation: AppInstallation; /** * Returns the current app's most recent BulkOperation. */ currentBulkOperation?: BulkOperation; /** * Returns a Customer resource by ID. */ customer?: Customer; /** * List of the shop's customer saved searches. */ customerSavedSearches: SavedSearchConnection; /** * List of customers. */ customers: CustomerConnection; /** * The paginated list of deletion events. */ deletionEvents: DeletionEventConnection; /** * Lookup a Delivery Profile by ID. */ deliveryProfile?: DeliveryProfile; /** * List of saved delivery profiles. */ deliveryProfiles: DeliveryProfileConnection; /** * The shop-wide shipping settings. */ deliverySettings?: DeliverySetting; /** * Lookup a Domain by ID. */ domain?: Domain; /** * Returns a DraftOrder resource by ID. */ draftOrder?: DraftOrder; /** * List of the shop's draft order saved searches. */ draftOrderSavedSearches: SavedSearchConnection; /** * List of saved draft orders. */ draftOrders: DraftOrderConnection; /** * Returns a Fulfillment resource by ID. */ fulfillment?: Fulfillment; /** * Returns a Fulfillment order resource by ID. */ fulfillmentOrder?: FulfillmentOrder; /** * Returns a FulfillmentService resource by ID. */ fulfillmentService?: FulfillmentService; /** * Returns an InventoryItem resource by ID. */ inventoryItem?: InventoryItem; /** * List of inventory items. */ inventoryItems: InventoryItemConnection; /** * Returns an InventoryLevel resource by ID. */ inventoryLevel?: InventoryLevel; /** * Returns a Job resource by ID. Used to check the status of internal jobs and any applicable changes. * */ job?: Job; /** * Returns an inventory Location resource by ID. */ location?: Location; /** * List of active locations. */ locations: LocationConnection; /** * Returns a list of all origin locations available for a delivery profile. * @deprecated Use `locationsAvailableForDeliveryProfilesConnection` instead */ locationsAvailableForDeliveryProfiles?: Array<Location>; /** * Returns a list of all origin locations available for a delivery profile. */ locationsAvailableForDeliveryProfilesConnection: LocationConnection; /** * List of a campaign's marketing activities. */ marketingActivities: MarketingActivityConnection; /** * Returns a MarketingActivity resource by ID. */ marketingActivity?: MarketingActivity; /** * Returns a MarketingEvent resource by ID. */ marketingEvent?: MarketingEvent; /** * List of marketing events. */ marketingEvents: MarketingEventConnection; /** * List of metafield namespaces and keys visible to the Storefront API. */ metafieldStorefrontVisibilities: MetafieldStorefrontVisibilityConnection; /** * Returns metafield storefront visibility by ID. */ metafieldStorefrontVisibility?: MetafieldStorefrontVisibility; /** * Returns a specific node by ID. */ node?: Node; /** * Returns the list of nodes with the given IDs. */ nodes: Array<Node | null>; /** * Returns an Order resource by ID. */ order?: Order; /** * List of the shop's order saved searches. */ orderSavedSearches: SavedSearchConnection; /** * List of orders placed. */ orders: OrderConnection; /** * Lookup a price rule by ID. */ priceRule?: PriceRule; /** * List of the shop's price rule saved searches. */ priceRuleSavedSearches: SavedSearchConnection; /** * List of price rules. */ priceRules: PriceRuleConnection; /** * Returns a private metafield by ID. */ privateMetafield?: PrivateMetafield; /** * List of private metafields. */ privateMetafields: PrivateMetafieldConnection; /** * Returns a Product resource by ID. */ product?: Product; /** * Return a product by its handle. */ productByHandle?: Product; /** * List of the shop's product saved searches. */ productSavedSearches: SavedSearchConnection; /** * Returns a ProductVariant resource by ID. */ productVariant?: ProductVariant; /** * List of the product variants. */ productVariants: ProductVariantConnection; /** * List of products. */ products: ProductConnection; /** * The list of public Admin API versions, including supported, release candidate and unstable versions. */ publicApiVersions: Array<ApiVersion>; /** * Lookup a publication by ID. */ publication?: Publication; /** * List of the active publications. */ publications: PublicationConnection; /** * Returns a Refund resource by ID. */ refund?: Refund; /** * Lookup a script tag resource by ID. */ scriptTag?: ScriptTag; /** * List of script tags. */ scriptTags: ScriptTagConnection; /** * Returns a Shop resource corresponding to access token used in request. */ shop: Shop; /** * List of locales available on a shop. */ shopLocales: Array<ShopLocale>; /** * Shopify Payments account information, including balances and payouts. */ shopifyPaymentsAccount?: ShopifyPaymentsAccount; /** * List of TenderTransactions associated with the Shop. */ tenderTransactions: TenderTransactionConnection; /** * Translatable resource. */ translatableResource?: TranslatableResource; /** * List of translatable resources. */ translatableResources: TranslatableResourceConnection; /** * Returns a webhook subscription by ID. */ webhookSubscription?: WebhookSubscription; /** * List of webhook subscriptions. */ webhookSubscriptions: WebhookSubscriptionConnection; } /** * A Shopify application. */ export interface App extends Node { /** * 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; /** * Banner image for the app. */ banner: Image; /** * Description of the app. */ description?: string; /** * App's developer name. */ developerName?: string; /** * Website of the developer who created the app. * @deprecated Use `appStoreDeveloperUrl` instead */ developerUrl: URL; /** * Whether the app uses the Embedded App SDK. */ embedded: boolean; /** * Requirements that must be met before the app can be installed. */ failedRequirements: Array<FailedRequirement>; /** * List of app features. */ features: Array<string>; /** * Feedback from this app about the store. */ feedback?: AppFeedback; /** * Handle of the app. */ handle?: string; /** * Icon that represents the app. */ icon: Image; /** * Globally unique identifier. */ id: string; /** * 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; /** * Webpage that the app starts in. * @deprecated Use AppInstallation.launchUrl instead */ launchUrl: URL; /** * Menu items for the app, which also appear as submenu items in left navigation sidebar in the Shopify admin. * * @deprecated Use AppInstallation.navigationItems instead */ navigationItems: Array<NavigationItem>; /** * Detailed information about the app pricing. */ pricingDetails?: string; /** * Summary of the app pricing details. */ pricingDetailsSummary: string; /** * Link to app privacy policy. */ privacyPolicyUrl?: URL; /** * Whether the app is published. */ published: boolean; /** * Screenshots of the app. */ screenshots: Array<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; /** * Webpage where you can uninstall the app. * @deprecated Use AppInstallation.uninstallUrl instead */ uninstallUrl?: URL; } /** * An object with an ID to support global identification. */ export interface Node { /** * Globally unique identifier. */ id: string; } /** Use this to resolve interface type Node */ export type PossibleNodeTypeNames = 'App' | 'Metafield' | 'PrivateMetafield' | 'AppInstallation' | 'AppSubscription' | 'AppUsageRecord' | 'Channel' | 'Publication' | 'Collection' | 'Product' | 'ProductOption' | 'ProductVariant' | 'DeliveryProfile' | 'DeliveryCountry' | 'DeliveryProvince' | 'DeliveryLocationGroup' | 'Location' | 'InventoryLevel' | 'InventoryItem' | 'DeliveryMethodDefinition' | 'DeliveryCondition' | 'DeliveryRateDefinition' | 'DeliveryParticipant' | 'DeliveryCarrierService' | 'DeliveryZone' | 'AppCredit' | 'AppPurchaseOneTime' | 'DiscountAutomaticBxgy' | 'DiscountAutomaticNode' | 'SavedSearch' | 'DiscountCodeNode' | 'Customer' | 'MailingAddress' | 'Order' | 'CustomerVisit' | 'MarketingEvent' | 'OrderDisputeSummary' | 'LineItem' | 'Duty' | 'FulfillmentOrder' | 'FulfillmentOrderDestination' | 'Fulfillment' | 'FulfillmentEvent' | 'FulfillmentLineItem' | 'FulfillmentOrderLineItem' | 'FulfillmentOrderMerchantRequest' | 'LineItemMutable' | 'Refund' | 'OrderTransaction' | 'BulkOperation' | 'Domain' | 'DraftOrder' | 'DraftOrderLineItem' | 'MarketingActivity' | 'MetafieldStorefrontVisibility' | 'PriceRule' | 'PriceRuleDiscountCode' | 'ScriptTag' | 'Shop' | 'ShopifyPaymentsAccount' | 'ShopifyPaymentsBankAccount' | 'ShopifyPaymentsPayout' | 'ShopifyPaymentsDispute' | 'ShopifyPaymentsVerification' | 'StorefrontAccessToken' | 'TenderTransaction' | 'WebhookSubscription' | 'CalculatedOrder' | 'BasicEvent' | 'CommentEvent' | 'ExternalVideo' | 'MediaImage' | 'Model3d' | 'OnlineStoreArticle' | 'OnlineStoreBlog' | 'OnlineStorePage' | 'Video'; export interface NodeNameMap { Node: Node; App: App; Metafield: Metafield; PrivateMetafield: PrivateMetafield; AppInstallation: AppInstallation; AppSubscription: AppSubscription; AppUsageRecord: AppUsageRecord; Channel: Channel; Publication: Publication; Collection: Collection; Product: Product; ProductOption: ProductOption; ProductVariant: ProductVariant; DeliveryProfile: DeliveryProfile; DeliveryCountry: DeliveryCountry; DeliveryProvince: DeliveryProvince; DeliveryLocationGroup: DeliveryLocationGroup; Location: Location; InventoryLevel: InventoryLevel; InventoryItem: InventoryItem; DeliveryMethodDefinition: DeliveryMethodDefinition; DeliveryCondition: DeliveryCondition; DeliveryRateDefinition: DeliveryRateDefinition; DeliveryParticipant: DeliveryParticipant; DeliveryCarrierService: DeliveryCarrierService; DeliveryZone: DeliveryZone; AppCredit: AppCredit; AppPurchaseOneTime: AppPurchaseOneTime; DiscountAutomaticBxgy: DiscountAutomaticBxgy; DiscountAutomaticNode: DiscountAutomaticNode; SavedSearch: SavedSearch; DiscountCodeNode: DiscountCodeNode; Customer: Customer; MailingAddress: MailingAddress; Order: Order; CustomerVisit: CustomerVisit; MarketingEvent: MarketingEvent; OrderDisputeSummary: OrderDisputeSummary; LineItem: LineItem; Duty: Duty; FulfillmentOrder: FulfillmentOrder; FulfillmentOrderDestination: FulfillmentOrderDestination; Fulfillment: Fulfillment; FulfillmentEvent: FulfillmentEvent; FulfillmentLineItem: FulfillmentLineItem; FulfillmentOrderLineItem: FulfillmentOrderLineItem; FulfillmentOrderMerchantRequest: FulfillmentOrderMerchantRequest; LineItemMutable: LineItemMutable; Refund: Refund; OrderTransaction: OrderTransaction; BulkOperation: BulkOperation; Domain: Domain; DraftOrder: DraftOrder; DraftOrderLineItem: DraftOrderLineItem; MarketingActivity: MarketingActivity; MetafieldStorefrontVisibility: MetafieldStorefrontVisibility; PriceRule: PriceRule; PriceRuleDiscountCode: PriceRuleDiscountCode; ScriptTag: ScriptTag; Shop: Shop; ShopifyPaymentsAccount: ShopifyPaymentsAccount; ShopifyPaymentsBankAccount: ShopifyPaymentsBankAccount; ShopifyPaymentsPayout: ShopifyPaymentsPayout; ShopifyPaymentsDispute: ShopifyPaymentsDispute; ShopifyPaymentsVerification: ShopifyPaymentsVerification; StorefrontAccessToken: StorefrontAccessToken; TenderTransaction: TenderTransaction; WebhookSubscription: WebhookSubscription; CalculatedOrder: CalculatedOrder; BasicEvent: BasicEvent; CommentEvent: CommentEvent; ExternalVideo: ExternalVideo; MediaImage: MediaImage; Model3d: Model3d; OnlineStoreArticle: OnlineStoreArticle; OnlineStoreBlog: OnlineStoreBlog; OnlineStorePage: OnlineStorePage; Video: Video; } /** * An RFC 3986 and RFC 3987 compliant URI string. * * Example value: `"https://johns-apparel.myshopify.com"`. * */ export type URL = any; /** * Represents an image resource. */ export interface Image extends HasMetafields { /** * A word or phrase to share the nature or contents of an image. */ altText?: string; /** * A unique identifier for the image. */ id?: string; /** * The metafield associated with the resource. */ metafield?: Metafield; /** * A paginated list of metafields associated with the resource. */ metafields: MetafieldConnection; /** * The location of the original image as a URL. * * If there are any existing transformations in the original source URL, they will remain and not be stripped. * */ originalSrc: URL; /** * Returns a private metafield found by namespace and key. */ privateMetafield?: PrivateMetafield; /** * List of private metafields. */ privateMetafields: PrivateMetafieldConnection; /** * The location of the image as a URL. * @deprecated Previously an image had a single `src` field. This could either return the original image * location or a URL that contained transformations such as sizing or scale. * * These transformations were specified by arguments on the parent field. * * Now an image has two distinct URL fields: `originalSrc` and `transformedSrc`. * * * `originalSrc` - the original unmodified image URL * * `transformedSrc` - the image URL with the specified transformations included * * To migrate to the new fields, image transformations should be moved from the parent field to `transformedSrc`. * * Before: * ```graphql * { * shop { * productImages(maxWidth: 200, scale: 2) { * edges { * node { * src * } * } * } * } * } * ``` * * After: * ```graphql * { * shop { * productImages { * edges { * node { * transformedSrc(maxWidth: 200, scale: 2) * } * } * } * } * } * ``` * */ src: URL; /** * The location of the transformed image as a URL. * * All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. * Otherwise any transformations which an image type does not support will be ignored. * */ transformedSrc: URL; } /** * Represents information about the metafields associated to the specified resource. */ export interface HasMetafields { /** * The metafield associated with the resource. */ metafield?: Metafield; /** * A paginated list of metafields associated with the resource. */ metafields: MetafieldConnection; /** * Returns a private metafield found by namespace and key. */ privateMetafield?: PrivateMetafield; /** * List of private metafields. */ privateMetafields: PrivateMetafieldConnection; } /** Use this to resolve interface type HasMetafields */ export type PossibleHasMetafieldsTypeNames = 'Image' | 'Collection' | 'Product' | 'ProductVariant' | 'Customer' | 'Order' | 'DraftOrder' | 'Shop'; export interface HasMetafieldsNameMap { HasMetafields: HasMetafields; Image: Image; Collection: Collection; Product: Product; ProductVariant: ProductVariant; Customer: Customer; Order: Order; DraftOrder: DraftOrder; Shop: Shop; } /** * Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are * composed of keys, values, and value types. * */ export interface Metafield extends Node, LegacyInteroperability { /** * The date and time when the metafield was created. */ createdAt: DateTime; /** * The description of a metafield. */ description?: string; /** * Globally unique identifier. */ id: string; /** * The key name for a metafield. */ key: string; /** * The ID of the corresponding resource in the REST Admin API. */ legacyResourceId: UnsignedInt64; /** * The namespace for a metafield. */ namespace: string; /** * Owner type of a metafield visible to the Storefront API. */ ownerType: MetafieldOwnerType; /** * The date and time when the metafield was updated. */ updatedAt: DateTime; /** * The value of a metafield. */ value: string; /** * Represents the metafield value type. */ valueType: MetafieldValueType; } /** * Interoperability metadata for types that directly correspond to a REST Admin API resource. * For example, on the Product type, LegacyInteroperability returns metadata for the corresponding [Product object](https://help.shopify.com/api/reference/products/product) in the REST Admin API. * */ export interface LegacyInteroperability { /** * The ID of the corresponding resource in the REST Admin API. */ legacyResourceId: UnsignedInt64; } /** Use this to resolve interface type LegacyInteroperability */ export type PossibleLegacyInteroperabilityTypeNames = 'Metafield' | 'Product' | 'ProductVariant' | 'Location' | 'InventoryItem' | 'SavedSearch' | 'Customer' | 'Order' | 'MarketingEvent' | 'Fulfillment' | 'Refund' | 'DraftOrder' | 'MetafieldStorefrontVisibility' | 'PriceRule' | 'ScriptTag' | 'ShopifyPaymentsPayout' | 'ShopifyPaymentsDispute' | 'WebhookSubscription'; export interface LegacyInteroperabilityNameMap { LegacyInteroperability: LegacyInteroperability; Metafield: Metafield; Product: Product; ProductVariant: ProductVariant; Location: Location; InventoryItem: InventoryItem; SavedSearch: SavedSearch; Customer: Customer; Order: Order; MarketingEvent: MarketingEvent; Fulfillment: Fulfillment; Refund: Refund; DraftOrder: DraftOrder; MetafieldStorefrontVisibility: MetafieldStorefrontVisibility; PriceRule: PriceRule; ScriptTag: ScriptTag; ShopifyPaymentsPayout: ShopifyPaymentsPayout; ShopifyPaymentsDispute: ShopifyPaymentsDispute; WebhookSubscription: WebhookSubscription; } /** * An unsigned 64-bit integer. Represents whole numeric values between 0 and 2^64 - 1 encoded as a string of base-10 digits. * * Example value: `"50"`. * */ export type UnsignedInt64 = any; /** * An ISO-8601 encoded UTC date time string. Example value: `"2019-07-03T20:47:55Z"`. */ export type DateTime = any; /** * Metafield owner types. */ export const enum MetafieldOwnerType { /** * A metafield owner type. */ ARTICLE = 'ARTICLE', /** * A metafield owner type. */ BLOG = 'BLOG', /** * A metafield owner type. */ COLLECTION = 'COLLECTION', /** * A metafield owner type. */ CUSTOMER = 'CUSTOMER', /** * A metafield owner type. */ DRAFTORDER = 'DRAFTORDER', /** * A metafield owner type. */ ORDER = 'ORDER', /** * A metafield owner type. */ PAGE = 'PAGE', /** * A metafield owner type. */ PRODUCT = 'PRODUCT', /** * A metafield owner type. */ PRODUCTIMAGE = 'PRODUCTIMAGE', /** * A metafield owner type. */ PRODUCTVARIANT = 'PRODUCTVARIANT', /** * A metafield owner type. */ SHOP = 'SHOP' } /** * Metafield value types. */ export const enum MetafieldValueType { /** * A string. */ STRING = 'STRING', /** * An integer. */ INTEGER = 'INTEGER', /** * A JSON string. */ JSON_STRING = 'JSON_STRING' } export interface MetafieldConnection { /** * A list of edges. */ edges: Array<MetafieldEdge>; /** * Information to aid in pagination. */ pageInfo: PageInfo; } export interface MetafieldEdge { /** * A cursor for use in pagination. */ cursor: string; /** * The item at the end of MetafieldEdge. */ node: Metafield; } /** * Information about pagination in a connection. */ export interface PageInfo { /** * Indicates if there are more pages to fetch. */ hasNextPage: boolean; /** * Indicates if there are any pages prior to the current page. */ hasPreviousPage: boolean; } /** * Private metafields represent custom metadata that is attached to a resource. * Private metafields are private to the application that creates them on a shop's resources. * */ export interface PrivateMetafield extends Node { /** * The date and time when the private metafield was created. */ createdAt: DateTime; /** * The id of the private metafield. */ id: string; /** * The key name for a private metafield. */ key: string; /** * The namespace for a private metafield. */ namespace: string; /** * The date and time when the private metafield was updated. */ updatedAt: DateTime; /** * The value of a private metafield. */ value: string; /** * Represents the private metafield value type. */ valueType: PrivateMetafieldValueType; } /** * Private Metafield value types. */ export const enum PrivateMetafieldValueType { /** * A private metafield value type. */ STRING = 'STRING', /** * A private metafield value type. */ INTEGER = 'INTEGER', /** * A private metafield value type. */ JSON_STRING = 'JSON_STRING' } export interface PrivateMetafieldConnection { /** * A list of edges. */ edges: Array<PrivateMetafieldEdge>; /** * Information to aid in pagination. */ pageInfo: PageInfo; } export interface PrivateMetafieldEdge { /** * A cursor for use in pagination. */ cursor: string; /** * The item at the end of PrivateMetafieldEdge. */ node: PrivateMetafield; } /** * The part of the image that should remain after cropping. */ export const enum CropRegion { /** * Keep the center of the image. */ CENTER = 'CENTER', /** * Keep the top of the image. */ TOP = 'TOP', /** * Keep the bottom of the image. */ BOTTOM = 'BOTTOM', /** * Keep the left of the image. */ LEFT = 'LEFT', /** * Keep the right of the image. */ RIGHT = 'RIGHT' } /** * List of supported image content types. */ export const enum ImageContentType { /** * A PNG image. */ PNG = 'PNG', /** * A JPG image. */ JPG = 'JPG', /** * A WEBP image. */ WEBP = 'WEBP' } /** * Requirements that must be met before an app can be installed. */ export interface FailedRequirement { /** * Action to be taken to resolve a failed requirement, including URL link. */ action?: NavigationItem; /** * A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app * encounters when trying to make use of their Shop and its resources. * */ message: string; } /** * A navigation item, holding basic link attributes. */ export interface NavigationItem { /** * The unique identifier of the navigation item. */ id: string; /** * The name of the navigation item. */ title: string; /** * The URL of the page that the navigation item links to. */ url: URL; } /** * Reports the status of shops and their resources and displays this information * within Shopify admin. AppFeedback is used to notify merchants about steps they need to take * to set up an app on their store. * */ export interface AppFeedback { /** * The application associated to the feedback. */ app: App; /** * A link to where merchants can resolve errors. */ link?: Link; /** * The feedback message presented to the merchant. */ messages: Array<UserError>; } /** * A link to direct users to. */ export interface Link extends HasPublishedTranslations { /** * A context-sensitive label for the link. */ label: string; /** * The translations associated with the resource. */ translations: Array<PublishedTranslation>; /** * The URL that the link visits. */ url: URL; } /** * Published translations associated with the resource. */ export interface HasPublishedTranslations { /** * The translations associated with the resource. */ translations: Array<PublishedTranslation>; } /** Use this to resolve interface type HasPublishedTranslations */ export type PossibleHasPublishedTranslationsTypeNames = 'Link' | 'Collection' | 'Product' | 'ProductOption' | 'ProductVariant' | 'Shop' | 'OnlineStoreArticle' | 'OnlineStoreBlog' | 'OnlineStorePage'; export interface HasPublishedTranslationsNameMap { HasPublishedTranslations: HasPublishedTranslations; Link: Link; Collection: Collection; Product: Product; ProductOption: ProductOption; ProductVariant: ProductVariant; Shop: Shop; OnlineStoreArticle: OnlineStoreArticle; OnlineStoreBlog: OnlineStoreBlog; OnlineStorePage: OnlineStorePage; } /** * Published translation of a field of a resource. */ export interface PublishedTranslation { /** * Translation key. */ key: string; /** * Translation locale. */ locale: string; /** * Translation value. */ value?: string; } /** * Represents an error in the input of a mutation. */ export interface UserError extends DisplayableError { /** * Path to the input field which caused the error. */ field?: Array<string>; /** * The error message. */ message: string; } /** * Represents an error in the input of a mutation. */ export interface DisplayableError { /** * Path to the input field which caused the error. */ field?: Array<string>; /** * The error message. */ message: string; } /** Use this to resolve interface type DisplayableError */ export type PossibleDisplayableErrorTypeNames = 'UserError' | 'DiscountUserError' | 'PriceRuleUserError' | 'MediaUserError' | 'TranslationUserError'; export interface DisplayableErrorNameMap { DisplayableError: DisplayableError; UserError: UserError; DiscountUserError: DiscountUserError; PriceRuleUserError: PriceRuleUserError; MediaUserError: MediaUserError; TranslationUserError: TranslationUserError; } /** * Represents an installed application on a shop. */ export interface AppInstallation extends Node { /** * Access scopes granted to an app by a merchant during installation. */ accessScopes: Array<AccessScope>; /** * Active subscriptions charged to a shop on a recurring basis. */ activeSubscriptions: Array<AppSubscription>; /** * All subscriptions created for a shop. */ allSubscriptions: AppSubscriptionConnection; /** * Application which is installed. */ app: App; /** * Channel associated with the installed application. * @deprecated Use `publication` instead */ channel?: Channel; /** * Credits that can be used towards future app purchases. */ credits: AppCreditConnection; /** * Globally unique identifier. */ id: string; /** * Url used to launch the app. */ launchUrl: URL; /** * One-time purchases to a shop. */ oneTimePurchases: AppPurchaseOneTimeConnection; /** * Publication associated with the installed application. */ publication?: Publication; /** * Subscriptions charge to a shop on a recurring basis. * @deprecated Use `activeSubscriptions` instead */ subscriptions: Array<AppSubscription>; /** * Webpage where you can uninstall the app. */ uninstallUrl?: URL; } /** * Represents the access scope permission that is applicable to a merchant's shop, such as `read_orders`. * */ export interface AccessScope { /** * Description of the access scopes enabled on an api permission. */ description: string; /** * A human-friendly string for an access scope. */ handle: string; } /** * Provides users access to services and/or features for a duration of time. */ export interface AppSubscription extends Node { /** * The date and time when the app subscription was created. */ createdAt: DateTime; /** * The date and time when the current app subscription period ends. */ currentPeriodEnd?: DateTime; /** * Globally unique identifier. */ id: string; /** * Attaches a plan to an app subscription. */ lineItems: Array<AppSubscriptionLineItem>; /** * The name of the app subscription. */ name: string; /** * The URL where the merchant is redirected after approving the app subscription. */ returnUrl: URL; /** * The status of the app subscription. Possible values include pending, active, declined, * expired, frozen, and cancelled. */ status: AppSubscriptionStatus; /** * Specifies whether the app subscription is a test transaction. */ test: boolean; /** * The number of days of the free trial. */ trialDays: number; } /** * Attaches a plan to an app subscription. */ export interface AppSubscriptionLineItem { /** * Globally unique identifier. */ id: string; /** * Defines the pricing model for the app subscription. */ plan: AppPlanV2; /** * Lists the store's usage for a usage pricing plan. */ usageRecords: AppUsageRecordConnection; } /** * Defines the app plan the merchant is subscribed to. */ export interface AppPlanV2 { /** * Defines the pricing model for the app subscription. */ pricingDetails: AppPricingDetails; } /** * Information about the price charged to a shop every plan period. */ export type AppPricingDetails = AppUsagePricing | AppRecurringPricing; /** Use this to resolve union type AppPricingDetails */ export type PossibleAppPricingDetailsTypeNames = 'AppUsagePricing' | 'AppRecurringPricing'; export interface AppPricingDetailsNameMap { AppPricingDetails: AppPricingDetails; AppUsagePricing: AppUsagePricing; AppRecurringPricing: AppRecurringPricing; } /** * Defines the usage pricing model for the app subscription. */ export interface AppUsagePricing { /** * The total usage records for interval. */ balanceUsed: MoneyV2; /** * The limit a store can be charged for usage based pricing. */ cappedAmount: MoneyV2; /** * Specifies the interval which usage records are applied. */ interval: AppPricingInterval; /** * The terms and conditions for app usage pricing. */ terms: string; } /** * A monetary value with currency. * * To format currencies, combine this type's amount and currencyCode fields with your client's locale. * * For example, in JavaScript you could use Intl.NumberFormat: * * ```js * new Intl.NumberFormat(locale, { * style: 'currency', * currency: currencyCode * }).format(amount); * ``` * * Other formatting libraries include: * * * iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter) * * Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html) * * PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php) * * For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations * (such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)). * */ export interface MoneyV2 { /** * Decimal money amount. */ amount: Decimal; /** * Currency of the money. */ currencyCode: CurrencyCode; } /** * A signed decimal number, which supports arbitrary precision and is serialized as a string. Example value: `"29.99"`. */ export type Decimal = any; /** * Currency codes. */ export const enum CurrencyCode { /** * United States Dollars (USD). */ USD = 'USD', /** * Euro (EUR). */ EUR = 'EUR', /** * United Kingdom Pounds (GBP). */ GBP = 'GBP', /** * Canadian Dollars (CAD). */ CAD = 'CAD', /** * Afghan Afghani (AFN). */ AFN = 'AFN', /** * Albanian Lek (ALL). */ ALL = 'ALL', /** * Algerian Dinar (DZD). */ DZD = 'DZD', /** * Angolan Kwanza (AOA). */ AOA = 'AOA', /** * Argentine Pesos (ARS). */ ARS = 'ARS', /** * Armenian Dram (AMD). */ AMD = 'AMD', /** * Aruban Florin (AWG). */ AWG = 'AWG', /** * Australian Dollars (AUD). */ AUD = 'AUD', /** * Barbadian Dollar (BBD). */ BBD = 'BBD', /** * Azerbaijani Manat (AZN). */ AZN = 'AZN', /** * Bangladesh Taka (BDT). */ BDT = 'BDT', /** * Bahamian Dollar (BSD). */ BSD = 'BSD', /** * Bahraini Dinar (BHD). */ BHD = 'BHD', /** * Burundian Franc (BIF). */ BIF = 'BIF', /** * Belarusian Ruble (BYR). * @deprecated `BYR` is deprecated. Use `BYN` available from version `2019-10` onwards instead. */ BYR = 'BYR', /** * Belize Dollar (BZD). */ BZD = 'BZD', /** * Bermudian Dollar (BMD). */ BMD = 'BMD', /** * Bhutanese Ngultrum (BTN). */ BTN = 'BTN', /** * Bosnia and Herzegovina Convertible Mark (BAM). */ BAM = 'BAM', /** * Brazilian Real (BRL). */ BRL = 'BRL', /** * Bolivian Boliviano (BOB). */ BOB = 'BOB', /** * Botswana Pula (BWP). */ BWP = 'BWP', /** * Brunei Dollar (BND). */ BND = 'BND', /** * Bulgarian Lev (BGN). */ BGN = 'BGN', /** * Burmese Kyat (MMK). */ MMK = 'MMK', /** * Cambodian Riel. */ KHR = 'KHR', /** * Cape Verdean escudo (CVE). */ CVE = 'CVE', /** * Cayman Dollars (KYD). */ KYD = 'KYD', /** * Central African CFA Franc (XAF). */ XAF = 'XAF', /** * Chilean Peso (CLP). */ CLP = 'CLP', /** * Chinese Yuan Renminbi (CNY). */ CNY = 'CNY', /** * Colombian Peso (COP). */ COP = 'COP', /** * Comorian Franc (KMF). */ KMF = 'KMF', /** * Congolese franc (CDF). */ CDF = 'CDF', /** * Costa Rican Colones (CRC). */ CRC = 'CRC', /** * Croatian Kuna (HRK). */ HRK = 'HRK', /** * Czech Koruny (CZK). */ CZK = 'CZK', /** * Danish Kroner (DKK). */ DKK = 'DKK', /** * Djiboutian Franc (DJF). */ DJF = 'DJF', /** * Dominican Peso (DOP). */ DOP = 'DOP', /** * East Caribbean Dollar (XCD). */ XCD = 'XCD', /** * Egyptian Pound (EGP). */ EGP = 'EGP', /** * Ethiopian Birr (ETB). */ ETB = 'ETB', /** * Falkland Islands Pounds (FKP). */ FKP = 'FKP', /** * CFP Franc (XPF). */ XPF = 'XPF', /** * Fijian Dollars (FJD). */ FJD = 'FJD', /** * Gibraltar Pounds (GIP). */ GIP = 'GIP', /** * Gambian Dalasi (GMD). */ GMD = 'GMD', /** * Ghanaian Cedi (GHS). */ GHS = 'GHS', /** * Guatemalan Quetzal (GTQ). */ GTQ = 'GTQ', /** * Guyanese Dollar (GYD). */ GYD = 'GYD', /** * Georgian Lari (GEL). */ GEL = 'GEL', /** * Guinean Franc (GNF). */ GNF = 'GNF', /** * Haitian Gourde (HTG). */ HTG = 'HTG', /** * Honduran Lempira (HNL). */ HNL = 'HNL', /** * Hong Kong Dollars (HKD). */ HKD = 'HKD', /** * Hungarian Forint (HUF). */ HUF = 'HUF', /** * Icelandic Kronur (ISK). */ ISK = 'ISK', /** * Indian Rupees (INR). */ INR = 'INR', /** * Indonesian Rupiah (IDR). */ IDR = 'IDR', /** * Israeli New Shekel (NIS). */ ILS = 'ILS', /** * Iranian Rial (IRR). */ IRR = 'IRR', /** * Iraqi Dinar (IQD). */ IQD = 'IQD', /** * Jamaican Dollars (JMD). */ JMD = 'JMD', /** * Japanese Yen (JPY). */ JPY = 'JPY', /** * Jersey Pound. */ JEP = 'JEP', /** * Jordanian Dinar (JOD). */ JOD = 'JOD', /** * Kazakhstani Tenge (KZT). */ KZT = 'KZT', /** * Kenyan Shilling (KES). */ KES = 'KES', /** * Kuwaiti Dinar (KWD). */ KWD = 'KWD', /** * Kyrgyzstani Som (KGS). */ KGS = 'KGS', /** * Laotian Kip (LAK). */ LAK = 'LAK', /** * Latvian Lati (LVL). */ LVL = 'LVL', /** * Lebanese Pounds (LBP). */ LBP = 'LBP', /** * Lesotho Loti (LSL). */ LSL = 'LSL', /** * Liberian Dollar (LRD). */ LRD = 'LRD', /** * Libyan Dinar (LYD). */ LYD = 'LYD', /** * Lithuanian Litai (LTL). */ LTL = 'LTL', /** * Malagasy Ariary (MGA). */ MGA = 'MGA', /** * Macedonia Denar (MKD). */ MKD = 'MKD', /** * Macanese Pataca (MOP). */ MOP = 'MOP', /** * Malawian Kwacha (MWK). */ MWK = 'MWK', /** * Maldivian Rufiyaa (MVR). */ MVR = 'MVR', /** * Mexican Pesos (MXN). */ MXN = 'MXN', /** * Malaysian Ringgits (MYR). */ MYR = 'MYR', /** * Mauritian Rupee (MUR). */ MUR = 'MUR', /** * Moldovan Leu (MDL). */ MDL = 'MDL', /** * Moroccan Dirham. */ MAD = 'MAD', /** * Mongolian Tugrik. */ MNT = 'MNT', /** * Mozambican Metical. */ MZN = 'MZN', /** * Namibian Dollar. */ NAD = 'NAD', /** * Nepalese Rupee (NPR). */ NPR = 'NPR', /** * Netherlands Antillean Guilder. */ ANG = 'ANG', /** * New Zealand Dollars (NZD). */ NZD = 'NZD', /** * Nicaraguan Córdoba (NIO). */ NIO = 'NIO', /** * Nigerian Naira (NGN). */ NGN = 'NGN', /** * Norwegian Kroner (NOK). */ NOK = 'NOK', /** * Omani Rial (OMR). */ OMR = 'OMR', /** * Panamian Balboa (PAB). */ PAB = 'PAB', /** * Pakistani Rupee (PKR). */ PKR = 'PKR', /** * Papua New Guinean Kina (PGK). */ PGK = 'PGK', /** * Paraguayan Guarani (PYG). */ PYG = 'PYG', /** * Peruvian Nuevo Sol (PEN). */ PEN = 'PEN', /** * Philippine Peso (PHP). */ PHP = 'PHP', /** * Polish Zlotych (PLN). */ PLN = 'PLN', /** * Qatari Rial (QAR). */ QAR = 'QAR', /** * Romanian Lei (RON). */ RON = 'RON', /** * Russian Rubles (RUB). */ RUB = 'RUB', /** * Rwandan Franc (RWF). */ RWF = 'RWF', /** * Samoan Tala (WST). */ WST = 'WST', /** * Saint Helena Pounds (SHP). */ SHP = 'SHP', /** * Saudi Riyal (SAR). */ SAR = 'SAR', /** * Sao Tome And Principe Dobra (STD). */ STD = 'STD', /** * Serbian dinar (RSD). */ RSD = 'RSD', /** * Seychellois Rupee (SCR). */ SCR = 'SCR', /** * Sierra Leonean Leone (SLL). */ SLL = 'SLL', /** * Singapore Dollars (SGD). */ SGD = 'SGD', /** * Sudanese Pound (SDG). */ SDG = 'SDG', /** * Syrian Pound (SYP). */ SYP = 'SYP', /** * South African Rand (ZAR). */ ZAR = 'ZAR', /** * South Korean Won (KRW). */ KRW = 'KRW', /** * South Sudanese Pound (SSP). */ SSP = 'SSP', /** * Solomon Islands Dollar (SBD). */ SBD = 'SBD', /** * Sri Lankan Rupees (LKR). */ LKR = 'LKR', /** * Surinamese Dollar (SRD). */ SRD = 'SRD', /** * Swazi Lilangeni (SZL). */ SZL = 'SZL', /** * Swedish Kronor (SEK). */ SEK = 'SEK', /** * Swiss Francs (CHF). */ CHF = 'CHF', /** * Taiwan Dollars (TWD). */ TWD = 'TWD', /** * Thai baht (THB). */ THB = 'THB', /** * Tajikistani Somoni (TJS). */ TJS = 'TJS', /** * Tanzanian Shilling (TZS). */ TZS = 'TZS', /** * Tongan Pa'anga (TOP). */ TOP = 'TOP', /** * Trinidad and Tobago Dollars (TTD). */ TTD = 'TTD', /** * Tunisian Dinar (TND). */ TND = 'TND', /** * Turkish Lira (TRY). */ TRY = 'TRY', /** * Turkmenistani Manat (TMT). */ TMT = 'TMT', /** * Ugandan Shilling (UGX). */ UGX = 'UGX', /** * Ukrainian Hryvnia (UAH). */ UAH = 'UAH', /** * United Arab Emirates Dirham (AED). */ AED = 'AED', /** * Uruguayan Pesos (UYU). */ UYU = 'UYU', /** * Uzbekistan som (UZS). */ UZS = 'UZS', /** * Vanuatu Vatu (VUV). */ VUV = 'VUV', /** * Venezuelan Bolivares (VEF). */ VEF = 'VEF', /** * Vietnamese đồng (VND). */ VND = 'VND', /** * West African CFA franc (XOF). */ XOF = 'XOF', /** * Yemeni Rial (YER). */ YER = 'YER', /** * Zambian Kwacha (ZMW). */ ZMW = 'ZMW' } /** * Interval for which pricing details are applied. */ export const enum AppPricingInterval { /** * App plan pricing details are applied every 30 days. */ EVERY_30_DAYS = 'EVERY_30_DAYS' } /** * Price charged every interval. */ export interface AppRecurringPricing { /** * Specifies the number of days in a billing cycle of the app subscription. */ interval: AppPricingInterval; /** * The amount to be charged to the store every billing interval. */ price: MoneyV2; } /** * The set of valid sort keys for the AppUsageRecord query. */ export const enum AppUsageRecordSortKeys { /** * Sort by the `created_at` value. */ CREATED_AT = 'CREATED_AT', /** * Sort by the `id` value. */ ID = 'ID', /** * During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the * results by relevance to the search term(s). When no search query is specified, this sort key is not * deterministic and should not be used. * */ RELEVANCE = 'RELEVANCE' } export interface AppUsageRecordConnection { /** * A list of edges. */ edges: Array<AppUsageRecordEdge>; /** * Information to aid in pagination. */ pageInfo: PageInfo; } export interface AppUsageRecordEdge { /** * A cursor for use in pagination. */ cursor: string; /** * The item at the end of AppUsageRecordEdge. */ node: AppUsageRecord; } /** * Store usage for app subscriptions with usage pricing. */ export interface AppUsageRecord extends Node { /** * The date and time when the usage record was created. */ createdAt: DateTime; /** * The description of the app usage record. */ description: string; /** * Globally unique identifier. */ id: string; /** * The price of the usage record. The only permitted currency code is USD. */ price: MoneyV2; /** * Defines the usage pricing plan the merchant is subscribed to. */ subscriptionLineItem: AppSubscriptionLineItem; } /** * The status of the app subscription. */ export const enum AppSubscriptionStatus { /** * The app subscription is pending approval by the merchant. */ PENDING = 'PENDING', /** * The app subscription has been approved by the merchant and is ready to be activated by the app. App subscriptions created through the GraphQL Admin API are activated upon approval. */ ACCEPTED = 'ACCEPTED', /**