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

@atzentis/storage-sdk

v0.2.0

Published

Atzentis Storage SDK — TypeScript client for api.atzentis.cloud

Readme

@atzentis/storage-sdk

TypeScript client for the Atzentis Storage Cloud API (api.atzentis.cloud).

The core SDK ships a single StorageClient class that wraps the platform's HTTP surface with API key authentication, tenant injection, automatic retry on transient failures, timeout enforcement, typed error classes, and cursor pagination helpers. Domain services in later phases (files, folders, search, annotations, processing, usage) extend BaseService to share this transport.

Installation

pnpm add @atzentis/storage-sdk zod

zod is an optional peer dependency, used for runtime config validation.

Quick start

import { StorageClient } from "@atzentis/storage-sdk";

const storage = new StorageClient({
  apiKey: process.env.ATZ_STORAGE_API_KEY!,
  tenantId: process.env.ATZ_TENANT_ID!,
});

// Upload a file
const file = await storage.files.upload(blob);

// Search (hybrid)
const results = await storage.search.query({ q: "quarterly report" });

// Annotate
const annotation = await storage.annotations.create({
  fileId: file.id,
  type: "highlight",
  position: { page: 1, x: 10, y: 20, width: 100, height: 30 },
});

// Run OCR and wait
const job = await storage.processing.ocr(file.id);
const completed = await job.completed();

Domain services

| Accessor | Surface | |---|---| | client.files | upload, getUploadUrl, confirmUpload, getDownloadUrl, list, autoPaginate, get, update, delete (single + batch) | | client.folders | create, get, list, autoPaginate, update, move, delete, getTree | | client.search | query, fulltext, autoPaginateQuery, autoPaginateFulltext | | client.annotations | create, get, listByFile, autoPaginateByFile, update, delete, reply, listReplies, autoPaginateReplies, deleteReply | | client.processing | ocr, getOcrStatus, generateEmbedding, getEmbeddingStatus, generateThumbnail, getThumbnailStatus, getThumbnailUrl — every enqueue returns AwaitableJob<T> with a completed() poll helper | | client.usage | getQuota, getUsage, getUsageHistory |

Configuration

| Option | Required | Default | Description | | -------------- | -------- | ----------------------------- | ------------------------------------------------------ | | apiKey | yes | — | API key — sent as Authorization: Bearer {apiKey} | | tenantId | yes | — | Tenant identifier — sent as X-Tenant-ID: {tenantId} | | baseUrl | no | https://api.atzentis.cloud | Override for sandbox / preview / self-hosted | | timeoutMs | no | 30000 | Per-request timeout (ms) | | maxRetries | no | 3 | Maximum retries on transient failures | | retryDelayMs | no | 200 | Initial backoff delay (ms) | | fetch | no | globalThis.fetch | Custom transport (e.g. undici, MSW, test mocks) |

Missing apiKey or tenantId throws StorageConfigError synchronously.

Errors

All errors extend BaseError and carry code + statusCode:

| Class | HTTP | Retryable | | ---------------------- | ---- | --------- | | ValidationError | 400 | no | | AuthenticationError | 401 | no | | PermissionError | 403 | no | | NotFoundError | 404 | no | | ConflictError | 409 | no | | RateLimitError | 429 | yes | | ServerError | 5xx | yes | | ApiError | other| no | | NetworkError | — | yes | | TimeoutError | — | yes | | StorageConfigError | — | no |

RateLimitError.retryAfter honors the server's Retry-After header.

Retry behavior

maxRetries + 1 total attempts. Backoff is exponential with full jitter, capped at 8s. Only retryable errors trigger another attempt; validation and permission errors fail fast.

// Disable retry for a single request
await storage.get("/files", undefined, { retry: false });

Cursor pagination

import { paginate } from "@atzentis/storage-sdk";

for await (const file of paginate((p) => storage.get("/files", p))) {
  console.log(file);
}

paginate returns an AsyncIterable<T> and stops when the server reports hasNextPage: false. Use collectAll for small result sets.

Extending: BaseService

import { BaseService } from "@atzentis/storage-sdk";
import type { PaginatedResult } from "@atzentis/storage-sdk";

class FilesService extends BaseService {
  protected basePath = "/files";

  list(params?: { limit?: number }): Promise<PaginatedResult<File>> {
    return this._list<File>(params);
  }

  get(id: string): Promise<File> {
    return this._get<File>(this._buildPath(id));
  }
}

License

MIT — © Atzentis