import { type LocationFeatureFlag } from '@/api/feature-flags'; export { InventoryFeatureFlags } from '@feedmepos/inventory-core-2'; export declare enum InventoryModule { Costing = "Costing" } export interface FeatureState { isLoaded: boolean; flags: LocationFeatureFlag[]; premium: boolean; costing: boolean; enableEditOrderCosting: boolean; enableBackdatePo: boolean; /** @deprecated TODO: remove */ autoReceiveWarehouse: boolean; /** @deprecated TODO: remove */ manualReceive: boolean; enablePoTemplate: boolean; enableClosingTemplate: boolean; enableWastageTemplate: boolean; warehouseRequestRequiresTemplate: boolean; mustUseDefaultCost?: boolean; businessSupplierOnly: boolean; vendorPurchaseRequiresTemplate: boolean; enableXilnexTransferNote: boolean; enableCustomAttribute: boolean; usePurchaseOrderV2: boolean; acceptRequireFulfillment?: boolean; useOperatePurchaseOrderV2: boolean; inventory_xilnex_opening_migration: boolean; inventory_synergy_opening_migration: boolean; inventory_netsuite_inventory_transfer_out: boolean; inventory_portal_supplier_preparation_time: boolean; inventory_portal_delivery_order_write: boolean; inventory_pos_transfer_require_fulfillment: boolean; inventory_backdate_receive: boolean; inventory_purchase_order_custom_cost: boolean; inventory_bulk_import: boolean; inventory_portal_surcharge: boolean; inventory_purchase_order_cost_edit: boolean; inventory_purchase_order_price_adjustment: boolean; inventory_purchase_order_workflow_allow_to_mark_completed: boolean; inventory_recipe_v2: boolean; inventory_print_template: boolean; inventory_purchase_order_email: boolean; inventory_bulk_edit_recipes: boolean; inventory_receive_request_beta: boolean; inventory_portal_production_item: boolean; /** * JSON string controlling which day values are allowed in the PO forecast stepper. * - Not set / null: any integer > 0 * - `{"type":"options","values":[7,14]}`: only 7 or 14 days * - `{"type":"range","min":3,"max":5}`: between 3 and 5 days */ report_portal_po_forecast_days_constraint: string | null; /** * Default number of days pre-filled in the PO forecast stepper. * - Not set: 7 * - `"14"`: 14 days */ report_portal_po_forecast_days_default: number; } export type FeatureLoadStatus = 'idle' | 'loading' | 'ready' | 'error'; export type LocationFeatureWait = 'ready' | 'error' | 'superseded'; export declare const FEATURE_LOAD_TIMEOUT_MS = 30000; export declare const useFeatureStore: () => { readonly businessDbName: string; readonly isWarehouse: boolean; readonly restaurantPosVersion: string | null | undefined; readonly enableTotalCost: boolean; readonly enableEditOrderCosting: boolean; readonly enableBackdatePo: boolean; /** @deprecated TODO: remove */ readonly autoReceiveWarehouse: boolean; /** @deprecated TODO: remove */ readonly manualReceive: boolean; readonly isLoaded: boolean; readonly loadState: { dbName: string | null; status: FeatureLoadStatus; }; /** Reloads the current location's flags; a no-op before `init` has run. */ retryLoad(): Promise; readonly flags: { name: string; enabled: boolean; beta: boolean; value?: string | number | boolean | null | undefined; }[]; readonly premium: boolean; isFlagOn(flag: string): boolean; isModuleEnabled(module: InventoryModule): boolean; isModuleBeta(module: InventoryModule): boolean; readonly enablePoTemplate: boolean; readonly enableClosingTemplate: boolean; readonly enableWastageTemplate: boolean; readonly warehouseRequestRequiresTemplate: boolean; readonly businessSupplierOnly: boolean; readonly vendorPurchaseRequiresTemplate: boolean; readonly enableXilnexTransferNote: boolean; readonly enabledXilnexOpeningMigration: boolean; readonly enabledSynergyOpeningMigration: boolean; readonly enableCustomAttribute: boolean; readonly usePurchaseOrderV2: boolean; readonly acceptRequireFulfillment: boolean | undefined; readonly useOperatePurchaseOrderV2: boolean; readonly isNetSuiteInventoryTransferOutEnabled: boolean; readonly enableSupplierPreparationTime: boolean; readonly enablePortalDeliveryOrderWrite: boolean; readonly enablePOSTransferRequireFulfillment: boolean; readonly enableBackdateReceive: boolean; readonly enablePurchaseOrderReceiveWithCustomCost: boolean; readonly enableBulkImport: boolean; readonly enableSurcharge: boolean; readonly enablePurchaseOrderCostEdit: boolean; readonly enablePurchaseOrderPriceAdjustment: boolean; readonly poWorkflowAllowToMarkCompleted: boolean; readonly enableRecipeV2: boolean; readonly enablePrintTemplate: boolean; readonly enablePurchaseOrderEmail: boolean; readonly enableBulkEditRecipes: boolean; readonly enableReceiveRequestBeta: boolean; readonly enableProductionRun: boolean; readonly poForecastDaysConstraint: string | null; readonly poForecastDaysDefault: number; init(): Promise; /** * Waits, bounded by FEATURE_LOAD_TIMEOUT_MS, for the flags of `dbName` to be * confirmed. `ready` includes a confirmed outlet refreshing in the background. * `error` means the flags are unknown (failed or stalled), never "off". * `superseded` means the outlet changed or `signal` aborted, so the caller's * work is stale and must stop. With `retryOnError`, an outlet already in error * reloads first, so a caller's own refresh doubles as the flag retry. */ awaitLocationFeatures(dbName: string | null | undefined, options?: { signal?: AbortSignal; retryOnError?: boolean; }): Promise; };