npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@raft-tech/rdp-sdk-typescript

v2026.38.0

Published

TypeScript SDK for client applications interacting with RDP.

Readme

RDP SDK for TypeScript

The RDP SDK for TypeScript is part of the unified SDK family for client applications interacting with Raft Data Platform (RDP). It provides typed Node and Web clients plus endpoint, authentication, TLS, and logging helpers for the RDP API surface.

For platform concepts, API guides, and integration details, see https://developer.teamraft.com.

See Terms of Use.

Installation

npm config set @buf:registry https://buf.build/gen/npm/v1
npm install @raft-tech/rdp-sdk-typescript

The scoped registry provides the public TypeScript package generated from the raft/wdm Buf module.

Quick Start

export RDP_SERVER_URL=https://rdp.example.com
export RDP_API_KEY=your-api-key
import { create } from "@bufbuild/protobuf";
import {
  createClient,
  fromNodeConfig,
  loadConfig,
} from "@raft-tech/rdp-sdk-typescript";
import { SearchObjectsRequestSchema } from "@buf/raft_wdm.bufbuild_es/raft/wdm/v1/service/object_service_pb.js";

// Load RDP_SERVER_URL and authentication from the environment.
const cfg = loadConfig();

// Create a client from the loaded config.
const client = createClient(...fromNodeConfig(cfg));

// Request the first 10 WDM objects.
const response = await client.objectService.searchObjects(
  create(SearchObjectsRequestSchema, { pageSize: 10 }),
);

if (response.objects.length === 0) {
  console.log("No WDM objects found.");
} else {
  for (const object of response.objects) {
    console.log(`${object.id}\t${object.name}`);
  }
}

For more examples, see examples.

Configuration

Node clients can call loadConfig() to read connection settings from environment variables and optional .env.local files. Web clients pass the same keys as a plain object to the web loadConfig helper. For browser applications, import from @raft-tech/rdp-sdk-typescript/web.

| Variable | Required | Description | | --- | --- | --- | | RDP_SERVER_URL | No | Base RDP endpoint. Defaults to https://rdp.local; use scheme and host only. | | RDP_SERVER_PORT | No | Optional port override for the endpoint. | | TLS_SKIP_VERIFY | No | Node only. Set to true only for development or test endpoints with self-signed certificates. |

Authentication

API key authentication is the preferred method for client applications. Use OAuth2 client credentials or a static Bearer token only when your deployment requires it.

| Method | Variables | Request behavior | | --- | --- | --- | | API key | RDP_API_KEY | Sends the value on each request as an API key header. | | OAuth2 client credentials | RDP_CLIENT_ID, RDP_CLIENT_SECRET | Fetches a token from {RDP_SERVER_URL}/api/v1/auth/token and sends it as a bearer token. | | Bearer | RDP_BEARER_TOKEN | Sends Authorization: Bearer <token>. |

Providing multiple auth methods is an error. If no method is configured, requests are sent without auth and the SDK logs a warning.

Functional Configuration

Pass functional options to createClient(endpoint, ...options). Node clients can also start from loadConfig() and pass the result through fromNodeConfig(cfg).

For direct Node construction:

const client = createClient(
  "https://rdp.example.com",
  WithAPIKey("your-api-key"),
  WithTimeout(10_000),
  WithLogger(console),
);

Static Authorization header auth can be configured directly as well:

const bearerClient = createClient(
  "https://rdp.example.com",
  WithBearerToken("token"),
);

For Node environment-first configuration with call-site overrides:

const cfg = loadConfig({ envPath: ".env.local", logger: console });
const [endpoint, ...options] = fromNodeConfig(cfg);

const client = createClient(
  endpoint,
  ...options,
  WithTimeout(10_000),
);

For browser applications, import from @raft-tech/rdp-sdk-typescript/web and pass configuration as a plain object:

const rawConfig = {
  RDP_SERVER_URL: "https://rdp.example.com",
  RDP_BEARER_TOKEN: "token",
};
const cfg = loadConfig(rawConfig, console);

const client = createClient(
  cfg.serverUrl,
  WithBearerToken(rawConfig.RDP_BEARER_TOKEN),
  WithTimeout(10_000),
);

Use WithClientCredentials(clientId, clientSecret) only when your deployment requires OAuth2 client credentials. Use WithTLSSkipVerify() only in Node for development or test endpoints with self-signed certificates.

Browser hosts can provide their own fetch implementation for auth, instrumentation, or embedded runtimes:

import { createClient, WithFetch } from "@raft-tech/rdp-sdk-typescript/web";

const client = createClient(
  "https://rdp.example.com",
  WithFetch(authenticatedFetch),
);