open-index/open-npm huggingface dataset:
npm package: @forten/build
Description: Help create modular apps with blocks.
Author: Maia Taewana
Latest version: 2.0.0

# @forten/build

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
![100% coverage][coverage-image]

[npm-image]: https://img.shields.io/npm/v/@forten/build.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/build
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten
[coverage-image]: https://user-images.githubusercontent.com/79422935/109943846-79cd3980-7d3a-11eb-959b-2b8d33da3c28.png

The build module acts like a glue between different composants of an app called 'blocks'.
It helps create modular apps.
npm package: @forten/code-editor
Description: wrapper around codemirror for forten
Author: Maia Taewana
Latest version: 2.0.0

# @forten/code-editor

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]

[npm-image]: https://img.shields.io/npm/v/@forten/code-editor.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/code-editor
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten

Wrapper around codemirror with scrubbing and other helpers.
npm package: @forten/dragdrop
Description: Drag and drop support.
Author: Maia Taewana
Latest version: 2.0.0

# @forten/dragdrop

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]

[npm-image]: https://img.shields.io/npm/v/@forten/dragdrop.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/dragdrop
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten

Drag and drop management.
npm package: @forten/hooks
Description: Support for callable hooks in actions (through effects).
Author: Maia Taewana
Latest version: 2.0.0

# @forten/hooks

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
![100% coverage][coverage-image]

[npm-image]: https://img.shields.io/npm/v/@forten/hooks.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/hooks
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten
[coverage-image]: https://user-images.githubusercontent.com/79422935/109943846-79cd3980-7d3a-11eb-959b-2b8d33da3c28.png

Support for callable hooks. The first hook that returns 'true' blocks the chain.

For a simple example of hooks usage, see 'locale' module.
npm package: @forten/preferences
Description: An easy way to save and get back user preferences.
Author: Maia Taewana
Latest version: 2.0.0

# @forten/preferences

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]

[npm-image]: https://img.shields.io/npm/v/@forten/preferences.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/preferences
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten

Support for user preferences through a simple api.
npm package: @forten/theme
Description: Theming support.
Author: Maia Taewana
Latest version: 2.0.0

# @forten/theme

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
![100% coverage][coverage-image]

[npm-image]: https://img.shields.io/npm/v/@forten/theme.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/theme
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten
[coverage-image]: https://user-images.githubusercontent.com/79422935/109943846-79cd3980-7d3a-11eb-959b-2b8d33da3c28.png

A block to use themes in Overmind apps. The theming values are stored inside
the `theme` state in Overmind and styling uses CSS variables instead of a
react context.

Each block can add/alter values in any given theme. The used theme
overwrites values in the `default` theme. This means that apart from
the `default`, other themes can be partial.
npm package: @forten/tree
Description: Out-tree structure and handling
Author: Maia Taewana
Latest version: 2.0.0

# @forten/tree

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]

[npm-image]: https://img.shields.io/npm/v/@forten/tree.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/tree
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten

An out-tree structure (used by @forten/forten and @forten/tree-view).
npm package: @forten/tree-view
Description: visual tree composer
Author: Maia Taewana
Latest version: 2.0.0

# @forten/tree-view

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]

[npm-image]: https://img.shields.io/npm/v/@forten/tree-view.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/tree-view
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten

Out-tree composer to assemble elements (3D scene tree, flow programming, etc).
npm package: @forten/useragent
Description: Handle keyboard useragent.
Author: Maia Taewana
Latest version: 2.0.0

# @forten/useragent

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]

[npm-image]: https://img.shields.io/npm/v/@forten/useragent.svg?style=flat
[npm-url]: https://npmjs.org/package/@forten/useragent
[travis-image]: https://img.shields.io/travis/fortenjs/forten.svg?style=flat
[travis-url]: https://travis-ci.org/fortenjs/forten

A block to provide useragent information, hooks (online/offline) and
service worker setup (if needed).
npm package: @forteplatforms/sdk
Description: Official TypeScript SDK for Forte Platforms
Author: Forte Platforms
Latest version: 1.0.28

# Forte Platforms TypeScript SDK

Official TypeScript SDK for interacting with the Forte Platforms API.

## Installation

```bash
npm install @forteplatforms/sdk
```

## Authentication

When your code runs inside a Forte-hosted service, `FORTE_API_TOKEN` is set automatically and scoped to the service's project — no configuration needed:

```typescript
const client = new ForteClient();
```

Outside of Forte (local development, external hosting), pass the token explicitly:

```typescript
const client = new ForteClient({ apiToken: 'your_api_token_here' });
```

Or set it as an environment variable (Node.js only):

```bash
export FORTE_API_TOKEN=your_api_token_here
```

You can generate an API token from the Forte Platforms dashboard.

> **Note:** The TypeScript SDK works in both Node.js and browser/React environments. In browsers, you must pass `apiToken` directly since environment variables are not available.

## Quick Start

```typescript
import { ForteClient } from '@forteplatforms/sdk';

const client = new ForteClient();

// List your projects
const projects = await client.projects.listProjects();

// Get a specific project
const project = await client.projects.getProject({ projectId: 'your-project-id' });
```

## Error Handling

API errors are thrown as exceptions with HTTP status information:

```typescript
try {
  const project = await client.projects.getProject({ projectId: 'invalid-id' });
} catch (error) {
  console.error('API error:', error);
}
```

## User Custom Attributes

Store arbitrary key-value metadata on your users. Useful for tracking subscription tiers, feature flags, preferences, or any application-specific data.

```typescript
// Set custom attributes on a user
const user = await client.projects.putUserCustomAttributes({
  projectId: 'your-project-id',
  userId: 'user-id',
  requestBody: {
    plan: 'pro',
    referral_source: 'google',
    onboarding_completed: 'true',
  },
});

console.log(user.customMetadataAttributes);
// { plan: 'pro', referral_source: 'google', onboarding_completed: 'true' }
```

**Key constraints:**
- Keys must be 1-64 characters: letters, numbers, underscores, and hyphens only
- Values are strings
- Each call replaces all existing attributes — include any you want to keep

### Merge with existing attributes

```typescript
// Read current attributes, then merge
const user = await client.projects.getProjectUser({
  projectId: 'your-project-id',
  userId: 'user-id',
});

await client.projects.putUserCustomAttributes({
  projectId: 'your-project-id',
  userId: 'user-id',
  requestBody: {
    ...user.customMetadataAttributes,
    plan: 'enterprise', // update one field
  },
});
```

## API Reference

### `client.projects`

Manage projects and services on Forte Platforms.

### `client.users`

Manage end-users within your projects.