import type { RevisionIdMeta } from '@feedmepos/inventory-core'; import type { FdtoEditClosingDraftRequest } from '@feedmepos/zod-inventory'; /** Matches F_LambdaInitClosingDraftStockSnapshot_RedisValue from backend */ export type RefreshBalanceStatus = { requestId: string; closingDraftId: string; closingDraftRevision: string; message?: string | null; startedAt: string; completedAt?: string | null; } | null; export declare const useClosingDraftApi: () => { getDbName: () => string; getDraft(id: string): Promise; /** Combined trimmed payload for the detail dialog: draft + groups + * closing adjustment balances in one request. */ getDraftDetail(id: string, signal?: AbortSignal): Promise; readDrafts(): Promise<(FdoClosingDraft & RevisionIdMeta)[]>; /** Single page of the trimmed listing endpoint (cursor-based). * `from`/`to` window by created date (backend caps span at 6 months). */ listDraftsPage(body: { limit: number; startkey?: string; from?: string; to?: string; }): Promise; runOperation(operation: FdtoClosingDraftOperation): Promise; runOperationV1(operation: FdtoClosingDraftOperation): Promise; sync(operation: FdtoClosingDraftOperation): Promise; cloneDraft(id: string): Promise; /** Closing groups belonging to a parent closing draft. */ getClosingGroups(parentId: string): Promise<(FdoSubClosingDraft & RevisionIdMeta)[]>; /** Approve a closing group (sub-closing): status -> COMPLETED, no recalculation. */ approveClosingGroup(groupId: string, remark: string): Promise; /** Submit a closing group (sub-closing) for approval: DRAFT -> PENDING_APPROVAL. */ submitClosingGroup(groupId: string, remark: string): Promise; /** Reject a closing group (sub-closing): records a rejection note, resets to DRAFT. */ rejectClosingGroup(groupId: string, remark: string): Promise; /** Approve all pending closing groups for a parent draft at once (master-approver override). */ approveAllClosingGroups(parentDraftId: string, remark: string): Promise<(FdoSubClosingDraft & RevisionIdMeta)[]>; createQuickModeDraftWithItems(body: FdtoEditClosingDraftRequest): Promise; initializeStockSnapshot(closingDraftId: string, effectiveAt: string): Promise; getRefreshBalanceStatus(closingDraftId: string, closingDraftRevision: string): Promise; };