mindee 5.8.0 → 5.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +104 -95
- package/src/geometry/bbox.js +1 -1
- package/src/image/extractedImages.d.ts +1 -1
- package/src/image/imageExtractor.d.ts +1 -1
- package/src/image/imageExtractor.js +2 -2
- package/src/input/localInputSource.d.ts +1 -1
- package/src/parsing/baseLocalResponse.d.ts +1 -1
- package/src/pdf/extractedPdfs.d.ts +1 -1
- package/src/pdf/pdfExtractor.d.ts +1 -1
- package/src/pdf/pdfExtractor.js +2 -2
- package/src/v1/extraction/invoiceSplitterExtractor/invoiceSplitterExtractor.d.ts +2 -2
- package/src/v1/extraction/invoiceSplitterExtractor/invoiceSplitterExtractor.js +2 -2
- package/src/v1/extraction/multiReceiptsExtractor/multiReceiptsExtractor.d.ts +2 -2
- package/src/v1/extraction/multiReceiptsExtractor/multiReceiptsExtractor.js +1 -1
- package/src/v1/http/baseEndpoint.d.ts +1 -1
- package/src/v1/http/endpoint.d.ts +1 -1
- package/src/v1/http/endpoint.js +1 -1
- package/src/v1/http/httpParams.d.ts +1 -1
- package/src/v1/http/workflowEndpoint.d.ts +2 -2
- package/src/v1/http/workflowEndpoint.js +1 -1
- package/src/v1/parsing/common/execution.d.ts +1 -1
- package/src/v1/parsing/common/execution.js +1 -1
- package/src/v1/parsing/common/extras/cropperExtra.d.ts +1 -1
- package/src/v1/parsing/common/extras/cropperExtra.js +1 -1
- package/src/v1/parsing/common/ocrPage.d.ts +1 -1
- package/src/v1/parsing/common/ocrPage.js +1 -1
- package/src/v1/parsing/common/orientation.d.ts +1 -1
- package/src/v1/parsing/common/orientation.js +1 -1
- package/src/v1/parsing/generated/generatedList.d.ts +1 -1
- package/src/v1/parsing/generated/generatedList.js +1 -1
- package/src/v1/parsing/generated/generatedObject.d.ts +1 -1
- package/src/v1/parsing/generated/generatedObject.js +1 -1
- package/src/v1/parsing/localResponse.d.ts +1 -1
- package/src/v1/parsing/localResponse.js +1 -1
- package/src/v1/parsing/standard/amount.js +1 -1
- package/src/v1/parsing/standard/companyRegistration.js +1 -1
- package/src/v1/parsing/standard/tax.d.ts +1 -1
- package/src/v1/parsing/standard/tax.js +1 -1
- package/src/v1/product/barcodeReader/barcodeReaderV1.d.ts +1 -1
- package/src/v1/product/barcodeReader/barcodeReaderV1.js +1 -1
- package/src/v1/product/barcodeReader/barcodeReaderV1Document.d.ts +2 -2
- package/src/v1/product/barcodeReader/barcodeReaderV1Document.js +2 -2
- package/src/v1/product/cliProducts.d.ts +2 -2
- package/src/v1/product/cliProducts.js +1 -1
- package/src/v1/product/cropper/cropperV1.d.ts +1 -1
- package/src/v1/product/cropper/cropperV1.js +1 -1
- package/src/v1/product/cropper/cropperV1Document.d.ts +1 -1
- package/src/v1/product/cropper/cropperV1Page.d.ts +2 -2
- package/src/v1/product/cropper/cropperV1Page.js +2 -2
- package/src/v1/product/driverLicense/driverLicenseV1.d.ts +1 -1
- package/src/v1/product/driverLicense/driverLicenseV1.js +1 -1
- package/src/v1/product/driverLicense/driverLicenseV1Document.d.ts +2 -2
- package/src/v1/product/driverLicense/driverLicenseV1Document.js +2 -2
- package/src/v1/product/financialDocument/financialDocumentV1.d.ts +1 -1
- package/src/v1/product/financialDocument/financialDocumentV1.js +1 -1
- package/src/v1/product/financialDocument/financialDocumentV1Document.d.ts +2 -2
- package/src/v1/product/financialDocument/financialDocumentV1Document.js +2 -2
- package/src/v1/product/financialDocument/financialDocumentV1LineItem.js +1 -1
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +1 -1
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.js +1 -1
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +2 -2
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1Document.js +2 -2
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +1 -1
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.js +1 -1
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Document.d.ts +2 -2
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Document.js +2 -2
- package/src/v1/product/fr/carteGrise/carteGriseV1.d.ts +1 -1
- package/src/v1/product/fr/carteGrise/carteGriseV1.js +1 -1
- package/src/v1/product/fr/carteGrise/carteGriseV1Document.d.ts +2 -2
- package/src/v1/product/fr/carteGrise/carteGriseV1Document.js +2 -2
- package/src/v1/product/fr/idCard/idCardV2.d.ts +1 -1
- package/src/v1/product/fr/idCard/idCardV2.js +1 -1
- package/src/v1/product/fr/idCard/idCardV2Document.d.ts +2 -2
- package/src/v1/product/fr/idCard/idCardV2Document.js +2 -2
- package/src/v1/product/fr/idCard/idCardV2Page.d.ts +2 -2
- package/src/v1/product/fr/idCard/idCardV2Page.js +2 -2
- package/src/v1/product/generated/generatedV1.d.ts +1 -1
- package/src/v1/product/generated/generatedV1.js +1 -1
- package/src/v1/product/generated/generatedV1Document.js +2 -2
- package/src/v1/product/generated/generatedV1Page.js +2 -2
- package/src/v1/product/generated/generatedV1Prediction.d.ts +3 -3
- package/src/v1/product/generated/generatedV1Prediction.js +3 -3
- package/src/v1/product/internationalId/internationalIdV2.d.ts +1 -1
- package/src/v1/product/internationalId/internationalIdV2.js +1 -1
- package/src/v1/product/internationalId/internationalIdV2Document.d.ts +2 -2
- package/src/v1/product/internationalId/internationalIdV2Document.js +2 -2
- package/src/v1/product/invoice/invoiceV4.d.ts +1 -1
- package/src/v1/product/invoice/invoiceV4.js +1 -1
- package/src/v1/product/invoice/invoiceV4Document.d.ts +2 -2
- package/src/v1/product/invoice/invoiceV4Document.js +2 -2
- package/src/v1/product/invoice/invoiceV4LineItem.js +1 -1
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1.d.ts +1 -1
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1.js +1 -1
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +1 -1
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.js +1 -1
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.d.ts +1 -1
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.js +1 -1
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.d.ts +2 -2
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.js +2 -2
- package/src/v1/product/passport/passportV1.d.ts +1 -1
- package/src/v1/product/passport/passportV1.js +1 -1
- package/src/v1/product/passport/passportV1Document.d.ts +2 -2
- package/src/v1/product/passport/passportV1Document.js +2 -2
- package/src/v1/product/receipt/receiptV5.d.ts +1 -1
- package/src/v1/product/receipt/receiptV5.js +1 -1
- package/src/v1/product/receipt/receiptV5Document.d.ts +2 -2
- package/src/v1/product/receipt/receiptV5Document.js +2 -2
- package/src/v1/product/receipt/receiptV5LineItem.js +1 -1
- package/src/v1/product/resume/resumeV1.d.ts +1 -1
- package/src/v1/product/resume/resumeV1.js +1 -1
- package/src/v1/product/resume/resumeV1Certificate.js +1 -1
- package/src/v1/product/resume/resumeV1Document.d.ts +2 -2
- package/src/v1/product/resume/resumeV1Document.js +2 -2
- package/src/v1/product/resume/resumeV1Education.js +1 -1
- package/src/v1/product/resume/resumeV1Language.js +1 -1
- package/src/v1/product/resume/resumeV1ProfessionalExperience.js +1 -1
- package/src/v1/product/resume/resumeV1SocialNetworksUrl.js +1 -1
- package/src/v1/product/us/bankCheck/bankCheckV1.d.ts +1 -1
- package/src/v1/product/us/bankCheck/bankCheckV1.js +1 -1
- package/src/v1/product/us/bankCheck/bankCheckV1Document.d.ts +2 -2
- package/src/v1/product/us/bankCheck/bankCheckV1Document.js +2 -2
- package/src/v1/product/us/bankCheck/bankCheckV1Page.d.ts +2 -2
- package/src/v1/product/us/bankCheck/bankCheckV1Page.js +2 -2
- package/src/v2/cli.js +1 -1
- package/src/v2/client.d.ts +94 -18
- package/src/v2/client.js +171 -27
- package/src/v2/clientOptions/baseAnnotationParameters.d.ts +23 -0
- package/src/v2/clientOptions/baseAnnotationParameters.js +17 -0
- package/src/v2/clientOptions/baseProductParameters.js +3 -2
- package/src/v2/clientOptions/baseRagDocumentUploadParameters.d.ts +23 -0
- package/src/v2/clientOptions/baseRagDocumentUploadParameters.js +24 -0
- package/src/v2/clientOptions/index.d.ts +2 -0
- package/src/v2/clientOptions/index.js +2 -0
- package/src/v2/fileOperations/crop.d.ts +1 -1
- package/src/v2/http/errors.d.ts +1 -1
- package/src/v2/http/mindeeApiV2.d.ts +35 -6
- package/src/v2/http/mindeeApiV2.js +79 -3
- package/src/v2/parsing/baseRagAnnotationResponse.d.ts +28 -0
- package/src/v2/parsing/baseRagAnnotationResponse.js +14 -0
- package/src/v2/parsing/baseResponse.d.ts +6 -2
- package/src/v2/parsing/baseResponse.js +3 -1
- package/src/v2/parsing/error/errorResponse.d.ts +1 -1
- package/src/v2/parsing/error/errorResponse.js +1 -1
- package/src/v2/parsing/index.d.ts +2 -0
- package/src/v2/parsing/index.js +1 -0
- package/src/v2/parsing/inference/failedInferenceResponse.d.ts +2 -2
- package/src/v2/parsing/inference/failedInferenceResponse.js +2 -2
- package/src/v2/parsing/inference/field/inferenceFields.d.ts +9 -3
- package/src/v2/parsing/inference/field/inferenceFields.js +9 -3
- package/src/v2/parsing/inference/field/objectField.d.ts +13 -9
- package/src/v2/parsing/inference/field/objectField.js +19 -33
- package/src/v2/parsing/job/job.d.ts +8 -8
- package/src/v2/parsing/job/job.js +1 -1
- package/src/v2/parsing/job/jobResponse.d.ts +1 -1
- package/src/v2/parsing/job/jobResponse.js +1 -1
- package/src/v2/parsing/job/jobWebhook.d.ts +1 -1
- package/src/v2/parsing/job/jobWebhook.js +1 -1
- package/src/v2/parsing/search/baseSearchResponse.d.ts +1 -1
- package/src/v2/parsing/search/baseSearchResponse.js +1 -1
- package/src/v2/parsing/search/searchModels.d.ts +1 -1
- package/src/v2/parsing/search/searchModels.js +1 -1
- package/src/v2/parsing/search/searchRagDocuments.d.ts +1 -1
- package/src/v2/parsing/search/searchRagDocuments.js +1 -1
- package/src/v2/parsing/search/searchResponse.d.ts +1 -1
- package/src/v2/parsing/search/searchResponse.js +1 -1
- package/src/v2/product/baseProduct.d.ts +26 -6
- package/src/v2/product/baseProduct.js +31 -7
- package/src/v2/product/classification/classification.d.ts +1 -1
- package/src/v2/product/classification/classification.js +1 -1
- package/src/v2/product/classification/classificationClassifier.d.ts +1 -1
- package/src/v2/product/classification/classificationClassifier.js +1 -1
- package/src/v2/product/classification/classificationInference.d.ts +1 -1
- package/src/v2/product/classification/classificationInference.js +1 -1
- package/src/v2/product/classification/classificationResponse.d.ts +1 -1
- package/src/v2/product/classification/classificationResponse.js +1 -1
- package/src/v2/product/classification/params/classificationParameters.d.ts +1 -1
- package/src/v2/product/classification/params/classificationParameters.js +1 -1
- package/src/v2/product/crop/crop.d.ts +1 -1
- package/src/v2/product/crop/crop.js +1 -1
- package/src/v2/product/crop/cropInference.d.ts +2 -2
- package/src/v2/product/crop/cropInference.js +2 -2
- package/src/v2/product/crop/cropItem.d.ts +2 -2
- package/src/v2/product/crop/cropItem.js +3 -3
- package/src/v2/product/crop/cropResponse.d.ts +1 -1
- package/src/v2/product/crop/cropResponse.js +1 -1
- package/src/v2/product/crop/cropResult.d.ts +1 -1
- package/src/v2/product/crop/cropResult.js +2 -2
- package/src/v2/product/crop/params/cropParameters.d.ts +1 -1
- package/src/v2/product/crop/params/cropParameters.js +1 -1
- package/src/v2/product/extraction/extraction.d.ts +10 -2
- package/src/v2/product/extraction/extraction.js +17 -3
- package/src/v2/product/extraction/extractionInference.d.ts +1 -1
- package/src/v2/product/extraction/extractionInference.js +1 -1
- package/src/v2/product/extraction/extractionResponse.d.ts +1 -1
- package/src/v2/product/extraction/extractionResponse.js +1 -1
- package/src/v2/product/extraction/extractionResult.d.ts +3 -3
- package/src/v2/product/extraction/extractionResult.js +3 -3
- package/src/v2/product/extraction/index.d.ts +1 -0
- package/src/v2/product/extraction/index.js +1 -0
- package/src/v2/product/extraction/params/extractionParameters.d.ts +1 -1
- package/src/v2/product/extraction/params/extractionParameters.js +1 -1
- package/src/v2/product/extraction/ragDocuments/annotatedBaseField.d.ts +20 -0
- package/src/v2/product/extraction/ragDocuments/annotatedBaseField.js +15 -0
- package/src/v2/product/extraction/ragDocuments/annotatedFields.d.ts +27 -0
- package/src/v2/product/extraction/ragDocuments/annotatedFields.js +57 -0
- package/src/v2/product/extraction/ragDocuments/annotatedListField.d.ts +24 -0
- package/src/v2/product/extraction/ragDocuments/annotatedListField.js +67 -0
- package/src/v2/product/extraction/ragDocuments/annotatedObjectField.d.ts +43 -0
- package/src/v2/product/extraction/ragDocuments/annotatedObjectField.js +47 -0
- package/src/v2/product/extraction/ragDocuments/annotatedSimpleField.d.ts +15 -0
- package/src/v2/product/extraction/ragDocuments/annotatedSimpleField.js +13 -0
- package/src/v2/product/extraction/ragDocuments/extractionRagAnnotationResponse.d.ts +25 -0
- package/src/v2/product/extraction/ragDocuments/extractionRagAnnotationResponse.js +17 -0
- package/src/v2/product/extraction/ragDocuments/fieldFactory.d.ts +12 -0
- package/src/v2/product/extraction/ragDocuments/fieldFactory.js +23 -0
- package/src/v2/product/extraction/ragDocuments/index.d.ts +7 -0
- package/src/v2/product/extraction/ragDocuments/index.js +7 -0
- package/src/v2/product/extraction/ragDocuments/params/index.d.ts +2 -0
- package/src/v2/product/extraction/ragDocuments/params/index.js +2 -0
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentAnnotationParameters.d.ts +27 -0
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentAnnotationParameters.js +43 -0
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentUploadParameters.d.ts +7 -0
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentUploadParameters.js +9 -0
- package/src/v2/product/extraction/ragDocuments/ragAnnotation.d.ts +12 -0
- package/src/v2/product/extraction/ragDocuments/ragAnnotation.js +9 -0
- package/src/v2/product/ocr/ocr.d.ts +1 -1
- package/src/v2/product/ocr/ocr.js +1 -1
- package/src/v2/product/ocr/ocrInference.d.ts +2 -2
- package/src/v2/product/ocr/ocrInference.js +2 -2
- package/src/v2/product/ocr/ocrResponse.d.ts +1 -1
- package/src/v2/product/ocr/ocrResponse.js +1 -1
- package/src/v2/product/ocr/params/ocrParameters.d.ts +1 -1
- package/src/v2/product/ocr/params/ocrParameters.js +1 -1
- package/src/v2/product/split/params/splitParameters.d.ts +1 -1
- package/src/v2/product/split/params/splitParameters.js +1 -1
- package/src/v2/product/split/split.d.ts +1 -1
- package/src/v2/product/split/split.js +1 -1
- package/src/v2/product/split/splitInference.d.ts +1 -1
- package/src/v2/product/split/splitInference.js +1 -1
- package/src/v2/product/split/splitRange.d.ts +1 -1
- package/src/v2/product/split/splitRange.js +2 -2
- package/src/v2/product/split/splitResponse.d.ts +1 -1
- package/src/v2/product/split/splitResponse.js +1 -1
- package/src/v2/product/split/splitResult.js +1 -1
- package/src/v2/search/baseSearch.d.ts +2 -2
- package/src/v2/search/models/modelSearch.d.ts +3 -3
- package/src/v2/search/models/modelSearch.js +3 -3
- package/src/v2/search/models/modelSearchParameters.d.ts +1 -1
- package/src/v2/search/models/modelSearchParameters.js +1 -1
- package/src/v2/search/models/modelSearchResponse.d.ts +2 -2
- package/src/v2/search/models/modelSearchResponse.js +2 -2
- package/src/v2/search/ragDocuments/ragDocumentSearch.d.ts +3 -3
- package/src/v2/search/ragDocuments/ragDocumentSearch.js +3 -3
- package/src/v2/search/ragDocuments/ragDocumentSearchParameters.d.ts +1 -1
- package/src/v2/search/ragDocuments/ragDocumentSearchParameters.js +1 -1
- package/src/v2/search/ragDocuments/ragDocumentSearchResponse.d.ts +2 -2
- package/src/v2/search/ragDocuments/ragDocumentSearchResponse.js +2 -2
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
import { BaseProductParameters } from "
|
|
2
|
-
import { ResponseConstructor } from "
|
|
1
|
+
import { BaseProductParameters } from "../index.js";
|
|
2
|
+
import { ResponseConstructor, AnnotationResponseConstructor } from "../parsing/index.js";
|
|
3
|
+
import { BaseAnnotationParameters } from "../clientOptions/index.js";
|
|
4
|
+
import { BaseRagDocumentUploadParameters } from "../clientOptions/index.js";
|
|
3
5
|
/**
|
|
4
6
|
* Base class for all V2 product definitions.
|
|
5
7
|
*
|
|
6
8
|
* Child classes are passed to the Client when making requests.
|
|
7
9
|
*/
|
|
8
10
|
export declare abstract class BaseProduct {
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* API slug for this product.
|
|
13
|
+
*/
|
|
14
|
+
static get slug(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Parameter class accepted by this product.
|
|
17
|
+
*/
|
|
10
18
|
static get parametersClass(): new (...args: any[]) => BaseProductParameters;
|
|
11
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Response class returned by this product.
|
|
21
|
+
*/
|
|
12
22
|
static get responseClass(): ResponseConstructor<any>;
|
|
13
|
-
/**
|
|
14
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Annotation Response class returned by this product.
|
|
25
|
+
*/
|
|
26
|
+
static get annotationResponseClass(): AnnotationResponseConstructor<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Annotation Parameters class for this product.
|
|
29
|
+
*/
|
|
30
|
+
static get annotationParametersClass(): new (...args: any[]) => BaseAnnotationParameters;
|
|
31
|
+
/**
|
|
32
|
+
* Document Upload class for this product.
|
|
33
|
+
*/
|
|
34
|
+
static get ragDocumentUploadClass(): new (...args: any[]) => BaseRagDocumentUploadParameters;
|
|
15
35
|
}
|
|
@@ -4,16 +4,40 @@
|
|
|
4
4
|
* Child classes are passed to the Client when making requests.
|
|
5
5
|
*/
|
|
6
6
|
export class BaseProduct {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* API slug for this product.
|
|
9
|
+
*/
|
|
10
|
+
static get slug() {
|
|
11
|
+
throw new Error("Must define static slug property");
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Parameter class accepted by this product.
|
|
15
|
+
*/
|
|
8
16
|
static get parametersClass() {
|
|
9
|
-
throw new Error("Must define static
|
|
17
|
+
throw new Error("Must define static parametersClass property");
|
|
10
18
|
}
|
|
11
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Response class returned by this product.
|
|
21
|
+
*/
|
|
12
22
|
static get responseClass() {
|
|
13
|
-
throw new Error("Must define static
|
|
23
|
+
throw new Error("Must define static responseClass property");
|
|
14
24
|
}
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Annotation Response class returned by this product.
|
|
27
|
+
*/
|
|
28
|
+
static get annotationResponseClass() {
|
|
29
|
+
throw new Error("Must define static annotationResponseClass property");
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Annotation Parameters class for this product.
|
|
33
|
+
*/
|
|
34
|
+
static get annotationParametersClass() {
|
|
35
|
+
throw new Error("Must define static annotationParametersClass property");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Document Upload class for this product.
|
|
39
|
+
*/
|
|
40
|
+
static get ragDocumentUploadClass() {
|
|
41
|
+
throw new Error("Must define static ragDocumentUploadClass property");
|
|
18
42
|
}
|
|
19
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClassificationResponse } from "./classificationResponse.js";
|
|
2
2
|
import { ClassificationParameters } from "./params/index.js";
|
|
3
|
-
import { BaseProduct } from "
|
|
3
|
+
import { BaseProduct } from "../baseProduct.js";
|
|
4
4
|
/**
|
|
5
5
|
* Automatically sort any image or scanned document into categories.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClassificationResponse } from "./classificationResponse.js";
|
|
2
2
|
import { ClassificationParameters } from "./params/index.js";
|
|
3
|
-
import { BaseProduct } from "
|
|
3
|
+
import { BaseProduct } from "../baseProduct.js";
|
|
4
4
|
/**
|
|
5
5
|
* Automatically sort any image or scanned document into categories.
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/index.js";
|
|
2
|
-
import { BaseInference } from "
|
|
2
|
+
import { BaseInference } from "../../parsing/inference/baseInference.js";
|
|
3
3
|
import { ClassificationResult } from "./classificationResult.js";
|
|
4
4
|
/** Inference payload for classification responses. */
|
|
5
5
|
export declare class ClassificationInference extends BaseInference {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseInference } from "
|
|
1
|
+
import { BaseInference } from "../../parsing/inference/baseInference.js";
|
|
2
2
|
import { ClassificationResult } from "./classificationResult.js";
|
|
3
3
|
/** Inference payload for classification responses. */
|
|
4
4
|
export class ClassificationInference extends BaseInference {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/stringDict.js";
|
|
2
2
|
import { ClassificationInference } from "./classificationInference.js";
|
|
3
|
-
import { BaseResponse } from "
|
|
3
|
+
import { BaseResponse } from "../../parsing/index.js";
|
|
4
4
|
/** Response wrapper for classification product calls. */
|
|
5
5
|
export declare class ClassificationResponse extends BaseResponse {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClassificationInference } from "./classificationInference.js";
|
|
2
|
-
import { BaseResponse } from "
|
|
2
|
+
import { BaseResponse } from "../../parsing/index.js";
|
|
3
3
|
/** Response wrapper for classification product calls. */
|
|
4
4
|
export class ClassificationResponse extends BaseResponse {
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseProductParameters, BaseProductParametersConstructor } from "
|
|
1
|
+
import { BaseProductParameters, BaseProductParametersConstructor } from "../../../clientOptions/baseProductParameters.js";
|
|
2
2
|
/**
|
|
3
3
|
* Parameters for sending a file to a Classification product.
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseProductParameters } from "
|
|
1
|
+
import { BaseProductParameters } from "../../../clientOptions/baseProductParameters.js";
|
|
2
2
|
import { logger } from "../../../../logger.js";
|
|
3
3
|
/**
|
|
4
4
|
* Parameters for sending a file to a Classification product.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CropResponse } from "./cropResponse.js";
|
|
2
2
|
import { CropParameters } from "./params/index.js";
|
|
3
|
-
import { BaseProduct } from "
|
|
3
|
+
import { BaseProduct } from "../baseProduct.js";
|
|
4
4
|
/**
|
|
5
5
|
* Identify the borders of documents on each page, matching each one to a category.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CropResponse } from "./cropResponse.js";
|
|
2
2
|
import { CropParameters } from "./params/index.js";
|
|
3
|
-
import { BaseProduct } from "
|
|
3
|
+
import { BaseProduct } from "../baseProduct.js";
|
|
4
4
|
/**
|
|
5
5
|
* Identify the borders of documents on each page, matching each one to a category.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/index.js";
|
|
2
|
-
import { BaseInference } from "
|
|
3
|
-
import { CropResult } from "
|
|
2
|
+
import { BaseInference } from "../../parsing/inference/baseInference.js";
|
|
3
|
+
import { CropResult } from "./cropResult.js";
|
|
4
4
|
/** Inference payload for crop responses. */
|
|
5
5
|
export declare class CropInference extends BaseInference {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseInference } from "
|
|
2
|
-
import { CropResult } from "
|
|
1
|
+
import { BaseInference } from "../../parsing/inference/baseInference.js";
|
|
2
|
+
import { CropResult } from "./cropResult.js";
|
|
3
3
|
/** Inference payload for crop responses. */
|
|
4
4
|
export class CropInference extends BaseInference {
|
|
5
5
|
constructor(serverResponse) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FieldLocation } from "
|
|
1
|
+
import { FieldLocation } from "../../parsing/inference/field/index.js";
|
|
2
2
|
import { StringDict } from "../../../parsing/index.js";
|
|
3
3
|
import { LocalInputSource } from "../../../input/index.js";
|
|
4
4
|
import { ExtractedImage } from "../../../image/index.js";
|
|
5
|
-
import { ExtractionResponse } from "
|
|
5
|
+
import { ExtractionResponse } from "../index.js";
|
|
6
6
|
/** Single crop detection returned by the crop product. */
|
|
7
7
|
export declare class CropItem {
|
|
8
8
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FieldLocation } from "
|
|
2
|
-
import { extractSingleCrop } from "
|
|
3
|
-
import { ExtractionResponse } from "
|
|
1
|
+
import { FieldLocation } from "../../parsing/inference/field/index.js";
|
|
2
|
+
import { extractSingleCrop } from "../../fileOperations/crop.js";
|
|
3
|
+
import { ExtractionResponse } from "../index.js";
|
|
4
4
|
/** Single crop detection returned by the crop product. */
|
|
5
5
|
export class CropItem {
|
|
6
6
|
constructor(serverResponse) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/stringDict.js";
|
|
2
|
-
import { BaseResponse } from "
|
|
2
|
+
import { BaseResponse } from "../../parsing/index.js";
|
|
3
3
|
import { CropInference } from "./cropInference.js";
|
|
4
4
|
/** Response wrapper for crop product calls. */
|
|
5
5
|
export declare class CropResponse extends BaseResponse {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseResponse } from "
|
|
1
|
+
import { BaseResponse } from "../../parsing/index.js";
|
|
2
2
|
import { CropInference } from "./cropInference.js";
|
|
3
3
|
/** Response wrapper for crop product calls. */
|
|
4
4
|
export class CropResponse extends BaseResponse {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/stringDict.js";
|
|
2
|
-
import { CropItem } from "
|
|
2
|
+
import { CropItem } from "./cropItem.js";
|
|
3
3
|
import { LocalInputSource } from "../../../input/index.js";
|
|
4
4
|
import { ExtractedImages } from "../../../image/extractedImages.js";
|
|
5
5
|
/** Crop section of a crop inference result. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CropItem } from "
|
|
2
|
-
import { extractMultipleCrops } from "
|
|
1
|
+
import { CropItem } from "./cropItem.js";
|
|
2
|
+
import { extractMultipleCrops } from "../../fileOperations/crop.js";
|
|
3
3
|
/** Crop section of a crop inference result. */
|
|
4
4
|
export class CropResult {
|
|
5
5
|
constructor(serverResponse) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseProductParameters, BaseProductParametersConstructor } from "
|
|
1
|
+
import { BaseProductParameters, BaseProductParametersConstructor } from "../../../clientOptions/baseProductParameters.js";
|
|
2
2
|
/**
|
|
3
3
|
* Parameters for sending a file to a Crop product.
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseProductParameters } from "
|
|
1
|
+
import { BaseProductParameters } from "../../../clientOptions/baseProductParameters.js";
|
|
2
2
|
import { logger } from "../../../../logger.js";
|
|
3
3
|
/**
|
|
4
4
|
* Parameters for sending a file to a Crop product.
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { ExtractionResponse } from "./extractionResponse.js";
|
|
2
2
|
import { ExtractionParameters } from "./params/index.js";
|
|
3
|
-
import { BaseProduct } from "
|
|
3
|
+
import { BaseProduct } from "../baseProduct.js";
|
|
4
|
+
import { ExtractionRagAnnotationResponse } from "./ragDocuments/index.js";
|
|
5
|
+
import { RagDocumentAnnotationParameters, RagDocumentUploadParameters } from "./ragDocuments/params/index.js";
|
|
4
6
|
/**
|
|
5
7
|
* Automatically extract structured data from any image or scanned document.
|
|
6
8
|
*/
|
|
7
9
|
export declare class Extraction extends BaseProduct {
|
|
10
|
+
/** @inheritDoc */
|
|
11
|
+
static get slug(): string;
|
|
8
12
|
/** @inheritDoc */
|
|
9
13
|
static get parametersClass(): typeof ExtractionParameters;
|
|
10
14
|
/** @inheritDoc */
|
|
11
15
|
static get responseClass(): typeof ExtractionResponse;
|
|
12
16
|
/** @inheritDoc */
|
|
13
|
-
static get
|
|
17
|
+
static get annotationResponseClass(): typeof ExtractionRagAnnotationResponse;
|
|
18
|
+
/** @inheritDoc */
|
|
19
|
+
static get annotationParametersClass(): typeof RagDocumentAnnotationParameters;
|
|
20
|
+
/** @inheritDoc */
|
|
21
|
+
static get ragDocumentUploadClass(): typeof RagDocumentUploadParameters;
|
|
14
22
|
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { ExtractionResponse } from "./extractionResponse.js";
|
|
2
2
|
import { ExtractionParameters } from "./params/index.js";
|
|
3
|
-
import { BaseProduct } from "
|
|
3
|
+
import { BaseProduct } from "../baseProduct.js";
|
|
4
|
+
import { ExtractionRagAnnotationResponse } from "./ragDocuments/index.js";
|
|
5
|
+
import { RagDocumentAnnotationParameters, RagDocumentUploadParameters } from "./ragDocuments/params/index.js";
|
|
4
6
|
/**
|
|
5
7
|
* Automatically extract structured data from any image or scanned document.
|
|
6
8
|
*/
|
|
7
9
|
export class Extraction extends BaseProduct {
|
|
10
|
+
/** @inheritDoc */
|
|
11
|
+
static get slug() {
|
|
12
|
+
return "extraction";
|
|
13
|
+
}
|
|
8
14
|
/** @inheritDoc */
|
|
9
15
|
static get parametersClass() {
|
|
10
16
|
return ExtractionParameters;
|
|
@@ -14,7 +20,15 @@ export class Extraction extends BaseProduct {
|
|
|
14
20
|
return ExtractionResponse;
|
|
15
21
|
}
|
|
16
22
|
/** @inheritDoc */
|
|
17
|
-
static get
|
|
18
|
-
return
|
|
23
|
+
static get annotationResponseClass() {
|
|
24
|
+
return ExtractionRagAnnotationResponse;
|
|
25
|
+
}
|
|
26
|
+
/** @inheritDoc */
|
|
27
|
+
static get annotationParametersClass() {
|
|
28
|
+
return RagDocumentAnnotationParameters;
|
|
29
|
+
}
|
|
30
|
+
/** @inheritDoc */
|
|
31
|
+
static get ragDocumentUploadClass() {
|
|
32
|
+
return RagDocumentUploadParameters;
|
|
19
33
|
}
|
|
20
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/stringDict.js";
|
|
2
2
|
import { ExtractionResult } from "./extractionResult.js";
|
|
3
3
|
import { ExtractionActiveOptions } from "./extractionActiveOptions.js";
|
|
4
|
-
import { BaseInference } from "
|
|
4
|
+
import { BaseInference } from "../../parsing/inference/baseInference.js";
|
|
5
5
|
/** Inference payload for extraction responses. */
|
|
6
6
|
export declare class ExtractionInference extends BaseInference {
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractionResult } from "./extractionResult.js";
|
|
2
2
|
import { ExtractionActiveOptions } from "./extractionActiveOptions.js";
|
|
3
|
-
import { BaseInference } from "
|
|
3
|
+
import { BaseInference } from "../../parsing/inference/baseInference.js";
|
|
4
4
|
/** Inference payload for extraction responses. */
|
|
5
5
|
export class ExtractionInference extends BaseInference {
|
|
6
6
|
constructor(serverResponse) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractionInference } from "./extractionInference.js";
|
|
2
2
|
import { StringDict } from "../../../parsing/stringDict.js";
|
|
3
|
-
import { BaseResponse } from "
|
|
3
|
+
import { BaseResponse } from "../../parsing/index.js";
|
|
4
4
|
/** Response wrapper for extraction product calls. */
|
|
5
5
|
export declare class ExtractionResponse extends BaseResponse {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtractionInference } from "./extractionInference.js";
|
|
2
|
-
import { BaseResponse } from "
|
|
2
|
+
import { BaseResponse } from "../../parsing/index.js";
|
|
3
3
|
/** Response wrapper for extraction product calls. */
|
|
4
4
|
export class ExtractionResponse extends BaseResponse {
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InferenceFields } from "
|
|
1
|
+
import { InferenceFields } from "../../parsing/inference/field/index.js";
|
|
2
2
|
import { StringDict } from "../../../parsing/stringDict.js";
|
|
3
|
-
import { RawText } from "
|
|
4
|
-
import { RagMetadata } from "
|
|
3
|
+
import { RawText } from "../../parsing/inference/field/rawText.js";
|
|
4
|
+
import { RagMetadata } from "../../parsing/inference/field/ragMetadata.js";
|
|
5
5
|
/** Extraction result payload containing fields and optional extras. */
|
|
6
6
|
export declare class ExtractionResult {
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InferenceFields } from "
|
|
2
|
-
import { RawText } from "
|
|
3
|
-
import { RagMetadata } from "
|
|
1
|
+
import { InferenceFields } from "../../parsing/inference/field/index.js";
|
|
2
|
+
import { RawText } from "../../parsing/inference/field/rawText.js";
|
|
3
|
+
import { RagMetadata } from "../../parsing/inference/field/ragMetadata.js";
|
|
4
4
|
/** Extraction result payload containing fields and optional extras. */
|
|
5
5
|
export class ExtractionResult {
|
|
6
6
|
constructor(serverResponse) {
|
|
@@ -6,3 +6,4 @@ export { ExtractionActiveOptions } from "./extractionActiveOptions.js";
|
|
|
6
6
|
export { ExtractionResponse } from "./extractionResponse.js";
|
|
7
7
|
export { ExtractionResult } from "./extractionResult.js";
|
|
8
8
|
export { DataSchemaActiveOption } from "./dataSchemaActiveOption.js";
|
|
9
|
+
export * as ragDocuments from "./ragDocuments/index.js";
|
|
@@ -6,3 +6,4 @@ export { ExtractionActiveOptions } from "./extractionActiveOptions.js";
|
|
|
6
6
|
export { ExtractionResponse } from "./extractionResponse.js";
|
|
7
7
|
export { ExtractionResult } from "./extractionResult.js";
|
|
8
8
|
export { DataSchemaActiveOption } from "./dataSchemaActiveOption.js";
|
|
9
|
+
export * as ragDocuments from "./ragDocuments/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StringDict } from "../../../../parsing/stringDict.js";
|
|
2
2
|
import { DataSchema } from "./dataSchema.js";
|
|
3
|
-
import { BaseProductParameters, BaseProductParametersConstructor } from "
|
|
3
|
+
import { BaseProductParameters, BaseProductParametersConstructor } from "../../../clientOptions/baseProductParameters.js";
|
|
4
4
|
/**
|
|
5
5
|
* Parameters for sending a file to an Extraction product.
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataSchema } from "./dataSchema.js";
|
|
2
|
-
import { BaseProductParameters } from "
|
|
2
|
+
import { BaseProductParameters } from "../../../clientOptions/baseProductParameters.js";
|
|
3
3
|
import { logger } from "../../../../logger.js";
|
|
4
4
|
/**
|
|
5
5
|
* Parameters for sending a file to an Extraction product.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for annotated fields.
|
|
3
|
+
*/
|
|
4
|
+
export declare abstract class AnnotatedBaseField {
|
|
5
|
+
/**
|
|
6
|
+
* When true, use the RAG information for the final result. When false, use the Data Schema information.
|
|
7
|
+
*/
|
|
8
|
+
selected: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Guidelines or instructions for processing this field.
|
|
11
|
+
*/
|
|
12
|
+
guidelines: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Default constructor.
|
|
15
|
+
* @param selected When true, use the RAG information for the final result.
|
|
16
|
+
* When false, use the Data Schema information.
|
|
17
|
+
* @param guidelines Guidelines or instructions for processing this field.
|
|
18
|
+
*/
|
|
19
|
+
protected constructor(selected: boolean, guidelines?: string | null);
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for annotated fields.
|
|
3
|
+
*/
|
|
4
|
+
export class AnnotatedBaseField {
|
|
5
|
+
/**
|
|
6
|
+
* Default constructor.
|
|
7
|
+
* @param selected When true, use the RAG information for the final result.
|
|
8
|
+
* When false, use the Data Schema information.
|
|
9
|
+
* @param guidelines Guidelines or instructions for processing this field.
|
|
10
|
+
*/
|
|
11
|
+
constructor(selected, guidelines = null) {
|
|
12
|
+
this.selected = selected;
|
|
13
|
+
this.guidelines = guidelines;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AnnotatedSimpleField } from "./annotatedSimpleField.js";
|
|
2
|
+
import { AnnotatedObjectField } from "./annotatedObjectField.js";
|
|
3
|
+
import { AnnotatedListField } from "./annotatedListField.js";
|
|
4
|
+
import { StringDict } from "../../../../parsing/index.js";
|
|
5
|
+
/**
|
|
6
|
+
* A dictionary of field names and their corresponding configured field types.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AnnotatedFields extends Map<string, AnnotatedSimpleField | AnnotatedObjectField | AnnotatedListField> {
|
|
9
|
+
constructor(serverResponse: StringDict);
|
|
10
|
+
/**
|
|
11
|
+
* Returns a field as an `AnnotatedSimpleField`, or throws if the type mismatches.
|
|
12
|
+
*/
|
|
13
|
+
getSimpleField(fieldName: string): AnnotatedSimpleField;
|
|
14
|
+
/**
|
|
15
|
+
* Returns a field as an `AnnotatedObjectField`, or throws if the type mismatches.
|
|
16
|
+
*/
|
|
17
|
+
getObjectField(fieldName: string): AnnotatedObjectField;
|
|
18
|
+
/**
|
|
19
|
+
* Returns a field as an `AnnotatedListField`, or throws if the type mismatches.
|
|
20
|
+
*/
|
|
21
|
+
getListField(fieldName: string): AnnotatedListField;
|
|
22
|
+
/**
|
|
23
|
+
* Serializes the fields to API format.
|
|
24
|
+
* Needed because a `Map` is otherwise serialized as an empty object by `JSON.stringify`.
|
|
25
|
+
*/
|
|
26
|
+
toJSON(): Record<string, AnnotatedSimpleField | AnnotatedObjectField | AnnotatedListField>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createAnnotatedField } from "./fieldFactory.js";
|
|
2
|
+
/**
|
|
3
|
+
* A dictionary of field names and their corresponding configured field types.
|
|
4
|
+
*/
|
|
5
|
+
export class AnnotatedFields extends Map {
|
|
6
|
+
constructor(serverResponse) {
|
|
7
|
+
super(Object.entries(serverResponse).map(([key, value]) => {
|
|
8
|
+
return [key, createAnnotatedField(value)];
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Returns a field as an `AnnotatedSimpleField`, or throws if the type mismatches.
|
|
13
|
+
*/
|
|
14
|
+
getSimpleField(fieldName) {
|
|
15
|
+
const field = this.get(fieldName);
|
|
16
|
+
if (field === undefined) {
|
|
17
|
+
throw new Error(`The field '${fieldName}' was not found.`);
|
|
18
|
+
}
|
|
19
|
+
if (field.constructor.name !== "AnnotatedSimpleField") {
|
|
20
|
+
throw new Error(`The field '${fieldName}' is not a AnnotatedSimpleField.`);
|
|
21
|
+
}
|
|
22
|
+
return field;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns a field as an `AnnotatedObjectField`, or throws if the type mismatches.
|
|
26
|
+
*/
|
|
27
|
+
getObjectField(fieldName) {
|
|
28
|
+
const field = this.get(fieldName);
|
|
29
|
+
if (field === undefined) {
|
|
30
|
+
throw new Error(`The field '${fieldName}' was not found.`);
|
|
31
|
+
}
|
|
32
|
+
if (field.constructor.name !== "AnnotatedObjectField") {
|
|
33
|
+
throw new Error(`The field '${fieldName}' is not an ObjectField.`);
|
|
34
|
+
}
|
|
35
|
+
return field;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Returns a field as an `AnnotatedListField`, or throws if the type mismatches.
|
|
39
|
+
*/
|
|
40
|
+
getListField(fieldName) {
|
|
41
|
+
const field = this.get(fieldName);
|
|
42
|
+
if (field === undefined) {
|
|
43
|
+
throw new Error(`The field '${fieldName}' was not found.`);
|
|
44
|
+
}
|
|
45
|
+
if (field.constructor.name !== "AnnotatedListField") {
|
|
46
|
+
throw new Error(`The field '${fieldName}' is not a ListField.`);
|
|
47
|
+
}
|
|
48
|
+
return field;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Serializes the fields to API format.
|
|
52
|
+
* Needed because a `Map` is otherwise serialized as an empty object by `JSON.stringify`.
|
|
53
|
+
*/
|
|
54
|
+
toJSON() {
|
|
55
|
+
return Object.fromEntries(this);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StringDict } from "../../../../parsing/stringDict.js";
|
|
2
|
+
import { AnnotatedBaseField } from "./annotatedBaseField.js";
|
|
3
|
+
import { AnnotatedObjectField } from "./annotatedObjectField.js";
|
|
4
|
+
import { AnnotatedSimpleField } from "./annotatedSimpleField.js";
|
|
5
|
+
/**
|
|
6
|
+
* Field having a list of fields.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AnnotatedListField extends AnnotatedBaseField {
|
|
9
|
+
/**
|
|
10
|
+
* Items contained in the list.
|
|
11
|
+
*/
|
|
12
|
+
items: Array<AnnotatedListField | AnnotatedObjectField | AnnotatedSimpleField>;
|
|
13
|
+
constructor(serverResponse: StringDict);
|
|
14
|
+
/**
|
|
15
|
+
* AnnotatedSimpleField items from the list.
|
|
16
|
+
*/
|
|
17
|
+
get simpleItems(): Array<AnnotatedSimpleField>;
|
|
18
|
+
/**
|
|
19
|
+
* AnnotatedObjectField items from the list.
|
|
20
|
+
*/
|
|
21
|
+
get objectItems(): Array<AnnotatedObjectField>;
|
|
22
|
+
/** Returns a readable representation of list items. */
|
|
23
|
+
toString(): string;
|
|
24
|
+
}
|