Models
Overview of the models in Typescript Client Library
The Lume Typescript Client Library is currently in beta. Please reach out to support if you have any questions, encounter any bugs, or have any feature requests.
Primary Data Models
Job
Type representing details of a job. Returned in job fetching methods.
Property | Description |
---|---|
id | Unique identifier of the job. |
created_at | Date and time the job was created. |
pipeline_id | ID of the pipeline the job is associated with. |
Workshop
Type representing details of a workshop. Returned in workshop fetching methods.
Property | Description |
---|---|
id | Unique identifier of the workshop. |
created_at | Date and time the workshop was created. |
job_id | ID of the job the workshop is associated with. |
pipeline_id | ID of the pipeline the workshop is associated with. |
status | Status of the workshop. |
updated_at | Date and time the workshop was last updated. |
Workshop.status
Enum representing the status of a workshop.
Value | Description |
---|---|
CREATED | The workshop has been created. |
RUNNING | The workshop is currently running. |
FINISHED | The workshop has finished running. |
DEPLOYED | The workshop edits have been deployed. |
FAILED | The workshop has failed. |
NEEDS_REVIEW | The workshop needs review. |
QUEUED | The workshop is queued. |
Mapping
Type representing the mapped record of the data from the job.
Property | Description |
---|---|
index | The index of the record in the data. |
source_record | The source record of the data. |
mapped_record | The target record of the data. |
message | The message of the mapping. |
Pipeline
Type representing details of a pipeline. Returned in pipeline fetching methods.
Property | Description |
---|---|
id | Unique identifier of the pipeline. |
created_at | Date and time the pipeline was created. |
name | Name of the pipeline. Must be unique within the organization. |
description | Description of the pipeline. |
target_schema_id | The target schema of the pipeline in JSON-schema format. |
source_schema | The source schema of the pipeline, inferred from the pipeline’s jobs in JSON-schema format. |
updated_at | Date and time the pipeline was last updated. |
Result
Type representing details of a result. Returned in result fetching methods.
Property | Description |
---|---|
id | Unique identifier of the result. |
created_at | Date and time the result was created. |
status | Status of the mapping task. |
Result.status
Enum representing the status of a mapping task.
Value | Description |
---|---|
CREATED | The mapping task has been created. |
RUNNING | The mapping task is currently running. |
FINISHED | The mapping task has finished. |
FAILED | The mapping task has failed. |
NEEDS_REVIEW | The mapping task needs review. |
QUEUED | The mapping task is queued. |
Spec
Type representing the specification details.
Property | Description |
---|---|
@sources | The sources of the spec. |
@default_values | The default values of the spec. |
@lookup | The lookup of the spec. |
confidence_score | The confidence score of the lookups. |
TargetSchema
Type representing details of a target schema.
Property | Description |
---|---|
id | The ID of the target schema. |
name | The name of the target schema. |
filename | The file name of the target schema. |
Schema
Schema alias for Record<string, any>
.
Parameter Data Models
PipelineCreatePayload
Payload for creating a new pipeline.
Property | Description |
---|---|
name | Name of the pipeline. Must be unique within the organization. |
description | Description of the pipeline. |
target_schema | The target schema of the pipeline in JSON-schema format. |
PipelineUpdatePayload
Payload for updating an existing pipeline.
Property | Description |
---|---|
name | Name of the pipeline. Must be unique within the organization. |
description | Description of the pipeline. |
Response Data Models
PaginatedResponse<T>
Interface representing a paginated response containing items of type T.
Property | Description |
---|---|
items | Array of items in the current page of results. |
total | Total number of items across all pages. |
page | Current page number. |
size | Number of items per page. |
pages | Total number of pages (optional). |
CreateAndRunJobResponse
The response of the createAndRunJob request.
Property | Description |
---|---|
result | The result of the job. |
jobId | The ID of the job that was created and run. |
JobExecutionResponse
An object that displays the result of a job execution. This type is used in the workflow service to return multiple relevant objects in a single response.
Property | Description |
---|---|
result | The result of the job. |
mappingsPage | The mappings for the result of the job. |
jobId | The ID of the job that was executed. |
Workshop Edit Models
Mapper Edit
ManualTransformation
A ManualTransformation is a transformation that is manually defined by the user. It is used to transform data from a source schema to a specific field in a target schema. NOTE: either extract or default must be present.
Property | Description |
---|---|
extract | The source property to extract one-to-one mapping to, in dotted path notation to represent hierarchy (e.g. ‘user.name’). |
default | OPTIONAL: The default value to be used if the source property from ‘extract’ is missing. If ‘extract’ property is not present, then this value will be used as the default value for the target field. |
MapperEditSchema
A mapper is an object defining how to transform data from a source schema to a specific field in a target schema. It is associated with a pipeline and can be used to transform data in a job.
Property | Description |
---|---|
transformation | The transformation to be applied to the data. |
targetField | The field in the target schema that the transformation will be applied to. |
WorkshopWithMapperPayload
Represents a run workshop payload with mapper changes.
Property | Description |
---|---|
mapper | An array of mapper configurations for the workshop. |
auto_deploy | Indicates whether auto-deployment is enabled for the workshop (optional). |
immediate_return | Indicates whether to return immediately after starting the job (optional). This allows for asynchronous job execution and polling the job status later. |
Prompt Edit
TargetFieldsToPrompt
An object that displays the prompt for the target fields.
Property | Description |
---|---|
[field: string] | The prompt mapping request for the target fields. |
WorkshopWithPromptPayload
Represents a run workshop payload with a prompt mapping request.
Property | Description |
---|---|
target_fields_to_prompt | The prompt mapping request for the workshop. |
auto_deploy | Indicates whether auto-deployment is enabled for the workshop (optional). |
immediate_return | Indicates whether to return immediately after starting the job (optional). This allows for asynchronous job execution and polling the job status later. |
Sample Edit
SampleEdit
An object that displays the mapped record of the data from the job.
Property | Description |
---|---|
index | The index of the record in the data. |
mapped_record | The target record of the data. |
WorkshopWithSamplePayload
Represents a run workshop payload with a sample mapping request.
Property | Description |
---|---|
sample | The sample mapping request for the workshop. |
auto_deploy | Indicates whether auto-deployment is enabled for the workshop (optional). |
immediate_return | Indicates whether to return immediately after starting the job (optional). This allows for asynchronous job execution and polling the job status later. |
Target Schema Edit
WorkshopWithSchemaPayload
Represents a run workshop payload with a target schema.
Property | Description |
---|---|
target_schema | The target schema definition for the workshop. |
auto_deploy | Indicates whether auto-deployment is enabled for the workshop (optional). |
immediate_return | Indicates whether to return immediately after starting the job (optional). This allows for asynchronous job execution and polling the job status later. |