@bitrix24/b24jssdk 0.4.5 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README-AI.md ADDED
@@ -0,0 +1,576 @@
1
+ # Bitrix24 JS SDK — AI Guide
2
+
3
+ Purpose: give AI agents a precise, code-oriented overview of the SDK to generate working Bitrix24 apps. This SDK lets you:
4
+
5
+ - Call Bitrix24 REST API from apps embedded in Bitrix24 (iframe) and from backend services
6
+ - Interact with Bitrix24 UI: open sliders, dialogs, resize frame, set page title, IM integrations, etc.
7
+ - Manage app/user options via the parent portal
8
+ - Use helpers (profile/app/options/currencies/licenses/payments) and Pull client
9
+
10
+ Core building blocks:
11
+
12
+ - Frontend in frame: B24Frame + initializeB24Frame()
13
+ - Backend/service: B24Hook (webhook-based)
14
+ - REST utilities: callMethod, callBatch, callListMethod, fetchListMethod
15
+ - UI managers: parent, slider, dialog, placement, options, auth
16
+ - Helpers: B24HelperManager and useB24Helper hook; Pull client
17
+
18
+ Note: since v0.4.0 the package ships ESM and UMD only (no CommonJS).
19
+
20
+
21
+ ## Frontend in Bitrix24 (TypeScript, ESM)
22
+
23
+ Use when your app runs inside Bitrix24 as an iframe placement. The SDK initializes by messaging with the parent window and supplies auth tokens automatically.
24
+
25
+ Minimal contract
26
+
27
+ - `initializeB24Frame(): Promise<B24Frame>`
28
+ - `B24Frame.isInit`: boolean (after init)
29
+ - Auth auto-refresh on 401 (expired/invalid token)
30
+
31
+ Example: initialize, call REST, cleanup
32
+
33
+ ```ts
34
+ import {
35
+ initializeB24Frame,
36
+ B24Frame,
37
+ EnumCrmEntityTypeId,
38
+ Text,
39
+ LoggerBrowser,
40
+ Result,
41
+ type ISODate
42
+ } from '@bitrix24/b24jssdk'
43
+
44
+ const logger = LoggerBrowser.build('MyApp', import.meta.env?.DEV === true)
45
+ let $b24: B24Frame
46
+
47
+ async function boot() {
48
+ $b24 = await initializeB24Frame()
49
+
50
+ // Single method
51
+ const companies = await $b24.callMethod('crm.item.list', {
52
+ entityTypeId: EnumCrmEntityTypeId.company,
53
+ order: { id: 'desc' },
54
+ select: ['id', 'title', 'createdTime']
55
+ })
56
+ logger.info('items:', companies.getData().result)
57
+
58
+ // Batch (object syntax, with keys)
59
+ const batch: Result = await $b24.callBatch({
60
+ CompanyList: {
61
+ method: 'crm.item.list',
62
+ params: {
63
+ entityTypeId: EnumCrmEntityTypeId.company,
64
+ order: { id: 'desc' },
65
+ select: ['id', 'title', 'createdTime']
66
+ }
67
+ }
68
+ }, true)
69
+ const data = batch.getData()
70
+ const list = (data.CompanyList.items || []).map((it: any) => ({
71
+ id: Number(it.id),
72
+ title: it.title,
73
+ createdTime: Text.toDateTime(it.createdTime as ISODate)
74
+ }))
75
+ logger.info('batch list:', list)
76
+ }
77
+
78
+ function teardown() {
79
+ $b24?.destroy()
80
+ }
81
+ ```
82
+
83
+ Useful getters and services on B24Frame
84
+
85
+ - auth: getAuthData(), refreshAuth(), isAdmin; getAppSid()
86
+ - parent: fitWindow(), resizeWindow(w,h), resizeWindowAuto(node?, minH?, minW?), setTitle(title), closeApplication(), reloadWindow(), scrollParentWindow(scroll)
87
+ - slider: getUrl(path), openPath(url[, width]), openSliderAppPage(params), closeSliderAppPage()
88
+ - dialog: selectUser(), selectUsers() [selectAccess(), selectCRM() are deprecated]
89
+ - placement: title, options, isSliderMode, getInterface(), bindEvent(event, cb), call(command, params), callCustomBind(command, params?, cb)
90
+ - options: appGet/set, userGet/set
91
+ - getLang(): portal UI language
92
+
93
+ Patterns
94
+
95
+ - Always await initializeB24Frame() before any call.
96
+ - Destroy on page/component unmount with $b24.destroy().
97
+ - For large result sets prefer callListMethod or fetchListMethod.
98
+ - For big batches use callBatchByChunk to respect limits.
99
+
100
+
101
+ ## Frontend via UMD (CDN)
102
+
103
+ When you can’t bundle ESM, load the global B24Js from a CDN inside your iframe app.
104
+
105
+ ```html
106
+ <script src="https://unpkg.com/@bitrix24/b24jssdk@latest/dist/umd/index.min.js"></script>
107
+ <script>
108
+ document.addEventListener('DOMContentLoaded', async () => {
109
+ try {
110
+ const logger = B24Js.LoggerBrowser.build('MyApp', true)
111
+ const $b24 = await B24Js.initializeB24Frame()
112
+
113
+ const res = await $b24.callBatch({
114
+ CompanyList: {
115
+ method: 'crm.item.list',
116
+ params: {
117
+ entityTypeId: B24Js.EnumCrmEntityTypeId.company,
118
+ order: { id: 'desc' },
119
+ select: ['id', 'title', 'createdTime']
120
+ }
121
+ }
122
+ }, true)
123
+
124
+ logger.info('data:', res.getData())
125
+ } catch (e) {
126
+ console.error(e)
127
+ }
128
+ })
129
+ </script>
130
+ ```
131
+
132
+ Globals exposed by UMD
133
+
134
+ - B24Js.initializeB24Frame
135
+ - B24Js.B24Frame and managers via properties (auth, parent, slider, dialog, placement, options)
136
+ - Utilities: LoggerBrowser, Text, Type, enums (e.g., EnumCrmEntityTypeId), Result, AjaxError/AjaxResult, etc.
137
+
138
+
139
+ ## Backend/Services (Node.js, ESM) with B24Hook
140
+
141
+ Use B24Hook when calling Bitrix24 REST from servers or scripts via incoming webhook. Auth is embedded in the webhook path and no frame is required.
142
+
143
+ Minimal contract
144
+
145
+ - new B24Hook({ b24Url, userId, secret }) or B24Hook.fromWebhookUrl(url)
146
+ - callMethod, callBatch, callListMethod, fetchListMethod
147
+
148
+ Example: construct from webhook URL and call API
149
+
150
+ ```ts
151
+ import {
152
+ B24Hook,
153
+ EnumCrmEntityTypeId,
154
+ LoggerBrowser,
155
+ Result
156
+ } from '@bitrix24/b24jssdk'
157
+
158
+ const logger = LoggerBrowser.build('Srv', true)
159
+
160
+ const $b24 = B24Hook.fromWebhookUrl(
161
+ 'https://your_domain.bitrix24.com/rest/1/k32t88gf3azpmwv3'
162
+ )
163
+
164
+ // Optional: silence client-side warning (Node is server-side)
165
+ $b24.offClientSideWarning?.()
166
+
167
+ // Single method
168
+ const res = await $b24.callMethod('crm.item.list', {
169
+ entityTypeId: EnumCrmEntityTypeId.company,
170
+ order: { id: 'desc' },
171
+ })
172
+ logger.info('companies:', res.getData().result)
173
+
174
+ // Batch (array syntax)
175
+ const batch: Result = await $b24.callBatch([
176
+ ['crm.item.list', { entityTypeId: EnumCrmEntityTypeId.company, select: ['id'] }],
177
+ ['crm.item.list', { entityTypeId: EnumCrmEntityTypeId.contact, select: ['id'] }]
178
+ ], true)
179
+ logger.info('batch:', batch.getData())
180
+ ```
181
+
182
+ Listing helpers
183
+
184
+ ```ts
185
+ // Pull a full list with automatic paging
186
+ const list = await $b24.callListMethod('crm.item.list', {
187
+ entityTypeId: EnumCrmEntityTypeId.deal,
188
+ select: ['id', 'title']
189
+ })
190
+ console.log(list.getData()) // array of items
191
+
192
+ // Or stream chunks
193
+ for await (const chunk of $b24.fetchListMethod('crm.item.list', { entityTypeId: EnumCrmEntityTypeId.deal }, 'id')) {
194
+ console.log('chunk size', chunk.length)
195
+ }
196
+ ```
197
+
198
+ Notes
199
+
200
+ - Supported Node versions: ^18, ^20, or >=22.
201
+ - B24Hook warns if used on the client; keep it server-side.
202
+
203
+
204
+ ## UI Integrations in Frame (sliders, dialogs, parent window)
205
+
206
+ These require a B24Frame (i.e., running inside Bitrix24 placement iframe).
207
+
208
+ Sliders
209
+
210
+ ```ts
211
+ // Open a portal path in a slider
212
+ const url = $b24.slider.getUrl('/crm/deal/details/1')
213
+ const result = await $b24.slider.openPath(url, 1640)
214
+ if (result.isOpenAtNewWindow) {
215
+ // On mobile, falls back to window.open and returns close status after polling
216
+ }
217
+
218
+ // Open your application page as a slider and then close it
219
+ await $b24.slider.openSliderAppPage({ some: 'params' })
220
+ await $b24.slider.closeSliderAppPage()
221
+ ```
222
+
223
+ Dialogs
224
+
225
+ ```ts
226
+ const user = await $b24.dialog.selectUser() // null | { id, name, ... }
227
+ const users = await $b24.dialog.selectUsers() // SelectedUser[]
228
+ // selectAccess() and selectCRM() exist but are deprecated
229
+ ```
230
+
231
+ Parent window and IM integrations
232
+
233
+ ```ts
234
+ await $b24.parent.fitWindow()
235
+ await $b24.parent.setTitle('My Page')
236
+ await $b24.parent.scrollParentWindow(0)
237
+ await $b24.parent.imCallTo(5, true) // video call to user 5
238
+ await $b24.parent.imOpenMessenger('chat12') // open messenger
239
+ ```
240
+
241
+ Placement API
242
+
243
+ ```ts
244
+ // Placement meta
245
+ console.log($b24.placement.title, $b24.placement.options, $b24.placement.isSliderMode)
246
+
247
+ // Query interface capabilities
248
+ const iface = await $b24.placement.getInterface()
249
+
250
+ // Bind placement events or custom commands
251
+ await $b24.placement.bindEvent('onMessage', (...args) => console.log(args))
252
+ await $b24.placement.call('someCommand', { foo: 'bar' })
253
+ await $b24.placement.callCustomBind('someCommand', { opt: 1 }, (...args) => {})
254
+ ```
255
+
256
+ Options
257
+
258
+ ```ts
259
+ // App-level
260
+ await $b24.options.appSet('installComplete', true)
261
+ const appFlag = $b24.options.appGet('installComplete')
262
+
263
+ // User-level
264
+ await $b24.options.userSet('theme', 'dark')
265
+ const theme = $b24.options.userGet('theme')
266
+ ```
267
+
268
+ Auth and environment
269
+
270
+ ```ts
271
+ const auth = $b24.auth.getAuthData() // { access_token, refresh_token, expires_in, domain, member_id } | false
272
+ if (!auth) {
273
+ await $b24.auth.refreshAuth()
274
+ }
275
+ const lang = $b24.getLang() // portal UI language
276
+ const sid = $b24.getAppSid() // app SID in current session
277
+ ```
278
+
279
+
280
+ ## Helpers and Pull Client
281
+
282
+ The SDK ships a high-level helper to preload portal and app data and to work with Pull client.
283
+
284
+ Initialization pattern (after B24Frame is initialized)
285
+
286
+ ```ts
287
+ import { useB24Helper, LoadDataType, type TypePullMessage } from '@bitrix24/b24jssdk'
288
+
289
+ const {
290
+ initB24Helper,
291
+ destroyB24Helper,
292
+ getB24Helper,
293
+ usePullClient,
294
+ useSubscribePullClient,
295
+ startPullClient
296
+ } = useB24Helper()
297
+
298
+ const $b24 = await initializeB24Frame()
299
+ await initB24Helper($b24, [
300
+ LoadDataType.Profile,
301
+ LoadDataType.App,
302
+ LoadDataType.Currency,
303
+ LoadDataType.AppOptions,
304
+ LoadDataType.UserOptions,
305
+ ])
306
+
307
+ // Enable Pull
308
+ usePullClient('prefix') // optionally pass userId
309
+ useSubscribePullClient((m: TypePullMessage) => {
310
+ // handle Pull messages
311
+ }, 'application')
312
+ startPullClient()
313
+
314
+ // Access helper data and extra managers
315
+ const helper = getB24Helper()
316
+ const userId = helper.profileInfo.data.id
317
+ const uniq = $b24.auth.getUniq('prefix') // unique per member
318
+ ```
319
+
320
+ Notes
321
+
322
+ - Helper managers: profile, app, payment, license, currency, options
323
+ - Currency and options managers internally use callBatch/callBatchByChunk
324
+
325
+
326
+ ## REST calling model and error handling
327
+
328
+ Core REST utilities live in AbstractB24 and Http:
329
+
330
+ - callMethod(method, params[, start]) => `Promise<AjaxResult>`
331
+ - callBatch(calls, isHaltOnError = true, returnAjaxResult = false) => `Promise<Result>`
332
+ - calls can be object { key: { method, params } } or array [ [method, params], ... ]
333
+ - If isHaltOnError=false, Result accumulates errors; otherwise rejects on first error
334
+ - If returnAjaxResult=true, you receive AjaxResult objects per command
335
+ - callListMethod(method, params, progress?, customKey?) => `Promise<Result>` (auto-paging)
336
+ - fetchListMethod(method, params, idKey='ID', customKey?) => `AsyncGenerator<any[]>`
337
+
338
+ ### Choosing list retrieval strategy (recommendations)
339
+
340
+ - callListMethod: fetches the entire dataset into memory. Use only for small selections (< 1000 items) due to higher memory pressure.
341
+ - fetchListMethod: streams data in chunks via async iterator. Use for large datasets to keep memory usage low.
342
+ - callMethod (manual pagination): control paging via the `start` cursor. Use when you need precise batching and custom flow. For big data it’s typically less efficient/convenient than fetchListMethod.
343
+
344
+ Below are complete examples that iterate until all data are fetched.
345
+
346
+ #### A) Small datasets: callListMethod (all-in-memory)
347
+
348
+ Assumes `$b24` is already initialized (either B24Frame or B24Hook).
349
+
350
+ ```ts
351
+ import { EnumCrmEntityTypeId, Result } from '@bitrix24/b24jssdk'
352
+
353
+ async function loadAllCompaniesSmall($b24: any) {
354
+ const response: Result = await $b24.callListMethod(
355
+ 'crm.item.list',
356
+ {
357
+ entityTypeId: EnumCrmEntityTypeId.company,
358
+ order: { id: 'asc' },
359
+ select: ['id', 'title']
360
+ },
361
+ (progress: number) => {
362
+ // Optional progress callback (0..100)
363
+ // console.log('progress', progress)
364
+ }
365
+ )
366
+
367
+ const items = response.getData() as any[]
368
+ // Process all items (already fully loaded in memory)
369
+ for (const row of items) {
370
+ // ...process row
371
+ }
372
+
373
+ return items
374
+ }
375
+ ```
376
+
377
+ #### B) Large datasets: fetchListMethod (streaming by chunks)
378
+
379
+ For `crm.item.list`, use `idKey: 'id'` so the fast-iterator strategy works reliably with v3 entities.
380
+
381
+ ```ts
382
+ import { EnumCrmEntityTypeId } from '@bitrix24/b24jssdk'
383
+
384
+ async function loadAllDealsStreaming($b24: any) {
385
+ const all: any[] = []
386
+
387
+ for await (const chunk of $b24.fetchListMethod(
388
+ 'crm.item.list',
389
+ {
390
+ entityTypeId: EnumCrmEntityTypeId.deal,
391
+ select: ['id', 'title']
392
+ },
393
+ 'id' // idKey for crm.item.list payloads
394
+ )) {
395
+ // Process current chunk
396
+ for (const row of chunk) {
397
+ // ...process row
398
+ }
399
+ all.push(...chunk)
400
+ }
401
+
402
+ return all
403
+ }
404
+ ```
405
+
406
+ #### C) Manual pagination: callMethod + next pages
407
+
408
+ Use when you need to control page sizes, pauses, or add custom throttling. Iterate until `isMore()` returns false, using `getNext($b24.getHttpClient())`.
409
+
410
+ ```ts
411
+ import { EnumCrmEntityTypeId, AjaxResult } from '@bitrix24/b24jssdk'
412
+
413
+ async function loadAllContactsManual($b24: any) {
414
+ const all: any[] = []
415
+
416
+ // First page (start defaults to 0)
417
+ let page: AjaxResult = await $b24.callMethod('crm.item.list', {
418
+ entityTypeId: EnumCrmEntityTypeId.contact,
419
+ order: { id: 'asc' },
420
+ select: ['id', 'name']
421
+ }, 0)
422
+
423
+ // Process first page
424
+ all.push(...(page.getData().result as any[]))
425
+
426
+ // Follow next cursors until done
427
+ while (page.isMore()) {
428
+ const next = await page.getNext($b24.getHttpClient())
429
+ if (next === false) break
430
+
431
+ // Optional: your throttling/backoff here
432
+ // await new Promise(r => setTimeout(r, 50))
433
+
434
+ all.push(...(next.getData().result as any[]))
435
+ page = next
436
+ }
437
+
438
+ return all
439
+ }
440
+ ```
441
+
442
+ Result and AjaxResult basics
443
+
444
+ ```ts
445
+ import { AjaxError } from '@bitrix24/b24jssdk'
446
+
447
+ try {
448
+ const res = await $b24.callMethod('crm.item.get', { entityTypeId: 1, id: 10 })
449
+ const payload = res.getData() // raw REST payload
450
+ const ok = res.isSuccess // boolean
451
+ const total = res.getTotal() // for list calls
452
+ } catch (e) {
453
+ if (e instanceof AjaxError) {
454
+ console.error(e.code, e.description, e.status, e.requestInfo)
455
+ } else {
456
+ console.error(e)
457
+ }
458
+ }
459
+ ```
460
+
461
+
462
+ ## Recommended generation patterns (for AI)
463
+
464
+ - Frontend
465
+ - Always guard for frame context; initialize via await initializeB24Frame()
466
+ - On component unmount call $b24.destroy()
467
+ - For UI actions: prefer $b24.slider.openPath and handle mobile fallback via isOpenAtNewWindow in the returned StatusClose
468
+ - Use $b24.parent.fitWindow() after content changes
469
+ - Use $b24.options.appSet/userSet for settings persistence
470
+ - Backend
471
+ - Construct B24Hook with B24Hook.fromWebhookUrl() when possible
472
+ - Use callListMethod/fetchListMethod for large lists
473
+ - Batch related calls with callBatch; chunk big arrays with callBatchByChunk
474
+ - Logging
475
+ - Build once via LoggerBrowser.build(appName, isDev) and set to instances if needed
476
+ - Types and enums
477
+ - Prefer exported enums (e.g., EnumCrmEntityTypeId) and types (ISODate, payload types)
478
+
479
+
480
+ ## UMD vs ESM quick cheat sheet
481
+
482
+ - UMD: window.B24Js global; load via unpkg CDN; use inside Bitrix24 iframe
483
+ - ESM: import from '@bitrix24/b24jssdk'; works in browsers with bundlers and in Node (server-side) for B24Hook
484
+
485
+
486
+ ## Caveats and constraints
487
+
488
+ - Frame-only APIs (dialogs, sliders, placement, parent, options, auth refresh) require running in Bitrix24 placement context
489
+ - openPath automatically handles mobile devices by opening a new tab and polling for close status; check the returned StatusClose
490
+ - Webhook (B24Hook) is not safe on the client; keep it on the server
491
+ - Batch limits apply (SDK default chunk size is 50)
492
+
493
+
494
+ ## Export map (selected)
495
+
496
+ - initializeB24Frame, B24Frame and its managers: auth, parent, slider, dialog, placement, options
497
+ - B24Hook (+ B24Hook.fromWebhookUrl)
498
+ - AbstractB24 helpers: callMethod, callBatch, callListMethod, fetchListMethod, callBatchByChunk, chunkArray
499
+ - HTTP types and classes: AjaxResult, AjaxError, Result
500
+ - LoggerBrowser, Text, Type, Browser, tools/use-formatters
501
+ - Types/enums: http, b24, auth, payloads, user, slider, handler, placement, crm, catalog, bizproc, event, pull, b24-helper
502
+
503
+
504
+ ---
505
+ This document is based on the SDK source in packages/jssdk/src and the docs under docs/reference and docs/guide. Use it as the authoritative prompt for generating code with this SDK.
506
+
507
+
508
+ ## Extras for AI agents (helpers, pull, core, tools)
509
+
510
+ ### Helper Methods (high-level data access)
511
+
512
+ - useB24Helper: lifecycle for helpers and Pull client in frame apps (see section above)
513
+ - B24HelperManager: container for helper managers (profile/app/payment/license/currency/options) exposed via useB24Helper
514
+ - ProfileManager: `helper.profileInfo.data` provides current user info
515
+ - AppManager: `helper.appInfo.data` and `helper.appInfo.statusCode`
516
+ - LicenseManager: adjusts Http Restriction Manager for enterprise automatically
517
+ - CurrencyManager: formats amounts for a currency and language
518
+
519
+ ```ts
520
+ const name = helper.currency.getCurrencyFullName('USD', 'en')
521
+ const literal = helper.currency.getCurrencyLiteral('USD', 'en') // currency symbol/wording
522
+ const price = helper.currency.format(1234.56, 'USD', 'en')
523
+ ```
524
+ - OptionsManager (helper level): bulk save options to REST + optional pull notification
525
+
526
+
527
+ ```ts
528
+ await helper.appOptions.save({ featureFlags: helper.appOptions.encode({ a: 1 }) }, {
529
+ moduleId: 'application',
530
+ command: 'FEATURES_UPDATED',
531
+ params: { source: 'app' }
532
+ })
533
+ const cfg = helper.appOptions.getJsonObject('featureFlags', {})
534
+ ```
535
+
536
+ ### Push and Pull
537
+
538
+ - Pull client helpers are provided via useB24Helper
539
+
540
+ ```ts
541
+ const { usePullClient, useSubscribePullClient, startPullClient } = useB24Helper()
542
+ usePullClient('prefix')
543
+ useSubscribePullClient((m) => { /* handle */ }, 'application')
544
+ startPullClient()
545
+ ```
546
+
547
+ ### Core utilities
548
+
549
+ - AbstractB24: shared REST helpers (callMethod/batch/list/fetch/chunk)
550
+ - Http: low-level transport; supports restriction throttling and auth refresh
551
+ - RestrictionManager: automatic throttling to respect Bitrix24 limits
552
+
553
+ ```ts
554
+ // Example: increase limits for enterprise (done automatically by LicenseManager)
555
+ // $b24.getHttpClient().setRestrictionManagerParams(RestrictionManagerParamsForEnterprise)
556
+ ```
557
+
558
+ - Unique ID Generator: request IDs are appended automatically via Http
559
+ - Result / AjaxResult: uniform result objects, error aggregation, paging helpers (isMore, getNext, getTotal)
560
+ - Language List and LoggerBrowser
561
+
562
+ ### Tools
563
+
564
+ - Type: runtime type helpers (isStringFilled, etc.)
565
+ - Text: dates (Luxon), numbers (numberFormat), UUID v7, encode/decode, case transforms
566
+
567
+ ```ts
568
+ import Text from '@bitrix24/b24jssdk'
569
+ const dt = Text.toDateTime('2024-01-01T10:00:00Z')
570
+ const s = Text.numberFormat(12345.678, 2, '.', ' ')
571
+ const id = Text.getUuidRfc4122()
572
+ ```
573
+
574
+ - Browser: lightweight browser utilities
575
+ - useFormatters: number/date formatting hooks
576
+ - pick/omit/getEnumValue: object and enum helpers
@@ -2319,12 +2319,14 @@ declare class AppFrame {
2319
2319
 
2320
2320
  /**
2321
2321
  * Parent Window Request Parameters
2322
+ * @prop isRawValue if true then JSON.stringify will not be executed
2322
2323
  * @prop isSafely auto completion mode Promise.resolve()
2323
2324
  * @prop safelyTime after what time (900 ms) should it be automatically resolved Promise
2324
2325
  * @prop callBack for placement event
2325
2326
  */
2326
2327
  interface SendParams {
2327
2328
  [index: string]: any;
2329
+ isRawValue?: boolean;
2328
2330
  isSafely?: boolean;
2329
2331
  safelyTime?: number;
2330
2332
  callBack?: (...args: any[]) => void;
@@ -2769,11 +2771,12 @@ declare class PlacementManager {
2769
2771
  bindEvent(eventName: string, callBack: (...args: any[]) => void): Promise<any>;
2770
2772
  /**
2771
2773
  * Call the Registered Interface Command
2772
- * @param {string} command
2773
- * @param {Record<string, any>} parameters
2774
- * @return {Promise<any>}
2774
+ * @param { string } command
2775
+ * @param { Record<string, any> } parameters
2776
+ * @return { Promise<any> }
2775
2777
  *
2776
2778
  * @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
2779
+ * @memo For the `setValue` command, use the following parameters { value: string }
2777
2780
  */
2778
2781
  call(command: string, parameters?: Record<string, any>): Promise<any>;
2779
2782
  /**
@@ -3546,4 +3549,5 @@ declare class PullClient implements ConnectorParent {
3546
3549
 
3547
3550
  declare function initializeB24Frame(): Promise<B24Frame>;
3548
3551
 
3549
- export { AbstractB24, type ActivityConfig, type ActivityHandlerParams, type ActivityOrRobotConfig, type ActivityProperty, type ActivityPropertyType, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, AuthOAuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, B24LocaleMap, B24OAuth, type B24OAuthParams, type B24OAuthSecret, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, type CallbackRefreshAuth, type CatalogCatalog, type CatalogExtra, type CatalogLanguage, type CatalogMeasure, type CatalogPriceType, type CatalogPriceTypeLang, type CatalogProduct, type CatalogProductImage, CatalogProductImageType, type CatalogProductOffer, type CatalogProductService, type CatalogProductSku, CatalogProductType, type CatalogRatio, type CatalogRoundingRule, CatalogRoundingRuleType, type CatalogSection, type CatalogStore, type CatalogVat, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type CrmItemDelivery, type CrmItemPayment, type CrmItemProductRow, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumBitrix24Edition, EnumBizprocBaseType, EnumBizprocDocumentType, EnumCrmEntityType, EnumCrmEntityTypeId, EnumCrmEntityTypeShort, type EventHandlerParams, type EventOnAppInstallHandlerParams, type EventOnAppUnInstallHandlerParams, type Fields, type GenderString, type GetPayload, type HandlerAuthParams, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadOAuthToken, type PayloadTime, PlacementManager, type PlacementViewMode, ProductRowDiscountTypeId, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text$1 as Text, type TextType, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, convertBizprocDocumentTypeToCrmEntityTypeId, getDocumentId, getDocumentType, getDocumentTypeForFilter, getEnumCrmEntityTypeShort, getEnumValue, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
3552
+ export { AbstractB24, AjaxError, AjaxResult, AppFrame, AuthHookManager, AuthManager, AuthOAuthManager, B24Frame, B24Hook, B24LangList, B24LocaleMap, B24OAuth, PullClient as B24PullClientManager, Browser, CatalogProductImageType, CatalogProductType, CatalogRoundingRuleType, CloseReasons, ConnectionType, DataType, DialogManager, EnumAppStatus, EnumBitrix24Edition, EnumBizprocBaseType, EnumBizprocDocumentType, EnumCrmEntityType, EnumCrmEntityTypeId, EnumCrmEntityTypeShort, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, MessageManager, OptionsManager$1 as OptionsManager, ParentManager, PlacementManager, ProductRowDiscountTypeId, PullStatus, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, RpcMethod, SenderType, ServerMode, SliderManager, StatusDescriptions, SubscriptionType, SystemCommands, Text$1 as Text, Type, TypeOption, TypeSpecificUrl, convertBizprocDocumentTypeToCrmEntityTypeId, getDocumentId, getDocumentType, getDocumentTypeForFilter, getEnumCrmEntityTypeShort, getEnumValue, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
3553
+ export type { ActivityConfig, ActivityHandlerParams, ActivityOrRobotConfig, ActivityProperty, ActivityPropertyType, AjaxErrorParams, AjaxQuery, AjaxResultParams, AnswerError, AuthActions, AuthData, B24FrameQueryParams, B24HookParams, B24OAuthParams, B24OAuthSecret, BatchPayload, BoolString, CallbackRefreshAuth, CatalogCatalog, CatalogExtra, CatalogLanguage, CatalogMeasure, CatalogPriceType, CatalogPriceTypeLang, CatalogProduct, CatalogProductImage, CatalogProductOffer, CatalogProductService, CatalogProductSku, CatalogRatio, CatalogRoundingRule, CatalogSection, CatalogStore, CatalogVat, CommandHandlerFunctionV1, CommandHandlerFunctionV2, ConnectorCallbacks, ConnectorConfig, ConnectorParent, CrmItemDelivery, CrmItemPayment, CrmItemProductRow, Currency, CurrencyFormat, EventHandlerParams, EventOnAppInstallHandlerParams, EventOnAppUnInstallHandlerParams, Fields, GenderString, GetPayload, HandlerAuthParams, IPlacementUF, IRequestIdGenerator, IResult, ISODate, JsonRpcRequest, ListPayload, MessageInitData, MultiField, MultiFieldArray, NumberString, Payload, PayloadOAuthToken, PayloadTime, PlacementViewMode, RefreshAuthData, RpcCommand, RpcCommandResult, RpcError, RpcRequest, SelectCRMParams, SelectCRMParamsEntityType, SelectCRMParamsValue, SelectedAccess, SelectedCRM, SelectedCRMEntity, SelectedUser, SendParams, SharedConfigCallbacks, SharedConfigParams, StatusClose, StorageManagerParams, TextType, TypeApp, TypeB24, TypeB24Form, TypeChanel, TypeChannelManagerParams, TypeConnector, TypeDescriptionError, TypeEnumAppStatus, TypeHttp, TypeJsonRpcConfig, TypeLicense, TypePayment, TypePublicIdDescriptor, TypePullClientConfig, TypePullClientEmitConfig, TypePullClientMessageBatch, TypePullClientMessageBody, TypePullClientParams, TypePullClientSession, TypePullMessage, TypeRestrictionManagerParams, TypeRpcResponseAwaiters, TypeSessionEvent, TypeStorageManager, TypeSubscriptionCommandHandler, TypeSubscriptionOptions, TypeUser, UserBasic, UserBrief, UserFieldType, UserStatusCallback };
@@ -2319,12 +2319,14 @@ declare class AppFrame {
2319
2319
 
2320
2320
  /**
2321
2321
  * Parent Window Request Parameters
2322
+ * @prop isRawValue if true then JSON.stringify will not be executed
2322
2323
  * @prop isSafely auto completion mode Promise.resolve()
2323
2324
  * @prop safelyTime after what time (900 ms) should it be automatically resolved Promise
2324
2325
  * @prop callBack for placement event
2325
2326
  */
2326
2327
  interface SendParams {
2327
2328
  [index: string]: any;
2329
+ isRawValue?: boolean;
2328
2330
  isSafely?: boolean;
2329
2331
  safelyTime?: number;
2330
2332
  callBack?: (...args: any[]) => void;
@@ -2769,11 +2771,12 @@ declare class PlacementManager {
2769
2771
  bindEvent(eventName: string, callBack: (...args: any[]) => void): Promise<any>;
2770
2772
  /**
2771
2773
  * Call the Registered Interface Command
2772
- * @param {string} command
2773
- * @param {Record<string, any>} parameters
2774
- * @return {Promise<any>}
2774
+ * @param { string } command
2775
+ * @param { Record<string, any> } parameters
2776
+ * @return { Promise<any> }
2775
2777
  *
2776
2778
  * @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
2779
+ * @memo For the `setValue` command, use the following parameters { value: string }
2777
2780
  */
2778
2781
  call(command: string, parameters?: Record<string, any>): Promise<any>;
2779
2782
  /**
@@ -3546,4 +3549,5 @@ declare class PullClient implements ConnectorParent {
3546
3549
 
3547
3550
  declare function initializeB24Frame(): Promise<B24Frame>;
3548
3551
 
3549
- export { AbstractB24, type ActivityConfig, type ActivityHandlerParams, type ActivityOrRobotConfig, type ActivityProperty, type ActivityPropertyType, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, AuthOAuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, B24LocaleMap, B24OAuth, type B24OAuthParams, type B24OAuthSecret, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, type CallbackRefreshAuth, type CatalogCatalog, type CatalogExtra, type CatalogLanguage, type CatalogMeasure, type CatalogPriceType, type CatalogPriceTypeLang, type CatalogProduct, type CatalogProductImage, CatalogProductImageType, type CatalogProductOffer, type CatalogProductService, type CatalogProductSku, CatalogProductType, type CatalogRatio, type CatalogRoundingRule, CatalogRoundingRuleType, type CatalogSection, type CatalogStore, type CatalogVat, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type CrmItemDelivery, type CrmItemPayment, type CrmItemProductRow, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumBitrix24Edition, EnumBizprocBaseType, EnumBizprocDocumentType, EnumCrmEntityType, EnumCrmEntityTypeId, EnumCrmEntityTypeShort, type EventHandlerParams, type EventOnAppInstallHandlerParams, type EventOnAppUnInstallHandlerParams, type Fields, type GenderString, type GetPayload, type HandlerAuthParams, type IPlacementUF, type IRequestIdGenerator, type IResult, type ISODate, type JsonRpcRequest, type ListPayload, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, type MessageInitData, MessageManager, type MultiField, type MultiFieldArray, type NumberString, OptionsManager$1 as OptionsManager, ParentManager, type Payload, type PayloadOAuthToken, type PayloadTime, PlacementManager, type PlacementViewMode, ProductRowDiscountTypeId, PullStatus, type RefreshAuthData, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, type RpcCommand, type RpcCommandResult, type RpcError, RpcMethod, type RpcRequest, type SelectCRMParams, type SelectCRMParamsEntityType, type SelectCRMParamsValue, type SelectedAccess, type SelectedCRM, type SelectedCRMEntity, type SelectedUser, type SendParams, SenderType, ServerMode, type SharedConfigCallbacks, type SharedConfigParams, SliderManager, type StatusClose, StatusDescriptions, type StorageManagerParams, SubscriptionType, SystemCommands, Text$1 as Text, type TextType, Type, type TypeApp, type TypeB24, type TypeB24Form, type TypeChanel, type TypeChannelManagerParams, type TypeConnector, type TypeDescriptionError, type TypeEnumAppStatus, type TypeHttp, type TypeJsonRpcConfig, type TypeLicense, TypeOption, type TypePayment, type TypePublicIdDescriptor, type TypePullClientConfig, type TypePullClientEmitConfig, type TypePullClientMessageBatch, type TypePullClientMessageBody, type TypePullClientParams, type TypePullClientSession, type TypePullMessage, type TypeRestrictionManagerParams, type TypeRpcResponseAwaiters, type TypeSessionEvent, TypeSpecificUrl, type TypeStorageManager, type TypeSubscriptionCommandHandler, type TypeSubscriptionOptions, type TypeUser, type UserBasic, type UserBrief, type UserFieldType, type UserStatusCallback, convertBizprocDocumentTypeToCrmEntityTypeId, getDocumentId, getDocumentType, getDocumentTypeForFilter, getEnumCrmEntityTypeShort, getEnumValue, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
3552
+ export { AbstractB24, AjaxError, AjaxResult, AppFrame, AuthHookManager, AuthManager, AuthOAuthManager, B24Frame, B24Hook, B24LangList, B24LocaleMap, B24OAuth, PullClient as B24PullClientManager, Browser, CatalogProductImageType, CatalogProductType, CatalogRoundingRuleType, CloseReasons, ConnectionType, DataType, DialogManager, EnumAppStatus, EnumBitrix24Edition, EnumBizprocBaseType, EnumBizprocDocumentType, EnumCrmEntityType, EnumCrmEntityTypeId, EnumCrmEntityTypeShort, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, MessageManager, OptionsManager$1 as OptionsManager, ParentManager, PlacementManager, ProductRowDiscountTypeId, PullStatus, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, RpcMethod, SenderType, ServerMode, SliderManager, StatusDescriptions, SubscriptionType, SystemCommands, Text$1 as Text, Type, TypeOption, TypeSpecificUrl, convertBizprocDocumentTypeToCrmEntityTypeId, getDocumentId, getDocumentType, getDocumentTypeForFilter, getEnumCrmEntityTypeShort, getEnumValue, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
3553
+ export type { ActivityConfig, ActivityHandlerParams, ActivityOrRobotConfig, ActivityProperty, ActivityPropertyType, AjaxErrorParams, AjaxQuery, AjaxResultParams, AnswerError, AuthActions, AuthData, B24FrameQueryParams, B24HookParams, B24OAuthParams, B24OAuthSecret, BatchPayload, BoolString, CallbackRefreshAuth, CatalogCatalog, CatalogExtra, CatalogLanguage, CatalogMeasure, CatalogPriceType, CatalogPriceTypeLang, CatalogProduct, CatalogProductImage, CatalogProductOffer, CatalogProductService, CatalogProductSku, CatalogRatio, CatalogRoundingRule, CatalogSection, CatalogStore, CatalogVat, CommandHandlerFunctionV1, CommandHandlerFunctionV2, ConnectorCallbacks, ConnectorConfig, ConnectorParent, CrmItemDelivery, CrmItemPayment, CrmItemProductRow, Currency, CurrencyFormat, EventHandlerParams, EventOnAppInstallHandlerParams, EventOnAppUnInstallHandlerParams, Fields, GenderString, GetPayload, HandlerAuthParams, IPlacementUF, IRequestIdGenerator, IResult, ISODate, JsonRpcRequest, ListPayload, MessageInitData, MultiField, MultiFieldArray, NumberString, Payload, PayloadOAuthToken, PayloadTime, PlacementViewMode, RefreshAuthData, RpcCommand, RpcCommandResult, RpcError, RpcRequest, SelectCRMParams, SelectCRMParamsEntityType, SelectCRMParamsValue, SelectedAccess, SelectedCRM, SelectedCRMEntity, SelectedUser, SendParams, SharedConfigCallbacks, SharedConfigParams, StatusClose, StorageManagerParams, TextType, TypeApp, TypeB24, TypeB24Form, TypeChanel, TypeChannelManagerParams, TypeConnector, TypeDescriptionError, TypeEnumAppStatus, TypeHttp, TypeJsonRpcConfig, TypeLicense, TypePayment, TypePublicIdDescriptor, TypePullClientConfig, TypePullClientEmitConfig, TypePullClientMessageBatch, TypePullClientMessageBody, TypePullClientParams, TypePullClientSession, TypePullMessage, TypeRestrictionManagerParams, TypeRpcResponseAwaiters, TypeSessionEvent, TypeStorageManager, TypeSubscriptionCommandHandler, TypeSubscriptionOptions, TypeUser, UserBasic, UserBrief, UserFieldType, UserStatusCallback };