You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@ydbjs/api

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ydbjs/api

TypeScript gRPC service definitions and protobuf types for all YDB APIs. Enables strongly-typed client generation and low-level protocol access.

6.0.1-alpha.32
latest
Source
npmnpm
Version published
Weekly downloads
175
-47.92%
Maintainers
1
Weekly downloads
 
Created
Source

@ydbjs/api

The @ydbjs/api package provides TypeScript/JavaScript bindings for interacting with YDB services. It includes generated gRPC service definitions and protocol buffer types for various YDB APIs.

Features

  • gRPC service definitions for YDB APIs
  • Protocol buffer types for YDB entities
  • TypeScript support with type definitions

Installation

Install the package using npm:

npm install @ydbjs/api@alpha

Usage

Importing Services

import { DiscoveryServiceDefinition } from '@ydbjs/api/discovery';
import { CmsServiceDefinition } from '@ydbjs/api/cms';
import { QueryServiceDefinition } from '@ydbjs/api/query';

Example: Using a Service

import { createClientFactory, createChannel } from 'nice-grpc';
import { DiscoveryServiceDefinition } from '@ydbjs/api/discovery';

const clientFactory = createClientFactory();
const discoveryClient = clientFactory.create(DiscoveryServiceDefinition, createChannel('http://localhost:2136'));

async function listEndpoints() {
  const response = await discoveryClient.listEndpoints({ database: '/local' });
  console.log(response);
}

listEndpoints().catch(console.error);

Using with @ydbjs/core

import { DiscoveryServiceDefinition } from '@ydbjs/api/discovery';
import { Driver } from '@ydbjs/core';

const driver = new Driver('grpc://localhost:2136');
const client = driver.createClient(DiscoveryServiceDefinition);
client.listEndpoints({ database: '/local' });

Development

Generating gRPC and Protocol Buffer Files

npm run generate

License

This project is licensed under the Apache 2.0 License.

Keywords

ydb

FAQs

Package last updated on 11 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts