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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@digitalocean/dots

v1.4.0

Published

TypeScript client generator based on DigitalOcean's OpenAPI specification.

Readme

DoTs

DoTs is the official DigitalOcean Typescript Client based on the DO OpenAPIv3 specification.

Getting Started

Prerequisites

  • NodeJS 18 or above
  • TypeScript 5 or above
  • A DigitalOcean account with an active subscription. Along with a DigitalOcean token with proper permissions to manage DigitalOcean resources.
  • "type": "module" in your package.json (for ES module support)

Installation

The package is published on npmjs.com.

npm i @digitalocean/dots

Documentation

Note: Comprehensive documentation quality is currently lacking and under development. The documentation is actively being improved and will be updated once fixed.

https://digitaloceandots.readthedocs.io/en/latest/

Basic Usage

A quick guide to getting started with client

Authenticating

dots must be initialized with createDigitalOceanClient(). A DigitalOcean token is required. This token can be passed in via DigitalOceanApiKeyAuthenticationProvider(), an example below:

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(token!);
// Create request adapter using the fetch-based implementation
const adapter = new FetchRequestAdapter(authProvider);
// Create the API client
const client = createDigitalOceanClient(adapter);

Managing DigitalOcean Resources

Find below a working example of creating a DigitalOcean volume via dots:

import { createDigitalOceanClient, DigitalOceanApiKeyAuthenticationProvider,
 FetchRequestAdapter, Volumes_ext4 } from "@digitalocean/dots";

const token = process.env.DIGITALOCEAN_TOKEN;
if (!token) {
    throw new Error("DIGITALOCEAN_TOKEN not set");
}

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(token!);
// Create request adapter using the fetch-based implementation
const adapter = new FetchRequestAdapter(authProvider);
// Create the API client
const client = createDigitalOceanClient(adapter);

async function main(): Promise<void> {
    try {
        const volumeReq: Volumes_ext4 = {
            sizeGigabytes: 10,
            name: `test-volume`,
            description: "Block storage testing",
            region: "nyc3",
            filesystemType: "ext4",
        };

        const resp = await client.v2.volumes.post(volumeReq);
        if (resp && resp.volume) {
            const volume = resp.volume;
            console.log(`Created volume ${volume.name} <ID: ${volume.id}>`);
        } else {
            throw new Error("Failed to create volume or volume is undefined");
        }

        console.log("Done!");

    } catch (err) {
        console.error(err);
    }
}

main();

Running the above code snippet with tsc && node index.js would output the following:

Created volume test-volume <ID: 751d0c09-1613-11f0-8aa5-0a58ac147241>
Done!

More working examples can be found in dots/examples.

Known Issues

This section lists the known issues of the client generator.

Generates nested value fields for nested arrays

  • This is an existing issue with our code generated tool, Kiota
  • More details about this issue can be found here

Contributing

We welcome contributions! Feel free to get involved in developing this client by visiting our Contribuing Guide for detailed information and guidelines. For feature requests or bug reports, open an issue to help us improve the client.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.