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

@elusion-sdk/briq

v1.2.5

Published

A modern TypeScript SDK for Briq SMS API integration

Readme

Briq SMS SDK

A modern TypeScript SDK for the Briq SMS API. Send messages, manage campaigns, and organize workspaces with full type safety.

Installation

npm install @elusion-sdk/briq
# or
bun add @elusion-sdk/briq

Quick Start

import { Briq } from "@elusion-sdk/briq";

const briq = new Briq({
  apiKey: "your-api-key", // or set BRIQ_API_KEY env var
});

// Send an instant message
const response = await briq.messages.sendInstant({
  recipients: ["255700000000"],
  content: "Hello from Briq!",
  sender_id: "BRIQ",
});

console.log("Message sent:", response.data);

Features

  • Modern TypeScript - Full type safety and IntelliSense
  • Instant Messages - Send SMS to single or multiple recipients
  • Campaign Management - Create and manage SMS campaigns
  • Workspace Organization - Organize projects and teams
  • Message Tracking - Get delivery status and logs
  • Built for Speed - Optimized for Node.js and modern runtimes

Core Services

Messages

// Send instant message
await briq.messages.sendInstant({
  recipients: ["255700000000", "255700000000"],
  content: "Your message here",
  sender_id: "your-sender-id",
});

// Get message logs
const logs = await briq.messages.getLogs();

Campaigns

// Create campaign
const campaign = await briq.campaigns.create({
  name: "Summer Sale",
  description: "Promotional campaign",
  workspace_id: "workspace-id",
  launch_date: "2025-07-01T10:00:00Z",
});

// Send campaign message
await briq.messages.sendCampaign({
  campaign_id: campaign.data.id,
  group_id: "group-id",
  content: "Special offer inside!",
  sender_id: "your-sender-id",
});

Workspaces

// Create workspace
const workspace = await briq.workspaces.create({
  name: "My Project",
  description: "SMS campaigns for my project",
});

// List all workspaces
const workspaces = await briq.workspaces.list();

Configuration

const briq = new Briq({
  apiKey: "your-api-key",
  baseURL: "https://karibu.briq.tz", // optional
  timeout: 30000, // optional, default 30s
  headers: {
    // optional custom headers
    "X-Custom-Header": "value",
  },
});

Error Handling

try {
  await briq.messages.sendInstant({
    recipients: ["invalid-number"],
    content: "Test message",
    sender_id: "BRIQ",
  });
} catch (error) {
  if (error.status === 400) {
    console.log("Invalid request:", error.message);
  } else if (error.status === 429) {
    console.log("Rate limited, try again later");
  } else {
    console.log("Unexpected error:", error);
  }
}

Environment Variables

# Set your API key
export BRIQ_API_KEY=your-api-key-here

# Optional: Custom API base URL
export BRIQ_BASE_URL=https://karibu.briq.tz

TypeScript Support

This SDK is built with TypeScript and provides full type definitions. No need to install additional @types packages.

Development

# Clone and install
git clone https://github.com/elusionhub/briq-sdk.git

cd briq-sdk
bun install

# Build
bun run build

License

MIT © Elution Hub

Support

typescript-sdk
├─ assets
├─ bun.lock
├─ content
├─ CONTRIBUTING.md
├─ eslint.config.cjs
├─ examples
│  ├─ campaign-management.ts
│  ├─ message-sending.ts
│  └─ workspace-management.ts
├─ LICENSE
├─ package.json
├─ README.md
├─ release.config.cjs
├─ src
│  ├─ client
│  │  ├─ BaseClient.ts
│  │  ├─ BriqClient.ts
│  │  └─ HttpClient.ts
│  ├─ config
│  │  └─ defaults.ts
│  ├─ factory.ts
│  ├─ index.ts
│  ├─ services
│  │  ├─ BaseService.ts
│  │  ├─ CampaignService.ts
│  │  ├─ MessageService.ts
│  │  └─ WorkspaceService.ts
│  ├─ types
│  │  ├─ campaign.ts
│  │  ├─ common.ts
│  │  ├─ message.ts
│  │  └─ workspace.ts
│  └─ utils
│     ├─ constants.ts
│     ├─ errors.ts
│     ├─ helpers.ts
│     └─ validators.ts
├─ tests
│  └─ blank.txt
├─ tsconfig.build.json
└─ tsconfig.json