Skip to navigation

SDK Quickstart

A single TypeScript SDK covering all five AutoExtract services

All five AutoExtract OpenAPI specifications are combined under one Fern generator group (sdk), producing one SDK. Each microservice is exposed as a namespaced sub-client.

Sub-clientSource serviceExample
client.fileIntakeFile Intakeclient.fileIntake.files.upload(...)
client.registrationRegistrationclient.registration.clientApplications.list()
client.extractorExtractorclient.extractor.jobs.run(fileId)
client.statusCheckStatus Checkclient.statusCheck.files.getStatusHistory(id)
client.documentSplitterDocument Splitterclient.documentSplitter.health.check()

Install

npm install @cla-demo/autoextract-sdk

The package name and output repository are demo placeholders. Replace them in fern/generators.yml before publishing.

Authenticate

The SDK reads a JWT from AUTOEXTRACT_TOKEN, or you can pass token explicitly.

import { AutoExtractClient } from "@cla-demo/autoextract-sdk";
const client = new AutoExtractClient({ token: process.env.AUTOEXTRACT_TOKEN });
const status = await client.statusCheck.files.getStatusHistory("<fileId>");

Each service is deployed on its own host. Pass the base URL for the service you are calling via the client’s environment option.