# @wavestreamlabs/wavestream-sdk-ts

> A typescript SDK that allows for seamless communication with the Wavestream API.

Latest version **0.16.1** (published 2023-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wavestreamlabs/wavestream-sdk-ts
pnpm add @wavestreamlabs/wavestream-sdk-ts
yarn add @wavestreamlabs/wavestream-sdk-ts
bun add @wavestreamlabs/wavestream-sdk-ts
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.16.1 |
| Published | 2023-06-09 |
| First published | 2022-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 51.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Wavestream Labs |
| Maintainers | wavestreamcontact |
| Keywords | video, wavestream, typescript |

## Links

- npm: https://www.npmjs.com/package/@wavestreamlabs/wavestream-sdk-ts
- Repository: https://gitlab.com/wavestream-public/wavestream-sdk-ts
- Homepage: https://gitlab.com/wavestream-public/wavestream-sdk-ts#readme
- Issues: https://gitlab.com/wavestream-public/wavestream-sdk-ts/issues
- npm.io page: https://npm.io/package/@wavestreamlabs/wavestream-sdk-ts

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) 1.4.0
- [tus-js-client](https://npm.io/package/tus-js-client.md) 3.0.1
- [@wavestream/openapi-sdk-js](https://npm.io/package/@wavestream/openapi-sdk-js.md) 1.28.2

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.16.1 (latest) — 2023-06-09
- 0.16.0 — 2023-06-08
- 0.15.1 — 2023-05-30
- 0.15.0 — 2023-05-30
- 0.14.1 — 2023-05-04
- 0.14.0 — 2023-05-04
- 0.13.1 — 2023-05-03
- 0.13.0 — 2023-05-03
- 0.12.0 — 2023-04-05
- 0.11.0 — 2023-02-24
- 0.10.0 — 2023-02-24
- 0.9.0 — 2023-02-24
- 0.8.0 — 2023-02-24
- 0.7.0 — 2023-02-24
- 0.6.0 — 2023-01-18
- … 10 more at https://npm.io/package/@wavestreamlabs/wavestream-sdk-ts/versions

## README

<a href="https://www.wave.stream/">
    <img src="./wavestream_logo.png" alt="wavestream logo" title="Wavestream" align="right" height="45" />
</a>

# Wavestream-sdk-ts

The Wavestream client libary is a Javascript SDK written in typescript that allows for seamless communication with Wavestream's API.
Built-in methods make it easy to manage videos and webhooks operations.

## Table of contents

- [Getting Started](#getting-started)
  - [Installation](#installation)
  - [Runtime requirements](#runtime-requirements)
- [Usage](#usage)
  - [Example](#example)

## Getting Started

### Installation

Run following command to specify to `npm` where to fetch the wavestream sdk packages:

```bash
$ echo "@wavestream:registry=https://gitlab.com/api/v4/projects/39243899/packages/npm/" >> .npmrc
```

Install the package using `npm`:

```
$ npm install --save @wavestream/sdk-ts
```

After that, you can load the package:

```js
const wavestreamClient = require("@wavestream/sdk-ts);
```

If you are using ES Modules, you can use:

```js
import wavestreamClient from "@wavestream/sdk-ts";
```

## Runtime requirements

Node.js v14 or newer

## Usage

### Example

```javascript
// Initialize the client with your apiKey
const wavestream = new wavestreamClient({ apiKey: YOUR_API_KEY, endpoint?: API_URL, accessToken: YOUR_ACCESS_TOKEN });

//Create a new empty video container
let video = await wavestream.video.create({
  title: "Title of my video container",
  description: "Description of my video",
});

// Upload video source in the container
// The video processing starts automatically after the upload completes
wavestream.video.upload({
  videoId: video.id,
  filePath: "/home/user/Downloads/myFileName.mp4",
});

// Wait for the video to be processed
// Webhooks can be configured to notify the user when the upload and transcoding processes are completed

// Get video info
video = await wavestream.video.get(video.id);
video.outputs.forEach((vo) => console.log(vo.uri)); // Show outputs uri
```

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