Skip to main content

latest

JavaScript SDK for Lucidtech AI Services API

Installation

Browser version

$ yarn add @lucidtech/las-sdk-browser
$ npm install @lucidtech/las-sdk-browser

Node version

$ yarn add @lucidtech/las-sdk-node
$ npm install @lucidtech/las-sdk-node

Usage

import { Client } from '@lucidtech/las-sdk-core';
import { ClientCredentials } from '@lucidtech/las-sdk-node';
import { readFile } from 'fs/promises'

const fileBuffer = await readFile('...path/file.jpg')

const credentials = new ClientCredentials('<apiEndpoint>', '<clientId>', '<clientSecret>', '<authEndpoint>');
const client = new Client(credentials);

const documentResponse = await client.createDocument(fileBuffer, 'image/jpeg');

Contributing

Install dependencies

$ npm install && npm run upgrade-lucidtech

Build

$ npm run build

Run tests

$ npm run test test

Class: Client

A high-level http client for communicating with the Lucidtech REST API

Constructors

constructor

new Client(credentials)

Parameters

NameType
credentialsCredentials

Properties

credentials

credentials: Credentials

Methods

createAppClient

createAppClient(options): Promise<AppClient>

Creates an app client, calls the POST /appClients endpoint.

Parameters

NameType
optionsCreateAppClientOptions

Returns

Promise<AppClient>

AppClient response from REST API


createAsset

createAsset(content): Promise<Asset>

Creates an asset, calls the POST /assets endpoint.

Parameters

NameTypeDescription
contentstringContent to POST (base64-encoded string | Buffer)

Returns

Promise<Asset>

Asset response from REST API


createBatch

createBatch(options): Promise<Batch>

deprecated Use the new Client.createDataset method instead. Creates a batch, calls the POST /batches endpoint.

Parameters

NameType
optionsCreateBatchOptions

Returns

Promise<Batch>

Batch response from REST API


createDataBundle

createDataBundle(modelId, datasetIds, options): Promise<DataBundle>

Creates a dataBundle, calls the POST /models/{modelId}/dataBundles endpoint.

Parameters

NameTypeDescription
modelIdstringId of the model to create dataBundle for
datasetIdsstring[]Ids of the datasets to create dataBundle with
optionsCreateDataBundleOptions-

Returns

Promise<DataBundle>

DataBundle response from REST API


createDataset

createDataset(options): Promise<Dataset>

Creates a dataset, calls the POST /datasets endpoint.

Parameters

NameType
optionsCreateDatasetOptions

Returns

Promise<Dataset>

Dataset response from REST API


createDocument

createDocument(content, contentType, options?): Promise<Pick<LasDocument, "batchId" | "consentId" | "contentType" | "datasetId" | "documentId" | "groundTruth" | "retentionInDays" | "createdTime" | "updatedTime" | "createdBy" | "updatedBy">>

Creates a document, calls the POST /documents endpoint.

Parameters

NameTypeDescription
contentstring | BufferContent to POST (base64 string | Buffer)
contentTypeContentTypeMIME type for the document
options?CreateDocumentOptions-

Returns

Promise<Pick<LasDocument, "batchId" | "consentId" | "contentType" | "datasetId" | "documentId" | "groundTruth" | "retentionInDays" | "createdTime" | "updatedTime" | "createdBy" | "updatedBy">>

Document response from REST API


createModel

createModel(fieldConfig, width, height, options?): Promise<Model>

Creates a model, calls the POST /models endpoint.

Parameters

NameTypeDescription
fieldConfigRecord<string, Field>Specification of the fields that the model is going to predict
widthnumberThe number of pixels to be used for the input image width of your model
heightnumberThe number of pixels to be used for the input image height of your model
options?CreateModelOptions-

Returns

Promise<Model>

Model response from REST API


createPrediction

createPrediction(documentId, modelId, options?): Promise<PredictionResponse>

Create a prediction on a document using specified model, calls the POST /predictions endpoint.

Parameters

NameTypeDescription
documentIdstringId of the document to run inference and create a prediction on
modelIdstringId of the model to use for inference
options?CreatePredictionsOptions-

Returns

Promise<PredictionResponse>

Predicion response from REST API


createSecret

createSecret(data, options?): Promise<Secret>

Creates a secret, calls the POST /secrets endpoint.

Parameters

NameTypeDescription
dataRecord<any, any>Object containing the data you want to keep secret
options?CreateSecretOptions-

Returns

Promise<Secret>

Secret response from REST API


createTransition

createTransition(transitionType, options?): Promise<Transition>

Creates a transition, calls the POST /transitions endpoint.

Parameters

NameTypeDescription
transitionTypeTransitionTypeType of transition "docker"|"manual"
options?CreateTransitionOptions-

Returns

Promise<Transition>

Transition response from REST API


createUser

createUser(email, data?): Promise<User>

Creates a new user, calls the POST /users endpoint.

Parameters

NameTypeDescription
emailstringEmail to the new user
data?CreateUserOptions-

Returns

Promise<User>

User response from REST API


createWorkflow

createWorkflow(name, specification, options?): Promise<Workflow>

