# lilt-node

> The_Lilt_REST_API_enables_programmatic_access_to_the_full_range_of_Lilt_backend_services_including___Training_of_and_translating_with_interactive_adaptive_machine_translation___Large_scale_translation_memory___The_Lexicon__a_large_scale_termbase___Program

Latest version **3.0.0** (published 2024-12-23) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

```sh
npm install lilt-node
pnpm add lilt-node
yarn add lilt-node
bun add lilt-node
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities; has provenance.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2024-12-23 |
| First published | 2020-09-09 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 879.9 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Maintainers | tgallant |

## Links

- npm: https://www.npmjs.com/package/lilt-node
- Repository: https://github.com/lilt/lilt-node
- Homepage: https://github.com/lilt/lilt-node#readme
- Issues: https://github.com/lilt/lilt-node/issues
- npm.io page: https://npm.io/package/lilt-node

## Dependencies (5)

- [dotenv](https://npm.io/package/dotenv.md) ^16.4.5
- [adm-zip](https://npm.io/package/adm-zip.md) ^0.5.16
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.0.0
- [mocha-each](https://npm.io/package/mocha-each.md) ^2.0.1
- [superagent](https://npm.io/package/superagent.md) 3.7.0

## Recent versions

- 3.0.0 (latest) — 2024-12-23
- 0.6.5 — 2024-10-17
- 0.6.3 — 2023-05-30
- 0.6.2 — 2021-08-20
- 0.6.1 — 2021-08-16
- 0.6.0 — 2021-08-16
- 0.5.0 — 2020-09-09

## README

# lilt-node

LiltNode - JavaScript client for lilt-node
Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals   
The Lilt REST API enables programmatic access to the full-range of Lilt backend services including:
  * Training of and translating with interactive, adaptive machine translation
  * Large-scale translation memory
  * The Lexicon (a large-scale termbase)
  * Programmatic control of the Lilt CAT environment
  * Translation memory synchronization

Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. 
The base url for this REST API is `https://api.lilt.com/`.

## Authentication

Requests are authenticated via REST API key, which requires the Business plan.

Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`.

For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use.

## Quotas

Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request.

This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 3.0.0
- Package version: 3.0.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install lilt-node --save
```

Finally, you need to build the module:

```shell
npm run build
```

##### Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

To use the link you just defined in your project, switch to the directory you want to use your lilt-node from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finally, you need to build the module:

```shell
npm run build
```

#### git

If the library is hosted at a git repository, e.g.https://github.com/lilt/lilt-node
then install it via:

```shell
    npm install lilt/lilt-node --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var LiltNode = require('lilt-node');

var defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['key'] = "Token"
// Configure HTTP basic authorization: BasicAuth
var BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME'
BasicAuth.password = 'YOUR PASSWORD'

var api = new LiltNode.CreateApi()
var contentId = 56; // {Number} The content ID.
api.deleteLiltCreateContent(contentId).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});


```

## Checking Credentials

If you would like to test your credentials using our functionality tests you can do the following.

Navigate to the folder where the package is installed and create a .env file inside the package using .env_example as a template. Fill out the API_HOST and API_KEY lines using the credentials you were given.

Then while inside the package folder, run:

```sh
npm test
```

You should be able to see the tests run.

## Documentation for API Endpoints

