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

condo-billing-integration-client

v2.1.0

Published

A small toolkit to write custom billing integrations on open-condo-software

Downloads

421

Readme

condo-billing-integration-client

A Node.js client for building billing integrations with CONDO.

It provides a reusable sync runtime:

  • loads receipts from an external system
  • saves them to CONDO
  • uploads receipt PDFs (if available)
  • sends a sync report to Telegram (optional)

Runtime flow

  1. Authenticate in CONDO.
  2. Load billing context and integration settings.
  3. Call your integration (getAllReceipts).
  4. Save receipts to CONDO in chunks.
  5. Upload PDF files for receipts that have them.
  6. Send a report (Telegram webhook or stdout fallback).
  7. If no receipts were found for the target period, optionally try previous months.

Requirements

  • Node.js v22.17.0

Installation

yarn install

Environment variables

Required

CONDO_INTEGRATION='{"endpoint":"https://<condo>/admin/api","authRequisites":{"identity":"<email>","password":"<password>"}}'

authRequisites supports:

  • identity/password
  • phone/password
  • token

Optional (Telegram notifications)

NOTIFY_TELEGRAM='{"url":"https://<bot-webhook>","chatId":"-100..."}'

Optional (report language)

REPORT_LANG='en'

Supported values:

  • ru (default)
  • en

Running an integration

Typical command:

node index.js -c <BILLING_CONTEXT_ID> -p 2026-04-01

Arguments:

  • -c, --context (required): billing context id
  • -p, --period (optional): period in YYYY-MM-01 format

If -p is omitted, current month start is used.

Report example

ООО "Название организации" (ИНН)
Контекст : ID-Контекста
Период : 2026-01-01

Загружено квитанций (70) : 28.72 s

Сохранение : 1.41 s
Новых : 0
Обновлено : 0
Ошибок : 0
Не изменилось : 70

PDF квитанции : 2.36 s
Не изменилось : 70

Integration contract

Every integration must implement this interface:

class Integration {
    async getAllReceipts ({ tin, period }) {
        throw new Error('Not implemented')
    }

    hasPDFFile (receipt) {
        throw new Error('Not implemented')
    }

    async getPDFBuffer (receipt) {
        throw new Error('Not implemented')
    }
}

Minimal receipt shape

A receipt must contain:

  • accountNumber: string | number // Л/С
  • address: string // Адрес вместе с помещением
  • tin: string | number // ИНН
  • bankAccount: string | number // Р/С
  • routingNumber: string | number // БИК
  • year: number
  • month: number
  • toPay: number | string

Recommended:

  • importId for idempotency
  • services[] for itemized lines
  • toPayDetails for detailed totals

Testing

This project uses native Node testing stack:

  • node:test
  • node:assert/strict

Run tests:

npm test

Watch mode:

npm run test:watch

License

MIT