Creates a new workflow, calls the POST /workflows endpoint.

Parameters

NameTypeDescription
namestringName of the workflow
specificationWorkflowSpecificationSpecification of the workflow
options?CreateWorkflowOptions-

Returns

Promise<Workflow>

Workflow response from REST API


deleteAppClient

deleteAppClient(appClientId): Promise<AppClient>

Delete the app client, calls the DELETE /appClients/{appClientId} endpoint.

Parameters

NameTypeDescription
appClientIdstringof the app client

Returns

Promise<AppClient>

AppClient response from REST API


deleteAsset

deleteAsset(assetId): Promise<Asset>

Delete an asset, calls the DELETE /assets/{assetId} endpoint.

Parameters

NameTypeDescription
assetIdstringof the app client

Returns

Promise<Asset>

Asset response from REST API


deleteBatch

deleteBatch(batchId, deleteDocuments?): Promise<Batch>

Deletes a batch, calls the DELETE /batches/{batchId} endpoint.

deprecated Use the new Client.deleteDataset method instead.

Parameters

NameTypeDefault valueDescription
batchIdstringundefinedId of the batch
deleteDocumentsbooleanfalseSet to true to delete documents in batch before deleting batch

Returns

Promise<Batch>

Batch response from REST API


deleteDataBundle

deleteDataBundle(modelId, dataBundleId): Promise<DataBundle>

Delete a dataBundle, calls the DELETE /dataBundles/{dataBundleId} endpoint.

Parameters

NameTypeDescription
modelIdstringof the model
dataBundleIdstringof the dataBundle

Returns

Promise<DataBundle>

DataBundle response from REST API


deleteDataset

deleteDataset(datasetId, deleteDocuments?): Promise<Dataset>

Deletes a dataset, calls the DELETE /datasets/{datasetId} endpoint.

Parameters

NameTypeDefault valueDescription
datasetIdstringundefinedId of the dataset
deleteDocumentsbooleanfalseSet to true to delete documents in dataset before deleting dataset

Returns

Promise<Dataset>

Dataset response from REST API


deleteDocument

deleteDocument(documentId): Promise<LasDocument>

Delete an document, calls the DELETE /documents/{documentId} endpoint.

Parameters

NameTypeDescription
documentIdstringof the document

Returns

Promise<LasDocument>

Document response from REST API


deleteDocuments

deleteDocuments(options?): Promise<LasDocumentList>

Delete documents with the provided consentId, calls the DELETE /documents endpoint. Will delete all documents when no consentId is provided.

Parameters

NameType
options?DeleteDocumentOptions

Returns

Promise<LasDocumentList>

Documents response from REST API


deleteModel

deleteModel(modelId): Promise<Model>

Delete an model, calls the DELETE /models/{modelId} endpoint.

Parameters

NameTypeDescription
modelIdstringof the app client

Returns

Promise<Model>

Model response from REST API


deleteTransition

deleteTransition(transitionId): Promise<Transition>

Delete the transition with the provided transitionId, calls the DELETE /transitions/{transitionId} endpoint. Will fail if transition is in use by one or more workflows.

Parameters

NameTypeDescription
transitionIdstringId of the transition

Returns

Promise<Transition>

Transition response from REST API


deleteUser

deleteUser(userId): Promise<User>

Delete a user, calls the DELETE /users/{userId} endpoint.

Parameters

NameTypeDescription
userIdstringId of the user

Returns

Promise<User>

User response from REST API


deleteWorkflow

deleteWorkflow(workflowId): Promise<Workflow>

Delete the workflow with the provided workflowId, calls the DELETE /workflows/{workflowId} endpoint.

Parameters

NameTypeDescription
workflowIdstringId of the workflow

Returns

Promise<Workflow>

Workflow response from REST API


deleteWorkflowExecution

deleteWorkflowExecution(workflowId, executionId): Promise<WorkflowExecution>

Deletes the execution with the provided executionId from workflowId, calls the DELETE /workflows/{workflowId}/executions/{executionId} endpoint.

Parameters

NameTypeDescription
workflowIdstringId of the workflow
executionIdstringId of the execution

Returns

Promise<WorkflowExecution>

WorkflowExecution response from REST API


executeTransition

executeTransition(transitionId): Promise<TransitionExecution>

Start executing a manual transition, calls the POST /transitions/{transitionId}/executions endpoint.

Parameters

NameTypeDescription
transitionIdstringId of the transition

Returns

Promise<TransitionExecution>

Transition execution response from REST API


executeWorkflow

executeWorkflow(workflowId, input): Promise<WorkflowExecution>

Start a workflow execution, calls the POST /workflows/{workflowId}/executions endpoint.

Parameters

NameTypeDescription
workflowIdstringId of the workflow
inputobjectInput to the first step of the workflow

Returns

Promise<WorkflowExecution>

Workflow execution response from REST API


getAsset

getAsset(assetId): Promise<Asset>

Get asset from the REST API, calls the GET /assets/{assetId} endpoint.

Parameters

NameTypeDescription
assetIdstringId of the asset

Returns

