A TypeScript client library for the Bitrix24 REST API, designed for use with Angular and Vue applications. Version 0.9.3 is the current stable release, offering a modular architecture with classes like BXRestNavvy, BXRestMap, and BXRestRequest for making API calls. It supports custom method extensions and provides a consistent interface for interacting with Bitrix24 entities. The library relies on an authentication token, typically stored in cookies, and requires configuration via BXRestSettings. Compared to alternatives, it provides tighter integration with Angular dependency injection and Vue plugin systems, but lacks comprehensive documentation and has limited community adoption. Release cadence is irregular; updates are infrequent.
npm install bx-restNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows configuration via BXRestSettings, setting an auth cookie, and making a basic API call to list elements.
Ensure a cookie with name 'auth' and value of the access token is set, e.g., via document.cookie or server-side cookie.
If not using Angular/Vue, ensure you manually create instances of BXRestNavvy, BXRestMap, etc., and manage dependency injection yourself.
Replace .resVanilla() with .resAll() to retrieve all items across pages.
Update BXRestSettings to use the new object format: { urls: { source: 'string', key: 'domain', additional_part: 'rest' } }.Define custom interfaces for API responses and cast results if necessary.
Call BXRestSettings.update() with valid config and ensure the auth cookie is set before making requests.
Verify the domain in BXRestSettings, e.g., BXRestSettings.update({ urls: { source: 'string', key: 'yourdomain.bitrix24.com' } }).Run 'npm install bx-rest' and ensure import is 'bx-rest' (not 'bx-rest/...').