Skip to content

Latest commit

 

History

History
3261 lines (1666 loc) · 60 KB

latest.md

File metadata and controls

3261 lines (1666 loc) · 60 KB

@lucidtech/las-sdk-core / Exports

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';

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

const content = '<read image content>'
client.createDocument(content, 'image/jpeg').then(documentResponse => {
    console.log(documentResponse);
}).catch(error => {
    console.log(error);
})

Contributing

Install dependencies

$ npm install && npm run upgrade-lucidtech

Build

$ npm run build

Run tests

$ npm run test test

@lucidtech/las-sdk-core / Exports / client / Client

Class: Client

client.Client

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

Table of contents

Constructors

Properties

Methods

Constructors

constructor

+ new Client(credentials: Credentials): Client

Parameters:

credentials Credentials

Returns: Client

Properties

credentials

credentials: Credentials

Methods

createAsset

createAsset(content: string): Promise<Asset>

Creates an asset handle, calls the POST /assets endpoint.

Parameters:

content string Content to POST (base64-encoded string | Buffer)

Returns: Promise<Asset>

Asset response from REST API


createBatch

createBatch(options: CreateBatchOptions): Promise<Batch>

Creates a batch, calls the POST /batches endpoint.

Parameters:

options CreateBatchOptions

Returns: Promise<Batch>

Batch response from REST API


createDocument

createDocument(content: string | Buffer, contentType: ContentType, options?: CreateDocumentOptions): Promise<LasDocument>

Creates a document handle, calls the POST /documents endpoint.

Parameters:

content string | Buffer Content to POST (base64 string | Buffer)
contentType ContentType MIME type for the document handle
options? CreateDocumentOptions -

Returns: Promise<LasDocument>

Document response from REST API


createPrediction

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

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

Parameters:

documentId string Id of the document to run inference and create a prediction on
modelId string Id of the model to use for inference
options? CreatePredictionsOptions -

Returns: Promise<PredictionResponse>

Predicion response from REST API


createSecret

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

Creates an secret handle, calls the POST /secrets endpoint.

Parameters:

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

Returns: Promise<Secret>

Secret response from REST API


createTransition

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

Creates a transition handle, calls the POST /transitions endpoint.

Parameters:

transitionType TransitionType Type of transition "docker"|"manual"
options? CreateTransitionOptions -

Returns: Promise<Transition>

Transition response from REST API


createUser

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

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

Parameters:

email string Email to the new user
data? CreateUserOptions -

Returns: Promise<User>

User response from REST API


createWorkflow

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

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

Parameters:

name string Name of the workflow
specification WorkflowSpecification Specification of the workflow
options? CreateWorkflowOptions -

Returns: Promise<Workflow>

Workflow response from REST API


deleteDocuments

deleteDocuments(options?: DeleteDocumentOptions): Promise<LasDocumentList>

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

Parameters:

options? DeleteDocumentOptions

Returns: Promise<LasDocumentList>

Documents response from REST API


deleteTransition

deleteTransition(transitionId: string): 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:

transitionId string Id of the transition

Returns: Promise<Transition>

Transition response from REST API


deleteUser

deleteUser(userId: string): Promise<User>

Delete the user with the provided user_id, calls the DELETE /users/{userId} endpoint.

Parameters:

userId string Id of the user

Returns: Promise<User>

User response from REST API


deleteWorkflow

deleteWorkflow(workflowId: string): Promise<Workflow>

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

Parameters:

workflowId string Id of the workflow

Returns: Promise<Workflow>

Workflow response from REST API


deleteWorkflowExecution

deleteWorkflowExecution(workflowId: string, executionId: string): Promise<WorkflowExecution>

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

Parameters:

workflowId string Id of the workflow
executionId string Id of the execution

Returns: Promise<WorkflowExecution>

WorkflowExecution response from REST API


executeTransition

executeTransition(transitionId: string): Promise<TransitionExecution>

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

Parameters:

transitionId string Id of the transition

Returns: Promise<TransitionExecution>

Transition execution response from REST API


executeWorkflow

executeWorkflow(workflowId: string, input: object): Promise<WorkflowExecution>

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

Parameters:

workflowId string Id of the workflow
input object Input to the first step of the workflow

