New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@timbrify/sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

@timbrify/sdk

TypeScript SDK for Timbrify API

unpublished
npmnpm
Version
0.2.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@timbrify/sdk

TypeScript/JavaScript client for the Timbrify API.

Installation

npm install @timbrify/sdk
# or
pnpm add @timbrify/sdk
# or
yarn add @timbrify/sdk

Usage

With API Key (Machine-to-Machine)

import { TimbrifyClient } from "@timbrify/sdk"

const client = new TimbrifyClient({
  apiKey: "sk_live_abc123...",
  baseUrl: "https://api.timbrify.com", // optional, defaults to localhost
})

// List webhooks
const webhooks = await client.webhooks.list("organization-id")

// Create webhook
const webhook = await client.webhooks.create("organization-id", {
  url: "https://example.com/webhooks",
  events: ["organization.created", "member.added"],
})

With Bearer Token (User Authentication)

import { TimbrifyClient } from "@timbrify/sdk"

const client = new TimbrifyClient({
  bearerToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  baseUrl: "https://api.timbrify.com",
})

// List organizations
const orgs = await client.organizations.list()

// Create organization
const org = await client.organizations.create({
  name: "Acme Corp",
  slug: "acme-corp",
})

API Reference

Organizations

// List all organizations
await client.organizations.list()

// Get organization by slug
await client.organizations.get("acme-corp")

// Create organization
await client.organizations.create({
  name: "Acme Corp",
  slug: "acme-corp",
})

// Update organization
await client.organizations.update("acme-corp", {
  name: "New Name",
  logo: "https://example.com/logo.png",
})

// Delete organization
await client.organizations.delete("acme-corp")

Webhooks

// List webhooks
await client.webhooks.list("organization-id")

// Get webhook
await client.webhooks.get("organization-id", "webhook-id")

// Create webhook
await client.webhooks.create("organization-id", {
  url: "https://example.com/webhooks",
  events: ["organization.created"],
})

// Update webhook
await client.webhooks.update("organization-id", "webhook-id", {
  url: "https://new-url.com/webhooks",
  isActive: false,
})

// Delete webhook
await client.webhooks.delete("organization-id", "webhook-id")

// Get delivery history
await client.webhooks.deliveries("organization-id", "webhook-id")

// Send test webhook
await client.webhooks.test("organization-id", "webhook-id")

API Keys

// List API keys
await client.apiKeys.list("organization-id")

// Get API key
await client.apiKeys.get("organization-id", "api-key-id")

// Create API key
await client.apiKeys.create("organization-id", {
  name: "Production Key",
  expiresAt: "2025-12-31T23:59:59Z", // optional
})

// Update API key
await client.apiKeys.update("organization-id", "api-key-id", {
  name: "New Name",
})

// Revoke API key
await client.apiKeys.delete("organization-id", "api-key-id")

// Get usage stats
await client.apiKeys.stats("organization-id", "api-key-id")

// Validate API key
await client.apiKeys.validate("organization-id", "sk_live_abc123...")

Error Handling

import { TimbrifyClient, type TimbrifyError } from "@timbrify/sdk"

const client = new TimbrifyClient({ apiKey: "sk_live_abc123..." })

try {
  await client.organizations.get("non-existent")
} catch (error) {
  const timbrifyError = error as TimbrifyError
  console.error(`Error ${timbrifyError.statusCode}: ${timbrifyError.message}`)
}

TypeScript Support

The client is written in TypeScript and includes full type definitions:

import type {
  Organization,
  Webhook,
  ApiKey,
  CreateWebhookInput,
  WebhookEvent,
} from "@timbrify/sdk"

License

MIT

Keywords

timbrify

FAQs

Package last updated on 16 Mar 2026

Related posts