This guide lists everything that is @deprecated in 2.0.0 and removed in 3.0.0, with the canonical replacement for each symbol.
2.0.0 — they keep working but emit a runtime deprecation warning on every call. They are removed in 3.0.0. Migrate before upgrading to 3.0.0.diff examples for every method are in the v0 → v1 guide under "Deprecated" — this page is the at-a-glance removal checklist.What is removed in 3.0.0
Legacy REST shortcuts on AbstractB24
These instance shortcuts ignore the restApi:v2 / restApi:v3 split and are replaced by the explicit action surface:
- await b24.callMethod('crm.deal.list', { filter: { '>id': 123 } }, 100)
+ await b24.actions.v2.call.make({
+ method: 'crm.deal.list',
+ params: { filter: { '>id': 123 }, start: 100 },
+ requestId: 'unique-request-id'
+ })
AbstractB24.batchSize
Maximum length for batch response.
The static const is removed. Inline the value 50 if you relied on it.
- if (size < AbstractB24.batchSize) {
+ if (size < 50) {
// some code ...
}
AjaxResult paging helpers
These are tied to the restApi:v2 envelope fields next / total, which restApi:v3 does not return:
Replace manual paging with callList.make (collect everything) or fetchList.make (async generator):
- // legacy manual paging on the deprecated surface
- const res = await b24.callMethod('crm.deal.list', {})
- let list = res.getData().result
- while (res.isMore()) { res = await res.getNext(http); list.push(...res.getData().result) }
+ // the list helper iterates for you — `chunk` is the next array of items
+ for await (const chunk of b24.actions.v2.fetchList.make({ method: 'crm.deal.list' })) {
+ // handle chunk
+ }
LoggerBrowser and LoggerType
Replaced by the universal Logger / LoggerFactory system. The LoggerType enum is removed with no replacement — LoggerFactory manages levels itself, so just drop the import:
- import { LoggerBrowser, LoggerType } from '@bitrix24/b24jssdk'
+ import { LoggerFactory } from '@bitrix24/b24jssdk'
- const $logger = LoggerBrowser.build('MyApp', import.meta.env?.DEV === true)
+ const $logger = LoggerFactory.createForBrowser('MyApp', import.meta.env?.DEV === true)
- $logger.info('response', dataList)
+ $logger.info('response', { someInfo: dataList })
How to find every call site
The deprecated symbols emit a JSSDK_CORE_DEPRECATED_METHOD warning at runtime, and LoggerBrowser logs @deprecated: use Logger. A quick static check:
grep -rnE 'callMethod|callListMethod|fetchListMethod|callBatch|callBatchByChunk|\.isMore\(|\.hasMore\(|\.getNext\(|\.fetchNext\(|\.getTotal\(|LoggerBrowser|LoggerType' src
Get-ChildItem -Recurse src -Include *.ts,*.js |
Select-String -Pattern 'callMethod|callListMethod|fetchListMethod|callBatch|callBatchByChunk|\.isMore\(|\.hasMore\(|\.getNext\(|\.fetchNext\(|\.getTotal\(|LoggerBrowser|LoggerType'
Once that returns nothing, you are ready for 3.0.0.