@lucidtech/las-sdk-core
Advanced tools
Comparing version 5.0.2 to 5.1.0
/// <reference types="node" /> | ||
import { AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
export declare type ContentType = 'application/pdf' | 'image/jpeg' | 'image/png' | 'image/tiff'; | ||
export interface CreatePredictionsOptions { | ||
maxPages?: number; | ||
autoRotate?: boolean; | ||
imageQuality?: 'LOW' | 'HIGH'; | ||
} | ||
export interface PaginationOptions { | ||
maxResults?: number; | ||
nextToken?: string; | ||
} | ||
export declare type ListTransitionOptions = PaginationOptions & { | ||
transitionType?: string | Array<string>; | ||
export declare type GroundTruth = { | ||
/** maxLength: 36, minLength: 1, pattern: ^[0-9A-Za-z_]+$ */ | ||
label: string; | ||
/** maxLength: 64, minLength: 1 */ | ||
value: string | boolean | null; | ||
}; | ||
export declare type LasDocument = { | ||
batchId?: string; | ||
consentId?: string; | ||
content: string; | ||
contentType: ContentType; | ||
datasetId?: string; | ||
documentId: string; | ||
groundTruth?: Array<GroundTruth>; | ||
retentionInDays: number; | ||
createdTime: string | null; | ||
updatedTime: string | null; | ||
createdBy: string | null; | ||
updatedBy: string | null; | ||
}; | ||
export declare type LasDocumentWithoutContent = Omit<LasDocument, 'content'>; | ||
export interface CreateDocumentOptions { | ||
@@ -21,6 +30,13 @@ batchId?: string; | ||
groundTruth?: Array<GroundTruth>; | ||
retentionInDays?: number; | ||
} | ||
export interface UpdateDocumentOptions { | ||
groundTruth?: Array<GroundTruth>; | ||
retentionInDays?: number; | ||
} | ||
export declare type DeleteDocumentOptions = PaginationOptions & { | ||
batchId?: string | Array<string>; | ||
consentId?: string | Array<string>; | ||
datasetId?: string | Array<string>; | ||
}; | ||
export declare type ListDocumentsOptions = PaginationOptions & { | ||
@@ -31,2 +47,19 @@ batchId?: string | Array<string>; | ||
}; | ||
export declare type LasDocumentList = { | ||
documents: Array<LasDocumentWithoutContent>; | ||
batchId?: string; | ||
nextToken: string | null; | ||
}; | ||
export interface CreatePredictionsOptions { | ||
maxPages?: number; | ||
autoRotate?: boolean; | ||
imageQuality?: 'LOW' | 'HIGH'; | ||
} | ||
export interface PaginationOptions { | ||
maxResults?: number; | ||
nextToken?: string; | ||
} | ||
export declare type ListTransitionOptions = PaginationOptions & { | ||
transitionType?: string | Array<string>; | ||
}; | ||
export declare type TransitionExecutionStatus = 'succeeded' | 'failed' | 'retry' | 'running' | 'rejected'; | ||
@@ -69,7 +102,2 @@ export declare type TransitionExecution = { | ||
} | ||
export declare type LasDocumentList = { | ||
documents: Array<LasDocumentWithoutContent>; | ||
batchId?: string; | ||
nextToken: string | null; | ||
}; | ||
export declare type CreateTransitionDockerParams = { | ||
@@ -177,13 +205,2 @@ environment?: object; | ||
}; | ||
export declare type GroundTruth = { | ||
/** maxLength: 36, minLength: 1, pattern: ^[0-9A-Za-z_]+$ */ | ||
label: string; | ||
/** maxLength: 64, minLength: 1 */ | ||
value: string | boolean | null; | ||
}; | ||
export declare type DeleteDocumentOptions = PaginationOptions & { | ||
batchId?: string | Array<string>; | ||
consentId?: string | Array<string>; | ||
datasetId?: string | Array<string>; | ||
}; | ||
export declare type PostPredictions = CreatePredictionsOptions & { | ||
@@ -239,2 +256,3 @@ documentId: string; | ||
description: string; | ||
groundTruthSummary: Record<string, number>; | ||
name: string; | ||
@@ -323,12 +341,2 @@ numberOfDocuments: number; | ||
} | ||
export declare type LasDocumentWithoutContent = Omit<LasDocument, 'content'>; | ||
export declare type LasDocument = { | ||
batchId?: string; | ||
consentId?: string; | ||
content: string; | ||
contentType: ContentType; | ||
datasetId?: string; | ||
documentId: string; | ||
groundTruth?: Array<GroundTruth>; | ||
}; | ||
export declare type UpdateOrganizationOptions = { | ||
@@ -423,3 +431,3 @@ description?: string; | ||
maxLength: number; | ||
type: 'all' | 'alphanum' | 'alphanumext' | 'amount' | 'date' | 'letter' | 'number' | 'phone'; | ||
type: 'all' | 'alphanum' | 'alphanumext' | 'amount' | 'date' | 'letter' | 'number' | 'phone' | 'string' | 'digits'; | ||
}; | ||
@@ -426,0 +434,0 @@ export declare type FieldConfig = Record<string, Field>; |
{ | ||
"name": "@lucidtech/las-sdk-core", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"author": "Lucidtech AS <hello@lucidtech.ai>", | ||
@@ -33,3 +33,3 @@ "maintainers": [ | ||
}, | ||
"gitHead": "d74f4d02d1979e6335ff46320ebf7690adc048d1" | ||
"gitHead": "3ace809e7a6337026a262d78b4e5d3f386d3d63e" | ||
} |
@@ -179,2 +179,7 @@ /** | ||
await expect(getDocumentPromise).resolves.toHaveProperty('contentType'); | ||
await expect(getDocumentPromise).resolves.toHaveProperty('createdTime'); | ||
await expect(getDocumentPromise).resolves.toHaveProperty('updatedTime'); | ||
await expect(getDocumentPromise).resolves.toHaveProperty('createdBy'); | ||
await expect(getDocumentPromise).resolves.toHaveProperty('updatedBy'); | ||
await expect(getDocumentPromise).resolves.toHaveProperty('retentionInDays'); | ||
}); | ||
@@ -187,3 +192,3 @@ }); | ||
const groundTruth = [{ label: 'test', value: 'test' }]; | ||
const updateDocumentPromise = client.updateDocument(documentId, { groundTruth }); | ||
const updateDocumentPromise = client.updateDocument(documentId, { groundTruth, retentionInDays: 500 }); | ||
await expect(updateDocumentPromise).resolves.toHaveProperty('consentId'); | ||
@@ -706,2 +711,3 @@ await expect(updateDocumentPromise).resolves.toHaveProperty('documentId'); | ||
await expect(getDatasetPromise).resolves.toHaveProperty('version'); | ||
await expect(getDatasetPromise).resolves.toHaveProperty('groundTruthSummary'); | ||
}); | ||
@@ -708,0 +714,0 @@ }); |
@@ -7,16 +7,25 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
export interface CreatePredictionsOptions { | ||
maxPages?: number; | ||
autoRotate?: boolean; | ||
imageQuality?: 'LOW' | 'HIGH'; | ||
} | ||
export type GroundTruth = { | ||
/** maxLength: 36, minLength: 1, pattern: ^[0-9A-Za-z_]+$ */ | ||
label: string; | ||
/** maxLength: 64, minLength: 1 */ | ||
value: string | boolean | null; | ||
}; | ||
export interface PaginationOptions { | ||
maxResults?: number; | ||
nextToken?: string; | ||
} | ||
export type LasDocument = { | ||
batchId?: string; | ||
consentId?: string; | ||
content: string; | ||
contentType: ContentType; | ||
datasetId?: string; | ||
documentId: string; | ||
groundTruth?: Array<GroundTruth>; | ||
retentionInDays: number; | ||
createdTime: string | null; | ||
updatedTime: string | null; | ||
createdBy: string | null; | ||
updatedBy: string | null; | ||
}; | ||
export type ListTransitionOptions = PaginationOptions & { | ||
transitionType?: string | Array<string>; | ||
} | ||
export type LasDocumentWithoutContent = Omit<LasDocument, 'content'>; | ||
@@ -28,2 +37,3 @@ export interface CreateDocumentOptions { | ||
groundTruth?: Array<GroundTruth>; | ||
retentionInDays?: number; | ||
} | ||
@@ -33,4 +43,11 @@ | ||
groundTruth?: Array<GroundTruth>; | ||
retentionInDays?: number; | ||
} | ||
export type DeleteDocumentOptions = PaginationOptions & { | ||
batchId?: string | Array<string>; | ||
consentId?: string | Array<string>; | ||
datasetId?: string | Array<string>; | ||
} | ||
export type ListDocumentsOptions = PaginationOptions & { | ||
@@ -42,2 +59,23 @@ batchId?: string | Array<string>; | ||
export type LasDocumentList = { | ||
documents: Array<LasDocumentWithoutContent>; | ||
batchId?: string; | ||
nextToken: string | null; | ||
}; | ||
export interface CreatePredictionsOptions { | ||
maxPages?: number; | ||
autoRotate?: boolean; | ||
imageQuality?: 'LOW' | 'HIGH'; | ||
} | ||
export interface PaginationOptions { | ||
maxResults?: number; | ||
nextToken?: string; | ||
} | ||
export type ListTransitionOptions = PaginationOptions & { | ||
transitionType?: string | Array<string>; | ||
} | ||
export type TransitionExecutionStatus = 'succeeded' | 'failed' | 'retry' | 'running' | 'rejected'; | ||
@@ -84,8 +122,2 @@ | ||
export type LasDocumentList = { | ||
documents: Array<LasDocumentWithoutContent>; | ||
batchId?: string; | ||
nextToken: string | null; | ||
}; | ||
export type CreateTransitionDockerParams = { | ||
@@ -212,15 +244,2 @@ environment?: object; | ||
export type GroundTruth = { | ||
/** maxLength: 36, minLength: 1, pattern: ^[0-9A-Za-z_]+$ */ | ||
label: string; | ||
/** maxLength: 64, minLength: 1 */ | ||
value: string | boolean | null; | ||
}; | ||
export type DeleteDocumentOptions = PaginationOptions & { | ||
batchId?: string | Array<string>; | ||
consentId?: string | Array<string>; | ||
datasetId?: string | Array<string>; | ||
} | ||
export type PostPredictions = CreatePredictionsOptions & { | ||
@@ -286,2 +305,3 @@ documentId: string; | ||
description: string; | ||
groundTruthSummary: Record<string, number>; | ||
name: string; | ||
@@ -390,14 +410,2 @@ numberOfDocuments: number; | ||
export type LasDocumentWithoutContent = Omit<LasDocument, 'content'>; | ||
export type LasDocument = { | ||
batchId?: string; | ||
consentId?: string; | ||
content: string; | ||
contentType: ContentType; | ||
datasetId?: string; | ||
documentId: string; | ||
groundTruth?: Array<GroundTruth>; | ||
}; | ||
export type UpdateOrganizationOptions = { | ||
@@ -503,3 +511,3 @@ description?: string; | ||
maxLength: number; | ||
type: 'all' | 'alphanum' | 'alphanumext' | 'amount' | 'date' | 'letter' | 'number' | 'phone'; | ||
type: 'all' | 'alphanum' | 'alphanumext' | 'amount' | 'date' | 'letter' | 'number' | 'phone' | 'string' | 'digits'; | ||
} | ||
@@ -506,0 +514,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
233899
5215