/** * Action button ids for shipping-notice chat. * Keep in sync with backend `state_machine.py` → ACTION_SPECS keys. * CI: backend/tests/test_shipping_notice_state_machine.py::test_frontend_action_ids_match_backend */ export const SHIPPING_ACTION_IDS = [ 'confirm', 'reject', 'reparse', 'confirm_inventory_mapping', 'correct_inventory_mapping', 'reparse_inventory', 'rematch', 'retry_rpa', 'upload_inventory_file', 'retry_upload', 'download_excel', 'generate_excel', 'mark_manual_uploaded', 'paste_inventory_json', 'edit_inventory_mapping', 'match_inventory', 'refresh', ] as const; export type ShippingActionId = (typeof SHIPPING_ACTION_IDS)[number]; export const SHIPPING_KNOWN_ACTION_ID_SET = new Set(SHIPPING_ACTION_IDS); /** Backend state-machine codes — must never appear in user-visible chat text. */ export const SHIPPING_TERMINAL_CHECKPOINTS = new Set(['uploaded', 'completed', 'rejected']); export const SHIPPING_INTERNAL_STATUS_TOKENS = [ 'rpa_pending', 'upload_rpa_pending', 'rpa_exhausted', 'inv_unavail', 'align_review', 'map_infer', 'parse_review', 'shortage_review', 'low_confidence', 'waiting_inventory', 'inventory_ready', 'pending_review', 'waiting_upload', 'upload_failed', 'ready_to_match', 'ready_to_export', 'export_ready', 'upload_req', 'inventory_pending', 'map_ok', 'parse_ok', 'needs_human', 'fulfillable', 'unfulfillable', ] as const;