# @expressms/smartapp-bridge

> SmartApp bridge library

Latest version **1.5.0-alpha.2** (published 2026-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @expressms/smartapp-bridge
pnpm add @expressms/smartapp-bridge
yarn add @expressms/smartapp-bridge
bun add @expressms/smartapp-bridge
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.5.0-alpha.2 |
| Published | 2026-08-05 |
| First published | 2022-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 163 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | bigbublik, termyanen, arturio-rnd |

## Links

- npm: https://www.npmjs.com/package/@expressms/smartapp-bridge
- npm.io page: https://npm.io/package/@expressms/smartapp-bridge

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^4.0.7

## Recent versions

- 1.5.0-alpha.2 (latest) — 2026-08-05
- 1.5.0-alpha.1 — 2026-08-05
- 1.5.0-alpha.0 — 2026-05-14
- 1.4.5 — 2025-07-18
- 1.4.4 — 2025-07-18
- 1.4.3 — 2025-07-18
- 1.4.2 — 2025-07-18
- 1.4.1 — 2025-07-09
- 1.4.0 — 2025-03-17
- 1.4.0-alpha.2 — 2025-02-18
- 1.4.0-alpha.1 — 2024-08-06
- 1.4.0-alpha.0 — 2024-08-05
- 1.3.0 — 2024-06-10
- 1.3.0-alpha.0 — 2024-05-07
- 1.2.3 — 2023-12-01
- … 16 more at https://npm.io/package/@expressms/smartapp-bridge/versions

## README

# SmartApp bridge library

This library provides a universal interface for exchanging events with an express client.
Andriod, iOS, Aurora and Web clients supported.

All types can be found [here](https://smartapp.ccsteam.xyz/smartapp-bridge/).

### Send event to eXpress

```js
SmartAppBridge
  .sendClientEvent(
    {
      method: 'get_weather',
      params: {
        city: 'Moscow',
      },
      files: []
    }
  )
  .then(data => {
    // Handle response
    console.log('response', data)
  })
  .then(({ type: method, handler: express, payload: params, files }) => {
    // Handle response data type, payload
  })
  .catch(() => {
    // Do something on timeout
  })
```

```js
SmartAppBridge
  .sendBotEvent(
    {
      method: 'get_weather',
      params: {
        city: 'Moscow',
      },
    }
  )
  .then(data => {
    // Handle response
    console.log('response', data)
  })
  .then(({ type: method, handler: botx, payload: params }) => {
    // Handle response data type, payload
  })
  .catch(() => {
    // Do something on timeout
  })
```

### Receive event from eXpress
```js
SmartAppBridge.onRecieve(({ type, payload }) => {
  // This callback triggers when eXpress client send data without ref
})
```

### Enable/Disable renaming event params from camelCase to snake_case and vice versa
- Params are renamed from camelCase to snake_case and vice versa by default
- Call after sending `ready` event

```js
SmartAppBridge.disableRenameParams()
```

```js
SmartAppBridge.enableRenameParams()
```

### Enable/disable logging smart app events

```js
SmartAppBridge.enableLogs()
```

```js
SmartAppBridge.disableLogs()
```

### Logging via bridge on mobile devices
- log your data inside a smart app:
```typescript
  import { Bridge as bridge } from '@unlimited/smartapp-bridge'

  const data: string | value = { logs: 'test' }
  bridge?.log?.(data)
```
- Search in mobile logs by 'SmartApp Log' string

```js
SmartAppBridge?.log?.(data)
```

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