# @bluedot-innovation/javascript-sdk

> Don’t have an app and still want to use Bluedot? Wave API lets you use Bluedot tech in web pages. Leverage world-class location capabilities on every channel.

Latest version **1.3.3** (published 2022-04-19) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install @bluedot-innovation/javascript-sdk
pnpm add @bluedot-innovation/javascript-sdk
yarn add @bluedot-innovation/javascript-sdk
bun add @bluedot-innovation/javascript-sdk
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.3 |
| Published | 2022-04-19 |
| First published | 2021-05-10 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 4 |
| Unpacked size | 292.8 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | dannybluedot, santiruedha, darrenlim_bluedot, bdandrew, bddeployment, toroduque, rwk1, an_bluedot, yuliayulia, jamie-bluedot, stewartcollins, nehaish |

## Links

- npm: https://www.npmjs.com/package/@bluedot-innovation/javascript-sdk
- npm.io page: https://npm.io/package/@bluedot-innovation/javascript-sdk

## Dependencies (4)

- [uuid](https://npm.io/package/uuid.md) ^8.3.1
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [tslib](https://npm.io/package/tslib.md) ^2.2.0
- [events](https://npm.io/package/events.md) ^3.3.0

## Recent versions

- 1.3.3 (latest) — 2022-04-19
- 1.3.5-alpha.4 (alpha) — 2023-10-03
- 1.3.5-alpha.3 — 2023-10-03
- 1.3.5-alpha.2 — 2023-10-03
- 1.3.5-alpha.1 — 2023-10-03
- 1.3.5-alpha.0 — 2023-10-03
- 1.3.4-alpha — 2023-07-24
- 1.3.4 — 2023-07-18
- 1.3.2 — 2022-04-11
- 1.3.1 — 2022-02-27
- 1.3.0 — 2021-08-10
- 1.2.0 — 2021-06-01
- 1.1.0 — 2021-05-26
- 1.0.1 — 2021-05-12
- 1.0.0 — 2021-05-10
- … 1 more at https://npm.io/package/@bluedot-innovation/javascript-sdk/versions

## README

Don’t have an app and still want to use Bluedot? Wave API lets you use Bluedot tech in web pages. Leverage world-class location capabilities on every channel. 

The Javascript SDK provides an easy and convenient way to integrate the Wave API. It also gives you methods to request a user's location from the browser. You will be able to integrate Wave API in few lines and be good to go.

## Installation
Bluedot Javascript SDK is available as a NPM package
```
npm install @bluedot-innovation/javascript-sdk
```
## Usage
CommonJS
```
const bluedotSdk = require("@bluedot-innovation/javascript-sdk")
const {
    bluedot,
    createHelloModel
} = bluedotSdk
```

ES Modules
```
import { bluedot } from '@bluedot-innovation/javascript-sdk'
```

Send a Wave event
```
import { bluedot, createHelloModel } from "@bluedot-innovation/javascript-sdk"

bluedot.initialize('2a397117-5c61-4474-85d9-c216c13da7f9')
bluedot.setLocationEnabled(true)
await bluedot.wave.send('your_destinationId', { key1: 'value1' })
```

Send a Hello Screen order
```
const helloModel = createHelloModel();
helloModel.setOrderId("Order-1234")
    .setCustomerName("Peter Goldman")
    .setDisplayedCustomDataField("Parking Bay", "10")
    .setEventType("onTheWay")
await bluedot.wave.send('your_destinationId', helloModel)
```


**_See the [public interfaces](https://bluedot-javascript-sdk-docs.bluedot.io/modules.html) for details about object structure, function signatures and their purpose._**

**_Visit <a href="https://docs.bluedot.io/web-sdk/" target="_blank">Web SDK</a> for guides to integrate the Javascript SDK within your webpage or app._**

---
_Source: https://npm.io/package/@bluedot-innovation/javascript-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