Promise<Asset>

Asset response from REST API


getDataset

getDataset(datasetId): Promise<Dataset>

Get dataset from the REST API, calls the GET /datasets/{datasetId} endpoint.

Parameters

NameTypeDescription
datasetIdstringId of the dataset

Returns

Promise<Dataset>

Dataset response from REST API


getDocument

getDocument(documentId): Promise<LasDocument>

Get document from the REST API, calls the GET /documents/{documentId} endpoint.

Parameters

NameTypeDescription
documentIdstringId of the document

Returns

Promise<LasDocument>

Document response from REST API


getLog

getLog(logId): Promise<Log>

Get log, calls the GET /logs/{logId} endpoint.

Parameters

NameTypeDescription
logIdstringId of the log

Returns

Promise<Log>

Log response from REST API


getModel

getModel(modelId): Promise<Model>

Get model from the REST API, calls the GET /models/{modelId} endpoint.

Parameters

NameTypeDescription
modelIdstringId of the model

Returns

Promise<Model>

Model response from REST API


getOrganization

getOrganization(organizationId): Promise<Organization>

Get organization from the REST API, calls the GET /organizations/{organizationId} endpoint.

Parameters

NameTypeDescription
organizationIdstringId of the organization

Returns

Promise<Organization>

Organization response from REST API


getTransition

getTransition(transitionId): Promise<Transition>

Get the transition with the provided transitionId, calls the GET /transitions/{transitionId} endpoint.

Parameters

NameTypeDescription
transitionIdstringId of the transition

Returns

Promise<Transition>

Transition response from REST API


getTransitionExecution

getTransitionExecution(transitionId, transitionExecutionId): Promise<TransitionExecution>

Get an execution of a transition, calls the GET /transitions/{transitionId}/executions/{executionId} endpoint

Parameters

NameTypeDescription
transitionIdstringId of the transition
transitionExecutionIdstringId of the execution

Returns

Promise<TransitionExecution>

Transition execution responses from REST API


getUser

getUser(userId): Promise<User>

Get information about a specific user, calls the GET /users/{userId} endpoint.

Parameters

NameTypeDescription
userIdstringId of the user

Returns

Promise<User>

User response from REST API


getWorkflow

getWorkflow(workflowId): Promise<Workflow>

Get the workflow with the provided workflowId, calls the GET /workflows/{workflowId} endpoint.

Parameters

NameTypeDescription
workflowIdstringId of the workflow

Returns

Promise<Workflow>

Workflow response from REST API


getWorkflowExecution

getWorkflowExecution(workflowId, executionId): Promise<WorkflowExecution>

Get a workflow execution, calls the GET /workflows/{workflowId}/executions/{executionId} endpoint.

Parameters

NameTypeDescription
workflowIdstringId of the workflow that performs the execution
executionIdstringId of the execution to get

Returns

Promise<WorkflowExecution>

Workflow execution response from REST API


listAppClients

listAppClients(options?): Promise<AppClientList>

List app clients, calls the GET /appClients endpoint.

Parameters

NameType
options?PaginationOptions

Returns

Promise<AppClientList>

AppClientList response from REST API


listAssets

listAssets(options?): Promise<AssetList>

List assets available, calls the GET /assets endpoint.

Parameters

NameType
options?PaginationOptions

Returns

Promise<AssetList>

Assets response from REST API without the content of each asset


listBatches

listBatches(options?): Promise<BatchList>

List batches, calls the GET /batches endpoint.

deprecated Use the new Client.listDatasets method instead.

Parameters

NameType
options?PaginationOptions

Returns

Promise<BatchList>

BatchList response from REST API


listDataBundles

listDataBundles(modelId, options?): Promise<DataBundleList>

List dataBundles available, calls the GET /dataBundles endpoint.

Parameters

NameTypeDescription
modelIdstringof the model
options?PaginationOptions-

Returns

Promise<DataBundleList>

DataBundles response from REST API


listDatasets

listDatasets(options?): Promise<DatasetList>

List datasets, calls the GET /datasets endpoint.

Parameters

NameType
options?PaginationOptions

Returns

Promise<DatasetList>

DatasetList response from REST API


listDocuments

listDocuments(options?): Promise<LasDocumentList>

List documents available for inference, calls the GET /documents endpoint.

Parameters

NameType
options?ListDocumentsOptions

Returns

Promise<LasDocumentList>

Documents response from REST API


listModels

listModels(options?): Promise<ModelList>

List models available, calls the GET /models endpoint.

Parameters

NameType
options?PaginationOptions

Returns

Promise<ModelList>

Models response from the REST API


listPredictions

listPredictions(options?): Promise<PredictionList>

Parameters

NameType
options?PaginationOptions

Returns

Promise<PredictionList>


listSecrets

listSecrets(options?): Promise<SecretList>

List secrets available, calls the GET /secrets endpoint.

Parameters

NameType
options?PaginationOptions

Returns

Promise<SecretList>

Secrets response from REST API without the username of each secret


listTransitionExecutions

listTransitionExecutions(transitionId, options?): Promise<TransitionExecutionList>

