import { CustomerKeys, CustomerTypeName } from './Customer';
import { InventoryLevelKeys, InventoryLevelTypeName } from './InventoryLevel';
import { LineItemKeys, LineItemTypeName } from './LineItem';
import { LocationKeys, LocationTypeName } from './Location';
import { OrderPropsKeys, OrderTypeName } from './Order';
import { ProductKeys, ProductTypeName } from './Product';
import { ProductVariantKeys, ProductVariantTypeName } from './ProductVariant';
export * from './ShopifyObject';
export * from './Product';
export * from './Order';
export * from './ProductVariant';
export * from './Location';
export * from './InventoryLevel';
export * from './LineItem';
export * from './Customer';
export * from './shopifyObjectFamilies';
export * from './shopifyModelUtil';
const RESTBasedShopifyModelTypes = [LineItemTypeName, CustomerTypeName];
export const GQLShopifyObjectTypes = [
    ProductTypeName,
    ProductVariantTypeName,
    OrderTypeName,
    LocationTypeName,
    InventoryLevelTypeName,
];
export const RESTShopifyObjectTypes = [
    LineItemTypeName,
    CustomerTypeName
];
export const ShopifyObjectTypes = [
    ...GQLShopifyObjectTypes,
    ...RESTShopifyObjectTypes,
];
/**
 * Currently the same as GQL but may differ in the future
 * e.g.
 * 1. dedicated customer job is something we probably want to do
 * 2. we might want to put in product variants inside the products job (probably not but a possibility)
 *
 */
export const TopLevelBulkJobShopifyObjectTypes = [
    ...GQLShopifyObjectTypes,
];
/**
 * The order used when syncing entities from Shopify and checking for the existence of tables.
 */
export const ModelSyncOrder = [
    LocationTypeName,
    ProductTypeName,
    ProductVariantTypeName,
    OrderTypeName,
    InventoryLevelTypeName
];
export const AirtableSyncOrder = [
    LocationTypeName,
    ProductTypeName,
    ProductVariantTypeName,
    OrderTypeName,
    LineItemTypeName,
    CustomerTypeName,
    InventoryLevelTypeName
];
export function getSyncedObjectTypesInSyncOrder(syncedObjectTypes) {
    return AirtableSyncOrder.filter(shopifyObjectType => syncedObjectTypes.includes(shopifyObjectType));
}
export const ShopifyObjectDescriptions = {
    [ProductTypeName]: 'The goods, digital downloads, services, and gift cards that you sell.',
    [ProductVariantTypeName]: 'You add variants to a product that comes in more than one option, such as size or color. Each combination of option values for a product can be a variant for that product.',
    [OrderTypeName]: '',
    [CustomerTypeName]: 'Represents information about a customer of the shop, such as the customer\'s contact details, their order history, and whether they\'ve agreed to receive marketing material by email.',
    [LineItemTypeName]: 'Represents a single line item on an order.',
    [LocationTypeName]: 'Represents the location where the physical good resides.',
    [InventoryLevelTypeName]: 'Represents the inventory quantity of an inventory item at a specific location.'
};
const RelationTypes = ['HasMany', 'BelongsTo', 'HasOne'];
export const ShopifyObjectRelations = {
    [OrderTypeName]: {},
    [CustomerTypeName]: {},
    [LocationTypeName]: {
        [InventoryLevelTypeName]: {
            relation: 'HasMany'
        }
    },
    [ProductTypeName]: {
        [ProductVariantTypeName]: {
            relation: 'HasMany',
        }
    },
    [ProductVariantTypeName]: {
        [ProductTypeName]: {
            relation: 'BelongsTo',
            key: 'product'
        }
    },
    [InventoryLevelTypeName]: {
        [LocationTypeName]: {
            relation: 'BelongsTo',
            key: 'location'
        }
    },
    [LineItemTypeName]: {
        [OrderTypeName]: {
            relation: 'BelongsTo',
            key: 'order'
        }
    }
};
export const ModelPropsKeys = {
    [OrderTypeName]: OrderPropsKeys,
    [ProductTypeName]: ProductKeys,
    [ProductVariantTypeName]: ProductVariantKeys,
    [LocationTypeName]: LocationKeys,
    [InventoryLevelTypeName]: InventoryLevelKeys,
    [LineItemTypeName]: LineItemKeys,
    [CustomerTypeName]: CustomerKeys,
};
//# sourceMappingURL=index.js.map