The Lume Typescript Client Library is currently in beta. Please reach out to our support team if you have any questions or feature requests, or encounter any bugs.

Install

Download the Typescript Client Library using your favorite package manager.

Quickstart

Retrieve your input data and target schema.

const targetSchema = {
    type: "object",
    properties: {
        f_name: {
            type: "string",
            description: "The first name of the user",
        },
        l_name: {
            type: "string",
            description: "The last name of the user",
        },
    },
    required: ["f_name", "l_name"],
}

const sourceData = [
    { first_name: "John", last_name: "Doe" },
    { first_name: "Jane", last_name: "Smith" }
]

Create a new pipeline and map data.

import { Lume } from '@lume-ai/typescript-sdk';

const lume: Lume = new Lume('api_key')

// Create pipeline and get run mappings.
const pipeline = await lume.PipelineService.createPipeline({
    name: 'my_pipeline',
    description: 'My first Lume pipeline.',
    target_schema: targetSchema,
    sample_data: sourceData,
});
const run = await pipeline.getRun(0, ['mappings']);

// Make use of the mapped records in your application.
for (var mapping of run.mappings.items) {
    applicationLogic(mapping.mapped_record)
}

Usage

Refer to the Library Overview for more information. The full client library is viewable on GitHub.