All URIs are relative to *https://api.lilt.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*LiltNode.CreateApi* | [**deleteLiltCreateContent**](docs/CreateApi.md#deleteLiltCreateContent) | **DELETE** /v2/create/{contentId} | Delete Lilt Create content
*LiltNode.CreateApi* | [**generateLiltCreateContent**](docs/CreateApi.md#generateLiltCreateContent) | **POST** /v2/create | Generate new Lilt Create content
*LiltNode.CreateApi* | [**getLiltCreateById**](docs/CreateApi.md#getLiltCreateById) | **GET** /v2/create/{contentId} | Get Lilt Create content by ID.
*LiltNode.CreateApi* | [**getLiltCreateContent**](docs/CreateApi.md#getLiltCreateContent) | **GET** /v2/create | Get Lilt Create content
*LiltNode.CreateApi* | [**getLiltCreatePreferences**](docs/CreateApi.md#getLiltCreatePreferences) | **GET** /v2/create/preferences | Get Lilt Create preferences
*LiltNode.CreateApi* | [**regenerateLiltCreateContent**](docs/CreateApi.md#regenerateLiltCreateContent) | **GET** /v2/create/{contentId}/create | Regenerate Lilt Create content
*LiltNode.CreateApi* | [**signLiltCreateTerms**](docs/CreateApi.md#signLiltCreateTerms) | **POST** /v2/create/terms-and-conditions | Sign the Lilt Create terms and conditions
*LiltNode.CreateApi* | [**updateLiltCreateContent**](docs/CreateApi.md#updateLiltCreateContent) | **PUT** /v2/create/{contentId} | Update Lilt Create content
*LiltNode.CreateApi* | [**updateLiltCreatePreferences**](docs/CreateApi.md#updateLiltCreatePreferences) | **PUT** /v2/create/preferences | Update Lilt Create preferences
*LiltNode.DocumentsApi* | [**downloadDocument**](docs/DocumentsApi.md#downloadDocument) | **GET** /v2/documents/files | Download a Document
*LiltNode.DocumentsApi* | [**uploadDocument**](docs/DocumentsApi.md#uploadDocument) | **POST** /v2/documents/files | Upload a File
*LiltNode.FilesApi* | [**addLabel**](docs/FilesApi.md#addLabel) | **POST** /v2/files/labels | Add Label to File
*LiltNode.FilesApi* | [**deleteFile**](docs/FilesApi.md#deleteFile) | **DELETE** /v2/files | Delete a File
*LiltNode.FilesApi* | [**download**](docs/FilesApi.md#download) | **GET** /v2/files/download | Download file
*LiltNode.FilesApi* | [**getFiles**](docs/FilesApi.md#getFiles) | **GET** /v2/files | Retrieve a File
*LiltNode.FilesApi* | [**removeLabel**](docs/FilesApi.md#removeLabel) | **DELETE** /v2/files/labels | Remove Label from File
*LiltNode.FilesApi* | [**uploadFile**](docs/FilesApi.md#uploadFile) | **POST** /v2/files | Upload a File
*LiltNode.JobsApi* | [**archiveJob**](docs/JobsApi.md#archiveJob) | **POST** /v2/jobs/{jobId}/archive | Archive a Job
*LiltNode.JobsApi* | [**createJob**](docs/JobsApi.md#createJob) | **POST** /v2/jobs | Create a Job
*LiltNode.JobsApi* | [**deleteJob**](docs/JobsApi.md#deleteJob) | **DELETE** /v2/jobs/{jobId} | Delete a Job
*LiltNode.JobsApi* | [**deliverJob**](docs/JobsApi.md#deliverJob) | **POST** /v2/jobs/{jobId}/deliver | Deliver a Job
*LiltNode.JobsApi* | [**downloadJob**](docs/JobsApi.md#downloadJob) | **GET** /v2/jobs/{jobId}/download | Download a Job
*LiltNode.JobsApi* | [**exportJob**](docs/JobsApi.md#exportJob) | **GET** /v2/jobs/{jobId}/export | Export a Job
*LiltNode.JobsApi* | [**getJob**](docs/JobsApi.md#getJob) | **GET** /v2/jobs/{jobId} | Retrieve a Job
*LiltNode.JobsApi* | [**getJobLeverageStats**](docs/JobsApi.md#getJobLeverageStats) | **POST** /v2/jobs/{jobId}/stats | Retrieve Job Leverage Stats
*LiltNode.JobsApi* | [**reactivateJob**](docs/JobsApi.md#reactivateJob) | **POST** /v2/jobs/{jobId}/reactivate | Reactivate a Job
*LiltNode.JobsApi* | [**retrieveAllJobs**](docs/JobsApi.md#retrieveAllJobs) | **GET** /v2/jobs | Retrieve all Jobs
*LiltNode.JobsApi* | [**unarchiveJob**](docs/JobsApi.md#unarchiveJob) | **POST** /v2/jobs/{jobId}/unarchive | Unarchive a Job
*LiltNode.JobsApi* | [**updateJob**](docs/JobsApi.md#updateJob) | **PUT** /v2/jobs/{jobId} | Update a Job
*LiltNode.LanguagesApi* | [**getLanguages**](docs/LanguagesApi.md#getLanguages) | **GET** /v2/languages | Retrieve supported languages
*LiltNode.MemoriesApi* | [**createMemory**](docs/MemoriesApi.md#createMemory) | **POST** /v2/memories | Create a Memory
*LiltNode.MemoriesApi* | [**deleteMemory**](docs/MemoriesApi.md#deleteMemory) | **DELETE** /v2/memories | Delete a Memory
*LiltNode.MemoriesApi* | [**deleteSegmentFromMemory**](docs/MemoriesApi.md#deleteSegmentFromMemory) | **DELETE** /v2/memories/segment | Delete a segment from a memory.
*LiltNode.MemoriesApi* | [**downloadTermbase**](docs/MemoriesApi.md#downloadTermbase) | **GET** /v2/memories/termbase/download | Termbase download for a Memory
*LiltNode.MemoriesApi* | [**exportTermbase**](docs/MemoriesApi.md#exportTermbase) | **POST** /v2/memories/termbase/export | Termbase export for a Memory
*LiltNode.MemoriesApi* | [**getMemory**](docs/MemoriesApi.md#getMemory) | **GET** /v2/memories | Retrieve a Memory
*LiltNode.MemoriesApi* | [**importMemoryFile**](docs/MemoriesApi.md#importMemoryFile) | **POST** /v2/memories/import | File import for a Memory
*LiltNode.MemoriesApi* | [**queryMemory**](docs/MemoriesApi.md#queryMemory) | **GET** /v2/memories/query | Query a Memory
*LiltNode.MemoriesApi* | [**updateMemory**](docs/MemoriesApi.md#updateMemory) | **PUT** /v2/memories | Update the name of a Memory
*LiltNode.ProjectsApi* | [**createProject**](docs/ProjectsApi.md#createProject) | **POST** /v2/projects | Create a Project
*LiltNode.ProjectsApi* | [**deleteProject**](docs/ProjectsApi.md#deleteProject) | **DELETE** /v2/projects | Delete a Project
*LiltNode.ProjectsApi* | [**getProjects**](docs/ProjectsApi.md#getProjects) | **GET** /v2/projects | Retrieve a Project
*LiltNode.TranslateApi* | [**batchTranslateFile**](docs/TranslateApi.md#batchTranslateFile) | **POST** /v2/translate/file | Translate a File
*LiltNode.TranslateApi* | [**downloadFile**](docs/TranslateApi.md#downloadFile) | **GET** /v2/translate/files | Download translated file
*LiltNode.TranslateApi* | [**monitorFileTranslation**](docs/TranslateApi.md#monitorFileTranslation) | **GET** /v2/translate/file | Monitor file translation
*LiltNode.TranslateApi* | [**translateSegmentPost**](docs/TranslateApi.md#translateSegmentPost) | **POST** /v2/translate | Translate a segment
*LiltNode.WorkflowsApi* | [**getWorkflowTemplates**](docs/WorkflowsApi.md#getWorkflowTemplates) | **GET** /v2/workflows/templates | Retrieve workflow templates


## Documentation for Models

 - [LiltNode.AddFileLabelRequest](docs/AddFileLabelRequest.md)
 - [LiltNode.CreateConverterConfigParameters](docs/CreateConverterConfigParameters.md)
 - [LiltNode.DeleteSegmentFromMemoryResponse](docs/DeleteSegmentFromMemoryResponse.md)
 - [LiltNode.DocumentWithSegments](docs/DocumentWithSegments.md)
 - [LiltNode.DocumentWithoutSegments](docs/DocumentWithoutSegments.md)
 - [LiltNode.DocumentWithoutSegmentsStatus](docs/DocumentWithoutSegmentsStatus.md)
 - [LiltNode.Error](docs/Error.md)
 - [LiltNode.FileDeleteResponse](docs/FileDeleteResponse.md)
 - [LiltNode.GetLiltCreateContentResponse](docs/GetLiltCreateContentResponse.md)
 - [LiltNode.InlineResponse200](docs/InlineResponse200.md)
 - [LiltNode.Job](docs/Job.md)
 - [LiltNode.JobCreateParameters](docs/JobCreateParameters.md)
 - [LiltNode.JobDeleteResponse](docs/JobDeleteResponse.md)
 - [LiltNode.JobLeverageStats](docs/JobLeverageStats.md)
 - [LiltNode.JobProject](docs/JobProject.md)
 - [LiltNode.JobStats](docs/JobStats.md)
 - [LiltNode.JobUpdateParameters](docs/JobUpdateParameters.md)
 - [LiltNode.LanguagePair](docs/LanguagePair.md)
 - [LiltNode.LanguagesResponse](docs/LanguagesResponse.md)
 - [LiltNode.LiltCreateContent](docs/LiltCreateContent.md)
 - [LiltNode.LiltCreateContentPreferences](docs/LiltCreateContentPreferences.md)
 - [LiltNode.LiltCreateContentRequest](docs/LiltCreateContentRequest.md)
 - [LiltNode.LiltCreateContentTemplateParams](docs/LiltCreateContentTemplateParams.md)
 - [LiltNode.Memory](docs/Memory.md)
 - [LiltNode.MemoryCreateParameters](docs/MemoryCreateParameters.md)
 - [LiltNode.MemoryDeleteResponse](docs/MemoryDeleteResponse.md)
 - [LiltNode.MemoryImportResponse](docs/MemoryImportResponse.md)
 - [LiltNode.MemoryUpdateParameters](docs/MemoryUpdateParameters.md)
 - [LiltNode.Project](docs/Project.md)
 - [LiltNode.ProjectCreateParameters](docs/ProjectCreateParameters.md)
 - [LiltNode.ProjectDeleteResponse](docs/ProjectDeleteResponse.md)
 - [LiltNode.ProjectStats](docs/ProjectStats.md)
 - [LiltNode.SDLXLIFFFilter](docs/SDLXLIFFFilter.md)
 - [LiltNode.Segment](docs/Segment.md)
 - [LiltNode.SignLiltCreateTermsResponse](docs/SignLiltCreateTermsResponse.md)
 - [LiltNode.SourceFile](docs/SourceFile.md)
 - [LiltNode.TermbaseExportResponse](docs/TermbaseExportResponse.md)
 - [LiltNode.TranslateSegmentBody](docs/TranslateSegmentBody.md)
 - [LiltNode.Translation](docs/Translation.md)
 - [LiltNode.TranslationInfo](docs/TranslationInfo.md)
 - [LiltNode.TranslationList](docs/TranslationList.md)
 - [LiltNode.TranslationMemoryEntry](docs/TranslationMemoryEntry.md)
 - [LiltNode.WorkflowStageAssignment](docs/WorkflowStageAssignment.md)
 - [LiltNode.WorkflowStageTemplate](docs/WorkflowStageTemplate.md)
 - [LiltNode.WorkflowTemplate](docs/WorkflowTemplate.md)


## Documentation for Authorization



### ApiKeyAuth


- **Type**: API key
- **API key parameter name**: key
- **Location**: URL query string



### BasicAuth

- **Type**: HTTP basic authentication

---
_Source: https://npm.io/package/lilt-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
