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

weeek-api-sdk

v0.1.0

Published

TypeScript SDK for Weeek API

Readme

Weeek API TypeScript SDK

A TypeScript SDK for interacting with the Weeek API, focusing on CRM functionality.

Installation

npm install weeek-api-sdk
# or
yarn add weeek-api-sdk

Usage

Creating a client

import { createWeekCRMClient } from 'weeek-api-sdk';

// Create a client instance with your API token
const client = createWeekCRMClient('your-api-token');

Working with Funnels

// Get all funnels
const { funnels } = await client.getAllFunnels();

// Create a new funnel
const { funnel } = await client.createFunnel({
  name: 'My Sales Funnel',
  isPrivate: false
});

// Get a specific funnel
const { funnel } = await client.getFunnel('funnel-id');

// Update a funnel
await client.updateFunnel('funnel-id', {
  name: 'Updated Funnel Name'
});

// Delete a funnel
await client.deleteFunnel('funnel-id');

Working with Organizations

// Get all organizations
const { organizations } = await client.getAllOrganizations();

// Create a new organization
const { organization } = await client.createOrganization({
  name: 'ACME Corp',
  emails: ['[email protected]'],
  phones: ['+1234567890']
});

// Get a specific organization
const { organization } = await client.getOrganization('organization-id');

// Update an organization
await client.updateOrganization('organization-id', {
  name: 'ACME Corporation'
});

// Delete an organization
await client.deleteOrganization('organization-id');

Working with Contacts

// Get all contacts
const { contacts } = await client.getAllContacts();

// Create a new contact
const { contact } = await client.createContact({
  firstName: 'John',
  lastName: 'Doe',
  emails: ['[email protected]']
});

// Get a specific contact
const { contact } = await client.getContact('contact-id');

// Update a contact
await client.updateContact('contact-id', {
  firstName: 'Jonathan'
});

// Delete a contact
await client.deleteContact('contact-id');

Working with Deals

// Get all deals
const { deals } = await client.getAllDeals();

// Create a new deal in a specific status
const { deal } = await client.createDeal('status-id', {
  title: 'New Project Deal',
  amount: 10000
});

// Create a deal with validation to ensure the status exists
const { deal } = await client.createDealWithValidation('status-id', {
  title: 'New Project Deal',
  amount: 10000
});

// Get a specific deal
const { deal } = await client.getDeal('deal-id');

// Update a deal
await client.updateDeal('deal-id', {
  title: 'Updated Deal Title',
  amount: 15000
});

// Move a deal to a different status
await client.moveDeal('deal-id', 'new-status-id');

// Delete a deal
await client.deleteDeal('deal-id');

Working with Statuses

// Get all statuses
const { statuses } = await client.getAllStatuses();

// Get statuses for a specific funnel
const { statuses } = await client.getFunnelStatuses('funnel-id');

// Get all statuses with their associated funnel details
const { statuses } = await client.getAllStatusesWithFunnels();

API Reference

The SDK provides typed interfaces for all request and response objects to enable full IntelliSense support in your IDE.

CRM Client Methods

  • Funnels

    • createFunnel(data)
    • getAllFunnels()
    • getFunnel(funnelId)
    • updateFunnel(funnelId, data)
    • deleteFunnel(funnelId)
  • Organizations

    • createOrganization(data)
    • getAllOrganizations()
    • getOrganization(organizationId)
    • updateOrganization(organizationId, data)
    • deleteOrganization(organizationId)
  • Contacts

    • createContact(data)
    • getAllContacts()
    • getContact(contactId)
    • updateContact(contactId, data)
    • deleteContact(contactId)
  • Deals

    • validateStatus(statusId)
    • createDealWithValidation(statusId, data)
    • createDeal(statusId, data)
    • getAllDeals()
    • getDeal(dealId)
    • updateDeal(dealId, data)
    • deleteDeal(dealId)
    • moveDeal(dealId, statusId)
  • Statuses

    • getAllStatuses()
    • getFunnelStatuses(funnelId)
    • getAllStatusesWithFunnels()

License

MIT