[{"data":1,"prerenderedAt":3591},["ShallowReactive",2],{"navigation":3,"-docs-working-with-the-rest-api-deferred-batch-rest-api-ver3":523,"-docs-working-with-the-rest-api-deferred-batch-rest-api-ver3-description":3581},[4],{"title":5,"path":6,"stem":7,"children":8,"page":47},"Docs","\u002Fdocs","docs",[9,83,408,415],{"title":10,"path":11,"stem":12,"children":13,"restApiVersion":15,"category":15,"description":15,"badge":15},"Get Started","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started\u002F1.index",[14,17,48,68],{"title":10,"path":11,"stem":12,"restApiVersion":15,"category":15,"description":16,"badge":15},null,"Quick start guide for working with the SDK for Bitrix24 REST API",{"title":18,"path":19,"stem":20,"children":21,"page":47},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation",[22,27,32,37,42],{"title":23,"path":24,"stem":25,"restApiVersion":15,"category":15,"description":26,"badge":15},"Vue","\u002Fdocs\u002Fgetting-started\u002Finstallation\u002Fvue","docs\u002F1.getting-started\u002F2.installation\u002F1.vue","Guide for installing Bitrix24 JS SDK in Vue applications.",{"title":28,"path":29,"stem":30,"restApiVersion":15,"category":15,"description":31,"badge":15},"Nuxt","\u002Fdocs\u002Fgetting-started\u002Finstallation\u002Fnuxt","docs\u002F1.getting-started\u002F2.installation\u002F2.nuxt","Guide for installing Bitrix24 JS SDK in Nuxt applications.",{"title":33,"path":34,"stem":35,"restApiVersion":15,"category":15,"description":36,"badge":15},"React","\u002Fdocs\u002Fgetting-started\u002Finstallation\u002Freact","docs\u002F1.getting-started\u002F2.installation\u002F3.react","Guide for installing Bitrix24 JS SDK in React applications.",{"title":38,"path":39,"stem":40,"restApiVersion":15,"category":15,"description":41,"badge":15},"Node.js","\u002Fdocs\u002Fgetting-started\u002Finstallation\u002Fnodejs","docs\u002F1.getting-started\u002F2.installation\u002F4.nodejs","Guide for installing Bitrix24 JS SDK in Node.js applications.",{"title":43,"path":44,"stem":45,"restApiVersion":15,"category":15,"description":46,"badge":15},"UMD","\u002Fdocs\u002Fgetting-started\u002Finstallation\u002Fumd","docs\u002F1.getting-started\u002F2.installation\u002F5.umd","Guide for using UMD version Bitrix24 JS SDK in you applications.",false,{"title":49,"restApiVersion":15,"category":15,"description":15,"badge":15,"shadow":47,"path":50,"stem":51,"children":52,"page":47},"Migration","\u002Fdocs\u002Fgetting-started\u002Fmigration","docs\u002F1.getting-started\u002F3.migration",[53,58,63],{"title":54,"path":55,"stem":56,"restApiVersion":15,"category":15,"description":57,"badge":15},"v0 to v1","\u002Fdocs\u002Fgetting-started\u002Fmigration\u002Fv1","docs\u002F1.getting-started\u002F3.migration\u002F1.v1","A comprehensive guide to migrate your application from Bitrix24 JS SDK v0 to Bitrix24 JS SDK v1.",{"title":59,"path":60,"stem":61,"restApiVersion":15,"category":15,"description":62,"badge":15},"v2 to v3","\u002Fdocs\u002Fgetting-started\u002Fmigration\u002Fv3","docs\u002F1.getting-started\u002F3.migration\u002F2.v3","How to migrate off the deprecated REST surface that is removed in Bitrix24 JS SDK 3.0.0.",{"title":64,"path":65,"stem":66,"restApiVersion":15,"category":15,"description":67,"badge":15},"Inside 2.x","\u002Fdocs\u002Fgetting-started\u002Fmigration\u002Fwithin-2x","docs\u002F1.getting-started\u002F3.migration\u002F3.within-2x","Changes within the 2.x line that need a change on your side even though no API was removed — what breaks, how to tell, and what to do.",{"title":69,"restApiVersion":15,"category":15,"description":15,"badge":15,"path":70,"stem":71,"children":72,"page":47},"AI Tools","\u002Fdocs\u002Fgetting-started\u002Fai","docs\u002F1.getting-started\u002F7.ai",[73,78],{"title":74,"path":75,"stem":76,"restApiVersion":15,"category":15,"description":77,"badge":15},"Skills","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fskills","docs\u002F1.getting-started\u002F7.ai\u002F1.skills","Task-focused skill files for AI coding agents working with @bitrix24\u002Fb24jssdk.",{"title":79,"path":80,"stem":81,"restApiVersion":15,"category":15,"description":82,"badge":15},"LLMs.txt","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fllms-txt","docs\u002F1.getting-started\u002F7.ai\u002F2.llms-txt","How to get AI tools like Cursor, Windsurf, GitHub Copilot, ChatGPT, and Claude to understand Bitrix24 JS SDK methods, tools, and best practices.",{"title":84,"path":85,"stem":86,"children":87,"restApiVersion":15,"category":15,"description":15,"badge":15},"Working with the REST API","\u002Fdocs\u002Fworking-with-the-rest-api","docs\u002F2.working-with-the-rest-api\u002F0.index",[88,91,98,103,108,112,117,122,126,131,136,141,145,150,155,160,165,170,175,180,185,190,194,199,204,209,214,220,225,230,235,240,245,250,255,260,265,271,276,281,287,292,297,302,307,313,319,324,329,335,340,345,350,355,360,366,373,378,383,388,393,398,403],{"title":89,"path":85,"stem":86,"restApiVersion":15,"category":15,"description":90,"badge":15},"Introduction","Overview of SDK capabilities for working with Bitrix24 REST API",{"title":92,"path":93,"stem":94,"restApiVersion":95,"category":96,"description":97,"badge":15},"Call","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcall-rest-api-ver2","docs\u002F2.working-with-the-rest-api\u002F1.call-rest-api-ver2","rest-api-ver2","actions","A method for making Bitrix24 REST API version 2 calls.",{"title":92,"path":99,"stem":100,"restApiVersion":101,"category":96,"description":102,"badge":15},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcall-rest-api-ver3","docs\u002F2.working-with-the-rest-api\u002F1.call-rest-api-ver3","rest-api-ver3","Method for making Bitrix24 REST API version 3 calls.",{"title":104,"path":105,"stem":106,"restApiVersion":95,"category":96,"description":107,"badge":15},"CallList","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcall-list-rest-api-ver2","docs\u002F2.working-with-the-rest-api\u002F2.call-list-rest-api-ver2","Method for quickly retrieving all data from list methods of Bitrix24 REST API version 2.",{"title":104,"path":109,"stem":110,"restApiVersion":101,"category":96,"description":111,"badge":15},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcall-list-rest-api-ver3","docs\u002F2.working-with-the-rest-api\u002F2.call-list-rest-api-ver3","Method for quickly retrieving all data from list methods of Bitrix24 REST API version 3.",{"title":113,"path":114,"stem":115,"restApiVersion":101,"category":96,"description":116,"badge":15},"CallTail","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcall-tail-rest-api-ver3","docs\u002F2.working-with-the-rest-api\u002F2.call-tail-rest-api-ver3","Method for retrieving all records of a REST API version 3 tail method through the server's native keyset cursor.",{"title":118,"path":119,"stem":120,"restApiVersion":95,"category":96,"description":121,"badge":15},"FetchList","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ffetch-list-rest-api-ver2","docs\u002F2.working-with-the-rest-api\u002F2.fetch-list-rest-api-ver2","Returns an AsyncGenerator that allows processing data from list methods of Bitrix24 REST API version 2 as it is received without loading the entire array into memory at once. This is especially useful when working with very large volumes of data.",{"title":118,"path":123,"stem":124,"restApiVersion":101,"category":96,"description":125,"badge":15},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Ffetch-list-rest-api-ver3","docs\u002F2.working-with-the-rest-api\u002F2.fetch-list-rest-api-ver3","Returns an AsyncGenerator that allows processing data from list methods of Bitrix24 REST API version 3 as it is received without loading the entire array into memory at once. This is especially useful when working with very large volumes of data.",{"title":127,"path":128,"stem":129,"restApiVersion":101,"category":96,"description":130,"badge":15},"FetchTail","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ffetch-tail-rest-api-ver3","docs\u002F2.working-with-the-rest-api\u002F2.fetch-tail-rest-api-ver3","Async generator that streams all records of a REST API version 3 tail method through the server's native keyset cursor.",{"title":132,"path":133,"stem":134,"restApiVersion":15,"category":132,"description":135,"badge":15},"B24Hook","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhook","docs\u002F2.working-with-the-rest-api\u002F20.hook","Server-side entry point for talking to the Bitrix24 REST API through an inbound webhook (permanent token).",{"title":137,"path":138,"stem":139,"restApiVersion":95,"category":96,"description":140,"badge":15},"Batch","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fbatch-rest-api-ver2","docs\u002F2.working-with-the-rest-api\u002F3.batch-rest-api-ver2","Method for executing batch requests to Bitrix24 REST API version 2. Allows executing up to 50 commands in a single API call.",{"title":137,"path":142,"stem":143,"restApiVersion":101,"category":96,"description":144,"badge":15},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Fbatch-rest-api-ver3","docs\u002F2.working-with-the-rest-api\u002F3.batch-rest-api-ver3","Method for executing batch requests to Bitrix24 REST API version 3. The SDK sends up to 50 commands in a single API call.",{"title":89,"path":146,"stem":147,"restApiVersion":15,"category":148,"description":149,"badge":15},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Fframe","docs\u002F2.working-with-the-rest-api\u002F30.frame","B24Frame","Designed for managing Bitrix24 applications running inside a placement iframe. Inherits from AbstractB24 and exposes managers for authentication, parent-window messaging, sliders, dialogs, placements, and options.",{"title":151,"path":152,"stem":153,"restApiVersion":15,"category":148,"description":154,"badge":15},"Initialization","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fframe-initialize-b24-frame","docs\u002F2.working-with-the-rest-api\u002F30.frame-initialize-b24-frame","Function is designed to initialize a B24Frame",{"title":156,"path":157,"stem":158,"restApiVersion":15,"category":148,"description":159,"badge":15},"Auth","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fframe-auth","docs\u002F2.working-with-the-rest-api\u002F31.frame-auth","Designed for managing authentication in Bitrix24 applications. It handles authentication data received from the parent window and provides methods for updating and retrieving this data.",{"title":161,"path":162,"stem":163,"restApiVersion":15,"category":148,"description":164,"badge":15},"Dialog","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fframe-dialog","docs\u002F2.working-with-the-rest-api\u002F31.frame-dialog","Wraps the BX24 system dialogs (user picker, access permission picker, CRM entity picker) so they can be opened from inside a Bitrix24 application iframe.",{"title":166,"path":167,"stem":168,"restApiVersion":15,"category":148,"description":169,"badge":15},"Options","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fframe-options","docs\u002F2.working-with-the-rest-api\u002F31.frame-options","Used for managing application and user settings in the Bitrix24 application. It allows initializing data, getting, and setting options through messages to the parent window.",{"title":171,"path":172,"stem":173,"restApiVersion":15,"category":148,"description":174,"badge":15},"Parent","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fframe-parent","docs\u002F2.working-with-the-rest-api\u002F31.frame-parent","Provides methods for managing the parent application window in Bitrix24, including resizing the window, managing scroll, initiating calls, and opening the messenger.",{"title":176,"path":177,"stem":178,"restApiVersion":15,"category":148,"description":179,"badge":15},"Placement","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fframe-placement","docs\u002F2.working-with-the-rest-api\u002F31.frame-placement","Used for managing the placement of widgets in the Bitrix24 application.",{"title":181,"path":182,"stem":183,"restApiVersion":15,"category":148,"description":184,"badge":15},"Slider","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fframe-slider","docs\u002F2.working-with-the-rest-api\u002F31.frame-slider","Provides methods for working with sliders in the Bitrix24 application. It allows opening and closing sliders, as well as managing their content.",{"title":186,"path":187,"stem":188,"restApiVersion":95,"category":96,"description":189,"badge":15},"BatchByChunk","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fbatch-by-chunk-rest-api-ver2","docs\u002F2.working-with-the-rest-api\u002F4.batch-by-chunk-rest-api-ver2","Method for executing batch requests with automatic chunking for any number of commands. Automatically splits large command sets into batches of 50 and executes them sequentially. Use only arrays of tuples or arrays of objects.",{"title":186,"path":191,"stem":192,"restApiVersion":101,"category":96,"description":193,"badge":15},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Fbatch-by-chunk-rest-api-ver3","docs\u002F2.working-with-the-rest-api\u002F4.batch-by-chunk-rest-api-ver3","Method for executing batch requests to Bitrix24 REST API version 3 with automatic chunking for any number of commands. Automatically splits large command sets into batches of 50 and executes them sequentially. Use only arrays of tuples or arrays of objects.",{"title":195,"path":196,"stem":197,"restApiVersion":101,"category":96,"description":198,"badge":15},"DeferredBatch","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fdeferred-batch-rest-api-ver3","docs\u002F2.working-with-the-rest-api\u002F4.deferred-batch-rest-api-ver3","Deferred (background) batch for Bitrix24 REST API version 3: send thousands of commands in one call, follow the job status, and get the decoded rows — in one call with make(), or step by step.",{"title":200,"path":201,"stem":202,"restApiVersion":15,"category":200,"description":203,"badge":15},"B24OAuth","\u002Fdocs\u002Fworking-with-the-rest-api\u002Foauth","docs\u002F2.working-with-the-rest-api\u002F40.oauth","Server-side entry point for talking to the Bitrix24 REST API with an OAuth 2.0 access token (and automatic refresh).",{"title":205,"path":206,"stem":207,"restApiVersion":15,"category":15,"description":208,"badge":15},"Choosing the method","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fchoosing-the-right-method","docs\u002F2.working-with-the-rest-api\u002F5.choosing-the-right-method","Decision guide for picking between Call, CallList, FetchList, Batch, BatchByChunk and DeferredBatch in REST API v2 and v3.",{"title":210,"path":211,"stem":212,"restApiVersion":15,"category":15,"description":213,"badge":15},"Filtering","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ffiltering","docs\u002F2.working-with-the-rest-api\u002F5.filtering","Reference for building filter parameters in Bitrix24 REST API v2 (prefix operators) and v3 (array-of-triples), including date formatting and the order-stripping rule.",{"title":215,"path":216,"stem":217,"restApiVersion":15,"category":218,"description":219,"badge":15},"B24HelperManager","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhelper","docs\u002F2.working-with-the-rest-api\u002F50.helper","Helper","Aggregate manager that loads profile, app, payment, license, currency, and options data with one batched REST call, plus wires the Pull client.",{"title":221,"path":222,"stem":223,"restApiVersion":15,"category":218,"description":224,"badge":15},"useB24Helper","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhelper-use-b24-helper","docs\u002F2.working-with-the-rest-api\u002F51.helper-use-b24-helper","Closure-based composable that owns a single B24HelperManager instance and exposes lifecycle helpers (init \u002F destroy \u002F Pull client glue).",{"title":226,"path":227,"stem":228,"restApiVersion":15,"category":218,"description":229,"badge":15},"ProfileManager","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhelper-profile-manager","docs\u002F2.working-with-the-rest-api\u002F52.helper-profile-manager","Parsed `profile` REST response: id, name, last name, gender, photo, time zone, admin flag.",{"title":231,"path":232,"stem":233,"restApiVersion":15,"category":218,"description":234,"badge":15},"AppManager","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhelper-app-manager","docs\u002F2.working-with-the-rest-api\u002F53.helper-app-manager","Parsed `app.info` REST response: app id, code, version, status, install flag.",{"title":236,"path":237,"stem":238,"restApiVersion":15,"category":218,"description":239,"badge":15},"PaymentManager","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhelper-payment-manager","docs\u002F2.working-with-the-rest-api\u002F54.helper-payment-manager","Payment status of a Bitrix24 application — extracted from `app.info`.",{"title":241,"path":242,"stem":243,"restApiVersion":15,"category":218,"description":244,"badge":15},"LicenseManager","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhelper-license-manager","docs\u002F2.working-with-the-rest-api\u002F55.helper-license-manager","Bitrix24 license info from `app.info` — and an automatic restriction-manager retune for the matching tariff plan.",{"title":246,"path":247,"stem":248,"restApiVersion":15,"category":218,"description":249,"badge":15},"CurrencyManager","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhelper-currency-manager","docs\u002F2.working-with-the-rest-api\u002F56.helper-currency-manager","Currency catalogue cached in memory — base currency, per-currency formatters, and number-to-string formatter.",{"title":251,"path":252,"stem":253,"restApiVersion":15,"category":218,"description":254,"badge":15},"OptionsManager","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fhelper-options-manager","docs\u002F2.working-with-the-rest-api\u002F57.helper-options-manager","Typed access to `app.option.get` \u002F `user.option.get`, plus a save() that batches `*.option.set` with an optional Pull notification.",{"title":256,"path":257,"stem":258,"restApiVersion":15,"category":15,"description":259,"badge":15},"Errors","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ferrors","docs\u002F2.working-with-the-rest-api\u002F6.errors","Reference for SdkError and AjaxError codes raised by the SDK, plus the Bitrix24 REST error codes that surface through them.",{"title":261,"path":262,"stem":263,"restApiVersion":15,"category":261,"description":264,"badge":15},"Pull","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fpull","docs\u002F2.working-with-the-rest-api\u002F60.pull","Real-time message stream from Bitrix24 to your application — WebSocket primary, long-polling fallback. Frame-only.",{"title":266,"path":267,"stem":268,"restApiVersion":15,"category":269,"description":270,"badge":15},"Logger","\u002Fdocs\u002Fworking-with-the-rest-api\u002Flogger","docs\u002F2.working-with-the-rest-api\u002F66.logger","logger","Logger inspired by PHP Monolog, provides a structured logging system with support for channels, handlers, processors, and formatters. Implementation follows PSR-3 principles and the chain of responsibility pattern.",{"title":272,"path":273,"stem":274,"restApiVersion":15,"category":269,"description":275,"badge":15},"Telegram","\u002Fdocs\u002Fworking-with-the-rest-api\u002Flogger-telegram","docs\u002F2.working-with-the-rest-api\u002F66.logger-telegram","Sending logs to Telegram",{"title":277,"path":278,"stem":279,"restApiVersion":15,"category":15,"description":280,"badge":15},"Discovering v3 methods","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fdiscovering-v3-methods","docs\u002F2.working-with-the-rest-api\u002F7.discovering-v3-methods","Use rest.documentation.openapi to fetch the portal's own machine-readable list of every available REST API v3 method — the source of truth the SDK relies on instead of a hardcoded allowlist. Especially useful for AI agents and codegen.",{"title":282,"path":283,"stem":284,"restApiVersion":15,"category":285,"description":286,"badge":15},"AjaxResult","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcore-ajax-result","docs\u002F2.working-with-the-rest-api\u002F70.core-ajax-result","Core","Specialised Result returned by every REST helper. Provides `isMore() \u002F getNext() \u002F getTotal() \u002F getStatus()` for paged responses, and immutable data.",{"title":288,"path":289,"stem":290,"restApiVersion":15,"category":285,"description":291,"badge":15},"Http","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcore-http","docs\u002F2.working-with-the-rest-api\u002F70.core-http","Low-level transport interface returned by `b24.getHttpClient(version)`. Direct access to the axios-based clients, restriction params, statistics, and reset.",{"title":293,"path":294,"stem":295,"restApiVersion":15,"category":285,"description":296,"badge":15},"B24LangList","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcore-lang-list","docs\u002F2.working-with-the-rest-api\u002F70.core-lang-list","Enum of Bitrix24 cloud interface languages plus the BCP-47 locale map.",{"title":298,"path":299,"stem":300,"restApiVersion":15,"category":285,"description":301,"badge":15},"RequestIdGenerator","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcore-request-id-generator","docs\u002F2.working-with-the-rest-api\u002F70.core-request-id-generator","Default `IRequestIdGenerator` implementation. Generates UUID v7 request ids and exposes the header \u002F query parameter names used by the SDK.",{"title":303,"path":304,"stem":305,"restApiVersion":15,"category":285,"description":306,"badge":15},"Result","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcore-result","docs\u002F2.working-with-the-rest-api\u002F70.core-result","Generic operation result with success flag, data, and an error map. Analogue of \\\\Bitrix\\\\Main\\\\Result from the Bitrix Framework.",{"title":308,"path":309,"stem":310,"restApiVersion":15,"category":311,"description":312,"badge":15},"Limiters","\u002Fdocs\u002Fworking-with-the-rest-api\u002Flimiters","docs\u002F2.working-with-the-rest-api\u002F77.limiters","limiters","The restrictions system provides a comprehensive mechanism for managing request frequency, operation execution time, and adaptive delays.",{"title":314,"path":315,"stem":316,"restApiVersion":15,"category":317,"description":318,"badge":15},"Logging & Redaction","\u002Fdocs\u002Fworking-with-the-rest-api\u002Flogging","docs\u002F2.working-with-the-rest-api\u002F78.logging","logging","What the SDK redacts automatically before any request information enters the logger or an AjaxError, what it does not redact, and how to wire a custom logger via setLogger(...) without re-introducing credential leaks.",{"title":320,"path":321,"stem":322,"restApiVersion":15,"category":15,"description":323,"badge":15},"Security","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fsecurity","docs\u002F2.working-with-the-rest-api\u002F79.security","Two hardening patterns for any server that receives Bitrix24 outbound events or OAuth install\u002Funinstall callbacks: reply 200 before you verify, and compare application_token in constant time.",{"title":325,"path":326,"stem":327,"restApiVersion":15,"category":15,"description":328,"badge":15},"Discovering entity fields","\u002Fdocs\u002Fworking-with-the-rest-api\u002Fdiscovering-entity-fields","docs\u002F2.working-with-the-rest-api\u002F8.discovering-entity-fields","Ask the portal which fields an entity has, what type each one is, and whether it can be filtered, sorted or written — instead of guessing them or downloading the whole OpenAPI document. Also states the v3 camelCase field-name rule.",{"title":330,"path":331,"stem":332,"restApiVersion":15,"category":333,"description":334,"badge":15},"Browser","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftools-browser","docs\u002F2.working-with-the-rest-api\u002F80.tools-browser","tools","Cheap user-agent \u002F platform \u002F capability detector. Useful for runtime branches in front-end code.",{"title":336,"path":337,"stem":338,"restApiVersion":15,"category":333,"description":339,"badge":15},"Environment","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftools-environment","docs\u002F2.working-with-the-rest-api\u002F80.tools-environment","Runtime environment detection — `getEnvironment()`, `isBrowserLikeRuntime()` and the `Environment` enum for branching between browser, worker and Node.js code paths.",{"title":341,"path":342,"stem":343,"restApiVersion":15,"category":333,"description":344,"badge":15},"Object helpers","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftools-object-helpers","docs\u002F2.working-with-the-rest-api\u002F80.tools-object-helpers","Tiny, dependency-free object and enum helpers — `pick`, `omit`, `getEnumValue`, and the `isArrayOfArray` type guard.",{"title":346,"path":347,"stem":348,"restApiVersion":15,"category":333,"description":349,"badge":15},"Text","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftools-text","docs\u002F2.working-with-the-rest-api\u002F80.tools-text","Text and date utilities — UUID v4 \u002F v7, encode \u002F decode HTML entities, type conversions, case helpers, Luxon-backed `toDateTime` \u002F `toB24Format`, number formatting, and query-string builder.",{"title":351,"path":352,"stem":353,"restApiVersion":15,"category":333,"description":354,"badge":15},"Type","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftools-type","docs\u002F2.working-with-the-rest-api\u002F80.tools-type","Runtime type guards — strings, numbers, plain objects, arrays, DOM nodes, Blobs, FormData, JSON-RPC message shapes.",{"title":356,"path":357,"stem":358,"restApiVersion":15,"category":333,"description":359,"badge":15},"useFormatter","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftools-use-formatters","docs\u002F2.working-with-the-rest-api\u002F80.tools-use-formatters","Composable that returns shared `FormatterNumbers` and `FormatterIban` instances pre-configured with country specifications.",{"title":361,"path":362,"stem":363,"restApiVersion":15,"category":364,"description":365,"badge":15},"Common","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftypes-common","docs\u002F2.working-with-the-rest-api\u002F90.types-common","Types","Foundational building blocks used across the SDK — scalar string aliases, field-metadata shapes (Fields, MultiField, UserFieldType), and the DataType enum.",{"title":367,"path":368,"stem":369,"children":370,"restApiVersion":15,"category":364,"description":372,"badge":15},"Types overview","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftypes-index","docs\u002F2.working-with-the-rest-api\u002F90.types-index",[371],{"title":367,"path":368,"stem":369,"restApiVersion":15,"category":364,"description":372,"badge":15},"Navigable map of every types\u002F* module in the SDK — which have a dedicated page, which are surfaced through another page, and which are follow-ups.",{"title":374,"path":375,"stem":376,"restApiVersion":15,"category":364,"description":377,"badge":15},"IResult","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftypes-iresult","docs\u002F2.working-with-the-rest-api\u002F90.types-iresult","Generic operation-result interface. Implemented by `Result\u003CT>` and (transitively) by `AjaxResult\u003CT>`.",{"title":379,"path":380,"stem":381,"restApiVersion":15,"category":364,"description":382,"badge":15},"Payloads","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftypes-payloads","docs\u002F2.working-with-the-rest-api\u002F90.types-payloads","The REST response envelope — PayloadTime, GetPayload, ListPayload, BatchPayload, SuccessPayload, and the Payload union, with a note on the v2 vs v3 envelope status.",{"title":384,"path":385,"stem":386,"restApiVersion":15,"category":364,"description":387,"badge":15},"TypeB24","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftypes-type-b24","docs\u002F2.working-with-the-rest-api\u002F90.types-type-b24","Public contract implemented by every entry-point class (B24Frame, B24Hook, B24OAuth). Single source of truth for the SDK surface.",{"title":389,"path":390,"stem":391,"restApiVersion":15,"category":285,"description":392,"badge":15},"Telemetry","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftelemetry","docs\u002F2.working-with-the-rest-api\u002F95.telemetry","Request id, SDK version, and SDK type query parameters added to every Bitrix24 REST call.",{"title":394,"path":395,"stem":396,"restApiVersion":15,"category":285,"description":397,"badge":15},"Error Codes","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ferror-codes","docs\u002F2.working-with-the-rest-api\u002F96.error-codes","Codes with a pinned classification — \"hard\" (thrown) and \"soft\" (returned as AjaxError inside AjaxResult) — and the category rule that covers everything else on restApi:v3.",{"title":399,"path":400,"stem":401,"restApiVersion":15,"category":333,"description":402,"badge":15},"HealthCheck","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftools-health-check","docs\u002F2.working-with-the-rest-api\u002Ftools-health-check","Method for checking the availability of Bitrix24 REST API. Performs a simple request to the REST API to verify service health.",{"title":404,"path":405,"stem":406,"restApiVersion":15,"category":333,"description":407,"badge":15},"Ping","\u002Fdocs\u002Fworking-with-the-rest-api\u002Ftools-ping","docs\u002F2.working-with-the-rest-api\u002Ftools-ping","Method for measuring Bitrix24 REST API response speed. Performs a test request and returns response time in milliseconds.",{"title":409,"path":410,"stem":411,"children":412,"restApiVersion":15,"category":15,"description":15,"badge":15},"API Reference","\u002Fdocs\u002Fapi-reference","docs\u002F3.api-reference\u002F1.index",[413],{"title":409,"path":410,"stem":411,"restApiVersion":15,"category":15,"description":414,"badge":15},"Index of the public @bitrix24\u002Fb24jssdk surface, grouped by domain — every value export, what it is, and where its guide and source live.",{"title":416,"path":417,"stem":418,"children":419,"restApiVersion":15,"category":15,"description":15,"badge":15},"Examples","\u002Fdocs\u002Fexamples","docs\u002F99.examples\u002F0.index",[420,422,428,433,438,443,448,453,458,463,468,473,478,483,488,493,498,503,508,513,518],{"title":89,"path":417,"stem":418,"restApiVersion":15,"category":15,"description":421,"badge":15},"Recipes that pair the SDK with realistic scenarios — CRM analytics, mass messaging, AI assistants, OAuth installs, and more. Each recipe is a single, copy-paste-friendly file.",{"title":423,"path":424,"stem":425,"restApiVersion":15,"category":426,"description":427,"badge":15},"CRM analytics","\u002Fdocs\u002Fexamples\u002Fcrm-analytics","docs\u002F99.examples\u002F1.crm-analytics","examples","Stream all deals via actions.v2.fetchList.make, group by stage, print a funnel report (counts, conversion %, avg ticket, win rate).",{"title":429,"path":430,"stem":431,"restApiVersion":15,"category":426,"description":432,"badge":15},"Deals → CSV","\u002Fdocs\u002Fexamples\u002Fdashboard-deals-csv","docs\u002F99.examples\u002F1.dashboard-deals-csv","Stream every CRM deal that matches a date filter into a CSV file using a webhook and FetchListV2.",{"title":434,"path":435,"stem":436,"restApiVersion":15,"category":15,"description":437,"badge":15},"Entity List","\u002Fdocs\u002Fexamples\u002Fentity-list","docs\u002F99.examples\u002F10.entity-list","Render a paged Bitrix24 entity list with B24UI components and the SDK callList action.",{"title":439,"path":440,"stem":441,"restApiVersion":15,"category":426,"description":442,"badge":15},"Error handling","\u002Fdocs\u002Fexamples\u002Ferror-handling","docs\u002F99.examples\u002F10.error-handling","Demonstrates the four error layers (SdkError \u002F AjaxError \u002F network \u002F soft) and the hardErrorCodes \u002F softErrorCodes \u002F retryOnNetworkError knobs on the restriction manager.",{"title":444,"path":445,"stem":446,"restApiVersion":15,"category":426,"description":447,"badge":15},"Event registration","\u002Fdocs\u002Fexamples\u002Fevent-registration","docs\u002F99.examples\u002F11.event-registration","CLI tool — list, bind, and unbind Bitrix24 outbound webhook events via event.get \u002F event.bind \u002F event.unbind. Pairs with the webhook handler recipe.",{"title":449,"path":450,"stem":451,"restApiVersion":15,"category":426,"description":452,"badge":15},"OAuth install","\u002Fdocs\u002Fexamples\u002Foauth-install","docs\u002F99.examples\u002F12.oauth-install","Express server that handles ONAPPINSTALL \u002F ONAPPUPDATE \u002F ONAPPUNINSTALL events for a Bitrix24 marketplace app, persists tokens per portal, and builds a B24OAuth client on demand with a refresh callback wired to storage.",{"title":454,"path":455,"stem":456,"restApiVersion":15,"category":426,"description":457,"badge":15},"Frame app skeleton","\u002Fdocs\u002Fexamples\u002Fframe-app-skeleton","docs\u002F99.examples\u002F2.frame-app-skeleton","Minimum viable Bitrix24 iframe app: init handshake, set title, persist app state, open a slider, close cleanly.",{"title":459,"path":460,"stem":461,"restApiVersion":15,"category":426,"description":462,"badge":15},"Mass messaging","\u002Fdocs\u002Fexamples\u002Fmass-messaging","docs\u002F99.examples\u002F2.mass-messaging","Filter contacts in CRM, personalise a template, send IM notifications to assigned managers.",{"title":464,"path":465,"stem":466,"restApiVersion":15,"category":15,"description":467,"badge":15},"Installation Wizard","\u002Fdocs\u002Fexamples\u002Fapp-installation-wizard","docs\u002F99.examples\u002F20.app-installation-wizard","Multi-step install flow that creates user fields, registers placements, celebrates with confetti, and finalises the installation last — because the portal reloads the page in response.",{"title":469,"path":470,"stem":471,"restApiVersion":15,"category":426,"description":472,"badge":15},"Task automation","\u002Fdocs\u002Fexamples\u002Ftask-automation","docs\u002F99.examples\u002F3.task-automation","Poll deal stages every 60 s. When a watched transition fires, create a task with description, deadline and priority.",{"title":474,"path":475,"stem":476,"restApiVersion":15,"category":426,"description":477,"badge":15},"Webhook CLI","\u002Fdocs\u002Fexamples\u002Fwebhook-cli-node","docs\u002F99.examples\u002F3.webhook-cli-node","A 30-line Node script that authenticates against a Bitrix24 portal via inbound webhook and prints the calling user — useful as the first thing you run after creating a webhook.",{"title":479,"path":480,"stem":481,"restApiVersion":15,"category":15,"description":482,"badge":15},"Node + Hook Export","\u002Fdocs\u002Fexamples\u002Fnode-hook-company-export","docs\u002F99.examples\u002F30.node-hook-company-export","Export Bitrix24 companies into a CSV file from a pure Node.js script using B24Hook.",{"title":484,"path":485,"stem":486,"restApiVersion":15,"category":426,"description":487,"badge":15},"Bulk update","\u002Fdocs\u002Fexamples\u002Fbulk-update-deals","docs\u002F99.examples\u002F4.bulk-update-deals","Migrate thousands of CRM deals to a new stage using BatchByChunkV2 — automatic chunking, partial-error handling, and a single progress line.",{"title":489,"path":490,"stem":491,"restApiVersion":15,"category":426,"description":492,"badge":15},"ERP sync","\u002Fdocs\u002Fexamples\u002Ferp-sync","docs\u002F99.examples\u002F4.erp-sync","Two-way contact sync between Bitrix24 and an external ERP. Match by INN (primary) or email (fallback). Cron every hour.",{"title":494,"path":495,"stem":496,"restApiVersion":15,"category":426,"description":497,"badge":15},"Disk files","\u002Fdocs\u002Fexamples\u002Fdisk-files","docs\u002F99.examples\u002F5.disk-files","List storages and folder children, create subfolders, inspect files. File upload (multipart) is intentionally out of scope.",{"title":499,"path":500,"stem":501,"restApiVersion":15,"category":426,"description":502,"badge":15},"Pull subscribe","\u002Fdocs\u002Fexamples\u002Fpull-subscribe-frame","docs\u002F99.examples\u002F5.pull-subscribe-frame","Open a live channel from a Bitrix24 frame app and react to push events using useB24Helper + the Pull client.",{"title":504,"path":505,"stem":506,"restApiVersion":15,"category":426,"description":507,"badge":15},"Telegram bot","\u002Fdocs\u002Fexamples\u002Ftelegram-bot","docs\u002F99.examples\u002F6.telegram-bot","Poll new CRM deals every two minutes; notify a Telegram chat with an HTML-formatted card.",{"title":509,"path":510,"stem":511,"restApiVersion":15,"category":426,"description":512,"badge":15},"Webhook handler","\u002Fdocs\u002Fexamples\u002Fwebhook-handler","docs\u002F99.examples\u002F7.webhook-handler","Express server that receives Bitrix24 outbound events, fetches details via REST, dispatches by event name. Always returns 200.",{"title":514,"path":515,"stem":516,"restApiVersion":15,"category":426,"description":517,"badge":15},"AI assistant","\u002Fdocs\u002Fexamples\u002Fai-assistant","docs\u002F99.examples\u002F8.ai-assistant","Load a deal and its activities, ask GPT-4o for the next-best action, create a task bound to the deal with priority and deadline.",{"title":519,"path":520,"stem":521,"restApiVersion":15,"category":426,"description":522,"badge":15},"Web search + LLM","\u002Fdocs\u002Fexamples\u002Fweb-search-llm","docs\u002F99.examples\u002F9.web-search-llm","Two-step RAG: ask any web-search provider, run the result through your LLM with [N] citations, post the answer as a CRM timeline comment on a deal.",{"id":524,"title":525,"audited":526,"badge":15,"body":527,"category":96,"cookbookOrder":15,"description":198,"extension":3564,"featured":47,"links":3565,"meta":3577,"navigation":3578,"path":196,"restApiVersion":101,"scopes":15,"seo":3579,"stack":15,"stem":197,"__hash__":3580},"docs\u002Fdocs\u002F2.working-with-the-rest-api\u002F4.deferred-batch-rest-api-ver3.md","DeferredBatchV3","2026-09-27",{"type":528,"value":529,"toc":3549},"minimark",[530,535,552,606,616,635,725,754,757,801,805,1128,1135,1756,1769,1772,1994,1996,2000,2307,2323,2327,2332,2554,2558,3019,3023,3183,3187,3210,3213,3233,3237,3250,3254,3433,3437,3545],[531,532,534],"h2",{"id":533},"overview","Overview",[536,537,538,542,543,546,547,551],"p",{},[539,540,541],"code",{},"$b24.actions.v3.deferredBatch"," wraps the portal's ",[539,544,545],{},"rest.deferredbatch.*","\nmethods. A deferred batch is a ",[548,549,550],"strong",{},"background job",":",[553,554,555,585,603],"ol",{},[556,557,558,561,562,565,566,573,574,577,578,584],"li",{},[539,559,560],{},"rest.deferredbatch.add"," takes ",[548,563,564],{},"all"," commands in one call — thousands of\nthem, far past the 50 of a synchronous ",[567,568,570],"a",{"href":569},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Fbatch-rest-api-ver3\u002F",[539,571,572],{},"batch",".\nMeasured: 5000 ",[539,575,576],{},"tasks.task.get"," commands in one job, finished in under 5 seconds\n(",[567,579,583],{"href":580,"rel":581},"https:\u002F\u002Fgithub.com\u002Fbitrix24\u002Fb24jssdk\u002Fissues\u002F570#issuecomment-5844466488",[582],"nofollow","#570",").",[556,586,587,588,591,592,591,595,598,599,602],{},"The portal runs them in the background. The job's status goes\n",[539,589,590],{},"pending"," → ",[539,593,594],{},"processing",[539,596,597],{},"done",", or ends in ",[539,600,601],{},"error"," (all four observed).",[556,604,605],{},"The results are stored as a gzip-compressed JSON file. The SDK downloads it\nand decodes it into rows — one row per command, in command order.",[536,607,608,609,615],{},"Compared with ",[567,610,612],{"href":611},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Fbatch-by-chunk-rest-api-ver3\u002F",[539,613,614],{},"batchByChunk",",\nwhich sends one request per 50 commands, a deferred batch is one request to\nstart, then status checks until it is done. How the portal counts a background\njob against the operating-time limit has not been measured.",[617,618,619],"warning",{},[536,620,621,622,625,626,629,630,634],{},"Deferred batches depend on the portal's ",[548,623,624],{},"plan",". On a plan without them every\ncall answers ",[539,627,628],{},"FEATURE_NOT_AVAILABLE_ON_CURRENT_PLAN"," (observed on such a portal,\n",[567,631,583],{"href":632,"rel":633},"https:\u002F\u002Fgithub.com\u002Fbitrix24\u002Fb24jssdk\u002Fissues\u002F570",[582],"). Which scope the methods\nneed has not been measured.",[617,636,637,648],{},[536,638,639,642,643,647],{},[548,640,641],{},"Rules measured on the portal"," (",[567,644,583],{"href":645,"rel":646},"https:\u002F\u002Fgithub.com\u002Fbitrix24\u002Fb24jssdk\u002Fissues\u002F570#issuecomment-5844638165",[582],"):",[649,650,651,669,692,709],"ul",{},[556,652,653,656,657,660,661,664,665,668],{},[548,654,655],{},"v3 methods only."," A v2 method (",[539,658,659],{},"user.current",") or an unknown one is refused\nat ",[539,662,663],{},"add"," with ",[539,666,667],{},"INVALID_METHOD","; no job is created.",[556,670,671,674,675,678,679,642,681,684,685,688,689,691],{},[548,672,673],{},"All or nothing."," If one command fails — a ",[539,676,677],{},"get"," of a record that does not\nexist is enough — the whole job ends in ",[539,680,601],{},[539,682,683],{},"errorMessage: \"Result does not exists\"",") and there is ",[548,686,687],{},"no result file",", not even for the commands that\nworked. Build commands that cannot fail on data: list pages rather than a\n",[539,690,677],{}," per id.",[556,693,694,697,698,700,701,704,705,708],{},[548,695,696],{},"Duration depends on the method, not only the count."," 5000 cheap ",[539,699,677],{},"s\nfinished in seconds; 500 ",[539,702,703],{},"rest.scope.list"," were still running after 15\nminutes. Set ",[539,706,707],{},"timeout"," for your workload.",[556,710,711,714,715,718,719,721,722,724],{},[548,712,713],{},"A running job cannot be deleted"," — the portal answers ",[539,716,717],{},"BATCH_PROCESSING",".\nDelete it once it is ",[539,720,597],{}," or ",[539,723,601],{},".",[726,727,728],"note",{},[536,729,730,733,734,736,737,740,741,745,746,749,750,724],{},[548,731,732],{},"Measured through a webhook."," In a browser (",[539,735,148],{},") the result file can\nbe read: the portal serves it with ",[539,738,739],{},"Access-Control-Allow-Origin: *"," (measured, ",[567,742,583],{"href":743,"rel":744},"https:\u002F\u002Fgithub.com\u002Fbitrix24\u002Fb24jssdk\u002Fissues\u002F570#issuecomment-5844778591",[582],");\na full run from a frame\nhas not been done. ",[539,747,748],{},"idempotencyKey"," is not available in a browser — see\n",[567,751,753],{"href":752},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Fcall-rest-api-ver3\u002F#idempotency-key","Idempotency-Key",[536,755,756],{},"There are two ways to use it:",[758,759,760,773],"table",{},[761,762,763],"thead",{},[764,765,766,770],"tr",{},[767,768,769],"th",{},"You want to…",[767,771,772],{},"Use",[774,775,776,790],"tbody",{},[764,777,778,782],{},[779,780,781],"td",{},"Run the commands and get the rows, with a progress callback",[779,783,784],{},[567,785,787],{"href":786},"#method-signature",[539,788,789],{},"make()",[764,791,792,795],{},[779,793,794],{},"Start a job now and collect it later — another request, a queue worker, your own UI polling",[779,796,797],{},[567,798,800],{"href":799},"#step-by-step","the single steps",[531,802,804],{"id":803},"method-signature","Method Signature",[806,807,812],"pre",{"className":808,"code":809,"language":810,"meta":811,"style":811},"language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","make\u003CT = unknown>(options: ActionDeferredBatchV3): Promise\u003CResult\u003CT[]>>\n\nadd(options: ActionDeferredBatchAddV3): Promise\u003CResult\u003CDeferredBatchJob>>\nget(id: number): Promise\u003CResult\u003CDeferredBatchJob>>\nwaitFor(id: number, options?: ActionDeferredBatchWaitV3): Promise\u003CResult\u003CDeferredBatchJob>>\ndownload\u003CT = unknown>(id: number): Promise\u003CResult\u003CT[]>>\ndelete(id: number): Promise\u003CResult\u003Cboolean>>\nlist(): Promise\u003CResult\u003CDeferredBatchJob[]>>\ngetDownloadUrl(id: number): Promise\u003CResult\u003Cstring>>\ndecode(bytes: ArrayBuffer | Uint8Array): Promise\u003Cunknown[]>\n","ts-type","",[539,813,814,868,875,905,934,974,1012,1041,1064,1093],{"__ignoreMap":811},[815,816,819,823,827,830,834,837,840,844,846,849,851,854,856,858,860,862,865],"span",{"class":817,"line":818},"line",1,[815,820,822],{"class":821},"sBMFI","make",[815,824,826],{"class":825},"sMK4o","\u003C",[815,828,829],{"class":821},"T",[815,831,833],{"class":832},"sTEyZ"," = ",[815,835,836],{"class":821},"unknown",[815,838,839],{"class":825},">(",[815,841,843],{"class":842},"sHdIc","options",[815,845,551],{"class":825},[815,847,848],{"class":821}," ActionDeferredBatchV3",[815,850,647],{"class":825},[815,852,853],{"class":821}," Promise",[815,855,826],{"class":825},[815,857,303],{"class":821},[815,859,826],{"class":825},[815,861,829],{"class":821},[815,863,864],{"class":832},"[]",[815,866,867],{"class":825},">>\n",[815,869,871],{"class":817,"line":870},2,[815,872,874],{"emptyLinePlaceholder":873},true,"\n",[815,876,878,880,883,885,887,890,892,894,896,898,900,903],{"class":817,"line":877},3,[815,879,663],{"class":821},[815,881,882],{"class":825},"(",[815,884,843],{"class":842},[815,886,551],{"class":825},[815,888,889],{"class":821}," ActionDeferredBatchAddV3",[815,891,647],{"class":825},[815,893,853],{"class":821},[815,895,826],{"class":825},[815,897,303],{"class":821},[815,899,826],{"class":825},[815,901,902],{"class":821},"DeferredBatchJob",[815,904,867],{"class":825},[815,906,908,910,912,915,917,920,922,924,926,928,930,932],{"class":817,"line":907},4,[815,909,677],{"class":821},[815,911,882],{"class":825},[815,913,914],{"class":842},"id",[815,916,551],{"class":825},[815,918,919],{"class":821}," number",[815,921,647],{"class":825},[815,923,853],{"class":821},[815,925,826],{"class":825},[815,927,303],{"class":821},[815,929,826],{"class":825},[815,931,902],{"class":821},[815,933,867],{"class":825},[815,935,937,940,942,944,946,948,951,954,957,960,962,964,966,968,970,972],{"class":817,"line":936},5,[815,938,939],{"class":821},"waitFor",[815,941,882],{"class":825},[815,943,914],{"class":842},[815,945,551],{"class":825},[815,947,919],{"class":821},[815,949,950],{"class":825},",",[815,952,953],{"class":842}," options",[815,955,956],{"class":825},"?:",[815,958,959],{"class":821}," ActionDeferredBatchWaitV3",[815,961,647],{"class":825},[815,963,853],{"class":821},[815,965,826],{"class":825},[815,967,303],{"class":821},[815,969,826],{"class":825},[815,971,902],{"class":821},[815,973,867],{"class":825},[815,975,977,980,982,984,986,988,990,992,994,996,998,1000,1002,1004,1006,1008,1010],{"class":817,"line":976},6,[815,978,979],{"class":821},"download",[815,981,826],{"class":825},[815,983,829],{"class":821},[815,985,833],{"class":832},[815,987,836],{"class":821},[815,989,839],{"class":825},[815,991,914],{"class":842},[815,993,551],{"class":825},[815,995,919],{"class":821},[815,997,647],{"class":825},[815,999,853],{"class":821},[815,1001,826],{"class":825},[815,1003,303],{"class":821},[815,1005,826],{"class":825},[815,1007,829],{"class":821},[815,1009,864],{"class":832},[815,1011,867],{"class":825},[815,1013,1015,1018,1020,1022,1024,1026,1028,1030,1032,1034,1036,1039],{"class":817,"line":1014},7,[815,1016,1017],{"class":821},"delete",[815,1019,882],{"class":825},[815,1021,914],{"class":842},[815,1023,551],{"class":825},[815,1025,919],{"class":821},[815,1027,647],{"class":825},[815,1029,853],{"class":821},[815,1031,826],{"class":825},[815,1033,303],{"class":821},[815,1035,826],{"class":825},[815,1037,1038],{"class":821},"boolean",[815,1040,867],{"class":825},[815,1042,1044,1047,1050,1052,1054,1056,1058,1060,1062],{"class":817,"line":1043},8,[815,1045,1046],{"class":821},"list",[815,1048,1049],{"class":825},"():",[815,1051,853],{"class":821},[815,1053,826],{"class":825},[815,1055,303],{"class":821},[815,1057,826],{"class":825},[815,1059,902],{"class":821},[815,1061,864],{"class":832},[815,1063,867],{"class":825},[815,1065,1067,1070,1072,1074,1076,1078,1080,1082,1084,1086,1088,1091],{"class":817,"line":1066},9,[815,1068,1069],{"class":821},"getDownloadUrl",[815,1071,882],{"class":825},[815,1073,914],{"class":842},[815,1075,551],{"class":825},[815,1077,919],{"class":821},[815,1079,647],{"class":825},[815,1081,853],{"class":821},[815,1083,826],{"class":825},[815,1085,303],{"class":821},[815,1087,826],{"class":825},[815,1089,1090],{"class":821},"string",[815,1092,867],{"class":825},[815,1094,1096,1099,1101,1104,1106,1109,1112,1115,1117,1119,1121,1123,1125],{"class":817,"line":1095},10,[815,1097,1098],{"class":821},"decode",[815,1100,882],{"class":825},[815,1102,1103],{"class":842},"bytes",[815,1105,551],{"class":825},[815,1107,1108],{"class":821}," ArrayBuffer",[815,1110,1111],{"class":825}," |",[815,1113,1114],{"class":821}," Uint8Array",[815,1116,647],{"class":825},[815,1118,853],{"class":821},[815,1120,826],{"class":825},[815,1122,836],{"class":821},[815,1124,864],{"class":832},[815,1126,1127],{"class":825},">\n",[1129,1130,1132,1133],"h3",{"id":1131},"all-in-one-make","All in one: ",[539,1134,789],{},[806,1136,1140],{"className":1137,"code":1138,"language":1139,"meta":811,"style":811},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F const $b24 = ...\nimport type { BatchCommandsArrayUniversal, DeferredBatchJob } from '@bitrix24\u002Fb24jssdk'\n\ninterface TaskPage { items: Array\u003C{ id: number, title: string }> }\n\n\u002F\u002F 200 pages of 50 tasks. List pages, not a `get` per id: one failing command\n\u002F\u002F fails the whole job, while a page past the end is just empty (measured).\nconst calls: BatchCommandsArrayUniversal = Array.from({ length: 200 }, (_, i) => [\n  'tasks.task.list',\n  { select: ['id', 'title'], order: { id: 'ASC' }, pagination: { page: i + 1, limit: 50 } }\n])\n\nconst response = await $b24.actions.v3.deferredBatch.make\u003CTaskPage>({\n  calls,\n  \u002F\u002F Called on every status change, e.g. pending → done.\n  onStatus: (job: DeferredBatchJob) => console.log(`job #${job.id}: ${job.status}`)\n})\n\nif (!response.isSuccess) {\n  throw new Error(response.getErrorMessages().join('; '))\n}\n\nconst pages = response.getData()! \u002F\u002F one row per command, in order\nconst titles = pages.flatMap(page => page.items.map(task => task.title))\nconsole.log(`${titles.length} tasks in ${pages.length} pages`)\n","ts",[539,1141,1142,1148,1184,1188,1234,1238,1243,1248,1307,1321,1409,1415,1420,1468,1476,1482,1549,1556,1561,1582,1623,1629,1634,1659,1711],{"__ignoreMap":811},[815,1143,1144],{"class":817,"line":818},[815,1145,1147],{"class":1146},"sHwdD","\u002F\u002F const $b24 = ...\n",[815,1149,1150,1154,1157,1160,1163,1165,1168,1171,1174,1177,1181],{"class":817,"line":870},[815,1151,1153],{"class":1152},"s7zQu","import",[815,1155,1156],{"class":1152}," type",[815,1158,1159],{"class":825}," {",[815,1161,1162],{"class":832}," BatchCommandsArrayUniversal",[815,1164,950],{"class":825},[815,1166,1167],{"class":832}," DeferredBatchJob",[815,1169,1170],{"class":825}," }",[815,1172,1173],{"class":1152}," from",[815,1175,1176],{"class":825}," '",[815,1178,1180],{"class":1179},"sfazB","@bitrix24\u002Fb24jssdk",[815,1182,1183],{"class":825},"'\n",[815,1185,1186],{"class":817,"line":877},[815,1187,874],{"emptyLinePlaceholder":873},[815,1189,1190,1194,1197,1199,1203,1205,1208,1211,1214,1216,1218,1220,1223,1225,1228,1231],{"class":817,"line":907},[815,1191,1193],{"class":1192},"spNyl","interface",[815,1195,1196],{"class":821}," TaskPage",[815,1198,1159],{"class":825},[815,1200,1202],{"class":1201},"swJcz"," items",[815,1204,551],{"class":825},[815,1206,1207],{"class":821}," Array",[815,1209,1210],{"class":825},"\u003C{",[815,1212,1213],{"class":1201}," id",[815,1215,551],{"class":825},[815,1217,919],{"class":821},[815,1219,950],{"class":825},[815,1221,1222],{"class":1201}," title",[815,1224,551],{"class":825},[815,1226,1227],{"class":821}," string",[815,1229,1230],{"class":825}," }>",[815,1232,1233],{"class":825}," }\n",[815,1235,1236],{"class":817,"line":936},[815,1237,874],{"emptyLinePlaceholder":873},[815,1239,1240],{"class":817,"line":976},[815,1241,1242],{"class":1146},"\u002F\u002F 200 pages of 50 tasks. List pages, not a `get` per id: one failing command\n",[815,1244,1245],{"class":817,"line":1014},[815,1246,1247],{"class":1146},"\u002F\u002F fails the whole job, while a page past the end is just empty (measured).\n",[815,1249,1250,1253,1256,1258,1260,1263,1265,1267,1271,1273,1276,1279,1281,1285,1288,1290,1293,1295,1298,1301,1304],{"class":817,"line":1043},[815,1251,1252],{"class":1192},"const",[815,1254,1255],{"class":832}," calls",[815,1257,551],{"class":825},[815,1259,1162],{"class":821},[815,1261,1262],{"class":825}," =",[815,1264,1207],{"class":832},[815,1266,724],{"class":825},[815,1268,1270],{"class":1269},"s2Zo4","from",[815,1272,882],{"class":832},[815,1274,1275],{"class":825},"{",[815,1277,1278],{"class":1201}," length",[815,1280,551],{"class":825},[815,1282,1284],{"class":1283},"sbssI"," 200",[815,1286,1287],{"class":825}," },",[815,1289,642],{"class":825},[815,1291,1292],{"class":842},"_",[815,1294,950],{"class":825},[815,1296,1297],{"class":842}," i",[815,1299,1300],{"class":825},")",[815,1302,1303],{"class":1192}," =>",[815,1305,1306],{"class":832}," [\n",[815,1308,1309,1312,1315,1318],{"class":817,"line":1066},[815,1310,1311],{"class":825},"  '",[815,1313,1314],{"class":1179},"tasks.task.list",[815,1316,1317],{"class":825},"'",[815,1319,1320],{"class":825},",\n",[815,1322,1323,1326,1329,1331,1334,1336,1338,1340,1342,1344,1347,1349,1352,1354,1357,1359,1361,1363,1365,1367,1370,1372,1374,1377,1379,1381,1384,1386,1389,1392,1395,1397,1400,1402,1405,1407],{"class":817,"line":1095},[815,1324,1325],{"class":825},"  {",[815,1327,1328],{"class":1201}," select",[815,1330,551],{"class":825},[815,1332,1333],{"class":832}," [",[815,1335,1317],{"class":825},[815,1337,914],{"class":1179},[815,1339,1317],{"class":825},[815,1341,950],{"class":825},[815,1343,1176],{"class":825},[815,1345,1346],{"class":1179},"title",[815,1348,1317],{"class":825},[815,1350,1351],{"class":832},"]",[815,1353,950],{"class":825},[815,1355,1356],{"class":1201}," order",[815,1358,551],{"class":825},[815,1360,1159],{"class":825},[815,1362,1213],{"class":1201},[815,1364,551],{"class":825},[815,1366,1176],{"class":825},[815,1368,1369],{"class":1179},"ASC",[815,1371,1317],{"class":825},[815,1373,1287],{"class":825},[815,1375,1376],{"class":1201}," pagination",[815,1378,551],{"class":825},[815,1380,1159],{"class":825},[815,1382,1383],{"class":1201}," page",[815,1385,551],{"class":825},[815,1387,1388],{"class":832}," i ",[815,1390,1391],{"class":825},"+",[815,1393,1394],{"class":1283}," 1",[815,1396,950],{"class":825},[815,1398,1399],{"class":1201}," limit",[815,1401,551],{"class":825},[815,1403,1404],{"class":1283}," 50",[815,1406,1170],{"class":825},[815,1408,1233],{"class":825},[815,1410,1412],{"class":817,"line":1411},11,[815,1413,1414],{"class":832},"])\n",[815,1416,1418],{"class":817,"line":1417},12,[815,1419,874],{"emptyLinePlaceholder":873},[815,1421,1423,1425,1428,1431,1434,1437,1439,1441,1443,1446,1448,1451,1453,1455,1457,1460,1463,1465],{"class":817,"line":1422},13,[815,1424,1252],{"class":1192},[815,1426,1427],{"class":832}," response ",[815,1429,1430],{"class":825},"=",[815,1432,1433],{"class":1152}," await",[815,1435,1436],{"class":832}," $b24",[815,1438,724],{"class":825},[815,1440,96],{"class":832},[815,1442,724],{"class":825},[815,1444,1445],{"class":832},"v3",[815,1447,724],{"class":825},[815,1449,1450],{"class":832},"deferredBatch",[815,1452,724],{"class":825},[815,1454,822],{"class":1269},[815,1456,826],{"class":825},[815,1458,1459],{"class":821},"TaskPage",[815,1461,1462],{"class":825},">",[815,1464,882],{"class":832},[815,1466,1467],{"class":825},"{\n",[815,1469,1471,1474],{"class":817,"line":1470},14,[815,1472,1473],{"class":832},"  calls",[815,1475,1320],{"class":825},[815,1477,1479],{"class":817,"line":1478},15,[815,1480,1481],{"class":1146},"  \u002F\u002F Called on every status change, e.g. pending → done.\n",[815,1483,1485,1488,1490,1492,1495,1497,1499,1501,1503,1506,1508,1511,1513,1516,1519,1522,1524,1526,1528,1531,1534,1536,1538,1540,1543,1546],{"class":817,"line":1484},16,[815,1486,1487],{"class":1269},"  onStatus",[815,1489,551],{"class":825},[815,1491,642],{"class":825},[815,1493,1494],{"class":842},"job",[815,1496,551],{"class":825},[815,1498,1167],{"class":821},[815,1500,1300],{"class":825},[815,1502,1303],{"class":1192},[815,1504,1505],{"class":832}," console",[815,1507,724],{"class":825},[815,1509,1510],{"class":1269},"log",[815,1512,882],{"class":832},[815,1514,1515],{"class":825},"`",[815,1517,1518],{"class":1179},"job #",[815,1520,1521],{"class":825},"${",[815,1523,1494],{"class":832},[815,1525,724],{"class":825},[815,1527,914],{"class":832},[815,1529,1530],{"class":825},"}",[815,1532,1533],{"class":1179},": ",[815,1535,1521],{"class":825},[815,1537,1494],{"class":832},[815,1539,724],{"class":825},[815,1541,1542],{"class":832},"status",[815,1544,1545],{"class":825},"}`",[815,1547,1548],{"class":832},")\n",[815,1550,1552,1554],{"class":817,"line":1551},17,[815,1553,1530],{"class":825},[815,1555,1548],{"class":832},[815,1557,1559],{"class":817,"line":1558},18,[815,1560,874],{"emptyLinePlaceholder":873},[815,1562,1564,1567,1569,1572,1575,1577,1580],{"class":817,"line":1563},19,[815,1565,1566],{"class":1152},"if",[815,1568,642],{"class":832},[815,1570,1571],{"class":825},"!",[815,1573,1574],{"class":832},"response",[815,1576,724],{"class":825},[815,1578,1579],{"class":832},"isSuccess) ",[815,1581,1467],{"class":825},[815,1583,1585,1588,1591,1594,1596,1598,1600,1603,1606,1608,1611,1613,1615,1618,1620],{"class":817,"line":1584},20,[815,1586,1587],{"class":1152},"  throw",[815,1589,1590],{"class":825}," new",[815,1592,1593],{"class":1269}," Error",[815,1595,882],{"class":1201},[815,1597,1574],{"class":832},[815,1599,724],{"class":825},[815,1601,1602],{"class":1269},"getErrorMessages",[815,1604,1605],{"class":1201},"()",[815,1607,724],{"class":825},[815,1609,1610],{"class":1269},"join",[815,1612,882],{"class":1201},[815,1614,1317],{"class":825},[815,1616,1617],{"class":1179},"; ",[815,1619,1317],{"class":825},[815,1621,1622],{"class":1201},"))\n",[815,1624,1626],{"class":817,"line":1625},21,[815,1627,1628],{"class":825},"}\n",[815,1630,1632],{"class":817,"line":1631},22,[815,1633,874],{"emptyLinePlaceholder":873},[815,1635,1637,1639,1642,1644,1647,1649,1652,1654,1656],{"class":817,"line":1636},23,[815,1638,1252],{"class":1192},[815,1640,1641],{"class":832}," pages ",[815,1643,1430],{"class":825},[815,1645,1646],{"class":832}," response",[815,1648,724],{"class":825},[815,1650,1651],{"class":1269},"getData",[815,1653,1605],{"class":832},[815,1655,1571],{"class":825},[815,1657,1658],{"class":1146}," \u002F\u002F one row per command, in order\n",[815,1660,1662,1664,1667,1669,1672,1674,1677,1679,1682,1684,1686,1688,1691,1693,1696,1698,1701,1703,1706,1708],{"class":817,"line":1661},24,[815,1663,1252],{"class":1192},[815,1665,1666],{"class":832}," titles ",[815,1668,1430],{"class":825},[815,1670,1671],{"class":832}," pages",[815,1673,724],{"class":825},[815,1675,1676],{"class":1269},"flatMap",[815,1678,882],{"class":832},[815,1680,1681],{"class":842},"page",[815,1683,1303],{"class":1192},[815,1685,1383],{"class":832},[815,1687,724],{"class":825},[815,1689,1690],{"class":832},"items",[815,1692,724],{"class":825},[815,1694,1695],{"class":1269},"map",[815,1697,882],{"class":832},[815,1699,1700],{"class":842},"task",[815,1702,1303],{"class":1192},[815,1704,1705],{"class":832}," task",[815,1707,724],{"class":825},[815,1709,1710],{"class":832},"title))\n",[815,1712,1714,1717,1719,1721,1723,1726,1729,1731,1734,1736,1739,1741,1744,1746,1748,1750,1752,1754],{"class":817,"line":1713},25,[815,1715,1716],{"class":832},"console",[815,1718,724],{"class":825},[815,1720,1510],{"class":1269},[815,1722,882],{"class":832},[815,1724,1725],{"class":825},"`${",[815,1727,1728],{"class":832},"titles",[815,1730,724],{"class":825},[815,1732,1733],{"class":832},"length",[815,1735,1530],{"class":825},[815,1737,1738],{"class":1179}," tasks in ",[815,1740,1521],{"class":825},[815,1742,1743],{"class":832},"pages",[815,1745,724],{"class":825},[815,1747,1733],{"class":832},[815,1749,1530],{"class":825},[815,1751,1671],{"class":1179},[815,1753,1515],{"class":825},[815,1755,1548],{"class":832},[536,1757,1758,1760,1761,1764,1765,1768],{},[539,1759,789],{}," adds the job, waits for it, downloads and decodes the result file, and\ndeletes the job. What the portal answers never makes it throw: check\n",[539,1762,1763],{},"isSuccess",". It throws only for malformed ",[539,1766,1767],{},"calls",", before anything is sent.",[1770,1771,166],"h4",{"id":843},[758,1773,1774,1789],{},[761,1775,1776],{},[764,1777,1778,1781,1783,1786],{},[767,1779,1780],{},"Option",[767,1782,351],{},[767,1784,1785],{},"Default",[767,1787,1788],{},"Meaning",[774,1790,1791,1818,1853,1878,1903,1922,1943,1971],{},[764,1792,1793,1797,1804,1807],{},[779,1794,1795],{},[539,1796,1767],{},[779,1798,1799],{},[539,1800,1801],{"className":808,"language":810,"style":811},[815,1802,1803],{"class":821},"DeferredBatchCalls",[779,1805,1806],{},"—",[779,1808,1809,1810,1813,1814,1817],{},"The commands: ",[539,1811,1812],{},"[['method', params], …]",", ",[539,1815,1816],{},"[{ method, params }, …]",", or both mixed. Named commands are not supported — the result is an array.",[764,1819,1820,1825,1844,1846],{},[779,1821,1822],{},[539,1823,1824],{},"onStatus",[779,1826,1827],{},[539,1828,1829,1831,1833,1835,1837,1839,1841],{"className":808,"language":810,"style":811},[815,1830,882],{"class":825},[815,1832,1494],{"class":842},[815,1834,551],{"class":825},[815,1836,1167],{"class":821},[815,1838,1300],{"class":825},[815,1840,1303],{"class":1192},[815,1842,1843],{"class":821}," void",[779,1845,1806],{},[779,1847,1848,1849,1852],{},"Called when the status changes, the first status included. An exception in it — or a rejection, if it is ",[539,1850,1851],{},"async"," — is logged and ignored.",[764,1854,1855,1860,1867,1872],{},[779,1856,1857],{},[539,1858,1859],{},"pollInterval",[779,1861,1862],{},[539,1863,1864],{"className":808,"language":810,"style":811},[815,1865,1866],{"class":821},"number",[779,1868,1869],{},[539,1870,1871],{},"2000",[779,1873,1874,1875,724],{},"Milliseconds between status checks. At least ",[539,1876,1877],{},"250",[764,1879,1880,1884,1890,1895],{},[779,1881,1882],{},[539,1883,707],{},[779,1885,1886],{},[539,1887,1888],{"className":808,"language":810,"style":811},[815,1889,1866],{"class":821},[779,1891,1892],{},[539,1893,1894],{},"600000",[779,1896,1897,1898,1900,1901,724],{},"Milliseconds to wait for ",[539,1899,597],{}," \u002F ",[539,1902,601],{},[764,1904,1905,1910,1917,1919],{},[779,1906,1907],{},[539,1908,1909],{},"signal",[779,1911,1912],{},[539,1913,1914],{"className":808,"language":810,"style":811},[815,1915,1916],{"class":821},"AbortSignal",[779,1918,1806],{},[779,1920,1921],{},"Stops waiting.",[764,1923,1924,1929,1935,1940],{},[779,1925,1926],{},[539,1927,1928],{},"deleteAfter",[779,1930,1931],{},[539,1932,1933],{"className":808,"language":810,"style":811},[815,1934,1038],{"class":821},[779,1936,1937],{},[539,1938,1939],{},"true",[779,1941,1942],{},"Delete the job and its file after reading.",[764,1944,1945,1949,1955,1957],{},[779,1946,1947],{},[539,1948,748],{},[779,1950,1951],{},[539,1952,1953],{"className":808,"language":810,"style":811},[815,1954,1090],{"class":821},[779,1956,1806],{},[779,1958,1959,1960,1962,1963,1965,1966,1968,1969,724],{},"Sent with ",[539,1961,663],{},". Use one key per run: by the portal's idempotency contract — not measured for deferred batches — a retry of an interrupted ",[539,1964,789],{}," with the same key then does not start a second job, while a key reused after a finished ",[539,1967,789],{}," deleted its job would replay the id of a job that no longer exists. See ",[567,1970,753],{"href":752},[764,1972,1973,1978,1984,1986],{},[779,1974,1975],{},[539,1976,1977],{},"requestId",[779,1979,1980],{},[539,1981,1982],{"className":808,"language":810,"style":811},[815,1983,1090],{"class":821},[779,1985,1806],{},[779,1987,1988,1989,664,1992,724],{},"Sent as ",[539,1990,1991],{},"bx24_request_id",[539,1993,663],{},[531,1995,416],{"id":426},[1129,1997,1999],{"id":1998},"progress-in-a-ui-and-cancelling","Progress in a UI, and cancelling",[806,2001,2003],{"className":1137,"code":2002,"language":1139,"meta":811,"style":811},"\u002F\u002F const $b24 = ...\ndeclare const calls: [string, Record\u003Cstring, unknown>][]\ndeclare function showStatus(text: string): void\n\nconst controller = new AbortController()\n\u002F\u002F e.g. wired to a \"Cancel\" button: cancelButton.onclick = () => controller.abort()\n\nconst response = await $b24.actions.v3.deferredBatch.make({\n  calls,\n  pollInterval: 3_000,\n  timeout: 30 * 60_000,\n  signal: controller.signal,\n  onStatus: job => showStatus(job.status === 'done' ? 'Downloading results…' : `Status: ${job.status}`)\n})\n\nif (!response.isSuccess) {\n  \u002F\u002F JSSDK_DEFERRED_BATCH_ABORTED, _TIMEOUT or _FAILED — see \"Errors\" below.\n  showStatus(response.getErrorMessages().join('; '))\n}\n",[539,2004,2005,2009,2044,2068,2072,2089,2094,2098,2130,2136,2148,2166,2182,2243,2249,2253,2269,2274,2303],{"__ignoreMap":811},[815,2006,2007],{"class":817,"line":818},[815,2008,1147],{"class":1146},[815,2010,2011,2014,2017,2019,2021,2023,2025,2027,2030,2032,2034,2036,2039,2041],{"class":817,"line":870},[815,2012,2013],{"class":1192},"declare",[815,2015,2016],{"class":1192}," const",[815,2018,1255],{"class":832},[815,2020,551],{"class":825},[815,2022,1333],{"class":832},[815,2024,1090],{"class":821},[815,2026,950],{"class":825},[815,2028,2029],{"class":821}," Record",[815,2031,826],{"class":825},[815,2033,1090],{"class":821},[815,2035,950],{"class":825},[815,2037,2038],{"class":821}," unknown",[815,2040,1462],{"class":825},[815,2042,2043],{"class":832},"][]\n",[815,2045,2046,2048,2051,2054,2056,2059,2061,2063,2065],{"class":817,"line":877},[815,2047,2013],{"class":1192},[815,2049,2050],{"class":1192}," function",[815,2052,2053],{"class":1269}," showStatus",[815,2055,882],{"class":825},[815,2057,2058],{"class":842},"text",[815,2060,551],{"class":825},[815,2062,1227],{"class":821},[815,2064,647],{"class":825},[815,2066,2067],{"class":821}," void\n",[815,2069,2070],{"class":817,"line":907},[815,2071,874],{"emptyLinePlaceholder":873},[815,2073,2074,2076,2079,2081,2083,2086],{"class":817,"line":936},[815,2075,1252],{"class":1192},[815,2077,2078],{"class":832}," controller ",[815,2080,1430],{"class":825},[815,2082,1590],{"class":825},[815,2084,2085],{"class":1269}," AbortController",[815,2087,2088],{"class":832},"()\n",[815,2090,2091],{"class":817,"line":976},[815,2092,2093],{"class":1146},"\u002F\u002F e.g. wired to a \"Cancel\" button: cancelButton.onclick = () => controller.abort()\n",[815,2095,2096],{"class":817,"line":1014},[815,2097,874],{"emptyLinePlaceholder":873},[815,2099,2100,2102,2104,2106,2108,2110,2112,2114,2116,2118,2120,2122,2124,2126,2128],{"class":817,"line":1043},[815,2101,1252],{"class":1192},[815,2103,1427],{"class":832},[815,2105,1430],{"class":825},[815,2107,1433],{"class":1152},[815,2109,1436],{"class":832},[815,2111,724],{"class":825},[815,2113,96],{"class":832},[815,2115,724],{"class":825},[815,2117,1445],{"class":832},[815,2119,724],{"class":825},[815,2121,1450],{"class":832},[815,2123,724],{"class":825},[815,2125,822],{"class":1269},[815,2127,882],{"class":832},[815,2129,1467],{"class":825},[815,2131,2132,2134],{"class":817,"line":1066},[815,2133,1473],{"class":832},[815,2135,1320],{"class":825},[815,2137,2138,2141,2143,2146],{"class":817,"line":1095},[815,2139,2140],{"class":1201},"  pollInterval",[815,2142,551],{"class":825},[815,2144,2145],{"class":1283}," 3_000",[815,2147,1320],{"class":825},[815,2149,2150,2153,2155,2158,2161,2164],{"class":817,"line":1411},[815,2151,2152],{"class":1201},"  timeout",[815,2154,551],{"class":825},[815,2156,2157],{"class":1283}," 30",[815,2159,2160],{"class":825}," *",[815,2162,2163],{"class":1283}," 60_000",[815,2165,1320],{"class":825},[815,2167,2168,2171,2173,2176,2178,2180],{"class":817,"line":1417},[815,2169,2170],{"class":1201},"  signal",[815,2172,551],{"class":825},[815,2174,2175],{"class":832}," controller",[815,2177,724],{"class":825},[815,2179,1909],{"class":832},[815,2181,1320],{"class":825},[815,2183,2184,2186,2188,2191,2193,2195,2198,2200,2203,2206,2208,2210,2212,2215,2217,2220,2222,2225,2228,2231,2233,2235,2237,2239,2241],{"class":817,"line":1422},[815,2185,1487],{"class":1269},[815,2187,551],{"class":825},[815,2189,2190],{"class":842}," job",[815,2192,1303],{"class":1192},[815,2194,2053],{"class":1269},[815,2196,2197],{"class":832},"(job",[815,2199,724],{"class":825},[815,2201,2202],{"class":832},"status ",[815,2204,2205],{"class":825},"===",[815,2207,1176],{"class":825},[815,2209,597],{"class":1179},[815,2211,1317],{"class":825},[815,2213,2214],{"class":825}," ?",[815,2216,1176],{"class":825},[815,2218,2219],{"class":1179},"Downloading results…",[815,2221,1317],{"class":825},[815,2223,2224],{"class":825}," :",[815,2226,2227],{"class":825}," `",[815,2229,2230],{"class":1179},"Status: ",[815,2232,1521],{"class":825},[815,2234,1494],{"class":832},[815,2236,724],{"class":825},[815,2238,1542],{"class":832},[815,2240,1545],{"class":825},[815,2242,1548],{"class":832},[815,2244,2245,2247],{"class":817,"line":1470},[815,2246,1530],{"class":825},[815,2248,1548],{"class":832},[815,2250,2251],{"class":817,"line":1478},[815,2252,874],{"emptyLinePlaceholder":873},[815,2254,2255,2257,2259,2261,2263,2265,2267],{"class":817,"line":1484},[815,2256,1566],{"class":1152},[815,2258,642],{"class":832},[815,2260,1571],{"class":825},[815,2262,1574],{"class":832},[815,2264,724],{"class":825},[815,2266,1579],{"class":832},[815,2268,1467],{"class":825},[815,2270,2271],{"class":817,"line":1551},[815,2272,2273],{"class":1146},"  \u002F\u002F JSSDK_DEFERRED_BATCH_ABORTED, _TIMEOUT or _FAILED — see \"Errors\" below.\n",[815,2275,2276,2279,2281,2283,2285,2287,2289,2291,2293,2295,2297,2299,2301],{"class":817,"line":1558},[815,2277,2278],{"class":1269},"  showStatus",[815,2280,882],{"class":1201},[815,2282,1574],{"class":832},[815,2284,724],{"class":825},[815,2286,1602],{"class":1269},[815,2288,1605],{"class":1201},[815,2290,724],{"class":825},[815,2292,1610],{"class":1269},[815,2294,882],{"class":1201},[815,2296,1317],{"class":825},[815,2298,1617],{"class":1179},[815,2300,1317],{"class":825},[815,2302,1622],{"class":1201},[815,2304,2305],{"class":817,"line":1563},[815,2306,1628],{"class":825},[536,2308,2309,2310,2313,2314,2316,2317,2319,2320,2322],{},"Aborting or timing out stops ",[548,2311,2312],{},"waiting",", not the job: it keeps running on the\nportal, and can be collected later with the steps below. ",[539,2315,789],{},"'s ",[539,2318,303],{},"\ndoes not carry the job id; ",[539,2321,1824],{}," does — it is called with the job as soon\nas it is first read — so keep the id from there if you may want to collect it.",[1129,2324,2326],{"id":2325},"step-by-step","Step by step",[536,2328,2329,2330,551],{},"Each step is one method and returns a ",[539,2331,303],{},[758,2333,2334,2347],{},[761,2335,2336],{},[764,2337,2338,2341,2344],{},[767,2339,2340],{},"Method",[767,2342,2343],{},"Portal method",[767,2345,2346],{},"Returns",[774,2348,2349,2375,2399,2424,2452,2479,2505,2529],{},[764,2350,2351,2356,2360],{},[779,2352,2353],{},[539,2354,2355],{},"add({ calls, idempotencyKey?, requestId? })",[779,2357,2358],{},[539,2359,560],{},[779,2361,2362,2372,2373],{},[539,2363,2364,2366,2368,2370],{"className":808,"language":810,"style":811},[815,2365,303],{"class":821},[815,2367,826],{"class":825},[815,2369,902],{"class":821},[815,2371,1462],{"class":825}," — the new job, usually ",[539,2374,590],{},[764,2376,2377,2382,2387],{},[779,2378,2379],{},[539,2380,2381],{},"get(id)",[779,2383,2384],{},[539,2385,2386],{},"rest.deferredbatch.get",[779,2388,2389],{},[539,2390,2391,2393,2395,2397],{"className":808,"language":810,"style":811},[815,2392,303],{"class":821},[815,2394,826],{"class":825},[815,2396,902],{"class":821},[815,2398,1462],{"class":825},[764,2400,2401,2406,2411],{},[779,2402,2403],{},[539,2404,2405],{},"waitFor(id, { pollInterval?, timeout?, signal?, onStatus? })",[779,2407,2408,2410],{},[539,2409,2386],{},", repeated",[779,2412,2413,2423],{},[539,2414,2415,2417,2419,2421],{"className":808,"language":810,"style":811},[815,2416,303],{"class":821},[815,2418,826],{"class":825},[815,2420,902],{"class":821},[815,2422,1462],{"class":825}," — the job in its final state",[764,2425,2426,2431,2437],{},[779,2427,2428],{},[539,2429,2430],{},"download\u003CT>(id)",[779,2432,2433,2436],{},[539,2434,2435],{},"rest.deferredbatch.downloadresult"," + the file",[779,2438,2439,2451],{},[539,2440,2441,2443,2445,2447,2449],{"className":808,"language":810,"style":811},[815,2442,303],{"class":821},[815,2444,826],{"class":825},[815,2446,829],{"class":821},[815,2448,864],{"class":832},[815,2450,1462],{"class":825}," — the decoded rows",[764,2453,2454,2459,2464],{},[779,2455,2456],{},[539,2457,2458],{},"delete(id)",[779,2460,2461],{},[539,2462,2463],{},"rest.deferredbatch.delete",[779,2465,2466,2476,2477],{},[539,2467,2468,2470,2472,2474],{"className":808,"language":810,"style":811},[815,2469,303],{"class":821},[815,2471,826],{"class":825},[815,2473,1038],{"class":821},[815,2475,1462],{"class":825}," — refused while the job is ",[539,2478,594],{},[764,2480,2481,2486,2491],{},[779,2482,2483],{},[539,2484,2485],{},"list()",[779,2487,2488],{},[539,2489,2490],{},"rest.deferredbatch.list",[779,2492,2493],{},[539,2494,2495,2497,2499,2501,2503],{"className":808,"language":810,"style":811},[815,2496,303],{"class":821},[815,2498,826],{"class":825},[815,2500,902],{"class":821},[815,2502,864],{"class":832},[815,2504,1462],{"class":825},[764,2506,2507,2512,2516],{},[779,2508,2509],{},[539,2510,2511],{},"getDownloadUrl(id)",[779,2513,2514],{},[539,2515,2435],{},[779,2517,2518,2528],{},[539,2519,2520,2522,2524,2526],{"className":808,"language":810,"style":811},[815,2521,303],{"class":821},[815,2523,826],{"class":825},[815,2525,1090],{"class":821},[815,2527,1462],{"class":825}," — the file link (a credential, see below)",[764,2530,2531,2536,2538],{},[779,2532,2533],{},[539,2534,2535],{},"decode(bytes)",[779,2537,1806],{},[779,2539,2540,2553],{},[539,2541,2542,2545,2547,2549,2551],{"className":808,"language":810,"style":811},[815,2543,2544],{"class":821},"Promise",[815,2546,826],{"class":825},[815,2548,836],{"class":821},[815,2550,864],{"class":832},[815,2552,1462],{"class":825}," — gunzip + JSON of file bytes",[1770,2555,2557],{"id":2556},"start-now-collect-later","Start now, collect later",[806,2559,2561],{"className":1137,"code":2560,"language":1139,"meta":811,"style":811},"\u002F\u002F const $b24 = ...\ndeclare const calls: [string, Record\u003Cstring, unknown>][]\ndeclare function saveJobId(id: number): Promise\u003Cvoid>\ndeclare function loadJobId(): Promise\u003Cnumber>\n\n\u002F\u002F Request 1: start the job and remember its id.\nconst added = await $b24.actions.v3.deferredBatch.add({ calls })\nif (!added.isSuccess) {\n  throw new Error(added.getErrorMessages().join('; '))\n}\nawait saveJobId(added.getData()!.id)\n\n\u002F\u002F Request 2, later: is it ready?\nconst jobId = await loadJobId()\nconst job = (await $b24.actions.v3.deferredBatch.get(jobId)).getData()\n\nif (job?.status === 'done') {\n  const rows = await $b24.actions.v3.deferredBatch.download(jobId)\n  console.log(`${rows.getData()?.length ?? 0} rows`)\n  await $b24.actions.v3.deferredBatch.delete(jobId)\n} else if (job?.status === 'error') {\n  console.error(job.errorMessage)\n}\n",[539,2562,2563,2567,2597,2625,2644,2648,2653,2693,2710,2742,2746,2768,2772,2777,2792,2832,2836,2861,2898,2939,2968,2996,3015],{"__ignoreMap":811},[815,2564,2565],{"class":817,"line":818},[815,2566,1147],{"class":1146},[815,2568,2569,2571,2573,2575,2577,2579,2581,2583,2585,2587,2589,2591,2593,2595],{"class":817,"line":870},[815,2570,2013],{"class":1192},[815,2572,2016],{"class":1192},[815,2574,1255],{"class":832},[815,2576,551],{"class":825},[815,2578,1333],{"class":832},[815,2580,1090],{"class":821},[815,2582,950],{"class":825},[815,2584,2029],{"class":821},[815,2586,826],{"class":825},[815,2588,1090],{"class":821},[815,2590,950],{"class":825},[815,2592,2038],{"class":821},[815,2594,1462],{"class":825},[815,2596,2043],{"class":832},[815,2598,2599,2601,2603,2606,2608,2610,2612,2614,2616,2618,2620,2623],{"class":817,"line":877},[815,2600,2013],{"class":1192},[815,2602,2050],{"class":1192},[815,2604,2605],{"class":1269}," saveJobId",[815,2607,882],{"class":825},[815,2609,914],{"class":842},[815,2611,551],{"class":825},[815,2613,919],{"class":821},[815,2615,647],{"class":825},[815,2617,853],{"class":821},[815,2619,826],{"class":825},[815,2621,2622],{"class":821},"void",[815,2624,1127],{"class":825},[815,2626,2627,2629,2631,2634,2636,2638,2640,2642],{"class":817,"line":907},[815,2628,2013],{"class":1192},[815,2630,2050],{"class":1192},[815,2632,2633],{"class":1269}," loadJobId",[815,2635,1049],{"class":825},[815,2637,853],{"class":821},[815,2639,826],{"class":825},[815,2641,1866],{"class":821},[815,2643,1127],{"class":825},[815,2645,2646],{"class":817,"line":936},[815,2647,874],{"emptyLinePlaceholder":873},[815,2649,2650],{"class":817,"line":976},[815,2651,2652],{"class":1146},"\u002F\u002F Request 1: start the job and remember its id.\n",[815,2654,2655,2657,2660,2662,2664,2666,2668,2670,2672,2674,2676,2678,2680,2682,2684,2686,2689,2691],{"class":817,"line":1014},[815,2656,1252],{"class":1192},[815,2658,2659],{"class":832}," added ",[815,2661,1430],{"class":825},[815,2663,1433],{"class":1152},[815,2665,1436],{"class":832},[815,2667,724],{"class":825},[815,2669,96],{"class":832},[815,2671,724],{"class":825},[815,2673,1445],{"class":832},[815,2675,724],{"class":825},[815,2677,1450],{"class":832},[815,2679,724],{"class":825},[815,2681,663],{"class":1269},[815,2683,882],{"class":832},[815,2685,1275],{"class":825},[815,2687,2688],{"class":832}," calls ",[815,2690,1530],{"class":825},[815,2692,1548],{"class":832},[815,2694,2695,2697,2699,2701,2704,2706,2708],{"class":817,"line":1043},[815,2696,1566],{"class":1152},[815,2698,642],{"class":832},[815,2700,1571],{"class":825},[815,2702,2703],{"class":832},"added",[815,2705,724],{"class":825},[815,2707,1579],{"class":832},[815,2709,1467],{"class":825},[815,2711,2712,2714,2716,2718,2720,2722,2724,2726,2728,2730,2732,2734,2736,2738,2740],{"class":817,"line":1066},[815,2713,1587],{"class":1152},[815,2715,1590],{"class":825},[815,2717,1593],{"class":1269},[815,2719,882],{"class":1201},[815,2721,2703],{"class":832},[815,2723,724],{"class":825},[815,2725,1602],{"class":1269},[815,2727,1605],{"class":1201},[815,2729,724],{"class":825},[815,2731,1610],{"class":1269},[815,2733,882],{"class":1201},[815,2735,1317],{"class":825},[815,2737,1617],{"class":1179},[815,2739,1317],{"class":825},[815,2741,1622],{"class":1201},[815,2743,2744],{"class":817,"line":1095},[815,2745,1628],{"class":825},[815,2747,2748,2751,2753,2756,2758,2760,2762,2765],{"class":817,"line":1411},[815,2749,2750],{"class":1152},"await",[815,2752,2605],{"class":1269},[815,2754,2755],{"class":832},"(added",[815,2757,724],{"class":825},[815,2759,1651],{"class":1269},[815,2761,1605],{"class":832},[815,2763,2764],{"class":825},"!.",[815,2766,2767],{"class":832},"id)\n",[815,2769,2770],{"class":817,"line":1417},[815,2771,874],{"emptyLinePlaceholder":873},[815,2773,2774],{"class":817,"line":1422},[815,2775,2776],{"class":1146},"\u002F\u002F Request 2, later: is it ready?\n",[815,2778,2779,2781,2784,2786,2788,2790],{"class":817,"line":1470},[815,2780,1252],{"class":1192},[815,2782,2783],{"class":832}," jobId ",[815,2785,1430],{"class":825},[815,2787,1433],{"class":1152},[815,2789,2633],{"class":1269},[815,2791,2088],{"class":832},[815,2793,2794,2796,2799,2801,2803,2805,2807,2809,2811,2813,2815,2817,2819,2821,2823,2826,2828,2830],{"class":817,"line":1478},[815,2795,1252],{"class":1192},[815,2797,2798],{"class":832}," job ",[815,2800,1430],{"class":825},[815,2802,642],{"class":832},[815,2804,2750],{"class":1152},[815,2806,1436],{"class":832},[815,2808,724],{"class":825},[815,2810,96],{"class":832},[815,2812,724],{"class":825},[815,2814,1445],{"class":832},[815,2816,724],{"class":825},[815,2818,1450],{"class":832},[815,2820,724],{"class":825},[815,2822,677],{"class":1269},[815,2824,2825],{"class":832},"(jobId))",[815,2827,724],{"class":825},[815,2829,1651],{"class":1269},[815,2831,2088],{"class":832},[815,2833,2834],{"class":817,"line":1484},[815,2835,874],{"emptyLinePlaceholder":873},[815,2837,2838,2840,2843,2846,2848,2850,2852,2854,2856,2859],{"class":817,"line":1551},[815,2839,1566],{"class":1152},[815,2841,2842],{"class":832}," (job",[815,2844,2845],{"class":825},"?.",[815,2847,2202],{"class":832},[815,2849,2205],{"class":825},[815,2851,1176],{"class":825},[815,2853,597],{"class":1179},[815,2855,1317],{"class":825},[815,2857,2858],{"class":832},") ",[815,2860,1467],{"class":825},[815,2862,2863,2866,2869,2871,2873,2875,2877,2879,2881,2883,2885,2887,2889,2891,2893,2896],{"class":817,"line":1558},[815,2864,2865],{"class":1192},"  const",[815,2867,2868],{"class":832}," rows",[815,2870,1262],{"class":825},[815,2872,1433],{"class":1152},[815,2874,1436],{"class":832},[815,2876,724],{"class":825},[815,2878,96],{"class":832},[815,2880,724],{"class":825},[815,2882,1445],{"class":832},[815,2884,724],{"class":825},[815,2886,1450],{"class":832},[815,2888,724],{"class":825},[815,2890,979],{"class":1269},[815,2892,882],{"class":1201},[815,2894,2895],{"class":832},"jobId",[815,2897,1548],{"class":1201},[815,2899,2900,2903,2905,2907,2909,2911,2914,2916,2918,2920,2922,2925,2928,2931,2933,2935,2937],{"class":817,"line":1563},[815,2901,2902],{"class":832},"  console",[815,2904,724],{"class":825},[815,2906,1510],{"class":1269},[815,2908,882],{"class":1201},[815,2910,1725],{"class":825},[815,2912,2913],{"class":832},"rows",[815,2915,724],{"class":825},[815,2917,1651],{"class":1269},[815,2919,1605],{"class":832},[815,2921,2845],{"class":825},[815,2923,2924],{"class":832},"length ",[815,2926,2927],{"class":825},"??",[815,2929,2930],{"class":1283}," 0",[815,2932,1530],{"class":825},[815,2934,2868],{"class":1179},[815,2936,1515],{"class":825},[815,2938,1548],{"class":1201},[815,2940,2941,2944,2946,2948,2950,2952,2954,2956,2958,2960,2962,2964,2966],{"class":817,"line":1584},[815,2942,2943],{"class":1152},"  await",[815,2945,1436],{"class":832},[815,2947,724],{"class":825},[815,2949,96],{"class":832},[815,2951,724],{"class":825},[815,2953,1445],{"class":832},[815,2955,724],{"class":825},[815,2957,1450],{"class":832},[815,2959,724],{"class":825},[815,2961,1017],{"class":1269},[815,2963,882],{"class":1201},[815,2965,2895],{"class":832},[815,2967,1548],{"class":1201},[815,2969,2970,2972,2975,2978,2980,2982,2984,2986,2988,2990,2992,2994],{"class":817,"line":1625},[815,2971,1530],{"class":825},[815,2973,2974],{"class":1152}," else",[815,2976,2977],{"class":1152}," if",[815,2979,2842],{"class":832},[815,2981,2845],{"class":825},[815,2983,2202],{"class":832},[815,2985,2205],{"class":825},[815,2987,1176],{"class":825},[815,2989,601],{"class":1179},[815,2991,1317],{"class":825},[815,2993,2858],{"class":832},[815,2995,1467],{"class":825},[815,2997,2998,3000,3002,3004,3006,3008,3010,3013],{"class":817,"line":1631},[815,2999,2902],{"class":832},[815,3001,724],{"class":825},[815,3003,601],{"class":1269},[815,3005,882],{"class":1201},[815,3007,1494],{"class":832},[815,3009,724],{"class":825},[815,3011,3012],{"class":832},"errorMessage",[815,3014,1548],{"class":1201},[815,3016,3017],{"class":817,"line":1636},[815,3018,1628],{"class":825},[1770,3020,3022],{"id":3021},"the-job-object","The job object",[806,3024,3026],{"className":808,"code":3025,"language":810,"meta":811,"style":811},"interface DeferredBatchJob {\n  id: number\n  status: 'pending' | 'processing' | 'done' | 'error'\n  commands?: Array\u003C{ method: string, query: Record\u003Cstring, unknown> }>\n  createdAt?: string\n  updatedAt?: string\n  resultFileId?: number | null \u002F\u002F set once `done`\n  errorMessage?: string | null \u002F\u002F set when `error`\n}\n",[539,3027,3028,3037,3047,3084,3124,3134,3143,3162,3179],{"__ignoreMap":811},[815,3029,3030,3032,3034],{"class":817,"line":818},[815,3031,1193],{"class":821},[815,3033,1167],{"class":821},[815,3035,3036],{"class":832}," {\n",[815,3038,3039,3042,3044],{"class":817,"line":870},[815,3040,3041],{"class":821},"  id",[815,3043,551],{"class":825},[815,3045,3046],{"class":832}," number\n",[815,3048,3049,3052,3054,3056,3058,3060,3062,3064,3066,3068,3070,3072,3074,3076,3078,3080,3082],{"class":817,"line":877},[815,3050,3051],{"class":821},"  status",[815,3053,551],{"class":825},[815,3055,1176],{"class":825},[815,3057,590],{"class":1179},[815,3059,1317],{"class":825},[815,3061,1111],{"class":825},[815,3063,1176],{"class":825},[815,3065,594],{"class":1179},[815,3067,1317],{"class":825},[815,3069,1111],{"class":825},[815,3071,1176],{"class":825},[815,3073,597],{"class":1179},[815,3075,1317],{"class":825},[815,3077,1111],{"class":825},[815,3079,1176],{"class":825},[815,3081,601],{"class":1179},[815,3083,1183],{"class":825},[815,3085,3086,3089,3091,3093,3095,3098,3100,3102,3104,3107,3109,3111,3113,3115,3117,3119,3121],{"class":817,"line":907},[815,3087,3088],{"class":832},"  commands",[815,3090,956],{"class":825},[815,3092,1207],{"class":832},[815,3094,1210],{"class":825},[815,3096,3097],{"class":821}," method",[815,3099,551],{"class":825},[815,3101,1227],{"class":832},[815,3103,950],{"class":825},[815,3105,3106],{"class":821}," query",[815,3108,551],{"class":825},[815,3110,2029],{"class":832},[815,3112,826],{"class":825},[815,3114,1090],{"class":832},[815,3116,950],{"class":825},[815,3118,2038],{"class":832},[815,3120,1462],{"class":825},[815,3122,3123],{"class":825}," }>\n",[815,3125,3126,3129,3131],{"class":817,"line":936},[815,3127,3128],{"class":832},"  createdAt",[815,3130,956],{"class":825},[815,3132,3133],{"class":832}," string\n",[815,3135,3136,3139,3141],{"class":817,"line":976},[815,3137,3138],{"class":832},"  updatedAt",[815,3140,956],{"class":825},[815,3142,3133],{"class":832},[815,3144,3145,3148,3150,3153,3156,3159],{"class":817,"line":1014},[815,3146,3147],{"class":832},"  resultFileId",[815,3149,956],{"class":825},[815,3151,3152],{"class":832}," number ",[815,3154,3155],{"class":825},"|",[815,3157,3158],{"class":825}," null",[815,3160,3161],{"class":1146}," \u002F\u002F set once `done`\n",[815,3163,3164,3167,3169,3172,3174,3176],{"class":817,"line":1043},[815,3165,3166],{"class":832},"  errorMessage",[815,3168,956],{"class":825},[815,3170,3171],{"class":832}," string ",[815,3173,3155],{"class":825},[815,3175,3158],{"class":825},[815,3177,3178],{"class":1146}," \u002F\u002F set when `error`\n",[815,3180,3181],{"class":817,"line":1066},[815,3182,1628],{"class":832},[531,3184,3186],{"id":3185},"the-result-rows","The result rows",[536,3188,3189,3190,3192,3193,3196,3197,1813,3199,3202,3203,3205,3206,3209],{},"A row is what that command returned, in command order — the same shape as one\nentry of a synchronous v3 ",[539,3191,572],{}," result: ",[539,3194,3195],{},"{ item }"," for a ",[539,3198,677],{},[539,3200,3201],{},"{ items }"," for\na ",[539,3204,1046],{},", and so on. The row carries no ",[539,3207,3208],{},"time"," block. There are no error rows:\na job with a failing command has no result file at all (see the rules above).",[536,3211,3212],{},"The whole file is held in memory while it is decoded. Rows that each carry a\nfull list page add up quickly; split very large exports into several jobs.",[536,3214,3215,1900,3218,3220,3221,3224,3225,3228,3229,3232],{},[539,3216,3217],{},"download()",[539,3219,789],{}," decode the file for you. If you downloaded it some other\nway, ",[539,3222,3223],{},"decode()"," does the same: it gunzips the bytes (the file is\n",[539,3226,3227],{},"application\u002Fgzip",") and parses the JSON array. Bytes already inflated — a proxy\nthat decompressed them — are parsed as they are. Decoding uses the standard\n",[539,3230,3231],{},"DecompressionStream",", available in Node.js 18+ and current browsers.",[531,3234,3236],{"id":3235},"security-the-download-link-is-a-credential","Security: the download link is a credential",[536,3238,3239,3241,3242,3245,3246,3249],{},[539,3240,2435],{}," answers with an absolute URL that carries\nthe caller's credential — measured: the webhook secret in the path; per the\nportal's code, an access token for an OAuth app. The SDK downloads it itself,\nkeeps it out of the errors it builds, refuses redirects with it, and its log of\nthe ",[539,3243,3244],{},"downloadresult"," answer masks the secret and the token. ",[539,3247,3248],{},"getDownloadUrl()"," hands it to you: treat it like\nthe webhook URL itself. Deleting the job makes the link stop working.",[531,3251,3253],{"id":3252},"error-handling","Error Handling",[758,3255,3256,3266],{},[761,3257,3258],{},[764,3259,3260,3263],{},[767,3261,3262],{},"Code",[767,3264,3265],{},"When",[774,3267,3268,3298,3311,3323,3333,3343,3355,3367,3383,3400,3409,3420],{},[764,3269,3270,3275],{},[779,3271,3272],{},[539,3273,3274],{},"JSSDK_DEFERRED_BATCH_FAILED",[779,3276,3277,3278,3280,3281,3283,3284,3286,3287,3290,3291,3294,3295,3297],{},"The job ended with status ",[539,3279,601],{}," — one failing command is enough. ",[539,3282,789],{}," logs the portal's ",[539,3285,3012],{}," and deletes the job (unless ",[539,3288,3289],{},"deleteAfter: false","); ",[539,3292,3293],{},"waitFor()"," returns the job as data, with its ",[539,3296,3012],{},". The message names the job id.",[764,3299,3300,3305],{},[779,3301,3302],{},[539,3303,3304],{},"JSSDK_DEFERRED_BATCH_TIMEOUT",[779,3306,3307,3308,3310],{},"No final status within ",[539,3309,707],{},". The job keeps running and cannot be deleted yet; the message names its id, to collect it later.",[764,3312,3313,3318],{},[779,3314,3315],{},[539,3316,3317],{},"JSSDK_DEFERRED_BATCH_ABORTED",[779,3319,3320,3322],{},[539,3321,1909],{}," was aborted. A job already added keeps running; the message names its id.",[764,3324,3325,3330],{},[779,3326,3327],{},[539,3328,3329],{},"JSSDK_DEFERRED_BATCH_DOWNLOAD_FAILED",[779,3331,3332],{},"The result file could not be downloaded; the message names the HTTP status.",[764,3334,3335,3340],{},[779,3336,3337],{},[539,3338,3339],{},"JSSDK_DEFERRED_BATCH_DECODE_FAILED",[779,3341,3342],{},"The file is not valid gzip, or not a JSON array.",[764,3344,3345,3350],{},[779,3346,3347],{},[539,3348,3349],{},"JSSDK_DEFERRED_BATCH_GZIP_UNSUPPORTED",[779,3351,3352,3353,724],{},"The runtime has no ",[539,3354,3231],{},[764,3356,3357,3362],{},[779,3358,3359],{},[539,3360,3361],{},"JSSDK_DEFERRED_BATCH_EMPTY",[779,3363,3364,3366],{},[539,3365,1767],{}," is empty — thrown, before anything is sent.",[764,3368,3369,3374],{},[779,3370,3371],{},[539,3372,3373],{},"JSSDK_DEFERRED_BATCH_UNEXPECTED_RESPONSE",[779,3375,3376,3377,3379,3380,584],{},"The portal answered without the data the step expects (e.g. ",[539,3378,663],{}," without an ",[539,3381,3382],{},"item",[764,3384,3385,3390],{},[779,3386,3387],{},[539,3388,3389],{},"JSSDK_INTERACTION_BATCH_ROW_FAIL",[779,3391,3392,3393,3395,3396,3399],{},"A command in ",[539,3394,1767],{}," is neither a tuple nor a ",[539,3397,3398],{},"{ method, params }"," object — thrown, before anything is sent.",[764,3401,3402,3406],{},[779,3403,3404],{},[539,3405,628],{},[779,3407,3408],{},"The portal's plan has no deferred batches.",[764,3410,3411,3415],{},[779,3412,3413],{},[539,3414,667],{},[779,3416,3417,3419],{},[539,3418,663],{}," named a v2 or unknown method; a deferred batch takes v3 methods only. No job was created.",[764,3421,3422,3426],{},[779,3423,3424],{},[539,3425,717],{},[779,3427,3428,3430,3431,724],{},[539,3429,1017],{}," of a job that is still ",[539,3432,594],{},[531,3434,3436],{"id":3435},"alternatives-and-recommendations","Alternatives and Recommendations",[649,3438,3439,3450,3460,3483,3495,3516,3529],{},[556,3440,3441,3444,3445,3449],{},[548,3442,3443],{},"Up to 50 commands, result needed right away:"," a synchronous\n",[567,3446,3447],{"href":569},[539,3448,572],{}," is simpler and\nreturns in the same request.",[556,3451,3452,3455,3459],{},[548,3453,3454],{},"More than 50, and the plan has no deferred batches:",[567,3456,3457],{"href":611},[539,3458,614],{},"\ndoes the same work as one request per 50 commands.",[556,3461,3462,3465,3466,3472,3473,3479,3480,3482],{},[548,3463,3464],{},"Reading a whole list:"," ",[567,3467,3469],{"href":3468},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Ffetch-list-rest-api-ver3\u002F",[539,3470,3471],{},"fetchList","\nor ",[567,3474,3476],{"href":3475},"\u002Fdocs\u002Fworking-with-the-rest-api\u002Ffetch-tail-rest-api-ver3\u002F",[539,3477,3478],{},"fetchTail","\npage through it without building thousands of ",[539,3481,677],{}," commands.",[556,3484,3485,3488,3489,3491,3492,3494],{},[548,3486,3487],{},"Writes that must not repeat:"," pass ",[539,3490,748],{},", one per run, so a\nretried ",[539,3493,663],{}," does not start a second job (the portal's idempotency contract;\nnot measured for deferred batches).",[556,3496,3497,3465,3500,3502,3503,3505,3506,3508,3509,3512,3513,3515],{},[548,3498,3499],{},"Cancelling:",[539,3501,1909],{}," works as on the list actions, but an abort comes\nback as ",[539,3504,3317],{}," on the ",[539,3507,303],{}," rather than a thrown\n",[539,3510,3511],{},"JSSDK_ACTION_ABORTED",", in line with ",[539,3514,789],{}," never throwing.",[556,3517,3518,3521,3522,3524,3525,3528],{},[548,3519,3520],{},"Large result files:"," the download uses the HTTP client's timeout (30 s by\ndefault), not ",[539,3523,707],{},". Raise ",[539,3526,3527],{},"getHttpClient(ApiVersion.v3).ajaxClient.defaults.timeout","\nfor very large jobs.",[556,3530,3531,3534,3535,3539,3540,3542,3543,724],{},[548,3532,3533],{},"Writes:"," the job is all-or-nothing only for its ",[3536,3537,3538],"em",{},"result",". A failing\ncommand ends it in ",[539,3541,601],{}," without a file, but nothing says the writes that\nran before it were undone — so for writes, prefer commands that cannot fail,\nand check the portal's data after an ",[539,3544,601],{},[3546,3547,3548],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":811,"searchDepth":870,"depth":870,"links":3550},[3551,3552,3556,3560,3561,3562,3563],{"id":533,"depth":870,"text":534},{"id":803,"depth":870,"text":804,"children":3553},[3554],{"id":1131,"depth":877,"text":3555},"All in one: make()",{"id":426,"depth":870,"text":416,"children":3557},[3558,3559],{"id":1998,"depth":877,"text":1999},{"id":2325,"depth":877,"text":2326},{"id":3185,"depth":870,"text":3186},{"id":3235,"depth":870,"text":3236},{"id":3252,"depth":870,"text":3253},{"id":3435,"depth":870,"text":3436},"md",[3566,3569,3571,3574],{"label":525,"iconName":3567,"to":3568},"GitHubIcon","https:\u002F\u002Fgithub.com\u002Fbitrix24\u002Fb24jssdk\u002Fblob\u002Fmain\u002Fpackages\u002Fjssdk\u002Fsrc\u002Fcore\u002Factions\u002Fv3\u002Fdeferred-batch.ts",{"label":303,"iconName":3567,"to":3570},"https:\u002F\u002Fgithub.com\u002Fbitrix24\u002Fb24jssdk\u002Fblob\u002Fmain\u002Fpackages\u002Fjssdk\u002Fsrc\u002Fcore\u002Fresult.ts",{"label":3572,"iconName":3567,"to":3573},"SdkError","https:\u002F\u002Fgithub.com\u002Fbitrix24\u002Fb24jssdk\u002Fblob\u002Fmain\u002Fpackages\u002Fjssdk\u002Fsrc\u002Fcore\u002Fsdk-error.ts",{"label":3575,"iconName":3567,"to":3576},"Skill — b24jssdk-rest","https:\u002F\u002Fgithub.com\u002Fbitrix24\u002Fb24jssdk\u002Fblob\u002Fmain\u002Fskills\u002Fb24jssdk-rest\u002FSKILL.md",{},{"title":195},{"title":525,"description":198},"yOVRzEAQsfv6YAnhcgo2ok5Pmgdpwx8aWAHdjTKXFKk",{"data":3582,"body":3583},{},{"type":3584,"children":3585},"root",[3586],{"type":3587,"tag":536,"props":3588,"children":3589},"element",{},[3590],{"type":2058,"value":198},1790836207131]