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

tally-js

v1.0.2

Published

TypeScript wrapper for Tally.so API

Readme

tally-js

A type-safe and developer-friendly TypeScript wrapper for the tally.so API.

Disclaimer: The Tally.so API is currently in Private Beta and might be subject to change. You need to sign up for the Beta to get access.

Documenation

Full documentation available here

Installation

npm install tally-js

Core Concepts

  • This tally client provides access to all endpoints of the Tally.so API by exposing services

  • Service endpoints always return a response with

    {
      data: TallyDTO | null,
      error: Error | null
    }
  • Wrapper uses a three-layer architecture for maximum type safety and flexibility:

    1. DTOs (Data Transfer Objects)

      • Raw API response types
      • Match the exact structure of the API responses
    2. Domain Interfaces

      • Enhanced types for better developer experience
      • Example: TallyForm interface with addBlock function
    3. Models

      • Concrete implementations of domain interfaces
      • Handle DTO to domain model transformation

Quick Start

import { TallyClient } from 'tally-js'

const tally = new TallyClient({
  apiKey: 'your-api-key','https://api.tally.so'
})

// Access data
const { data: form, error } = await tally.forms.get('form-id')
console.log(form)

Examples

Create new form from scratch

// init client as described above

import {
  TallyFormModel,
  TallyFormStatus,
  TallyBlockTypes,
  initNewTallyBlock,
  TallyPayloadFormTitleDTO,
} from 'tally-js'

const newForm = new TallyFormModel(
  [], // no blocks - starting from scratch
  TallyFormStatus.DRAFT,
  {}, // default settings
  'your-workspace-id',
)

const titleBlock = initNewTallyBlock(TallyBlockTypes.TITLE)
titleBlock.payload = {
  title: 'Official Title',
  html: 'Official Title',
} as TallyPayloadFormTitleDTO
// simple option for auto-completion without class instantiation

newForm.addBlock(titleBlock)

const { data: createdForm, error: createError } = await tally.forms.create(newForm)

console.log(createdForm.id, createError)
// should print the form id of the created form and null

List Forms

let forms = null
let currentPage = 0
do {
  currentPage += 1
  const { data, error } = await tally.forms.list(currentPage)
  if (!error && data) {
    forms = data
    forms.items.forEach((form) => {
      console.log(form.id)
    })
  }
} while (forms?.hasMore)

Creating a webhook

const { data, error } = await tally.webhooks.create({
  formId: 'xZllsk',
  url: 'https://webhook.site/1b1b1b1b',
  eventTypes: [TallyWebhookEventType.FORM_RESPONSE],
})

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Apache 2.0

Directory Structure


tally-js/
├── src/
│ ├── client.ts
│ ├── lib/
│ ├── models/
│ ├── services/
│ ├── types/
│ ├── util/