List executions in a transition, calls the GET /transitions/{transitionId}/executions endpoint.

Parameters

NameTypeDescription
transitionIdstringId of the transition
options?TransitionExecutionListOptions-

Returns

Promise<TransitionExecutionList>

Transition executions responses from REST API


listTransitions

listTransitions(options?): Promise<TransitionList>

List transitions, calls the GET /transitions endpoint.

Parameters

NameType
options?ListTransitionOptions

Returns

Promise<TransitionList>

Transitions response from REST API


listUsers

listUsers(options?): Promise<UserList>

List users, calls the GET /users endpoint.

Parameters

NameType
options?PaginationOptions

Returns

Promise<UserList>

User response from REST API


listWorkflowExecutions

listWorkflowExecutions(workflowId, options?): Promise<WorkflowExecutionList>

List executions in a workflow, calls the GET /workflows/{workflowId}/executions endpoint.

Parameters

NameTypeDescription
workflowIdstringId of the workflow
options?ListWorkflowExecutionsOptions-

Returns

Promise<WorkflowExecutionList>

Workflow executions responses from REST API


listWorkflows

listWorkflows(options?): Promise<WorkflowList>

List workflows, calls the GET /workflows endpoint.

Parameters

NameType
options?PaginationOptions

Returns

Promise<WorkflowList>

Workflows response from REST API


makeDeleteRequest

makeDeleteRequest<T>(path, query?): Promise<T>

Type parameters

Name
T

Parameters

NameType
pathstring
query?any

Returns

Promise<T>


makeGetRequest

makeGetRequest<T>(path, query?): Promise<T>

Type parameters

Name
T

Parameters

NameType
pathstring
query?any

Returns

Promise<T>


makePatchRequest

makePatchRequest<T>(path, body): Promise<T>

Type parameters

Name
T

Parameters

NameType
pathstring
bodyany

Returns

Promise<T>


makePostRequest

makePostRequest<T>(path, body): Promise<T>

Type parameters

Name
T

Parameters

NameType
pathstring
bodyany

Returns

Promise<T>


sendHeartbeat

sendHeartbeat(transitionId, transitionExecutionId): Promise<unknown>

Send heartbeat for a manual execution to signal that we are still working on it. Must be done at minimum once every 60 seconds or the transition execution will time out. Calls the POST /transitions/{transitionId}/executions/{executionId}/heartbeats endpoint.

Parameters

NameTypeDescription
transitionIdstringId of the transition
transitionExecutionIdstringId of the transition execution

Returns

Promise<unknown>

Empty response


updateAppClient

updateAppClient(appClientId, options): Promise<AppClient>

Updates an appClient, calls the PATCH /appClients/{appClientId} endpoint.

Parameters

NameTypeDescription
appClientIdstringId of the appClient
optionsUpdateAppClientOptions-

Returns

Promise<AppClient>

AppClient response from REST API with content


updateAsset

updateAsset(assetId, data): Promise<Asset>

Updates an asset, calls the PATCH /assets/{assetId} endpoint.

Parameters

NameTypeDescription
assetIdstringId of the asset
dataUpdateAssetOptions-

Returns

Promise<Asset>

Asset response from REST API with content


updateBatch

updateBatch(batchId, options): Promise<Batch>

Updates an batch, calls the PATCH /batches/{batchId} endpoint.

deprecated Use the new Client.updateDataset method instead.

Parameters

NameTypeDescription
batchIdstringId of the batch
optionsUpdateBatchOptions-

Returns

Promise<Batch>

Batch response from REST API with content


updateDataBundle

updateDataBundle(modelId, dataBundleId, options): Promise<DataBundle>

Updates a dataBundle, calls the PATCH /dataBundles/{dataBundleId} endpoint.

Parameters

NameTypeDescription
modelIdstringof the model
dataBundleIdstringId of the dataBundle
optionsUpdateDataBundleOptions-

Returns

Promise<DataBundle>

DataBundle response from REST API


updateDataset

updateDataset(datasetId, options): Promise<Dataset>

Updates a dataset, calls the PATCH /datasets/{datasetId} endpoint.

Parameters

NameTypeDescription
datasetIdstringId of the dataset
optionsUpdateDatasetOptions-

Returns

Promise<Dataset>

Dataset response from REST API with content


updateDocument

updateDocument(documentId, data): Promise<LasDocument>

Post ground truth to the REST API, calls the PATCH /documents/{documentId} endpoint. Posting ground truth means posting the ground truth data for the particular document. This enables the API to learn from past mistakes.

Parameters

NameTypeDescription
documentIdstringId of the document
dataUpdateDocumentOptions-

Returns

Promise<LasDocument>

Document response from REST API


updateModel

updateModel(modelId, options): Promise<Model>

Updates a model, calls the PATCH /models/{modelId} endpoint.

Parameters

NameTypeDescription
modelIdstringId of the model
optionsUpdateModelOptions-

Returns

Promise<Model>

Model response from REST API


updateOrganization

updateOrganization(organizationId, options): Promise<Organization>

Updates an organization, calls the PATCH /organizations/{organizationId} endpoint.

