import { ShopifyAppPurchaseOneTime, ShopifyAppSubscription, ShopifyProduct, ShopifyProductImage } from "./shopify";
import { ElasticDataType } from "./elastic";
import { AppPurchaseStatus } from "./graphql";
export interface ResourceDocument {
    id: string;
    keywords: Array<string>;
    version?: string;
    createdAt?: string;
    updatedAt?: string;
}
export declare enum ResourceType {
    ActivityLog = "activity_log",
    Product = "product",
    Collection = "collection",
    Curation = "curation",
    Callout = "callout",
    SettingsAccount = "account_settings",
    SettingsAutomation = "automation_settings",
    SettingsProduct = "product_settings",
    FilterGroup = "filter_group",
    FilterFacet = "filter_facet",
    MergedValue = "merged_value",
    Redirect = "redirect",
    Relevancy = "relevancy",
    Sort = "sort",
    Antonym = "antonym",
    Synonym = "synonym",
    Task = "task"
}
export declare const ResourceTypeLabel: Record<ResourceType, string>;
export interface Log {
    id: string;
    keywords: Array<string>;
    message: string;
    platform: "reactify" | "shopify" | "google" | "elastic";
    percentCompleted: number;
    action?: {
        type: "retry";
        label: string;
        task: Task["taskId"];
    };
    step: "syncMainDownload" | "syncBulkStart" | "syncBulkDownload" | "syncBulkTransform" | "syncBulkMerge" | "syncBulkUpload" | "syncBulkCleanup" | "syncBulkCleanupCurations" | "analyticsDownload" | "analyticsTransform" | "analyticsUpload" | "complete" | "analyticsStart";
    title: string;
    type: "bulk" | "analytics";
    data?: string;
    progress: "new" | "error" | "complete" | "partiallyComplete";
    status: "success" | "info" | "warning" | "critical";
    createdAt: string;
    updatedAt?: string;
    finishedAt?: string;
}
export interface Task {
    logId: string;
    taskId: "setupInstall" | "setupWebhook" | "syncCollectionId" | "syncProductId" | "syncMainDownload" | "syncBulkReset" | "syncBulkStart" | "syncBulkDownload" | "syncBulkTransform" | "syncBulkMerge" | "syncBulkUpload" | "syncBulkCleanup" | "syncBulkCleanupCurations" | "cleanCuration" | "cleanCurationId" | "plantSeeds" | "refreshMappings" | "refreshDefinedFields" | "refreshCurations" | "analyticsStart" | "analyticsDownload" | "analyticsTransform" | "analyticsUpload" | "indexCleanup" | "cacheClear" | "syncMarkets" | "syncConfig" | "syncShop";
    firstRun?: boolean;
    createdAt: string;
    updatedAt?: string;
}
export interface TaskSub extends Task {
    taskSubId: string;
}
export interface TaskSubSyncCollectionId extends TaskSub {
    taskId: "syncCollectionId";
    collectionGid: string;
}
export interface TaskSubSyncProductId extends TaskSub {
    taskId: "syncProductId";
    productGid: string;
}
export interface TaskSyncShop extends Task {
    taskId: "syncShop";
    manual?: boolean;
}
export interface TaskSyncMainDownload extends Task {
    taskId: "syncMainDownload";
    type: "product_download" | "product_polling" | "collection_download" | "collection_polling";
    productUrl?: string;
    collectionUrl?: string;
    manual?: boolean;
}
export interface TaskSyncBulkReset extends Task {
    taskId: "syncBulkReset";
    manual?: boolean;
}
export interface TaskSyncBulkStart extends Task {
    taskId: "syncBulkStart";
    manual?: boolean;
}
export interface TaskSyncBulkDownload extends Task {
    taskId: "syncBulkDownload";
    type: "collection" | "product" | "product_market";
    productUrl?: string;
    productMarketUrl?: string;
    collectionUrl?: string;
    syncAt: string;
}
export declare const TaskSyncBulkDownloadTypeLabel: Record<"collection" | "product" | "product_market", string>;
export interface TaskSyncBulkTransform extends Task {
    taskId: "syncBulkTransform";
    productUrl: string;
    productMarketUrl?: string;
    collectionUrl: string;
    collectionCount?: number;
    lastCollectionCursor?: string;
    syncAt: string;
}
export interface TaskSyncBulkMerge extends Task {
    taskId: "syncBulkMerge";
    productCount: number;
    collectionCount: number;
    productCompletedCount?: number;
    startAfterId?: string;
    syncAt: string;
}
export interface TaskSyncBulkUpload extends Task {
    taskId: "syncBulkUpload";
    productCount: number;
    collectionCount: number;
    productCompletedCount?: number;
    startAfterId?: string;
    syncAt: string;
}
export interface TaskSyncBulkCleanup extends Task {
    taskId: "syncBulkCleanup";
    syncAt: string;
}
export interface TaskSyncBulkCleanupCurations extends Task {
    taskId: "syncBulkCleanupCurations";
}
export interface TaskCleanCuration extends Task {
    taskId: "cleanCuration";
    startAfterId?: string;
    manual?: boolean;
}
export interface TaskSubCleanCurationId extends TaskSub {
    taskId: "cleanCurationId";
    curationId: string;
    manual?: boolean;
}
export interface TaskSetupInstall extends Task {
    taskId: "setupInstall";
}
export interface TaskSetupWebhook extends Task {
    taskId: "setupWebhook";
}
export interface TaskPlantSeeds extends Task {
    taskId: "plantSeeds";
}
export interface TaskRefreshMappings extends Task {
    taskId: "refreshMappings";
    manual?: boolean;
}
export interface TaskRefreshDefinedFields extends Task {
    taskId: "refreshDefinedFields";
    manual?: boolean;
}
export interface TaskRefreshCurations extends Task {
    taskId: "refreshCurations";
    manual?: boolean;
}
export interface TaskAnalyticsStart extends Task {
    taskId: "analyticsStart";
    manual?: boolean;
}
export interface TaskAnalyticsDownload extends Task {
    taskId: "analyticsDownload";
    reports: AnalyticsReports[];
    manual?: boolean;
}
export interface TaskAnalyticsTransform extends Task {
    taskId: "analyticsTransform";
    startAfterId?: string;
    manual?: boolean;
}
export interface TaskAnalyticsUpload extends Task {
    taskId: "analyticsUpload";
    startAfterId?: string;
    manual?: boolean;
}
export interface TaskIndexCleanup extends Task {
    taskId: "indexCleanup";
    manual?: boolean;
}
export interface TaskCacheClear extends Task {
    taskId: "cacheClear";
    manual?: boolean;
}
export interface TaskSyncMarkets extends Task {
    taskId: "syncMarkets";
    manual?: boolean;
}
export interface TaskSyncConfig extends Task {
    taskId: "syncConfig";
    manual?: boolean;
}
export interface Lock {
    logId: string;
    taskType: "sync" | "syncConfig" | "syncCollectionId" | "syncProductId" | "analytics";
    createdAt: string;
    expiresAt: string;
}
export declare enum ManageAdminFlag {
    Example = "example"
}
export interface ManageAdmin {
    installed: boolean;
    indexRead: string;
    indexWrite: string;
    indexAlias: string;
    indexAutomatic: boolean;
    indexRollback: Array<{
        indexName: string;
        documentCount: number;
        createdAt: number;
    }>;
    indexRefreshInterval: string;
    endpoint: string;
    cluster: string;
    customMappings: string;
    customFilters: string;
    timezone: string;
    cacheEnabled: boolean;
    cacheSeconds: number;
    flags?: Array<ManageAdminFlag>;
    production: boolean;
}
export interface ManageProduct {
    tagChild?: string;
    tagKeys?: Array<string>;
    tagParent?: string;
    tagRelated?: string;
    syncObjects?: Array<string>;
    tagExclude?: Array<string>;
    tagExcludeSearch?: Array<string>;
    tagExcludeCollection?: Array<string>;
    tagSeparator?: string;
    metafieldWhitelist?: Array<string>;
    externalAppReactifyImageAI: boolean;
    suggestionsExclude?: Array<string>;
    automaticCleanCurations?: boolean;
    merchandisingCalloutAutofillBehaviour: MerchandisingCalloutAutofillBehaviour;
}
export declare enum MerchandisingCalloutAutofillBehaviour {
    Always = "always",
    MoreResults = "more_results"
}
export interface ManageAutomation {
    sync: boolean;
    webhooks: boolean;
    mappings: boolean;
    curations: boolean;
    analytics: boolean;
    syncFrequency: string;
    syncThreshold: number;
    notificationEnabled?: boolean;
    notificationEmail?: string;
    syncCatalogueCompletedAt?: number;
    syncAnalyticsCompletedAt?: number;
    syncConfigCompletedAt?: number;
    syncSpecialResourcePendingAt?: number | null;
    syncConfigHash?: string;
}
export interface ManageAccount {
    shopifyPlanCustomCost?: number;
    shopifyPlanType?: "general" | "partner" | "custom";
    shopifyPlanStore?: "primary" | "addon";
    shopifyPlan?: "non-plus" | "plus" | "development";
    shopifyPlanSubscriptionShareCode?: string;
    stripeCustomerId?: string;
    googleAnalyticsId?: string;
    googleEmail?: string;
    googleAccessToken?: string;
    googleRefreshToken?: string;
    googleAccessTokenExpiryDate?: number;
    googleAnalyticsType?: "UA" | "GA4";
    googleIdField?: "shopify_code" | "product_id" | "variant_id" | "variant_sku" | "variant_barcode";
}
export declare enum SettingsCurationsImageOption {
    Index = "index",
    Suffix = "suffix"
}
export interface SettingsCurations {
    pageSize?: number;
    gridColumns?: number;
    imageOption: SettingsCurationsImageOption;
    imagePosition: number;
    imageSuffix: string;
    imageSize?: "small" | "medium" | "large";
    imageSizePx: number;
    showCardDetailTitle?: boolean;
    showCardDetailContent?: boolean;
    showCardDetailPrice?: boolean;
    showCardDetailVendor?: boolean;
    showCardDetailPreorder?: boolean;
    showCardDetailDiscount?: boolean;
    showCardDetailInventory?: boolean;
    showCardDetailAvailability?: boolean;
    showCardDetailProfitMargin?: boolean;
    showCardDetailPublishedDays?: boolean;
    showCardDetailAnalyticsSales7Days?: boolean;
    showCardDetailAnalyticsSales30Days?: boolean;
    showCardDetailAnalyticsRevenue7Days?: boolean;
    showCardDetailAnalyticsRevenue30Days?: boolean;
}
export interface Relevance extends ResourceDocument {
    field: string;
    enabled: boolean;
    importance: number;
    searchType: "always_search" | "search_page" | "instant_search";
    hidden?: boolean;
}
export interface DefinedField {
    label: string;
    value: string;
    type: ElasticDataType | string;
}
export interface Sort extends ResourceDocument {
    name: string;
    handle: string;
    field: string;
    position: number;
    enabled: boolean;
    direction: "desc" | "asc";
    visibility: "all" | "search" | "collection";
    hidden?: boolean;
}
export interface FilterGroup extends ResourceDocument {
    name: string;
    handle: string;
    enabled: boolean;
    pageSize: number;
    keywords: Array<string>;
    collections: Array<string>;
    type: "search" | "collection";
    paginationType: "pagination" | "load_more" | "next_prev" | "infinite_scroll";
    inventoryVisibility: "show_all" | "hide_products" | "hide_variants" | "hide_all";
}
export interface FilterFacet extends ResourceDocument {
    name: string;
    field: string;
    handle: string;
    position: number;
    enabled: boolean;
    keywords: Array<string>;
    customSortOrder?: string;
    displayType: "multi" | "single" | "slider";
    displayView: "list" | "check" | "swatch" | "range" | "box";
    displaySize: string;
    displaySliderStep: string;
    displaySliderPrefix: string;
    displaySliderSuffix: string;
    displayRangeOptions: Array<string>;
    settingsShowMore: boolean;
    settingsUppercase: boolean;
    settingsShowSearch: boolean;
    settingsShowFilter: boolean;
    settingsShowEmptyValues: boolean;
    settingsHideUnavailable: boolean;
    settingsCollapsedMobile: boolean;
    settingsCollapsedDesktop: boolean;
    settingsFilterLogic: "and" | "or";
    valuesShow: "all" | "manual";
    valuesManual: Array<string>;
    valuesExclude: Array<string>;
}
export interface Redirect extends ResourceDocument {
    url: string;
    query: string;
    enabled: boolean;
    keywords: Array<string>;
    hidden?: boolean;
}
export interface Curation extends ResourceDocument {
    title: string;
    status: CurationStatus;
    published: boolean;
    keywords: Array<string>;
    searchTerm?: string;
    longRunningTask?: boolean;
    collectionHandle?: string;
    collectionId?: string;
    type: CurationType;
    boosting?: {
        groupings?: BoostGrouping[];
        sortings?: BoostSorting[];
    };
    sort?: CurationSort;
    schedule?: CurationSchedule;
    hidden?: boolean;
    markets?: Array<string>;
}
export declare enum CurationType {
    Search = "search",
    Collection = "collection"
}
export declare const CurationTypeLabel: Record<CurationType, string>;
export interface CurationSort {
    sortTag?: string;
    sortOption: string;
    sortDirection: "asc" | "desc";
    sortVariantOption?: "option1" | "option2" | "option3";
}
export interface CurationSchedule {
    schedulePublish: string;
    schedulePublishEnabled: boolean;
    scheduleUnpublish: string;
    scheduleUnpublishEnabled: boolean;
}
export declare enum CurationStatus {
    Draft = "draft",
    Publishing = "publishing",
    Published = "published",
    Error = "error",
    Unpublishing = "unpublishing",
    Resetting = "resetting",
    Pinning = "pinning",
    Sorting = "sorting"
}
export declare const CurationStatusLabel: Record<CurationStatus, string>;
export interface CurationHiding {
    productId: number;
}
export interface Market {
    id: string;
    label: string;
    enabled: boolean;
    publicationId: string;
}
export interface BoostGrouping {
    key: string;
    value: string;
    field: string;
    position: number;
    operation: string;
}
export interface BoostSorting {
    key: string;
    field: string;
    query?: string;
    position: number;
    direction: "asc" | "desc";
}
export type Pin = PinProduct | PinCallout;
export declare enum PinSource {
    Manual = "manual",
    Automatic = "automatic"
}
export declare enum PinType {
    Product = "product",
    Callout = "callout"
}
export type PinTypeOnly = Pick<Pin, "type">;
export declare function isPinProduct(pin: PinTypeOnly): pin is PinProduct;
export declare function isPinCallout(pin: PinTypeOnly): pin is PinCallout;
export interface PinProduct {
    key: string;
    type: PinType.Product;
    position: number;
    productId: number;
    source?: PinSource;
}
export interface PinCallout {
    key: string;
    type: PinType.Callout;
    position: number;
    calloutId: string;
    source?: PinSource;
}
export interface Link {
    content: string;
    url: string;
    key: string;
}
export interface Callout extends ResourceDocument {
    id: string;
    type: CalloutType;
    link: string;
    links: Array<Link>;
    title: string;
    content: string;
    enabled: boolean;
    textColor: string;
    keywords: Array<string>;
    mobileImage: string;
    mobileVideo: string;
    desktopVideo: string;
    desktopImage: string;
    backgroundColor: string;
    visibility: "desktop" | "mobile" | "all";
    displayColumns: string;
    displayRows: string;
    selectedDates?: {
        end: string;
        start: string;
    };
    hidden?: boolean;
}
export declare enum CalloutType {
    Standard = "standard",
    Filler = "filler"
}
export declare enum SynonymType {
    Group = "group",
    Oneway = "oneway"
}
export interface Synonym extends ResourceDocument {
    id: string;
    name: string;
    enabled: boolean;
    keywords: Array<string>;
    synonyms: Array<string>;
    type: SynonymType;
    hidden?: boolean;
}
export interface Antonym extends ResourceDocument {
    id: string;
    name: string;
    enabled: boolean;
    keywords: Array<string>;
    antonyms: Array<string>;
    hidden?: boolean;
}
export interface MergedValue extends ResourceDocument {
    id: string;
    name: string;
    field: string;
    enabled: boolean;
    keywords: Array<string>;
    values: Array<string>;
    hidden?: boolean;
}
export interface Collection extends ResourceDocument {
    title: string;
    handle: string;
    shopifyId: string;
    productIds: Array<string>;
    storefrontId: string;
    legacyResourceId: number;
    syncStatus?: "error" | "complete" | "partiallyComplete";
    syncAt?: string;
}
export type Product = ResourceDocument & Omit<ShopifyProduct, "variants" | "images" | "media" | "metafields" | "category" | "unpublishedPublications"> & {
    category: string;
    unpublishedPublications: ShopifyProduct["unpublishedPublications"]["edges"][0]["node"][];
    variants: (Omit<ShopifyProduct["variants"]["edges"][0]["node"], "presentmentPrices"> & {
        images?: Array<ShopifyProductImage>;
        presentmentPrices: ShopifyProduct["variants"]["edges"][0]["node"]["presentmentPrices"]["edges"][0]["node"][];
        productId?: string;
    })[];
    related?: Array<string>;
    images: Array<ShopifyProductImage>;
    media: ShopifyProduct["media"]["edges"][0]["node"][];
    metafields: ShopifyProduct["metafields"]["edges"][0]["node"][];
    keywords: Array<string>;
    syncStatus?: "error" | "complete" | "partiallyComplete";
    syncAt?: string;
    markets?: Array<string>;
};
export interface Analytics {
    query: AnalyticsQueryDoc & {
        items: AnalyticsDownloadItem[];
    };
}
export interface AnalyticsQueryDoc {
    tableId: string;
    accountId: string;
    profileId: string;
    profileName: string;
    webPropertyId: string;
    internalWebPropertyId: string;
}
export interface AnalyticsDownloadItem {
    id: string;
    name: string;
    value: number;
    externalId: string;
    type: AnalyticsReports;
}
export interface AnalyticsUploadItems {
    id: string;
    [AnalyticsReports.Sales7Days]: number;
    [AnalyticsReports.Sales30Days]: number;
    [AnalyticsReports.Revenue7Days]: number;
    [AnalyticsReports.Revenue30Days]: number;
}
export declare enum AnalyticsReports {
    Sales7Days = "sales_7days",
    Sales30Days = "sales_30days",
    Revenue7Days = "revenue_7days",
    Revenue30Days = "revenue_30days"
}
export declare enum ActivityLogAction {
    Create = "create",
    Delete = "delete",
    Duplicate = "duplicate",
    Sync = "sync",
    Trigger = "trigger",
    Update = "update"
}
export interface ShopifyUser {
    account_owner: boolean;
    bio: string;
    email: string;
    first_name: string;
    id: string;
    im: string;
    last_name: string;
    permissions: Array<string>;
    phone: string;
    receive_announcements: number;
    screen_name: string;
    url: string;
    locale: string;
    user_type: string;
}
export interface ActivityLog extends ResourceDocument {
    action: ActivityLogAction;
    resourceDisplayName: string;
    resourceId: string;
    resourceType: ResourceType;
    shopifyStaffMemberId: string | undefined;
}
export type BillingAppSubscription = ShopifyAppSubscription;
export type BillingAppPurchaseOneTime = ShopifyAppPurchaseOneTime;
export type BillingAppPurchaseCredit = {
    id: string;
    name: string;
    status: AppPurchaseStatus;
    amount: string;
};
