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

@databite/build

v6.0.1

Published

A comprehensive SDK for building connectors to third party APIs.

Readme

@databite/build

A comprehensive SDK for building connectors to third-party APIs with a fluent, type-safe API.

📦 Project Structure

build/
├── src/
│   ├── connector-builder/
│   │   ├── builder.ts          # Main ConnectorBuilder class
│   │   ├── flow-builder.ts     # Flow builder for authentication flows
│   │   ├── index.ts            # Public API exports
│   │   └── utils.ts            # Utility functions
│   └── index.ts                # Main package exports
├── dist/                       # Compiled JavaScript output
├── package.json
└── README.md

🚀 Installation

npm install @databite/build @databite/types

Peer Dependencies:

npm install zod typescript

🎯 Overview

The @databite/build package provides the core functionality for creating connectors using a fluent API. It includes ConnectorBuilder for defining connectors, Action & Sync Creators, Type Safety, Validation, Retry Logic, Flow Builder, and Connector Validation.

📚 API Reference

Core Classes

ConnectorBuilder

The main class for building connectors with a fluent API.

class ConnectorBuilder<
  TIntegrationConfig extends z.ZodType,
  TConnectionConfig extends z.ZodType
> {
  withIdentity(id: string, name: string): this
  withVersion(version: string): this
  withAuthor(author: string): this
  withLogo(logo: string): this
  withDocumentationUrl(url: string): this
  withDescription(description: string): this
  withIntegrationConfig(config: TIntegrationConfig): this
  withConnectionConfig(config: TConnectionConfig): this
  withAuthenticationFlow(flow: Flow<TConnectionConfig>): this
  withRefresh(refresh: (connection: Connection<TConnectionConfig>) => Promise<z.infer<TConnectionConfig>>): this
  withActions(actions: Record<string, Action>): this
  withSyncs(syncs: Record<string, Sync>): this
  withTags(...tags: string[]): this
  withCategories(...categories: ConnectorCategory[]): this
  build(): Connector<TIntegrationConfig, TConnectionConfig>
}

Helper Functions

createConnector

Creates a new ConnectorBuilder instance.

function createConnector(): ConnectorBuilder<any, any>

createAction

Creates an action with automatic retry logic and timeout handling.

function createAction<
  TInputSchema extends z.ZodType,
  TOutputSchema extends z.ZodType,
  TConnectionConfig extends z.ZodType
>(config: {
  label: string;
  description: string;
  inputSchema: TInputSchema;
  outputSchema: TOutputSchema;
  maxRetries: number;
  timeout: number;
  handler: (
    params: z.infer<TInputSchema>,
    connection: Connection<TConnectionConfig>
  ) => Promise<z.infer<TOutputSchema>>;
}): Action<TInputSchema, TOutputSchema, TConnectionConfig>

createSync

Creates a sync operation for data synchronization.

function createSync<
  TOutputSchema extends z.ZodType,
  TConnectionConfig extends z.ZodType
>(config: {
  label: string;
  description: string;
  schedule: string;
  outputSchema: TOutputSchema;
  maxRetries: number;
  timeout: number;
  handler: (
    connection: Connection<TConnectionConfig>
  ) => Promise<z.infer<TOutputSchema>[]>;
}): Sync<TOutputSchema, TConnectionConfig>

💡 Usage Example

import { createConnector, createAction, createSync } from "@databite/build";
import { z } from "zod";

const connector = createConnector()
  .withIdentity("my-service", "My Service")
  .withVersion("1.0.0")
  .withAuthor("Your Name")
  .withLogo("https://example.com/logo.png")
  .withDescription("Connector for My Service API")
  .withIntegrationConfig(z.object({ apiKey: z.string() }))
  .withConnectionConfig(z.object({ accessToken: z.string() }))
  .withActions({
    getUser: createAction({
      label: "Get User",
      description: "Fetch user information",
      inputSchema: z.object({ id: z.string() }),
      outputSchema: z.object({ user: z.any() }),
      handler: async (params, connection) => {
        const response = await fetch(
          `${connection.config.baseUrl}/users/${params.id}`,
          {
            headers: {
              Authorization: `Bearer ${connection.config.accessToken}`,
            },
          }
        );
        return { user: await response.json() };
      },
    }),
  })
  .build();

🔗 Related Packages

📄 License

MIT License - see LICENSE for details.