Parameters

NameTypeDescription
organizationIdstringId of the organization
optionsUpdateOrganizationOptions-

Returns

Promise<Organization>

Organization response from REST API with content


updateSecret

updateSecret(secretId, data): Promise<Secret>

Updates a secret, calls the PATCH /secrets/{secretId} endpoint.

Parameters

NameTypeDescription
secretIdstringId of the secret
dataUpdateSecretOptions-

Returns

Promise<Secret>


updateTransition

updateTransition(transitionId, data): Promise<Transition>

Updates a transition, calls the PATCH /transitions/{transitionId} endpoint.

Parameters

NameTypeDescription
transitionIdstringId of the transition
dataUpdateTransitionOptionsTransition fields to PATCH

Returns

Promise<Transition>

Transition response from REST API


updateTransitionExecution

updateTransitionExecution(transitionId, executionId, data): Promise<TransitionExecution>

Ends the processing of the transition execution, calls the PATCH /transitions/{transitionId}/executions/{executionId} endpoint.

Parameters

NameTypeDescription
transitionIdstringId of the transition that performs the execution
executionIdstringId of the execution to update
dataUpdateTransitionExecution-

Returns

Promise<TransitionExecution>

Transition execution response from REST API


updateUser

updateUser(userId, data): Promise<User>

Updates a user, calls the PATCH /users/{userId} endpoint.

Parameters

NameTypeDescription
userIdstringId of the user
dataUpdateUserOptions-

Returns

Promise<User>

User response from REST API


updateWorkflow

updateWorkflow(workflowId, data): Promise<Workflow>

Updates a workflow, calls the PATCH /workflows/{workflowId} endpoint.

Parameters

NameTypeDescription
workflowIdstringId of the workflow
dataUpdateWorkflowOptionsWorkflow fields to PATCH

Returns

Promise<Workflow>

Workflow response from REST API


updateWorkflowExecution

updateWorkflowExecution(workflowId, executionId, data): Promise<WorkflowExecution>

Retry or end the processing of a workflow execution, calls the PATCH /workflows/{workflowId}/executions/{executionId} endpoint.

Parameters

NameTypeDescription
workflowIdstringId of the workflow that performs the execution
executionIdstringId of the execution to update
dataUpdateWorkflowExecutionOptions-

Returns

Promise<WorkflowExecution>

Workflow execution response from REST API

Class: Credentials

Use to fetch and store credentials and to generate/cache an access token

Properties

apiEndpoint

Readonly apiEndpoint: string

Methods

getAccessToken

getAccessToken(): Promise<string>

Method used to get and cache an access token. Algorithm used:

  1. Look for a valid token in memory.
  2. Look for a valid token in the storage (if provided);
  3. Fetch a new token from server and cache it (both in memory and in storage).

Returns

Promise<string>

Class: Token

Wrapper class for an AWS Cognito token

Constructors

constructor

new Token(accessToken, expiration, refreshToken?)

Parameters

NameType
accessTokenstring
expirationnumber
refreshToken?string

Properties

accessToken

Readonly accessToken: string


expiration

Readonly expiration: number


refreshToken

Optional Readonly refreshToken: string

Methods

isValid

isValid(): boolean

Checks if current timestamp is larger than token expiration time

Returns

boolean

Interface: CreateDocumentOptions

Properties

batchId

Optional batchId: string


consentId

Optional consentId: string


datasetId

Optional datasetId: string


groundTruth

Optional groundTruth: GroundTruth[]


retentionInDays

Optional retentionInDays: number

Interface: CreatePredictionsOptions

Properties

autoRotate

Optional autoRotate: boolean


imageQuality

Optional imageQuality: "LOW" | "HIGH"


maxPages

Optional maxPages: number

Interface: CreateSecretOptions

Properties

description

Optional description: string

Interface: CreateTransitionOptions

Properties

description

Optional description: null | string


inputJsonSchema

Optional inputJsonSchema: Record<any, any>


name

Optional name: null | string


outputJsonSchema

Optional outputJsonSchema: Record<any, any>


parameters

Optional parameters: CreateTransitionDockerParams | CreateTransitionManualParams

Interface: PaginationOptions

Properties

maxResults

Optional maxResults: number


nextToken

Optional nextToken: string

Interface: TokenStorage<T>

Type parameters

NameType
Textends Token

Methods

getPersistentToken

getPersistentToken(): null | T

Returns

null | T


setPersistentToken

setPersistentToken(value): void

Parameters

NameType
valueT

Returns

void

Interface: UpdateAssetOptions

Properties

content

Optional content: string | Buffer

Interface: UpdateDocumentOptions

Properties

groundTruth

Optional groundTruth: GroundTruth[]


retentionInDays

Optional retentionInDays: number

Interface: UpdateSecretOptions

Properties

data

Optional data: Record<any, any>


description

Optional description: null | string


name

Optional name: null | string

Interface: UpdateTransitionExecution

Properties

error

Optional error: Object

Type declaration

NameType
messagestring

output

Optional output: Record<any, any>


startTime

Optional startTime: string


status

