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

@cresium/cleric-clients

v0.4.1

Published

Shared external API clients for Cresium services

Readme

@cresium/cleric-clients

Shared external API clients for Cresium services.

Installation

yarn add @cresium/cleric-clients
# or
npm install @cresium/cleric-clients

Available Clients

| Client | Description | | ------ | ----------- | | TwilioClient | WhatsApp verification & messaging | | ComplifClient | Compliance API with OAuth2 | | AfipClient | AFIP integration |


Twilio Client

Client for Twilio API with support for:

  • WhatsApp verification codes
  • Message sending
  • Media downloads
import { TwilioClient } from "@cresium/cleric-clients";

const twilioClient = new TwilioClient({
  baseUrl: "https://verify.twilio.com",
  messagingBaseUrl: "https://api.twilio.com",
  authUsername: "your-account-sid",
  authPassword: "your-auth-token",
  verificationId: "your-verification-service-id",
  whatsappFrom: "+1234567890",
});

// Send verification code
await twilioClient.sendCode("+1234567890");

// Verify code
const isValid = await twilioClient.verifyCode("+1234567890", "123456");

// Send WhatsApp message
await twilioClient.sendMessage("+1234567890", "Hello!");

// Download media from Twilio
const buffer = await twilioClient.getFromUrl("https://api.twilio.com/media/...");

Complif Client

Client for Complif API with support for:

  • OAuth2 automatic authentication
  • Account creation
  • Transaction management
import {
  ComplifClient,
  ComplifAccountType,
  ComplifAccountStatus,
  ComplifTransactionType,
  ComplifOwnerType,
  ComplifOwnerStatus,
} from "@cresium/cleric-clients";

const complifClient = new ComplifClient({
  baseUrl: "https://api.complif.io",
  clientId: "your-client-id",
  clientSecret: "your-client-secret",
});

// Create account
await complifClient.createAccount({
  type: ComplifAccountType.COMITENTE_AR,
  status: ComplifAccountStatus.OPENING,
  name: "John Doe",
  external_code: 12345,
  alias: "john_doe_account",
  owners: [
    {
      type: ComplifOwnerType.HUMAN,
      status: ComplifOwnerStatus.PENDING,
      // ... more fields
    },
  ],
});

// Create transaction
await complifClient.createTransaction({
  type: ComplifTransactionType.CASH_IN,
  account_external_code: 12345,
  created_at: new Date().toISOString(),
  external_code: 67890,
  amount: "1000.00",
  currency: "ARS",
});

AFIP Client

Client for AFIP (Argentina tax authority) integration.

import { AfipClient } from "@cresium/cleric-clients";

// Check AFIP documentation for usage

Base Classes

ExternalAPIClient

Base class for building external API clients with built-in:

  • Axios integration
  • Error handling and logging
  • Request/response interceptors
  • Auth headers management
import { ExternalAPIClient } from "@cresium/cleric-clients";

class MyClient extends ExternalAPIClient {
  constructor() {
    super("https://api.example.com", "MY_CLIENT");
  }

  protected async getAuthHeaders() {
    return {
      Authorization: `Bearer ${this.token}`,
    };
  }

  async getData() {
    return this.get("/endpoint");
  }
}

Publishing

Quick Release

cd /path/to/cleric/packages/clients

# 1. Build and verify
yarn build
yarn typecheck

# 2. Bump version
npm version patch   # 0.4.0 -> 0.4.1 (bug fixes)
npm version minor   # 0.4.0 -> 0.5.0 (new features)
npm version major   # 0.4.0 -> 1.0.0 (breaking changes)

# 3. Publish
npm publish

# 4. Push tags to git
git push && git push --tags

Pre-publish Checklist

# Verify what will be published
npm pack --dry-run

# Should show:
# - dist/
# - README.md
# - package.json

License

MIT