mindee
Version:
Mindee Client Library for Node.js
53 lines (52 loc) • 1.44 kB
TypeScript
import { FormData } from "undici";
/**
* Constructor parameters for BaseParameters and its subclasses.
*/
export interface BaseParametersConstructor {
modelId: string;
alias?: string;
webhookIds?: string[];
closeFile?: boolean;
}
/**
* Parameters accepted by all v2 products.
*
* All fields are optional except `modelId`.
*
* @category ClientV2
* @example
* const params = {
* modelId: "YOUR_MODEL_ID",
* rag: true,
* alias: "YOUR_ALIAS",
* webhookIds: ["YOUR_WEBHOOK_ID_1", "YOUR_WEBHOOK_ID_2"],
* };
*/
export declare abstract class BaseParameters {
/**
* Model ID to use for the inference. **Required.**
*/
modelId: string;
/**
* Optional: a free-form string to tag the request with your own identifier.
* For example, an internal document ID, reference number, or database key.
* If set, it will be included in the job and result responses.
*/
alias?: string;
/**
* Webhook IDs to call after all processing is finished.
* If empty, no webhooks will be used.
*/
webhookIds?: string[];
/**
* By default, the file is closed once the upload is finished.
* Set to `false` to keep it open.
*/
closeFile?: boolean;
protected constructor(params: BaseParametersConstructor);
/**
* Returns the form data to send to the API.
* @returns A `FormData` object.
*/
getFormData(): FormData;
}