status: "succeeded" | "failed" | "retry" | "rejected"

Interface: UpdateWorkflowExecutionOptions

Properties

nextTransitionId

nextTransitionId: string

Interface: UpdateWorkflowOptions

Properties

completedConfig

Optional completedConfig: WorkflowCompletedConfig


description

Optional description: null | string


errorConfig

Optional errorConfig: WorkflowErrorConfig


name

Optional name: null | string

@lucidtech/las-sdk-core

Classes

Interfaces

Type aliases

AppClient

Ƭ AppClient: Object

Type declaration

NameType
appClientIdstring
callbackUrlsstring[] | null
clientIdstring
clientSecret?string
createdBystring | null
createdTimestring | null
defaultLoginUrlstring | null
descriptionstring | null
hasSecretboolean
loginUrlsstring[] | null
logoutUrlsstring[] | null
namestring | null
updatedBystring | null
updatedTimestring | null

AppClientList

Ƭ AppClientList: Object

Type declaration

NameType
appClientsAppClient[]
nextTokenstring | null

Asset

Ƭ Asset: Object

Type declaration

NameType
assetIdstring
contentstring

AssetList

Ƭ AssetList: Object

Type declaration

NameType
assetsAssetWithoutContent[]
nextTokenstring | null

AssetWithoutContent

Ƭ AssetWithoutContent: Omit<Asset, "content">


AuthorizationHeaders

Ƭ AuthorizationHeaders: Object

Type declaration

NameType
Authorizationstring

AxiosFn

Ƭ AxiosFn: <T, R>(url: string, body?: any, config?: AxiosRequestConfig) => Promise<R>

Type declaration

▸ <T, R>(url, body?, config?): Promise<R>

Type parameters
NameType
Tany
RAxiosResponse<T>
Parameters
NameType
urlstring
body?any
config?AxiosRequestConfig
Returns

Promise<R>


Batch

Ƭ Batch: Object

Type declaration

NameType
batchIdstring
containsPersonallyIdentifiableInformationboolean
createdTimestring
descriptionstring
namestring
numDocumentsnumber
retentionInDaysnumber
storageLocation"EU"

BatchList

Ƭ BatchList: Object

Type declaration

NameType
batchesBatch[]
nextTokenstring | null

ContentType

Ƭ ContentType: "application/pdf" | "image/jpeg" | "image/png" | "image/tiff"


CreateAppClientOptions

Ƭ CreateAppClientOptions: Object

Type declaration

NameType
callbackUrls?string[]
defaultLoginUrl?string
description?string
generateSecret?boolean
loginUrls?string[]
logoutUrls?string[]
name?string

CreateBatchOptions

Ƭ CreateBatchOptions: Object

Type declaration

NameType
containsPersonallyIdentifiableInformation?boolean
description?string
name?string

CreateDataBundleOptions

Ƭ CreateDataBundleOptions: Object

Type declaration

NameType
description?string
name?string

CreateDatasetOptions

Ƭ CreateDatasetOptions: Object

Type declaration

NameType
containsPersonallyIdentifiableInformation?boolean
description?string
name?string

CreateModelOptions

Ƭ CreateModelOptions: Object

Type declaration

NameType
description?string
name?string
preprocessConfig?PreprocessConfig

CreateTransitionDockerParams

Ƭ CreateTransitionDockerParams: Object

Type declaration

NameType
cpu?256
credentials?Object
credentials.passwordstring
credentials.usernamestring
environment?object
imageUrlstring
memory?512 | 1024 | 2048

CreateTransitionManualParams

Ƭ CreateTransitionManualParams: Object

Type declaration

NameType
assets?{ jsRemoteComponent?: string } & Record<string, string>

CreateTransitionParams

Ƭ CreateTransitionParams: CreateTransitionDockerParams | CreateTransitionManualParams


CreateUserOptions

Ƭ CreateUserOptions: Object

Type declaration

NameType
appClientId?string
avatar?string
name?string

CreateWorkflowOptions

Ƭ CreateWorkflowOptions: Object

Type declaration

NameType
completedConfig?WorkflowCompletedConfig
description?string | null
errorConfig?WorkflowErrorConfig

DataBundle

Ƭ DataBundle: Object

Type declaration

NameType
createdBystring | null
createdTimestring
dataBundleIdstring
datasetsDataset[]
descriptionstring | null
modelIdstring
namestring | null
status"ready" | "processing" | "failed"
summaryRecord<string, any>
updatedBystring | null
updatedTimestring

DataBundleList

Ƭ DataBundleList: Object

Type declaration

NameType
dataBundlesDataBundle[]
nextTokenstring | null

Dataset

Ƭ Dataset: Object

Type declaration

NameType
containsPersonallyIdentifiableInformationboolean
createdBystring | null
createdTimestring
datasetIdstring
descriptionstring
groundTruthSummaryRecord<string, number>
namestring
numberOfDocumentsnumber
retentionInDaysnumber
storageLocation"EU"
updatedBystring | null
updatedTimestring
versionnumber

DatasetList

Ƭ DatasetList: Object

Type declaration

NameType
datasetsDataset[]
nextTokenstring | null