Returns: Promise<WorkflowExecution>

Workflow execution response from REST API


getAsset

getAsset(assetId: string): Promise<Asset>

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

Parameters:

assetId string Id of the asset

Returns: Promise<Asset>

Asset response from REST API


getDocument

getDocument(documentId: string): Promise<LasDocument>

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

Parameters:

documentId string Id of the document

Returns: Promise<LasDocument>

Document response from REST API


getLog

getLog(logId: string): Promise<Log>

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

Parameters:

logId string Id of the log

Returns: Promise<Log>

Log response from REST API


getTransition

getTransition(transitionId: string): Promise<Transition>

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

Parameters:

transitionId string Id of the transition

Returns: Promise<Transition>

Transition response from REST API


getUser

getUser(userId: string): Promise<User>

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

Parameters:

userId string Id of the user

Returns: Promise<User>

User response from REST API


getWorkflow

getWorkflow(workflowId: string): Promise<Workflow>

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

Parameters:

workflowId string Id of the workflow

Returns: Promise<Workflow>

Workflow response from REST API


listAssets

listAssets(options?: PaginationOptions): Promise<AssetList>

List assets available, calls the GET /assets endpoint.

Parameters:

options? PaginationOptions

Returns: Promise<AssetList>

Assets response from REST API without the content of each asset


listDocuments

listDocuments(options?: ListDocumentsOptions): Promise<LasDocumentList>

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

Parameters:

options? ListDocumentsOptions

Returns: Promise<LasDocumentList>

Documents response from REST API


listModels

listModels(options?: PaginationOptions): Promise<ModelList>

List models available, calls the GET /models endpoint.

Parameters:

options? PaginationOptions

Returns: Promise<ModelList>

Models response from the REST API


listPredictions

listPredictions(options?: PaginationOptions): Promise<PredictionList>

Parameters:

options? PaginationOptions

Returns: Promise<PredictionList>


listSecrets

listSecrets(options?: PaginationOptions): Promise<SecretList>

List secrets available, calls the GET /secrets endpoint.

Parameters:

options? PaginationOptions

Returns: Promise<SecretList>

Secrets response from REST API without the username of each secret


listTransitionExecutions

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

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

Parameters:

transitionId string Id of the transition
options? TransitionExecutionListOptions -

Returns: Promise<TransitionExecutionList>

Transition executions responses from REST API


listTransitions

listTransitions(options?: ListTransitionOptions): Promise<TransitionList>

List transitions, calls the GET /transitions endpoint.

Parameters:

options? ListTransitionOptions

Returns: Promise<TransitionList>

Transitions response from REST API


listUsers

listUsers(options?: PaginationOptions): Promise<UserList>

List users, calls the GET /users endpoint.

Parameters:

options? PaginationOptions

Returns: Promise<UserList>

User response from REST API


listWorkflowExecutions

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

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

Parameters:

workflowId string Id of the workflow
options? ListWorkflowExecutionsOptions -

Returns: Promise<WorkflowExecutionList>

Workflow executions responses from REST API


listWorkflows

listWorkflows(options?: PaginationOptions): Promise<WorkflowList>

List workflows, calls the GET /workflows endpoint.

Parameters:

options? PaginationOptions

Returns: Promise<WorkflowList>

Workflows response from REST API


makeDeleteRequest

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

Type parameters:

T

Parameters:

path string query? any

Returns: Promise<T>


makeGetRequest

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

Type parameters:

T

Parameters:

path string query? any

Returns: Promise<T>


makePatchRequest

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

Type parameters:

T

Parameters:

path string body any

Returns: Promise<T>


makePostRequest

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

Type parameters:

T

Parameters:

path string body any

Returns: Promise<T>


updateAsset

updateAsset(assetId: string, data: UpdateAssetOptions): Promise<Asset>

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

Parameters:

assetId string Id of the asset
data UpdateAssetOptions -

Returns: Promise<Asset>

Asset response from REST API with content


updateDocument

updateDocument(documentId: string, data: UpdateDocumentOptions): 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:

documentId string Id of the document
data UpdateDocumentOptions -

Returns: Promise<LasDocument>

Document response from REST API


updateSecret

updateSecret(secretId: string, data: UpdateSecretOptions): Promise<Secret>

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

