import {
  ProductVariant
} from '../../../models';
import {
  BarcodeField,
  CheckboxField,
  CurrencyField,
  DatetimeField,
  FloatField,
  IntegerField,
  MultiLineTextField,
  MultipleRecordLinksField,
  NumberField,
  SingleLineTextField,
  SingleSelectField,
  UrlField,
} from '../AirtableFields';

import {
  ShopifyObjectAirtableFields
} from './ShopifyObjectAirtableFields';

export interface ProductVariantAirtableFields extends ShopifyObjectAirtableFields<ProductVariant> {
  type: ProductVariant['type'];
  fields: {
    title: SingleLineTextField;
    displayName: SingleLineTextField;
    availableForSale: CheckboxField;
    barcode: BarcodeField;
    compareAtPrice: CurrencyField;
    createdAt: DatetimeField;
    'fulfillmentService.id': SingleLineTextField;
    fulfillmentServiceEditable: MultiLineTextField;
    id: SingleLineTextField;
    image: UrlField;
    deliveryProfile: SingleLineTextField;
    inventoryPolicy: SingleSelectField;
    inventoryQuantity: IntegerField;
    legacyResourceId: SingleLineTextField;
    position: IntegerField;
    price: CurrencyField;
    requiresShipping: CheckboxField;
    'selectedOptions.1': SingleSelectField;
    'selectedOptions.2': SingleSelectField;
    'selectedOptions.3': SingleSelectField;
    sku: SingleLineTextField;
    storefrontId: SingleLineTextField;
    taxCode: SingleLineTextField;
    taxable: CheckboxField;
    updatedAt: DatetimeField;
    weight: NumberField;
    weightUnit: SingleSelectField;
    'product.id': SingleLineTextField;

    // InventoryItem fields
    'inventoryItem.id': SingleLineTextField;
    'inventoryItem.createdAt': DatetimeField;
    'inventoryItem.updatedAt': DatetimeField;
    'inventoryItem.legacyResourceId': SingleLineTextField;
    duplicateSkuCount: IntegerField;
    inventoryHistoryUrl: UrlField;
    locationsCount: IntegerField;
    harmonizedSystemCode: SingleLineTextField;
    countryCodeOfOrigin: SingleSelectField;
    provinceCodeOfOrigin: SingleLineTextField;
    tracked: CheckboxField;
    trackedEditable: MultiLineTextField;
    'unitCost.amount': FloatField;
    'unitCost.currencyCode': SingleLineTextField;

    // Relational Fields
    product: MultipleRecordLinksField | null;
  };
};