DeleteDocumentOptions

Ƭ DeleteDocumentOptions: PaginationOptions & { batchId?: string | string[] ; consentId?: string | string[] ; datasetId?: string | string[] }


Field

Ƭ Field: Object

Type declaration

NameType
descriptionstring
maxLengthnumber
type"all" | "alphanum" | "alphanumext" | "amount" | "date" | "letter" | "number" | "phone" | "string" | "digits"

FieldConfig

Ƭ FieldConfig: Record<string, Field>


GroundTruth

Ƭ GroundTruth: Object

Type declaration

NameTypeDescription
labelstringmaxLength: 36, minLength: 1, pattern: ^[0-9A-Za-z_]+$
valuestring | boolean | nullmaxLength: 64, minLength: 1

LasDocument

Ƭ LasDocument: Object

Type declaration

NameType
batchId?string
consentId?string
contentstring
contentTypeContentType
createdBystring | null
createdTimestring | null
datasetId?string
documentIdstring
groundTruth?GroundTruth[]
retentionInDaysnumber
updatedBystring | null
updatedTimestring | null

LasDocumentList

Ƭ LasDocumentList: Object

Type declaration

NameType
batchId?string
documentsLasDocumentWithoutContent[]
nextTokenstring | null

LasDocumentWithoutContent

Ƭ LasDocumentWithoutContent: Omit<LasDocument, "content">


ListAppClientsOptions

Ƭ ListAppClientsOptions: PaginationOptions


ListAssetsOptions

Ƭ ListAssetsOptions: PaginationOptions


ListBatchesOptions

Ƭ ListBatchesOptions: PaginationOptions


ListDataBundleOptions

Ƭ ListDataBundleOptions: PaginationOptions


ListDatasetsOptions

Ƭ ListDatasetsOptions: PaginationOptions


ListDocumentsOptions

Ƭ ListDocumentsOptions: PaginationOptions & { batchId?: string | string[] ; consentId?: string | string[] ; datasetId?: string | string[] }


ListModelsOptions

Ƭ ListModelsOptions: PaginationOptions


ListPredictionsOptions

Ƭ ListPredictionsOptions: PaginationOptions


ListSecretsOptions

Ƭ ListSecretsOptions: PaginationOptions


ListTransitionOptions

Ƭ ListTransitionOptions: PaginationOptions & { transitionType?: string | string[] }


ListUsersOptions

Ƭ ListUsersOptions: PaginationOptions


ListWorkflowExecutionsOptions

Ƭ ListWorkflowExecutionsOptions: PaginationOptions & { order?: "ascending" | "descending" ; sortBy?: "startTime" | "endTime" ; status?: string | string[] }


ListWorkflowOptions

Ƭ ListWorkflowOptions: PaginationOptions


Log

Ƭ Log: Object

Type declaration

NameType
eventsRecord<any, any>[]
logIdstring
transitionId?string | null

Model

Ƭ Model: Object

Type declaration

NameType
createdBystring | null
createdTimestring | null
descriptionstring | null
fieldConfigFieldConfig | null
heightnumber
modelIdstring
namestring | null
preprocessConfigPreprocessConfig
status"active" | "inactive" | "training"
updatedBystring | null
updatedTimestring | null
widthnumber

ModelList

Ƭ ModelList: Object

Type declaration

NameType
modelsModel[]
nextTokenstring | null

Organization

Ƭ Organization: Object

Type declaration

NameType
descriptionstring | null
monthlyNumberOfDataBundlesAllowednumber
monthlyNumberOfDataBundlesCreatednumber
monthlyNumberOfDocumentsAllowednumber
monthlyNumberOfDocumentsCreatednumber
monthlyNumberOfPredictionsAllowednumber
monthlyNumberOfPredictionsCreatednumber
monthlyNumberOfTransitionExecutionsAllowednumber
monthlyNumberOfTransitionExecutionsCreatednumber
monthlyNumberOfWorkflowExecutionsAllowednumber
monthlyNumberOfWorkflowExecutionsCreatednumber
monthlyUsageSummaryRecord<string, any>
namestring | null
numberOfAppClientsAllowednumber
numberOfAppClientsCreatednumber
numberOfAssetsAllowednumber
numberOfAssetsCreatednumber
numberOfBatchesAllowednumber
numberOfBatchesCreatednumber
numberOfDatasetsAllowednumber
numberOfDatasetsCreatednumber
numberOfModelsAllowednumber
numberOfModelsCreatednumber
numberOfSecretsAllowednumber
numberOfSecretsCreatednumber
numberOfTransitionsAllowednumber
numberOfTransitionsCreatednumber
numberOfUsersAllowednumber
numberOfUsersCreatednumber
numberOfWorkflowsAllowednumber
numberOfWorkflowsCreatednumber
organizationIdstring

PostPredictions

Ƭ PostPredictions: CreatePredictionsOptions & { documentId: string ; modelId: string }


Prediction

Ƭ Prediction: GroundTruth & { confidence: number }


PredictionList

Ƭ PredictionList: Object

Type declaration