Parameters:

secretId string Id of the secret
data UpdateSecretOptions -

Returns: Promise<Secret>


updateTransition

updateTransition(transitionId: string, data: UpdateTransitionOptions): Promise<Transition>

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

Parameters:

transitionId string Id of the transition
data UpdateTransitionOptions Transition fields to PATCH

Returns: Promise<Transition>

Transition response from REST API


updateTransitionExecution

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

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

Parameters:

transitionId string Id of the transition that performs the execution
executionId string Id of the execution to update
data UpdateTransitionExecution -

Returns: Promise<TransitionExecution>

Transition execution response from REST API


updateUser

updateUser(userId: string, data: UpdateUserOptions): Promise<User>

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

Parameters:

userId string Id of the user
data UpdateUserOptions -

Returns: Promise<User>

User response from REST API


updateWorkflow

updateWorkflow(workflowId: string, data: UpdateWorkflowOptions): Promise<Workflow>

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

Parameters:

workflowId string Id of the workflow
data UpdateWorkflowOptions Workflow fields to PATCH

Returns: Promise<Workflow>

Workflow response from REST API

@lucidtech/las-sdk-core / Exports / credentials / Credentials

Class: Credentials

credentials.Credentials

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

Table of contents

Properties

Methods

Properties

apiEndpoint

Readonly apiEndpoint: string


apiKey

Readonly apiKey: 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>

@lucidtech/las-sdk-core / Exports / credentials / Token

Class: Token

credentials.Token

Wrapper class for an AWS Cognito token

Table of contents

Constructors

Properties

Methods

Constructors

constructor

+ new Token(accessToken: string, expiration: number, refreshToken?: string): Token

Parameters:

accessToken string expiration number refreshToken? string

Returns: Token

Properties

accessToken

Readonly accessToken: string


expiration

Readonly expiration: number


refreshToken

Optional Readonly refreshToken: undefined | string

Methods

isValid

isValid(): boolean

Checks if current timestamp is larger than token expiration time

Returns: boolean

@lucidtech/las-sdk-core / Exports / index / CreateDocumentOptions

Interface: CreateDocumentOptions

index.CreateDocumentOptions

Table of contents

Properties

Properties

batchId

Optional batchId: undefined | string


consentId

Optional consentId: undefined | string


groundTruth

Optional groundTruth: undefined | GroundTruth[]

@lucidtech/las-sdk-core / Exports / index / CreatePredictionsOptions

Interface: CreatePredictionsOptions

index.CreatePredictionsOptions

Table of contents

Properties

Properties

autoRotate

Optional autoRotate: undefined | boolean


maxPages

Optional maxPages: undefined | number

@lucidtech/las-sdk-core / Exports / index / CreateSecretOptions

Interface: CreateSecretOptions

index.CreateSecretOptions

Table of contents

Properties

Properties

description

Optional description: undefined | string

@lucidtech/las-sdk-core / Exports / index / CreateTransitionOptions

Interface: CreateTransitionOptions

index.CreateTransitionOptions

Table of contents

Properties

Properties

description

Optional description: undefined | null | string


inputJsonSchema

Optional inputJsonSchema: undefined | Record<any, any>


name

Optional name: undefined | null | string


outputJsonSchema

Optional outputJsonSchema: undefined | Record<any, any>


parameters

Optional parameters: undefined | CreateTransitionDockerParams | CreateTransitionManualParams

@lucidtech/las-sdk-core / Exports / index / DeleteDocumentOptions

Interface: DeleteDocumentOptions

index.DeleteDocumentOptions

Table of contents

Properties

Properties

consentId

Optional consentId: undefined | string | string[]

@lucidtech/las-sdk-core / Exports / index / PaginationOptions

Interface: PaginationOptions

index.PaginationOptions

Table of contents

Properties

Properties

maxResults

Optional maxResults: undefined | number


nextToken

Optional nextToken: undefined | string

@lucidtech/las-sdk-core / Exports / index / UpdateAssetOptions

Interface: UpdateAssetOptions

index.UpdateAssetOptions

Table of contents

Properties

Properties

content

Optional content: undefined | string | Buffer

