Registry / storage / bkper-js

bkper-js

JSON →
library2.35.2jsnpmunverified

JavaScript/TypeScript client for the Bkper REST API, providing classes and functions for authentication, authorization, and data manipulation. Current stable version is 2.35.2, released on npm with regular updates. It supports Node.js and modern browsers, ships TypeScript definitions, and offers CDN usage without build tools. Key differentiators include simple OAuth token provider configuration, compatibility with @bkper/web-auth for *.bkper.app subdomains, and a Bkper CLI for token management.

storage
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Named export, not default. Also works with require: const { Bkper } = require('bkper-js').

import { Bkper } from 'bkper-js'

CDN exposes the global 'bkperjs' object.

<script src='https://cdn.jsdelivr.net/npm/bkper-js@2/dist/bkper.min.js'></script>; const { Bkper } = bkperjs;

Separate package for CLI authentication.

import { getOAuthToken } from 'bkper'

Initialize Bkper with OAuth token from CLI and retrieve a book by ID.

import { Bkper } from 'bkper-js'; import { getOAuthToken } from 'bkper'; Bkper.setConfig({ oauthTokenProvider: async () => getOAuthToken(), }); const bkper = new Bkper(); const book = await bkper.getBook('your-book-id'); console.log(`Book: ${book.getName()}`);
Debug
Known footguns
gotchaThe @bkper/web-auth SDK only works on *.bkper.app subdomains; session cookies are scoped to .bkper.app.
breakingVersion 2.x drops support for Node.js < 10 and older browsers. ESM only; no CommonJS.
deprecatedBkper.setConfig with static config is deprecated; use instance-level config in future major.
gotchaAccess tokens from bkper CLI are valid for 1 hour only; must refresh via CLI or implement refresh logic.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
16 hits · last 30 days
gptbot
3
amazonbot
3
bytedance
3
Resources