NameType
nextTokenstring | null
predictionsPredictionResponse[]

PredictionResponse

Ƭ PredictionResponse: Object

Type declaration

NameType
documentIdstring
inferenceTimenumber
modelIdstring
predictionIdstring
predictionsPrediction[]
timestampnumber

PreprocessConfig

Ƭ PreprocessConfig: Object

Type declaration

NameType
autoRotateboolean
imageQuality"LOW" | "HIGH"
maxPagesnumber

Secret

Ƭ Secret: Object

Type declaration

NameType
descriptionstring | null
namestring | null
secredIdstring

SecretList

Ƭ SecretList: Object

Type declaration

NameType
nextTokenstring | null
secretsSecret[]

Transition

Ƭ Transition: Object

Type declaration

NameType
assets?Record<string, string>
descriptionstring
inputJsonSchemaunknown
namestring
outputJsonSchema?unknown
parametersRecord<string, any>
transitionIdstring
transitionTypeTransitionType

TransitionExecution

Ƭ TransitionExecution: Object

Type declaration

NameType
completedBystring | null
endTimestring | null
executionIdstring
inputRecord<any, any>
logIdstring | null
startTimestring | null
statusTransitionExecutionStatus
transitionIdstring

TransitionExecutionList

Ƭ TransitionExecutionList: Object

Type declaration

NameType
executionsTransitionExecution[]
nextTokenstring | null
transitionIdstring

TransitionExecutionListOptions

Ƭ TransitionExecutionListOptions: PaginationOptions & { executionId?: string | string[] ; order?: "ascending" | "descending" ; sortBy?: "startTime" | "endTime" ; status?: TransitionExecutionStatus | TransitionExecutionStatus[] }


TransitionExecutionStatus

Ƭ TransitionExecutionStatus: "succeeded" | "failed" | "retry" | "running" | "rejected"


TransitionList

Ƭ TransitionList: Object

Type declaration

NameType
nextTokenstring | null
transitionsTransition[]

TransitionType

Ƭ TransitionType: "docker" | "manual"


UpdateAppClientOptions

Ƭ UpdateAppClientOptions: Object

Type declaration

NameType
defaultLoginUrl?string
description?string
loginUrls?string[]
name?string

UpdateBatchOptions

Ƭ UpdateBatchOptions: Object

Type declaration

NameType
description?string
name?string

UpdateDataBundleOptions

Ƭ UpdateDataBundleOptions: Object

Type declaration

NameType
description?string
name?string

UpdateDatasetOptions

Ƭ UpdateDatasetOptions: Object

Type declaration

NameType
description?string
name?string

UpdateModelOptions

Ƭ UpdateModelOptions: Object

Type declaration

NameType
description?string
fieldConfig?FieldConfig
height?number
name?string
preprocessConfig?PreprocessConfig
status?"training"
width?number

UpdateOrganizationOptions

Ƭ UpdateOrganizationOptions: Object

Type declaration

NameType
description?string
name?string

UpdateTransitionOptions

Ƭ UpdateTransitionOptions: Object

Type declaration

NameType
description?string
inputJsonSchema?Record<any, any>
name?string
outputJsonSchema?Record<any, any>

UpdateUserOptions

Ƭ UpdateUserOptions: Object

Type declaration

NameType
avatar?string | null
name?string | null

User

Ƭ User: Object

Type declaration

NameType
avatarstring | null
createdBystring | null
createdTimestring | null
emailstring
namestring | null
updatedBystring | null
updatedTimestring | null
userIdstring

UserList

Ƭ UserList: Object

Type declaration

NameType
nextTokenstring | null
usersUser[]

Workflow

Ƭ Workflow: Object

Type declaration

NameType
completedConfigWorkflowCompletedConfig
descriptionstring | null
errorConfigWorkflowErrorConfig
namestring | null
numberOfRunningExecutionsnumber
workflowIdstring

WorkflowCompletedConfig

Ƭ WorkflowCompletedConfig: Object

Type declaration

NameType
environment?Record<string, string>
environmentSecrets?string[]
imageUrlstring
secretId?string

WorkflowErrorConfig

Ƭ WorkflowErrorConfig: Object

Type declaration

NameType
email?string
manualRetry?boolean

WorkflowExecution

Ƭ WorkflowExecution: Object

Type declaration

NameType
completedBystring[]
endTimestring | null
executionIdstring
inputRecord<any, any>
logIdstring | null
outputRecord<any, any>
startTimestring | null
status"succeeded" | "failed" | "running" | "rejected" | "retry" | "error"
transitionExecutionsRecord<string, string[]> | null
workflowIdstring

WorkflowExecutionList

Ƭ WorkflowExecutionList: Object

Type declaration

NameType
executionsRequired<WorkflowExecution>[]
nextTokenstring | null
status?"succeeded" | "failed" | "running" | "rejected"
workflowIdstring

WorkflowList

Ƭ WorkflowList: Object

Type declaration

NameType
workflowsWorkflow[]

WorkflowSpecification

Ƭ WorkflowSpecification: Object

Type declaration

NameType
definitionobject
language?"ASL"
version?"1.0.0"