@lucidtech/las-sdk-core / Exports / index / UpdateDocumentOptions

Interface: UpdateDocumentOptions

index.UpdateDocumentOptions

Table of contents

Properties

Properties

groundTruth

Optional groundTruth: undefined | GroundTruth[]

@lucidtech/las-sdk-core / Exports / index / UpdateSecretOptions

Interface: UpdateSecretOptions

index.UpdateSecretOptions

Table of contents

Properties

Properties

data

Optional data: undefined | Record<any, any>


description

Optional description: undefined | null | string


name

Optional name: undefined | null | string

@lucidtech/las-sdk-core / Exports / index / UpdateTransitionExecution

Interface: UpdateTransitionExecution

index.UpdateTransitionExecution

Table of contents

Properties

Properties

error

Optional error: undefined | { message: string }


output

Optional output: undefined | Record<any, any>


status

status: succeeded | failed | retry | rejected

@lucidtech/las-sdk-core / Exports / index / UpdateWorkflowOptions

Interface: UpdateWorkflowOptions

index.UpdateWorkflowOptions

Table of contents

Properties

Properties

description

Optional description: undefined | string


name

Optional name: undefined | string

@lucidtech/las-sdk-core / Exports / storage / TokenStorage

Interface: TokenStorage<T>

storage.TokenStorage

Type parameters

T Token

Table of contents

Properties

Properties

getPersistentToken

getPersistentToken: () => null | T

Type declaration:

▸ (): null | T

Returns: null | T


setPersistentToken

setPersistentToken: (value: T) => void

Type declaration:

▸ (value: T): void

Parameters:

value T

Returns: void

@lucidtech/las-sdk-core / Exports / types / CreateDocumentOptions

Interface: CreateDocumentOptions

types.CreateDocumentOptions

Table of contents

Properties

Properties

batchId

Optional batchId: undefined | string


consentId

Optional consentId: undefined | string


groundTruth

Optional groundTruth: undefined | GroundTruth[]

@lucidtech/las-sdk-core / Exports / types / CreatePredictionsOptions

Interface: CreatePredictionsOptions

types.CreatePredictionsOptions

Table of contents

Properties

Properties

autoRotate

Optional autoRotate: undefined | boolean


maxPages

Optional maxPages: undefined | number

@lucidtech/las-sdk-core / Exports / types / CreateSecretOptions

Interface: CreateSecretOptions

types.CreateSecretOptions

Table of contents

Properties

Properties

description

Optional description: undefined | string

@lucidtech/las-sdk-core / Exports / types / CreateTransitionOptions

Interface: CreateTransitionOptions

types.CreateTransitionOptions

Table of contents

Properties

Properties

description

Optional description: undefined | null | string


inputJsonSchema

Optional inputJsonSchema: undefined | Record<any, any>


name

Optional name: undefined | null | string


outputJsonSchema

Optional outputJsonSchema: undefined | Record<any, any>


parameters

Optional parameters: undefined | CreateTransitionDockerParams | CreateTransitionManualParams

@lucidtech/las-sdk-core / Exports / types / DeleteDocumentOptions

Interface: DeleteDocumentOptions

types.DeleteDocumentOptions

Table of contents

Properties

Properties

consentId

Optional consentId: undefined | string | string[]

@lucidtech/las-sdk-core / Exports / types / PaginationOptions

Interface: PaginationOptions

types.PaginationOptions

Table of contents

Properties

Properties

maxResults

Optional maxResults: undefined | number


nextToken

Optional nextToken: undefined | string

@lucidtech/las-sdk-core / Exports / types / UpdateAssetOptions

Interface: UpdateAssetOptions

types.UpdateAssetOptions

Table of contents

Properties

Properties

content

Optional content: undefined | string | Buffer

@lucidtech/las-sdk-core / Exports / types / UpdateDocumentOptions

Interface: UpdateDocumentOptions

types.UpdateDocumentOptions

Table of contents

Properties

Properties

groundTruth

Optional groundTruth: undefined | GroundTruth[]

@lucidtech/las-sdk-core / Exports / types / UpdateSecretOptions

Interface: UpdateSecretOptions

types.UpdateSecretOptions

Table of contents

Properties

Properties

data

Optional data: undefined | Record<any, any>


description

