@scandit/web-datacapture-id
Version:
Scandit Data Capture SDK for the Web
60 lines (59 loc) • 2.69 kB
TypeScript
import type { Serializable } from "@scandit/web-datacapture-core/build/js/private/Serializable";
import type { DocumentManipulationCheckJSON, DocumentManipulationResultJSON } from "../SerializedTypes";
/** Whether the cloud document manipulation check produced a verdict. */
export declare enum DocumentManipulationStatus {
/** A verdict was produced. */
Ok = "ok",
/** The request completed but the model output was unusable; no verdict. */
TamperingCheckFailed = "tamperingCheckFailed",
/** The request did not complete (timeout, HTTP error, service unavailable); no verdict. */
RequestFailed = "requestFailed"
}
/** Overall verdict of the cloud document manipulation check. */
export declare enum DocumentManipulationVerdict {
Genuine = "genuine",
Manipulated = "manipulated",
Inconclusive = "inconclusive"
}
/** Outcome of one check of the rubric. */
export declare enum DocumentManipulationCheckResult {
Pass = "pass",
Fail = "fail",
Unverifiable = "unverifiable"
}
/** One check of the cloud document manipulation check rubric, as returned by the server. */
export declare class DocumentManipulationCheck {
private readonly json;
private constructor();
/** Name of the check. */
get name(): string;
/** Outcome of the check, or null when the server reported a value this SDK does not know. */
get result(): DocumentManipulationCheckResult | null;
get confidence(): string | null;
/** Short evidence text supporting the result, when provided. */
get evidence(): string | null;
private static fromJSON;
toJSONObject(): DocumentManipulationCheckJSON;
}
/**
* Outcome of the cloud document manipulation check (experimental; see
* SingleSideScannerOptions.manipulationCheck), exposed as
* VerificationResult.documentManipulationResult. The rubric, its checks and the model are owned by
* the server.
*/
export declare class DocumentManipulationResult implements Serializable<DocumentManipulationResultJSON> {
private json;
private constructor();
get status(): DocumentManipulationStatus;
/** The verdict, or null when no verdict was produced (see status). */
get verdict(): DocumentManipulationVerdict | null;
/** False when the image was too poor to judge; the verdict is then Inconclusive. */
get assessable(): boolean | null;
get checks(): DocumentManipulationCheck[];
get summary(): string | null;
/** Set when no verdict was produced: the request error or why the output was unusable. */
get error(): string | null;
get vlmRequestId(): string | null;
private static fromJSON;
toJSONObject(): DocumentManipulationResultJSON;
}