import { Record as RecordModel } from '@airtable/blocks/models';
import { FieldSet } from 'airtable';
import { AirtableFieldIdentifier, AirtableFieldLinks } from '../../mappers/airtable';
import { NonNullableObject } from '../../types';
import { ModelPropsKey, ShopifyObject, ShopifyObjectType, ShopifyObjects } from '../shopify';
import { AirtableModelAttributes } from './AirtableModel';
import { SerializedAirtableTable } from './AirtableTable';
declare const SerializedRecordProperties: readonly ["id"];
declare type SerializedRecordProperties = typeof SerializedRecordProperties[number];
export declare type SerializedAirtableRecord = AirtableModelAttributes<RecordModel, SerializedRecordProperties> & {
    fields: SerializedRecordFields;
};
interface BarcodeReadFormat {
    text: string;
    type?: string;
}
declare type FieldValue = FieldSet[string] | BarcodeReadFormat;
export declare type AirtableFieldValue = FieldValue | null;
export interface AirtableRecordFieldConfig {
    name: string;
    value: AirtableFieldValue;
}
export declare type AirtableFieldId = string;
export declare type SerializedRecordFields = Record<AirtableFieldId, AirtableRecordFieldConfig>;
export declare const ABSENT_AIRTABLE_FIELD_VALUE: null;
export declare type ABSENT_AIRTABLE_FIELD_VALUE = typeof ABSENT_AIRTABLE_FIELD_VALUE;
/**
 * Data structure that exists on Record models that stores the mapping between shopify object key and airtable field id.
 * Allows us to handle scenarios where a field is deleted from a table
 */
export declare type AirtableRecordFieldLinks<SO extends ShopifyObject> = {
    [K in keyof SO['props']]: AirtableFieldId;
};
export declare function getAirtableRecordFieldLinks<SO extends ShopifyObject>(airtableTableFieldLinks: AirtableFieldLinks<SO>): AirtableRecordFieldLinks<SO>;
export declare function serializeRecord(airtableRecordModel: RecordModel, airtableTable: SerializedAirtableTable): SerializedAirtableRecord;
export declare type SerializedRecordsDelta<SOT extends ShopifyObjectType> = {
    shopifyObjectKey: ModelPropsKey[SOT];
    fieldLink: NonNullableObject<AirtableFieldIdentifier>;
    fieldName: string;
    oldValue: AirtableFieldValue;
    newValue: AirtableFieldValue;
};
/**
 * Returns the differences between two records
 * @returns
 */
export declare function getSerializedRecordsDelta({ oldRecord, newRecord, shopifyObjectType, airtableFieldLinks, }: {
    oldRecord: SerializedAirtableRecord;
    newRecord: SerializedAirtableRecord;
    shopifyObjectType: ShopifyObjectType;
    airtableFieldLinks: AirtableFieldLinks<ShopifyObjects[typeof shopifyObjectType]>;
}): SerializedRecordsDelta<typeof shopifyObjectType>[];
export {};
