import type { ProcurementCommand, ProcurementCommandBody } from './api/procurementCommands' export interface PendingProcurement { command: ProcurementCommand; payload: ProcurementCommandBody } const commands = new Set(['review', 'purchase', 'purchase/confirm', 'budget-authorizations', 'planned-warehouse', 'cancel', 'overseas-receipts', 'domestic-receipts', 'overseas-receipts/complete', 'domestic-receipts/complete', 'packing', 'packing/confirm', 'packing/withdraw', 'dispositions', 'receipts/correct', 'dispositions/revoke', 'labels', 'international-estimate', 'labels/apply', 'domestic-repack', 'overseas-shipment', 'customer-shipment', 'charges/confirm', 'fees/retry', 'fees/terminate', 'fees/release-estimate', 'fees/correct-target', 'fees/refund', 'fees/replace-failed', 'fees/additional', 'control-notes', 'control-notes/resolve', 'actual-warehouse/correct', 'exception-close']) export function commandKey() { const bytes = new Uint8Array(16); globalThis.crypto.getRandomValues(bytes) return Array.from(bytes, byte => byte.toString(16).padStart(2, '0')).join('') }