npm package: @spokest/brain
Description: OpenAPI client for @spokest/brain
Author: OpenAPI-Generator
Latest version: 1.0.0

# @spokest/brain@1.0.0

A TypeScript SDK client for the brain-api.spokest.com API.

## Usage

First, install the SDK from npm.

```bash
npm install @spokest/brain --save
```

Next, try it out.


```ts
import {
  Configuration,
  APIKeysApi,
} from '@spokest/brain';
import type { ApiKeysGetRequest } from '@spokest/brain';

async function example() {
  console.log("🚀 Testing @spokest/brain SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: BearerAuth
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new APIKeysApi(config);

  try {
    const data = await api.apiKeysGet();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```


## Documentation

### API Endpoints

All URIs are relative to *https://brain-api.spokest.com/v1*

| Class | Method | HTTP request | Description
| ----- | ------ | ------------ | -------------
*APIKeysApi* | [**apiKeysGet**](docs/APIKeysApi.md#apikeysget) | **GET** /api-keys | List API keys (Mastermind only)
*APIKeysApi* | [**apiKeysIdDelete**](docs/APIKeysApi.md#apikeysiddelete) | **DELETE** /api-keys/{id} | Revoke API key (Mastermind only)
*APIKeysApi* | [**apiKeysPost**](docs/APIKeysApi.md#apikeyspostoperation) | **POST** /api-keys | Create API key (Mastermind only)
*CRUDApi* | [**memoriesGet**](docs/CRUDApi.md#memoriesget) | **GET** /memories | List memories (paginated)
*CRUDApi* | [**memoriesIdDelete**](docs/CRUDApi.md#memoriesiddelete) | **DELETE** /memories/{id} | Delete a memory
*CRUDApi* | [**memoriesIdGet**](docs/CRUDApi.md#memoriesidget) | **GET** /memories/{id} | Get a memory by ID
*CRUDApi* | [**memoriesIdHistoryGet**](docs/CRUDApi.md#memoriesidhistoryget) | **GET** /memories/{id}/history | Get memory version history
*CRUDApi* | [**memoriesIdPut**](docs/CRUDApi.md#memoriesidputoperation) | **PUT** /memories/{id} | Update a memory
*CRUDApi* | [**memoriesIdTtlPatch**](docs/CRUDApi.md#memoriesidttlpatchoperation) | **PATCH** /memories/{id}/ttl | Update memory expiration
*ChatApi* | [**chatPost**](docs/ChatApi.md#chatpost) | **POST** /chat | Chat with your brain
*EventsApi* | [**memoryEventsGet**](docs/EventsApi.md#memoryeventsget) | **GET** /memory/events | Poll memory events
*ImportApi* | [**jobsIdGet**](docs/ImportApi.md#jobsidget) | **GET** /jobs/{id} | Check import job status
*ImportApi* | [**memoryImportPost**](docs/ImportApi.md#memoryimportpostoperation) | **POST** /memory/import | Bulk import memories
*MemoryApi* | [**memoryConnectPost**](docs/MemoryApi.md#memoryconnectpost) | **POST** /memory/connect | Connect two memories
*MemoryApi* | [**memoryCrossAgentPost**](docs/MemoryApi.md#memorycrossagentpostoperation) | **POST** /memory/cross-agent | Cross-agent memory recall
*MemoryApi* | [**memoryGraphPost**](docs/MemoryApi.md#memorygraphpostoperation) | **POST** /memory/graph | Traverse memory graph
*MemoryApi* | [**memoryRecallPost**](docs/MemoryApi.md#memoryrecallpost) | **POST** /memory/recall | Recall memories
*MemoryApi* | [**memoryStorePost**](docs/MemoryApi.md#memorystorepost) | **POST** /memory/store | Store a memory
*MemoryApi* | [**memoryStoryPost**](docs/MemoryApi.md#memorystorypostoperation) | **POST** /memory/story | Reconstruct narrative timeline
*StatusApi* | [**statusGet**](docs/StatusApi.md#statusget) | **GET** /status | API health check
*WebhooksApi* | [**webhooksGet**](docs/WebhooksApi.md#webhooksget) | **GET** /webhooks | List webhooks (Mastermind only)
*WebhooksApi* | [**webhooksIdDelete**](docs/WebhooksApi.md#webhooksiddelete) | **DELETE** /webhooks/{id} | Delete webhook
*WebhooksApi* | [**webhooksIdDeliveriesGet**](docs/WebhooksApi.md#webhooksiddeliveriesget) | **GET** /webhooks/{id}/deliveries | Webhook delivery log
*WebhooksApi* | [**webhooksIdGet**](docs/WebhooksApi.md#webhooksidget) | **GET** /webhooks/{id} | Get webhook
*WebhooksApi* | [**webhooksIdPatch**](docs/WebhooksApi.md#webhooksidpatchoperation) | **PATCH** /webhooks/{id} | Update webhook
*WebhooksApi* | [**webhooksIdTestPost**](docs/WebhooksApi.md#webhooksidtestpost) | **POST** /webhooks/{id}/test | Test webhook
*WebhooksApi* | [**webhooksPost**](docs/WebhooksApi.md#webhookspostoperation) | **POST** /webhooks | Create webhook (Mastermind only)


### Models

- [ApiKeysPostRequest](docs/ApiKeysPostRequest.md)
- [ChatPost200Response](docs/ChatPost200Response.md)
- [ChatRequest](docs/ChatRequest.md)
- [ConnectRequest](docs/ConnectRequest.md)
- [MemoriesIdPutRequest](docs/MemoriesIdPutRequest.md)
- [MemoriesIdTtlPatchRequest](docs/MemoriesIdTtlPatchRequest.md)
- [Memory](docs/Memory.md)
- [MemoryCrossAgentPostRequest](docs/MemoryCrossAgentPostRequest.md)
- [MemoryGraphPostRequest](docs/MemoryGraphPostRequest.md)
- [MemoryImportPostRequest](docs/MemoryImportPostRequest.md)
- [MemoryImportPostRequestMemoriesInner](docs/MemoryImportPostRequestMemoriesInner.md)
- [MemoryRecallPost200Response](docs/MemoryRecallPost200Response.md)
- [MemoryStoryPostRequest](docs/MemoryStoryPostRequest.md)
- [ModelError](docs/ModelError.md)
- [RecallRequest](docs/RecallRequest.md)
- [RecallRequestTimeRange](docs/RecallRequestTimeRange.md)
- [StoreRequest](docs/StoreRequest.md)
- [WebhooksIdPatchRequest](docs/WebhooksIdPatchRequest.md)
- [WebhooksPostRequest](docs/WebhooksPostRequest.md)

### Authorization


Authentication schemes defined for the API:
<a id="BearerAuth"></a>
#### BearerAuth


- **Type**: HTTP Bearer Token authentication

## About

This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/)
and is automatically generated by the
[OpenAPI Generator](https://openapi-generator.tech) project:

- API version: `1.0.0`
- Package version: `1.0.0`
- Generator version: `7.21.0`
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`

The generated npm module supports the following:

- Environments
  * Node.js
  * Webpack
  * Browserify
- Language levels
  * ES5 - you must have a Promises/A+ library installed
  * ES6
- Module systems
  * CommonJS
  * ES6 module system

For more information, please visit [https://spokest.com](https://spokest.com)

## Development

### Building

To build the TypeScript source code, you need to have Node.js and npm installed.
After cloning the repository, navigate to the project directory and run:

```bash
npm install
npm run build
```

### Publishing

Once you've built the package, you can publish it to npm:

```bash
npm publish
```

## License

[]()