# TypeScript / JavaScript SDK

## Overview

The generated Neurelo TypeScript/JavaScript for NodeJS SDK provides easy access to your Neurelo APIs for your applications.

## Installation

* [Download the Typescript / Javascript SDK for your project](/sdks.md)
* Install the SDK:

  `npm i ./neurelo-sdk-typescript-cmt_<id>.tgz`
* Commit the `.tgz` file along with the package.json and package-lock.json

## Getting Started

Neurelo's TypeScript / JavaScript SDK expects two environment variables to be configured:

* `NEURELO_API_BASE_PATH`&#x20;
  * This is the endpoint for the region where your environment is running, for example, if your environment is running in Neurelo's `us-east-2` gateway, the value for this variable should be `https://us-east-2.aws.neurelo.com`
* `NEURELO_API_KEY`
  * This is the API key generated for your environment under the API Keys tab.

<details>

<summary>Replacing or modifying Neurelo's HTTP Client</summary>

To replace Neurelo's [Axios](https://www.npmjs.com/package/axios) client, you can create a `neurelo.config.ts` or `neurelo.config.js` file in your project's root directory. The configuration file should export a named variable called `customAxios` with your new Axios instance.

</details>

Once you've installed and configured your Neurelo SDK, you're ready to import the generated services into your application for use.&#x20;

For example, if a data definition had an Address object present, we would be able to import the `AddressApiService` and utilize various methods to interact with the application's data, as is shown below:

```typescript
import { AddressApiService } from 'neurelo-sdk';

try {
    const response = await AddressApiService.findAddress();
    const addresses = response.data.data;
    
    console.log(addresses);
} catch (error) {
    console.error('Failed to retrieve list of addresses', error);
}
```

For further documentation on the operations available for each of your objects, or how to construct parameters like Select or Where inputs, please see the documentation available inside the 'Docs' tab under the 'Definitions', or under the 'APIs' tab of the 'Environments' of your project

To review an example of an application built using Neurelo's SDK, please visit [Project Examples](/project-examples.md#projects-built-using-neurelo-sdks)&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.neurelo.com/sdks/typescript-javascript-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
