feat(scanner): validate elevated live automation
This commit is contained in:
Vendored
+21
-1
@@ -56,6 +56,7 @@ export interface CaptureResult {
|
||||
source: "ocr" | "missing";
|
||||
text: string;
|
||||
};
|
||||
locked?: boolean;
|
||||
layout?: {
|
||||
aspect: string;
|
||||
isSixteenNine: boolean;
|
||||
@@ -125,6 +126,14 @@ export interface SaveResultWithPath {
|
||||
|
||||
export type SaveSnapshotResult = SaveResultWithPath;
|
||||
|
||||
export type ScannerCommand =
|
||||
| "start-auto"
|
||||
| "stop"
|
||||
| {
|
||||
type: "start-auto";
|
||||
scanLimit?: number;
|
||||
};
|
||||
|
||||
export interface ScannerLearningRulePayload {
|
||||
textReplacements?: Record<string, string>;
|
||||
}
|
||||
@@ -211,6 +220,7 @@ export interface ReviewSampleRecord {
|
||||
ocr?: OcrResult[];
|
||||
inventoryGrid?: CaptureResult["inventoryGrid"];
|
||||
inventoryCount?: CaptureResult["inventoryCount"];
|
||||
locked?: boolean;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -239,6 +249,7 @@ export interface ReviewSamplePayload {
|
||||
ocr?: OcrResult[];
|
||||
inventoryGrid?: CaptureResult["inventoryGrid"];
|
||||
inventoryCount?: CaptureResult["inventoryCount"];
|
||||
locked?: boolean;
|
||||
};
|
||||
[key: string]: unknown;
|
||||
}
|
||||
@@ -280,6 +291,14 @@ export interface GoodDatabase {
|
||||
artifacts: GoodExportArtifact[];
|
||||
}
|
||||
|
||||
export interface GoodImportFileResult {
|
||||
ok: boolean;
|
||||
canceled: boolean;
|
||||
path: string;
|
||||
database?: unknown;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
assistantApi?: {
|
||||
@@ -302,10 +321,11 @@ declare global {
|
||||
loadArtifacts: () => Promise<ArtifactStoreLoadResult>;
|
||||
saveArtifacts: (records: StoredArtifactRecord[]) => Promise<ArtifactStoreSaveResult>;
|
||||
exportGood: (payload: GoodDatabase) => Promise<SaveResultWithPath>;
|
||||
importGoodFile: () => Promise<GoodImportFileResult>;
|
||||
publishScannerStatus: (status: ScannerStatusPayload) => Promise<BooleanResult>;
|
||||
showOverlay: () => Promise<BooleanResult>;
|
||||
hideOverlay: () => Promise<BooleanResult>;
|
||||
onScannerCommand: (callback: (command: "start-auto" | "stop") => void) => () => void;
|
||||
onScannerCommand: (callback: (command: ScannerCommand) => void) => () => void;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ export interface StoredArtifactRecord {
|
||||
equipped: string;
|
||||
confidence: number;
|
||||
needsReview: boolean;
|
||||
locked?: boolean;
|
||||
source: string;
|
||||
firstSeenAt?: string;
|
||||
lastSeenAt?: string;
|
||||
|
||||
Reference in New Issue
Block a user