import ono from '@jsdevtools/ono';
import { isNil } from 'lodash';
export function getRecordFieldValue(shopifyObjectKey, airtableRecord, airtableFieldLinks) {
    const fieldLink = airtableFieldLinks[shopifyObjectKey];
    const { id } = fieldLink;
    if (isNil(id)) {
        throw ono({
            fieldName: shopifyObjectKey,
            airtableRecord,
            airtableFieldLinks,
        }, 'id DNE for this fieldLink');
    }
    return airtableRecord.fields[id].value ?? null;
}
//# sourceMappingURL=AirtableLinks.js.map