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

@1c-odata/client

v0.6.0

Published

Type-safe OData V3 client for 1С:Enterprise 8 — query builder, filter DSL, register helpers.

Readme

@1c-odata/client

Typed runtime for the 1С:Enterprise OData V3 interface — ODataV3Client, query builder, filter DSL, value-storage helpers, and register helpers.

Server-side only. Pure ESM. Node ≥ 22.21.0.

⚠️ v0.x — pre-release. API is unstable; see STABILITY.md.

Install

pnpm add @1c-odata/client
pnpm add -D @1c-odata/cli   # generates types from $metadata

Quick start

Assuming this file lives at src/main.ts (so ../generated/ resolves to the sibling codegen output). The runtime builds its own Connection — it does not import 1c-odata.config.ts (that file is for the CLI):

import { clientOptionsFromConnection, defineConnection, parseConnectionUrl } from '@1c-odata/client'
import { and, any } from '@1c-odata/client/filter'
import { createClient } from '../generated/trade/client.js'
import type { Document_РеализацияТоваровУслуг } from '../generated/trade/index.js'

const url = process.env.ONEC_URL
if (!url) throw new Error('Set ONEC_URL')
const conn = defineConnection({ ...parseConnectionUrl(url), serverTimezone: 'Europe/Moscow' })
// `createClient` (generated) auto-loads the sibling `__metadata.json` and wires
// the `Functions` generic — DateTime / Int64 / ValueStorage handling is on.
const trade = await createClient(clientOptionsFromConnection(conn))

const { value: docs } = await trade
  .query<Document_РеализацияТоваровУслуг>('Document_РеализацияТоваровУслуг')
  .filter((f) => and(f.Date.year().eq(2025), any(f.Товары, (t) => t.Сумма.gt(10000))))
  .top(50)
  .get()

See examples/basic for a runnable end-to-end consumer, and the repo README for project-wide setup (network config, cross-platform Cyrillic filename handling, codegen flow).

Error handling

All errors extend ODataError; narrow with subclasses (HTTPError, BusinessError, ConcurrencyError, TimeoutError, ValidationError, …):

import { HTTPError, ODataError } from '@1c-odata/client'

try {
  await trade.query('Document_РеализацияТоваровУслуг').get()
} catch (e) {
  if (e instanceof HTTPError) console.error(`HTTP ${e.status}`, e.request) // { method, url }, no headers
  else if (e instanceof ODataError) console.error(e.name, e.message)
}

A caller-supplied AbortSignal abort is rethrown as the native AbortError (not an ODataError); library-issued timeouts surface as TimeoutError.

Registers

client.register(set) wraps 1С register virtual tables (balances / turnovers / slices). Turnover-style tables take a { from, to } range; balance() and slices take a single Period:

const balance = await trade
  .register('AccumulationRegister_ТоварыНаСкладах')
  .balance({ Period: new Date('2025-01-01') })

See the repo README for the full error model and register reference.

License

MIT