The OCF data object that may contain an object_type field
The data with normalized fields (shallow copy if modified)
normalizeOcfData({ object_type: 'TX_PLAN_SECURITY_ISSUANCE', id: '123' })
// => { object_type: 'TX_EQUITY_COMPENSATION_ISSUANCE', id: '123' }
normalizeOcfData({ quantity: '1000' })
// => { quantity: '1000', quantity_source: 'UNSPECIFIED' }
normalizeOcfData({ object_type: 'DOCUMENT', id: 'doc-1', date: '2024-01-15' })
// => { object_type: 'DOCUMENT', id: 'doc-1' }
normalizeOcfData({ object_type: 'STOCK_PLAN', stock_class_id: 'sc-1', id: 'sp-1', plan_name: 'Plan', initial_shares_reserved: '1000' })
// => { object_type: 'STOCK_PLAN', stock_class_ids: ['sc-1'], id: 'sp-1', plan_name: 'Plan', initial_shares_reserved: '1000' }
Normalize OCF data for consistent comparison.
This function applies normalizations to ensure semantically equivalent data compares as equal:
date)plan_security_type/option_grant_type)current_relationship->current_relationships)stock_class_id->stock_class_ids)quantity->quantity_converted)