Optional description: undefined | null | string


name

Optional name: undefined | null | string

@lucidtech/las-sdk-core / Exports / types / UpdateTransitionExecution

Interface: UpdateTransitionExecution

types.UpdateTransitionExecution

Table of contents

Properties

Properties

error

Optional error: undefined | { message: string }


output

Optional output: undefined | Record<any, any>


status

status: succeeded | failed | retry | rejected

@lucidtech/las-sdk-core / Exports / types / UpdateWorkflowOptions

Interface: UpdateWorkflowOptions

types.UpdateWorkflowOptions

Table of contents

Properties

Properties

description

Optional description: undefined | string


name

Optional name: undefined | string

@lucidtech/las-sdk-core / Exports

@lucidtech/las-sdk-core

Table of contents

Modules

@lucidtech/las-sdk-core / Exports / client

Module: client

Table of contents

References

Classes

References

default

Renames and exports: Client

@lucidtech/las-sdk-core / Exports / credentials

Module: credentials

Table of contents

Classes

@lucidtech/las-sdk-core / Exports / index

Module: index

Table of contents

References

Interfaces

Type aliases

References

Client

Re-exports: Client


Credentials

Re-exports: Credentials


Token

Re-exports: Token


TokenStorage

Re-exports: TokenStorage

Type aliases

Asset

Ƭ Asset: object

Type declaration:

assetId string content string


AssetList

Ƭ AssetList: object

Type declaration:

assets AssetWithoutContent[] nextToken string | null


AssetWithoutContent

Ƭ AssetWithoutContent: object

Type declaration:

assetId string


AuthorizationHeaders

Ƭ AuthorizationHeaders: object

Type declaration:

Authorization string X-Api-Key string


AxiosFn

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

Type declaration:

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

Type parameters:

T any R AxiosResponse<T>

Parameters:

url string body? any config? AxiosRequestConfig

Returns: Promise<R>


Batch

Ƭ Batch: object

Type declaration:

batchId string description string name string


ContentType

Ƭ ContentType: application/pdf | image/jpeg


CreateBatchOptions

Ƭ CreateBatchOptions: object

Type declaration:

description? string name? string


CreateTransitionDockerParams

Ƭ CreateTransitionDockerParams: object

Type declaration:

cpu? 256 credentials? object credentials.password string credentials.username string environment? object imageUrl string memory? 512 | 1024 | 2048


CreateTransitionManualParams

Ƭ CreateTransitionManualParams: object

Type declaration:

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


CreateTransitionParams

Ƭ CreateTransitionParams: CreateTransitionDockerParams | CreateTransitionManualParams


CreateUserOptions

Ƭ CreateUserOptions: object

Type declaration:

avatar? string | null name? string | null


CreateWorkflowOptions

Ƭ CreateWorkflowOptions: object

Type declaration:

description? string errorConfig? object errorConfig.email string


GroundTruth

Ƭ GroundTruth: object

Type declaration:

label string maxLength: 36, minLength: 1, pattern: ^[0-9A-Za-z_]+$
value string | boolean | null maxLength: 64, minLength: 1


LasDocument

Ƭ LasDocument: object

Type declaration:

batchId? string pattern: ^las:batch:[a-f0-9]{32}$
consentId? string pattern: ^las:consent:[a-f0-9]{32}$
content? string minimum: 1
contentType ContentType - documentId string pattern: ^las:document:[a-f0-9]{32}$
groundTruth? GroundTruth[] - inferenceTime? number minimum: 0
predictions? Prediction[] - updated? number minimum: 1


LasDocumentList

Ƭ LasDocumentList: object

Type declaration:

batchId? string consentId? string documents LasDocument[] nextToken? string


ListAssetsOptions

Ƭ ListAssetsOptions: PaginationOptions


ListDocumentsOptions

