@@ -23,12 +23,6 @@ import { MindeeHttpErrorV2 } from "./errors/mindeeError";
2323 * The `initialTimerOptions` and `recurringTimerOptions` objects let you pass an
2424 * `AbortSignal` or make the timer `unref`-ed to the `setTimeout()`.
2525 *
26- * @property initialDelaySec Number of seconds to wait **before the first poll**.
27- * @property delaySec Interval in seconds between two consecutive polls.
28- * @property maxRetries Maximum number of polling attempts (including the first one).
29- * @property initialTimerOptions Options passed to the initial `setTimeout()`.
30- * @property recurringTimerOptions Options passed to every recurring `setTimeout()`.
31- *
3226 * @category ClientV2
3327 * @example
3428 * const params = {
@@ -41,13 +35,18 @@ import { MindeeHttpErrorV2 } from "./errors/mindeeError";
4135 */
4236
4337export interface PollingOptions {
38+ /** Number of seconds to wait *before the first poll*. */
4439 initialDelaySec ?: number ;
40+ /** Interval in seconds between two consecutive polls. */
4541 delaySec ?: number ;
42+ /** Maximum number of polling attempts (including the first one). */
4643 maxRetries ?: number ;
44+ /** Options passed to the initial `setTimeout()`. */
4745 initialTimerOptions ?: {
4846 ref ?: boolean ,
4947 signal ?: AbortSignal
5048 } ;
49+ /** Options passed to every recurring `setTimeout()`. */
5150 recurringTimerOptions ?: {
5251 ref ?: boolean ,
5352 signal ?: AbortSignal
@@ -65,16 +64,6 @@ interface ValidatedPollingOptions extends PollingOptions {
6564 *
6665 * All fields are optional except `modelId`.
6766 *
68- * @property modelId Identifier of the model that must process the document. **Required**.
69- * @property rag Enhance extraction accuracy with Retrieval-Augmented Generation.
70- * @property rawText Extract the full text content from the document as strings, and fill the `raw_text` attribute.
71- * @property polygon Calculate bounding box polygons for all fields, and fill their `locations` attribute.
72- * @property confidence Boost the precision and accuracy of all extractions.
73- * Calculate confidence scores for all fields and fill their `confidence` attribute.
74- * @property alias Custom alias assigned to the uploaded document.
75- * @property webhookIds List of webhook UUIDs that will receive the final API response.
76- * @property pollingOptions Client-side polling configuration (see {@link PollingOptions}).
77- * @property closeFile By default the file is closed once the upload is finished, set to `false` to keep it open.
7867 * @category ClientV2
7968 * @example
8069 * const params = {
@@ -89,24 +78,35 @@ interface ValidatedPollingOptions extends PollingOptions {
8978 * };
9079 */
9180export interface InferenceParameters {
81+ /** Model ID to use for the inference. **Required** */
9282 modelId : string ;
83+ /** Use Retrieval-Augmented Generation during inference. */
9384 rag ?: boolean ;
85+ /** Extract the entire text from the document as strings, and fill the `rawText` attribute. */
9486 rawText ?: boolean ;
87+ /** Calculate bounding box polygons for values, and fill the `locations` attribute of fields. */
9588 polygon ?: boolean ;
89+ /** Calculate confidence scores for values, and fill the `confidence` attribute of fields.
90+ * Useful for automation.*/
9691 confidence ?: boolean ;
92+ /** Use an alias to link the file to your own DB. If empty, no alias will be used. */
9793 alias ?: string ;
94+ /** Additional text context used by the model during inference.
95+ * *Not recommended*, for specific use only. */
96+ textContext ?: string ;
97+ /** Webhook IDs to call after all processing is finished.
98+ * If empty, no webhooks will be used. */
9899 webhookIds ?: string [ ] ;
100+ /** Client-side polling configuration (see {@link PollingOptions}). */
99101 pollingOptions ?: PollingOptions ;
102+ /** By default, the file is closed once the upload is finished.
103+ * Set to `false` to keep it open. */
100104 closeFile ?: boolean ;
101105}
102106
103107/**
104108 * Options for the V2 Mindee Client.
105109 *
106- * @property apiKey Your API key for all endpoints.
107- * @property throwOnError Raise an `Error` on errors.
108- * @property debug Log debug messages.
109- *
110110 * @category ClientV2
111111 * @example
112112 * const client = new MindeeClientV2({
@@ -116,8 +116,11 @@ export interface InferenceParameters {
116116 * });
117117 */
118118export interface ClientOptions {
119+ /** Your API key for all endpoints. */
119120 apiKey ?: string ;
121+ /** Raise an `Error` on errors. */
120122 throwOnError ?: boolean ;
123+ /** Log debug messages. */
121124 debug ?: boolean ;
122125}
123126
0 commit comments