0.0.21-alpha • Published 12 hours ago

@upstash/sdk v0.0.21-alpha

Weekly downloads
-
License
MIT
Repository
github
Last release
12 hours ago

Upstash SDK Node.js Client · license Tests npm (scoped) npm bundle size npm weekly download

@upstash/sdk is an umbrella HTTP/REST based client for Typescript, built on top of other Upstash products and SDKs.

Quick Start

Install

Node.js

npm install @upstash/sdk

Basic Usage:

const client = new Upstash({
  email: "your-upstash-email@gmail.com",
  token: "developer-token",
});

//OR

//If you have your env keys already in your .env file, you don't have to pass them explicitly
const client = new Upstash();

//VECTOR SDK
const createRes = await client.createVectorIndex({
  name: "uptash-rocks",
  region: "eu-west-1",
  dimension_count: 2,
  similarity_function: "COSINE",
  type: "fixed",
});

const index = await client.newVectorClient(createRes.id);
await index.info();

const indexes = await client.listVectorIndexes();

await client.deleteVectorIndex(createRes.id);

//REDIS SDK
const createRes = await client.createRedisDatabase({
  name: "uptash-rocks",
  region: "eu-central-1",
  tls: true,
});

const redis = await client.newRedisClient(createRes.database_name);
await redis.incr("hut-two-three-four");

const dbs = await client.listRedisDatabases();

await client.deleteRedisDatabase(createRes.database_name);

//QSTASH SDK
const { client, receiver } = await client.newQStashClient();
await qstashClient.publishJSON();
await qstashReceiver.verify();

Troubleshooting

We have a Discord for common problems. If you can't find a solution, please open an issue.

Docs

See the documentation for details.

Contributing

Install Bun

Running tests

bun run test

Building

bun run build
0.0.20-alpha

12 hours ago

0.0.21-alpha

12 hours ago

0.0.15-alpha

3 days ago

0.0.19-alpha

3 days ago

0.0.10-alpha

3 days ago

0.0.11-alpha

3 days ago

0.0.9-alpha

3 days ago

0.0.14-alpha

3 days ago

0.0.18-alpha

3 days ago

0.0.12-alpha

3 days ago

0.0.17-alpha

3 days ago

0.0.13-alpha

3 days ago

0.0.16-alpha

3 days ago

0.0.8-alpha

3 days ago

0.0.6-alpha

3 days ago

0.0.5-alpha

3 days ago

0.0.7-alpha

3 days ago

0.0.4-alpha

3 months ago

0.0.3-alpha

3 months ago

0.0.2-alpha

3 months ago

0.0.1-alpha

3 months ago