Ƭ ListDocumentsOptions: PaginationOptions & { batchId?: string | string[] ; consentId?: 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:

events Record<any, any>[] logId string transitionId? string | null


Model

Ƭ Model: object

Type declaration:

description string | null height number modelId string name string | null width number


ModelList

Ƭ ModelList: object

Type declaration:

models Model[] nextToken string | null


PostPredictions

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


Prediction

Ƭ Prediction: GroundTruth & { confidence: number }


PredictionList

Ƭ PredictionList: object

Type declaration:

nextToken string | null predictions PredictionResponse[]


PredictionResponse

Ƭ PredictionResponse: object

Type declaration:

documentId string inferenceTime number modelId string predictionId string predictions Prediction[] timestamp number


Secret

Ƭ Secret: object

Type declaration:

description string | null name string | null secredId string


SecretList

Ƭ SecretList: object

Type declaration:

nextToken? string | null secrets Secret[]


Transition

Ƭ Transition: object

Type declaration:

assets? Record<string, string> description string inputJsonSchema unknown name string outputJsonSchema? unknown transitionId string transitionType TransitionType


TransitionExecution

Ƭ TransitionExecution: object

Type declaration:

completedBy string | null endTime string | null executionId string input Record<any, any> startTime string | null status succeeded | failed | retry | running | rejected transitionId string


TransitionExecutionList

Ƭ TransitionExecutionList: object

Type declaration:

executions TransitionExecution[] nextToken string | null transitionId string


TransitionExecutionListOptions

Ƭ TransitionExecutionListOptions: PaginationOptions & { executionId?: string | string[] ; order?: ascending | descending ; sortBy?: startTime | endTime ; status?: succeeded | failed | retry | running | rejected }


TransitionList

Ƭ TransitionList: object

Type declaration:

nextToken? string transitions Transition[]


TransitionType

Ƭ TransitionType: docker | manual


UpdateTransitionOptions

Ƭ UpdateTransitionOptions: object

Type declaration:

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


UpdateUserOptions

Ƭ UpdateUserOptions: object

Type declaration:

avatar? string | null name? string | null


User

Ƭ User: object

Type declaration:

avatar string | null email string name string | null userId string


UserList

Ƭ UserList: object

Type declaration:

nextToken? string users User[]


Workflow

Ƭ Workflow: object

Type declaration:

description? string name string workflowId string


WorkflowExecution

Ƭ WorkflowExecution: object

Type declaration:

completedBy string[] endTime string | null executionId string input Record<any, any> output Record<any, any> startTime string | null status? succeeded | failed | running | rejected transitionExecutions Record<string, string[]> | null workflowId string


WorkflowExecutionList

Ƭ WorkflowExecutionList: object

Type declaration:

executions Required<WorkflowExecution>[] nextToken? string status? succeeded | failed | running | rejected workflowId string


WorkflowList

Ƭ WorkflowList: object

Type declaration:

workflows Workflow[]


WorkflowSpecification

Ƭ WorkflowSpecification: object

Type declaration:

definition object language? ASL version? 1.0.0

@lucidtech/las-sdk-core / Exports / storage

Module: storage

Table of contents

Interfaces

@lucidtech/las-sdk-core / Exports / types

Module: types

Table of contents

Interfaces

Type aliases

Type aliases

Asset

Ƭ Asset: object

Type declaration:

assetId string content string


AssetList

Ƭ AssetList: object

Type declaration:

assets AssetWithoutContent[] nextToken string | null


AssetWithoutContent

Ƭ AssetWithoutContent: object

Type declaration:

assetId string


AuthorizationHeaders

Ƭ AuthorizationHeaders: object

Type declaration:

Authorization string X-Api-Key string


AxiosFn

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

Type declaration:

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

Type parameters:

T any R AxiosResponse<T>

Parameters:

url string body? any config? AxiosRequestConfig

Returns: Promise<R>


Batch

Ƭ Batch: object

Type declaration:

batchId string description string name string


ContentType

Ƭ ContentType: application/pdf | image/jpeg


CreateBatchOptions

Ƭ CreateBatchOptions: object

Type declaration:

description? string name? string


CreateTransitionDockerParams

Ƭ CreateTransitionDockerParams: object

Type declaration:

cpu? 256 credentials? object credentials.password string credentials.username string environment? object imageUrl string memory? 512 | 1024 | 2048


CreateTransitionManualParams

Ƭ CreateTransitionManualParams: object

Type declaration:

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


CreateTransitionParams

Ƭ CreateTransitionParams: CreateTransitionDockerParams | CreateTransitionManualParams


CreateUserOptions

Ƭ CreateUserOptions: object

Type declaration:

avatar? string | null name? string | null


CreateWorkflowOptions

Ƭ CreateWorkflowOptions: object

Type declaration:

description? string errorConfig? object errorConfig.email string


GroundTruth

Ƭ GroundTruth: object

Type declaration:

label string maxLength: 36, minLength: 1, pattern: ^[0-9A-Za-z_]+$
value string | boolean | null maxLength: 64, minLength: 1


LasDocument

Ƭ LasDocument: object

Type declaration:

batchId? string pattern: ^las:batch:[a-f0-9]{32}$
consentId? string pattern: ^las:consent:[a-f0-9]{32}$
content? string minimum: 1
contentType ContentType - documentId string pattern: ^las:document:[a-f0-9]{32}$
groundTruth? GroundTruth[] - inferenceTime? number minimum: 0
predictions? Prediction[] - updated? number minimum: 1


LasDocumentList

Ƭ LasDocumentList: object

Type declaration:

batchId? string consentId? string documents LasDocument[] nextToken? string


ListAssetsOptions

Ƭ ListAssetsOptions: PaginationOptions


ListDocumentsOptions

Ƭ ListDocumentsOptions: PaginationOptions & { batchId?: string | string[] ; consentId?: 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:

events Record<any, any>[] logId string transitionId? string | null


Model

Ƭ Model: object

Type declaration:

description string | null height number modelId string name string | null width number


ModelList

Ƭ ModelList: object

Type declaration:

models Model[] nextToken string | null


PostPredictions

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


Prediction

Ƭ Prediction: GroundTruth & { confidence: number }


PredictionList

Ƭ PredictionList: object

Type declaration:

nextToken string | null predictions PredictionResponse[]


PredictionResponse

Ƭ PredictionResponse: object

Type declaration:

documentId string inferenceTime number modelId string predictionId string predictions Prediction[] timestamp number


Secret

Ƭ Secret: object

Type declaration:

description string | null name string | null secredId string


SecretList

Ƭ SecretList: object

Type declaration:

nextToken? string | null secrets Secret[]


Transition

Ƭ Transition: objects

Type declaration:

assets? Record<string, string> description string inputJsonSchema unknown name string outputJsonSchema? unknown transitionId string transitionType TransitionType


TransitionExecution

Ƭ TransitionExecution: object

Type declaration:

completedBy string | null endTime string | null executionId string input Record<any, any> startTime string | null status succeeded | failed | retry | running | rejected transitionId string


TransitionExecutionList

Ƭ TransitionExecutionList: object

Type declaration:

executions TransitionExecution[] nextToken string | null transitionId string


TransitionExecutionListOptions

Ƭ TransitionExecutionListOptions: PaginationOptions & { executionId?: string | string[] ; order?: ascending | descending ; sortBy?: startTime | endTime ; status?: succeeded | failed | retry | running | rejected }


TransitionList

Ƭ TransitionList: object

Type declaration:

nextToken? string transitions Transition[]


TransitionType

Ƭ TransitionType: docker | manual


UpdateTransitionOptions

Ƭ UpdateTransitionOptions: object

Type declaration:

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


UpdateUserOptions

Ƭ UpdateUserOptions: object

Type declaration:

avatar? string | null name? string | null


User

Ƭ User: object

Type declaration:

avatar string | null email string name string | null userId string


UserList

Ƭ UserList: object

Type declaration:

nextToken? string users User[]


Workflow

Ƭ Workflow: object

Type declaration:

description? string name string workflowId string


WorkflowExecution

Ƭ WorkflowExecution: object

Type declaration:

completedBy string[] endTime string | null executionId string input Record<any, any> output Record<any, any> startTime string | null status? succeeded | failed | running | rejected transitionExecutions Record<string, string[]> | null workflowId string


WorkflowExecutionList

Ƭ WorkflowExecutionList: object

Type declaration:

executions Required<WorkflowExecution>[] nextToken? string status? succeeded | failed | running | rejected workflowId string


WorkflowList

Ƭ WorkflowList: object

Type declaration:

workflows Workflow[]


WorkflowSpecification

Ƭ WorkflowSpecification: object

Type declaration:

definition object language? ASL version? 1.0.0