@bitrix24/b24jssdk 1.1.2 → 1.3.0
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 +15 -3
- package/dist/esm/_virtual/_commonjsHelpers.mjs +1 -1
- package/dist/esm/_virtual/protobuf.mjs +1 -1
- package/dist/esm/_virtual/protobuf2.mjs +1 -1
- package/dist/esm/core/abstract-b24.mjs +1 -1
- package/dist/esm/core/actions/abstract-action.mjs +1 -1
- package/dist/esm/core/actions/abstract-batch.mjs +1 -1
- package/dist/esm/core/actions/manager.mjs +1 -1
- package/dist/esm/core/actions/v2/batch-by-chunk.mjs +1 -1
- package/dist/esm/core/actions/v2/batch.mjs +4 -4
- package/dist/esm/core/actions/v2/batch.mjs.map +1 -1
- package/dist/esm/core/actions/v2/call-list.mjs +17 -10
- package/dist/esm/core/actions/v2/call-list.mjs.map +1 -1
- package/dist/esm/core/actions/v2/call.mjs +1 -1
- package/dist/esm/core/actions/v2/fetch-list.mjs +17 -10
- package/dist/esm/core/actions/v2/fetch-list.mjs.map +1 -1
- package/dist/esm/core/actions/v2/manager-v2.mjs +6 -6
- package/dist/esm/core/actions/v2/manager-v2.mjs.map +1 -1
- package/dist/esm/core/actions/v3/batch-by-chunk.mjs +1 -1
- package/dist/esm/core/actions/v3/batch.mjs +4 -4
- package/dist/esm/core/actions/v3/batch.mjs.map +1 -1
- package/dist/esm/core/actions/v3/call-list.mjs +16 -9
- package/dist/esm/core/actions/v3/call-list.mjs.map +1 -1
- package/dist/esm/core/actions/v3/call.mjs +1 -1
- package/dist/esm/core/actions/v3/fetch-list.mjs +16 -9
- package/dist/esm/core/actions/v3/fetch-list.mjs.map +1 -1
- package/dist/esm/core/actions/v3/manager-v3.mjs +6 -6
- package/dist/esm/core/actions/v3/manager-v3.mjs.map +1 -1
- package/dist/esm/core/http/abstract-http.mjs +30 -6
- package/dist/esm/core/http/abstract-http.mjs.map +1 -1
- package/dist/esm/core/http/ajax-error.mjs +1 -1
- package/dist/esm/core/http/ajax-result.mjs +1 -1
- package/dist/esm/core/http/limiters/adaptive-delayer.mjs +1 -1
- package/dist/esm/core/http/limiters/manager.mjs +31 -1
- package/dist/esm/core/http/limiters/manager.mjs.map +1 -1
- package/dist/esm/core/http/limiters/operating-limiter.mjs +1 -1
- package/dist/esm/core/http/limiters/params-factory.mjs +1 -1
- package/dist/esm/core/http/limiters/rate-limiter.mjs +1 -1
- package/dist/esm/core/http/redact.mjs +1 -1
- package/dist/esm/core/http/v2.mjs +2 -2
- package/dist/esm/core/http/v3.mjs +2 -2
- package/dist/esm/core/interaction/batch/abstract-interaction-batch.mjs +1 -1
- package/dist/esm/core/interaction/batch/parse-row.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/interface-strategy.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v2/abstract-processing.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v2/as-array.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v2/as-object.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v3/abstract-processing.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v3/as-array.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v3/as-object.mjs +1 -1
- package/dist/esm/core/interaction/batch/v2.mjs +1 -1
- package/dist/esm/core/interaction/batch/v3.mjs +1 -1
- package/dist/esm/core/language/list.mjs +1 -1
- package/dist/esm/core/request-id-generator.mjs +1 -1
- package/dist/esm/core/result.mjs +28 -1
- package/dist/esm/core/result.mjs.map +1 -1
- package/dist/esm/core/sdk-error.mjs +1 -1
- package/dist/esm/core/tools/abstract-tool.mjs +1 -1
- package/dist/esm/core/tools/healthcheck.mjs +1 -1
- package/dist/esm/core/tools/manager.mjs +3 -3
- package/dist/esm/core/tools/manager.mjs.map +1 -1
- package/dist/esm/core/tools/ping.mjs +1 -1
- package/dist/esm/core/version-manager.mjs +89 -12
- package/dist/esm/core/version-manager.mjs.map +1 -1
- package/dist/esm/frame/auth.mjs +1 -1
- package/dist/esm/frame/b24.mjs +1 -1
- package/dist/esm/frame/dialog.mjs +1 -1
- package/dist/esm/frame/frame.mjs +1 -1
- package/dist/esm/frame/message/commands.mjs +1 -1
- package/dist/esm/frame/message/controller.mjs +1 -1
- package/dist/esm/frame/options.mjs +1 -1
- package/dist/esm/frame/parent.mjs +6 -2
- package/dist/esm/frame/parent.mjs.map +1 -1
- package/dist/esm/frame/placement.mjs +1 -1
- package/dist/esm/frame/slider.mjs +5 -1
- package/dist/esm/frame/slider.mjs.map +1 -1
- package/dist/esm/helper/abstract-helper.mjs +1 -1
- package/dist/esm/helper/app-manager.mjs +1 -1
- package/dist/esm/helper/currency-manager.mjs +1 -1
- package/dist/esm/helper/helper-manager.mjs +1 -1
- package/dist/esm/helper/license-manager.mjs +1 -1
- package/dist/esm/helper/options-manager.mjs +1 -1
- package/dist/esm/helper/payment-manager.mjs +1 -1
- package/dist/esm/helper/profile-manager.mjs +1 -1
- package/dist/esm/helper/use-b24-helper.mjs +1 -1
- package/dist/esm/hook/auth.mjs +1 -1
- package/dist/esm/hook/b24.mjs +1 -1
- package/dist/esm/index.d.mts +101 -22
- package/dist/esm/index.d.ts +101 -22
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/loader-b24frame.mjs +1 -1
- package/dist/esm/logger/abstract-logger.mjs +1 -1
- package/dist/esm/logger/browser.mjs +1 -1
- package/dist/esm/logger/formatter/abstract-formatter.mjs +1 -1
- package/dist/esm/logger/formatter/json-formatter.mjs +1 -1
- package/dist/esm/logger/formatter/line-formatter.mjs +1 -1
- package/dist/esm/logger/formatter/telegram-formatter.mjs +1 -1
- package/dist/esm/logger/handler/abstract-handler.mjs +1 -1
- package/dist/esm/logger/handler/consola-adapter.mjs +1 -1
- package/dist/esm/logger/handler/console-handler.mjs +1 -1
- package/dist/esm/logger/handler/console-v2-handler.mjs +1 -1
- package/dist/esm/logger/handler/memory-handler.mjs +1 -1
- package/dist/esm/logger/handler/stream-handler.mjs +1 -1
- package/dist/esm/logger/handler/telegram-handler.mjs +1 -1
- package/dist/esm/logger/handler/winston-adapter.mjs +1 -1
- package/dist/esm/logger/logger-factory.mjs +1 -1
- package/dist/esm/logger/logger.mjs +1 -1
- package/dist/esm/logger/null-logger.mjs +1 -1
- package/dist/esm/logger/processor/memory-usage-processor.mjs +1 -1
- package/dist/esm/logger/processor/pid-processor.mjs +1 -1
- package/dist/esm/oauth/auth.mjs +1 -1
- package/dist/esm/oauth/b24.mjs +1 -1
- package/dist/esm/oauth/refresh-token-error.mjs +1 -1
- package/dist/esm/pullClient/abstract-connector.mjs +1 -1
- package/dist/esm/pullClient/channel-manager.mjs +1 -1
- package/dist/esm/pullClient/client.mjs +1 -1
- package/dist/esm/pullClient/errors.mjs +1 -1
- package/dist/esm/pullClient/json-rpc.mjs +1 -1
- package/dist/esm/pullClient/long-polling-connector.mjs +1 -1
- package/dist/esm/pullClient/protobuf/index.mjs +1 -1
- package/dist/esm/pullClient/protobuf/model.mjs +1 -1
- package/dist/esm/pullClient/protobuf/protobuf.mjs +53 -53
- package/dist/esm/pullClient/protobuf/protobuf.mjs.map +1 -1
- package/dist/esm/pullClient/shared-config.mjs +1 -1
- package/dist/esm/pullClient/storage-manager.mjs +1 -1
- package/dist/esm/pullClient/web-socket-connector.mjs +1 -1
- package/dist/esm/tools/browser.mjs +1 -1
- package/dist/esm/tools/environment.mjs +1 -1
- package/dist/esm/tools/formatters/iban.mjs +1 -1
- package/dist/esm/tools/formatters/numbers.mjs +1 -1
- package/dist/esm/tools/index.mjs +1 -1
- package/dist/esm/tools/scroll-size.mjs +1 -1
- package/dist/esm/tools/text.mjs +1 -1
- package/dist/esm/tools/type.mjs +1 -1
- package/dist/esm/tools/use-formatters.mjs +1 -1
- package/dist/esm/tools/uuidv7.mjs +1 -1
- package/dist/esm/types/b24-helper.mjs +1 -1
- package/dist/esm/types/b24.mjs +1 -1
- package/dist/esm/types/bizproc/index.mjs +1 -1
- package/dist/esm/types/catalog/index.mjs +1 -1
- package/dist/esm/types/common.mjs +1 -1
- package/dist/esm/types/crm/entity-type.mjs +1 -1
- package/dist/esm/types/crm/productrow.mjs +1 -1
- package/dist/esm/types/logger.mjs +1 -1
- package/dist/esm/types/pull.mjs +1 -1
- package/dist/umd/index.js +1899 -1309
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.min.js +28 -28
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.d.mts
CHANGED
|
@@ -1006,6 +1006,7 @@ interface IResult<T = any> {
|
|
|
1006
1006
|
* Retrieves an iterator for the errors collected in the result.
|
|
1007
1007
|
*
|
|
1008
1008
|
* @returns {IterableIterator<Error>} An iterator over the stored Error objects.
|
|
1009
|
+
* @see {@link IResult.getErrorsByKey} — keeps the request keys.
|
|
1009
1010
|
*/
|
|
1010
1011
|
getErrors: () => IterableIterator<Error>;
|
|
1011
1012
|
/**
|
|
@@ -1014,6 +1015,21 @@ interface IResult<T = any> {
|
|
|
1014
1015
|
* @returns {string[]} An array of strings representing the error messages.
|
|
1015
1016
|
*/
|
|
1016
1017
|
getErrorMessages: () => string[];
|
|
1018
|
+
/**
|
|
1019
|
+
* Retrieves all errors keyed by their identifier (e.g. the batch request key),
|
|
1020
|
+
* preserving which request produced each error. Unlike {@link getErrors}, the
|
|
1021
|
+
* keys are not discarded — useful for batch calls with `isHaltOnError: false`.
|
|
1022
|
+
*
|
|
1023
|
+
* @returns {Record<string, Error>} A map of error key to Error object.
|
|
1024
|
+
*/
|
|
1025
|
+
getErrorsByKey: () => Record<string, Error>;
|
|
1026
|
+
/**
|
|
1027
|
+
* Retrieves all error messages keyed by their identifier (e.g. the batch
|
|
1028
|
+
* request key). Unlike {@link getErrorMessages}, the keys are preserved.
|
|
1029
|
+
*
|
|
1030
|
+
* @returns {Record<string, string>} A map of error key to error message.
|
|
1031
|
+
*/
|
|
1032
|
+
getErrorMessagesByKey: () => Record<string, string>;
|
|
1017
1033
|
/**
|
|
1018
1034
|
* Checks for an error in a collection by key
|
|
1019
1035
|
* @param key - Error key
|
|
@@ -1050,6 +1066,27 @@ declare class Result<T = any> implements IResult<T> {
|
|
|
1050
1066
|
* contains the message of a corresponding error object.
|
|
1051
1067
|
*/
|
|
1052
1068
|
getErrorMessages(): string[];
|
|
1069
|
+
/**
|
|
1070
|
+
* Retrieves all errors as a plain object (a snapshot copy) keyed by their
|
|
1071
|
+
* identifier, preserving which request produced each error. Unlike
|
|
1072
|
+
* {@link Result.getErrors}, the keys are not discarded — useful for batch
|
|
1073
|
+
* calls with `isHaltOnError: false`.
|
|
1074
|
+
*
|
|
1075
|
+
* Keys are meaningful only when the error was added with an explicit key
|
|
1076
|
+
* (e.g. an object / named-command batch). Array-mode batches and
|
|
1077
|
+
* {@link Result.addErrors} fall back to generated UUID keys.
|
|
1078
|
+
*
|
|
1079
|
+
* @returns {Record<string, Error>} A map of error key to Error object.
|
|
1080
|
+
*/
|
|
1081
|
+
getErrorsByKey(): Record<string, Error>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Retrieves all error messages as a plain object (a snapshot copy) keyed by
|
|
1084
|
+
* their identifier. Unlike {@link Result.getErrorMessages}, the keys are
|
|
1085
|
+
* preserved. See {@link Result.getErrorsByKey} for when keys are meaningful.
|
|
1086
|
+
*
|
|
1087
|
+
* @returns {Record<string, string>} A map of error key to error message.
|
|
1088
|
+
*/
|
|
1089
|
+
getErrorMessagesByKey(): Record<string, string>;
|
|
1053
1090
|
/**
|
|
1054
1091
|
* Converts the Result object to a string.
|
|
1055
1092
|
*
|
|
@@ -1465,6 +1502,7 @@ type ActionCallListV2 = ActionOptions & {
|
|
|
1465
1502
|
method: string;
|
|
1466
1503
|
params?: Omit<TypeCallParams, 'start' | 'order'>;
|
|
1467
1504
|
idKey?: string;
|
|
1505
|
+
cursorIdKey?: string;
|
|
1468
1506
|
customKeyForResult?: string;
|
|
1469
1507
|
requestId?: string;
|
|
1470
1508
|
};
|
|
@@ -1481,12 +1519,16 @@ declare class CallListV2 extends AbstractAction {
|
|
|
1481
1519
|
*
|
|
1482
1520
|
* @param {ActionCallListV2} options - parameters for executing the request.
|
|
1483
1521
|
* - `method: string` - The name of the REST API method that returns a list of data (for example: `crm.item.list`, `tasks.task.list`)
|
|
1484
|
-
* - `params?: Omit<TypeCallParams, 'start'>` - Request parameters, excluding the `start`
|
|
1522
|
+
* - `params?: Omit<TypeCallParams, 'start' | 'order'>` - Request parameters, excluding the `start` and `order` parameters,
|
|
1485
1523
|
* since the method is designed to obtain all data in one call.
|
|
1486
1524
|
* Note: Use `filter`, `order`, and `select` to control the selection.
|
|
1487
|
-
* - `idKey?: string` - The name of the field
|
|
1488
|
-
* Default is 'ID' (uppercase).
|
|
1489
|
-
*
|
|
1525
|
+
* - `idKey?: string` - The name of the id field as it appears in each RESPONSE item; its value
|
|
1526
|
+
* drives the cursor. Default is 'ID' (uppercase). For methods that return a lowercase /
|
|
1527
|
+
* camelCase id (for example `tasks.task.list` returns `id`), set `idKey: 'id'`.
|
|
1528
|
+
* - `cursorIdKey?: string` - The field name used in the REQUEST for `order` and the `>` page
|
|
1529
|
+
* filter. Defaults to `idKey`. Set it only when the sortable / filterable field name differs
|
|
1530
|
+
* from the response field name — e.g. `tasks.task.list` sorts and filters by `ID` (uppercase)
|
|
1531
|
+
* but returns `id` (lowercase): pass `idKey: 'id', cursorIdKey: 'ID'`.
|
|
1490
1532
|
* - `customKeyForResult?: string` - A custom key indicating that the response REST API will be
|
|
1491
1533
|
* grouped by this field.
|
|
1492
1534
|
* Example: `items` to group a list of CRM items.
|
|
@@ -1528,6 +1570,7 @@ type ActionFetchListV2 = ActionOptions & {
|
|
|
1528
1570
|
method: string;
|
|
1529
1571
|
params?: Omit<TypeCallParams, 'start' | 'order'>;
|
|
1530
1572
|
idKey?: string;
|
|
1573
|
+
cursorIdKey?: string;
|
|
1531
1574
|
customKeyForResult?: string;
|
|
1532
1575
|
requestId?: string;
|
|
1533
1576
|
};
|
|
@@ -1545,12 +1588,16 @@ declare class FetchListV2 extends AbstractAction {
|
|
|
1545
1588
|
*
|
|
1546
1589
|
* @param {ActionFetchListV2} options - parameters for executing the request.
|
|
1547
1590
|
* - `method: string` - The name of the REST API method that returns a list of data (for example: `crm.item.list`, `tasks.task.list`)
|
|
1548
|
-
* - `params?: Omit<TypeCallParams, 'start'>` - Request parameters, excluding the `start`
|
|
1591
|
+
* - `params?: Omit<TypeCallParams, 'start' | 'order'>` - Request parameters, excluding the `start` and `order` parameters,
|
|
1549
1592
|
* since the method is designed to obtain all data in one call.
|
|
1550
1593
|
* Note: Use `filter`, `order`, and `select` to control the selection.
|
|
1551
|
-
* - `idKey?: string` - The name of the field
|
|
1552
|
-
* Default is 'ID' (uppercase).
|
|
1553
|
-
*
|
|
1594
|
+
* - `idKey?: string` - The name of the id field as it appears in each RESPONSE item; its value
|
|
1595
|
+
* drives the cursor. Default is 'ID' (uppercase). For methods that return a lowercase /
|
|
1596
|
+
* camelCase id (for example `tasks.task.list` returns `id`), set `idKey: 'id'`.
|
|
1597
|
+
* - `cursorIdKey?: string` - The field name used in the REQUEST for `order` and the `>` page
|
|
1598
|
+
* filter. Defaults to `idKey`. Set it only when the sortable / filterable field name differs
|
|
1599
|
+
* from the response field name — e.g. `tasks.task.list` sorts and filters by `ID` (uppercase)
|
|
1600
|
+
* but returns `id` (lowercase): pass `idKey: 'id', cursorIdKey: 'ID'`.
|
|
1554
1601
|
* - `customKeyForResult?: string` - A custom key indicating that the response REST API will be
|
|
1555
1602
|
* grouped by this field.
|
|
1556
1603
|
* Example: `items` to group a list of CRM items.
|
|
@@ -1659,7 +1706,7 @@ declare class BatchV2 extends AbstractBatch {
|
|
|
1659
1706
|
* const resultData = (response as Result<AjaxResult<{ item: Contact }>[]>).getData()
|
|
1660
1707
|
* resultData.forEach((resultRow, index) => {
|
|
1661
1708
|
* if (resultRow.isSuccess) {
|
|
1662
|
-
* console.log(`Item ${index + 1}:`, resultRow.getData()
|
|
1709
|
+
* console.log(`Item ${index + 1}:`, resultRow.getData()!.result.item)
|
|
1663
1710
|
* }
|
|
1664
1711
|
* })
|
|
1665
1712
|
*
|
|
@@ -1702,8 +1749,8 @@ declare class BatchV2 extends AbstractBatch {
|
|
|
1702
1749
|
* }
|
|
1703
1750
|
*
|
|
1704
1751
|
* const results = response.getData() as Record<string, AjaxResult<{ item: Contact } | { item: Deal }>>
|
|
1705
|
-
* console.log('Contact:', results.Contact.getData()
|
|
1706
|
-
* console.log('Deal:', results.Deal.getData()
|
|
1752
|
+
* console.log('Contact:', results.Contact.getData()?.result.item as Contact)
|
|
1753
|
+
* console.log('Deal:', results.Deal.getData()?.result.item as Deal)
|
|
1707
1754
|
*
|
|
1708
1755
|
* @warning The maximum number of commands in one batch request is 50.
|
|
1709
1756
|
* @note A batch request executes faster than sequential single calls,
|
|
@@ -1833,6 +1880,7 @@ type ActionCallListV3 = ActionOptions & {
|
|
|
1833
1880
|
method: string;
|
|
1834
1881
|
params?: Omit<TypeCallParams, 'pagination' | 'order'>;
|
|
1835
1882
|
idKey?: string;
|
|
1883
|
+
cursorIdKey?: string;
|
|
1836
1884
|
customKeyForResult: string;
|
|
1837
1885
|
requestId?: string;
|
|
1838
1886
|
limit?: number;
|
|
@@ -1850,11 +1898,15 @@ declare class CallListV3 extends AbstractAction {
|
|
|
1850
1898
|
*
|
|
1851
1899
|
* @param {ActionCallListV3} options - parameters for executing the request.
|
|
1852
1900
|
* - `method: string` - The name of the REST API method that returns a list of data (for example: `crm.item.list`, `tasks.task.list`)
|
|
1853
|
-
* - `params?: Omit<TypeCallParams, 'pagination'>` - Request parameters, excluding the `pagination`
|
|
1901
|
+
* - `params?: Omit<TypeCallParams, 'pagination' | 'order'>` - Request parameters, excluding the `pagination` and `order` parameters,
|
|
1854
1902
|
* since the method is designed to obtain all data in one call.
|
|
1855
1903
|
* Note: Use `filter`, `order`, and `select` to control the selection.
|
|
1856
|
-
* - `idKey?: string` - The name of the field
|
|
1857
|
-
* Default is 'id'.
|
|
1904
|
+
* - `idKey?: string` - The name of the id field as it appears in each RESPONSE item; its value
|
|
1905
|
+
* drives the cursor. Default is 'id'. Set it to match the id field the method returns.
|
|
1906
|
+
* - `cursorIdKey?: string` - The field name used in the REQUEST for `order` and the
|
|
1907
|
+
* `[field, '>', n]` page filter. Defaults to `idKey`. Set it only when the sortable /
|
|
1908
|
+
* filterable field name differs from the response field name (e.g. an uppercase request
|
|
1909
|
+
* field but a lowercase response id): pass `idKey: 'id', cursorIdKey: 'ID'`.
|
|
1858
1910
|
* - `customKeyForResult: string` - A custom key indicating that the response REST API will be
|
|
1859
1911
|
* grouped by this field.
|
|
1860
1912
|
* Example: `items` to group a list of CRM items.
|
|
@@ -1896,6 +1948,7 @@ type ActionFetchListV3 = ActionOptions & {
|
|
|
1896
1948
|
method: string;
|
|
1897
1949
|
params?: Omit<TypeCallParams, 'pagination' | 'order'>;
|
|
1898
1950
|
idKey?: string;
|
|
1951
|
+
cursorIdKey?: string;
|
|
1899
1952
|
customKeyForResult: string;
|
|
1900
1953
|
requestId?: string;
|
|
1901
1954
|
limit?: number;
|
|
@@ -1914,11 +1967,15 @@ declare class FetchListV3 extends AbstractAction {
|
|
|
1914
1967
|
*
|
|
1915
1968
|
* @param {ActionFetchListV3} options - parameters for executing the request.
|
|
1916
1969
|
* - `method: string` - The name of the REST API method that returns a list of data (for example: `crm.item.list`, `tasks.task.list`)
|
|
1917
|
-
* - `params?: Omit<TypeCallParams, 'pagination'>` - Request parameters, excluding the `pagination`
|
|
1970
|
+
* - `params?: Omit<TypeCallParams, 'pagination' | 'order'>` - Request parameters, excluding the `pagination` and `order` parameters,
|
|
1918
1971
|
* since the method is designed to obtain all data in one call.
|
|
1919
1972
|
* Note: Use `filter`, `order`, and `select` to control the selection.
|
|
1920
|
-
* - `idKey?: string` - The name of the field
|
|
1921
|
-
* Default is 'id'.
|
|
1973
|
+
* - `idKey?: string` - The name of the id field as it appears in each RESPONSE item; its value
|
|
1974
|
+
* drives the cursor. Default is 'id'. Set it to match the id field the method returns.
|
|
1975
|
+
* - `cursorIdKey?: string` - The field name used in the REQUEST for `order` and the
|
|
1976
|
+
* `[field, '>', n]` page filter. Defaults to `idKey`. Set it only when the sortable /
|
|
1977
|
+
* filterable field name differs from the response field name (e.g. an uppercase request
|
|
1978
|
+
* field but a lowercase response id): pass `idKey: 'id', cursorIdKey: 'ID'`.
|
|
1922
1979
|
* - `customKeyForResult: string` - A custom key indicating that the response REST API will be
|
|
1923
1980
|
* grouped by this field.
|
|
1924
1981
|
* Example: `items` to group a list of CRM items.
|
|
@@ -2012,7 +2069,7 @@ declare class BatchV3 extends AbstractBatch {
|
|
|
2012
2069
|
* const resultData = (response as Result<AjaxResult<{ item: TaskItem }>[]>).getData()
|
|
2013
2070
|
* resultData.forEach((resultRow, index) => {
|
|
2014
2071
|
* if (resultRow.isSuccess) {
|
|
2015
|
-
* console.log(`Item ${index + 1}:`, resultRow.getData()
|
|
2072
|
+
* console.log(`Item ${index + 1}:`, resultRow.getData()!.result.item)
|
|
2016
2073
|
* }
|
|
2017
2074
|
* })
|
|
2018
2075
|
*
|
|
@@ -2051,8 +2108,8 @@ declare class BatchV3 extends AbstractBatch {
|
|
|
2051
2108
|
* }
|
|
2052
2109
|
*
|
|
2053
2110
|
* const results = response.getData() as Record<string, AjaxResult<{ item: TaskItem } | { items: MainEventLogItem[] }>>
|
|
2054
|
-
* console.log('Task:', results.Task.getData()
|
|
2055
|
-
* console.log('MainEventLog:', results.MainEventLog.getData()
|
|
2111
|
+
* console.log('Task:', results.Task.getData()?.result.item as TaskItem)
|
|
2112
|
+
* console.log('MainEventLog:', results.MainEventLog.getData()?.result.items as MainEventLogItem[])
|
|
2056
2113
|
*
|
|
2057
2114
|
* @warning The maximum number of commands in one batch request is 50.
|
|
2058
2115
|
* @note A batch request executes faster than sequential single calls,
|
|
@@ -4053,7 +4110,9 @@ declare class RestrictionManager {
|
|
|
4053
4110
|
}
|
|
4054
4111
|
|
|
4055
4112
|
/**
|
|
4056
|
-
*
|
|
4113
|
+
* Decides which REST API version (v2 or v3) a method is routed through:
|
|
4114
|
+
* v3 only for methods on the published allowlist (`#supportMethods`); everything
|
|
4115
|
+
* else falls back to v2.
|
|
4057
4116
|
*/
|
|
4058
4117
|
declare class VersionManager {
|
|
4059
4118
|
#private;
|
|
@@ -4226,6 +4285,12 @@ declare abstract class AbstractHttp implements TypeHttp {
|
|
|
4226
4285
|
protected _authActions: AuthActions;
|
|
4227
4286
|
protected _requestIdGenerator: RequestIdGenerator;
|
|
4228
4287
|
protected _restrictionManager: RestrictionManager;
|
|
4288
|
+
/**
|
|
4289
|
+
* In-flight token refresh, shared so concurrent 401s coalesce into a single
|
|
4290
|
+
* `refreshAuth()` round-trip — avoids OAuth refresh-token reuse errors when a
|
|
4291
|
+
* burst of requests expires together. (#182)
|
|
4292
|
+
*/
|
|
4293
|
+
protected _pendingRefresh: Promise<AuthData> | null;
|
|
4229
4294
|
protected _logger: LoggerInterface;
|
|
4230
4295
|
protected _isClientSideWarning: boolean;
|
|
4231
4296
|
protected _clientSideWarningMessage: string;
|
|
@@ -4298,6 +4363,12 @@ declare abstract class AbstractHttp implements TypeHttp {
|
|
|
4298
4363
|
*/
|
|
4299
4364
|
protected _executeSingleCall<T = unknown>(requestId: string, method: string, params: TypeCallParams): Promise<AjaxResult<T>>;
|
|
4300
4365
|
protected _ensureAuth(requestId: string): Promise<AuthData>;
|
|
4366
|
+
/**
|
|
4367
|
+
* Refresh the auth token, coalescing concurrent callers onto a single
|
|
4368
|
+
* in-flight `refreshAuth()` so a burst of 401s triggers exactly one refresh
|
|
4369
|
+
* round-trip. The slot clears once the refresh settles. (#182)
|
|
4370
|
+
*/
|
|
4371
|
+
protected _refreshAuth(): Promise<AuthData>;
|
|
4301
4372
|
protected _makeRequestWithAuthRetry<T>(requestId: string, method: string, params: TypeCallParams, authData: AuthData): Promise<AjaxResponse<T>>;
|
|
4302
4373
|
protected _makeAxiosRequest<T>(requestId: string, method: string, params: TypeCallParams, authData: AuthData): Promise<AjaxResponse<T>>;
|
|
4303
4374
|
protected _isAuthError(error: unknown): boolean;
|
|
@@ -4785,7 +4856,11 @@ declare class ParentManager {
|
|
|
4785
4856
|
*/
|
|
4786
4857
|
reloadWindow(): Promise<void>;
|
|
4787
4858
|
/**
|
|
4788
|
-
*
|
|
4859
|
+
* Sets the in-layout page title (the `#pagetitle` element the portal renders around the app).
|
|
4860
|
+
*
|
|
4861
|
+
* Does NOT change the browser tab title (`document.title`): the portal applies this command to
|
|
4862
|
+
* `#pagetitle`, never to the tab. To set the browser tab title, open the view as a slider via
|
|
4863
|
+
* `SliderManager.openSliderAppPage` with a `bx24_title` option.
|
|
4789
4864
|
*
|
|
4790
4865
|
* @param {string} title
|
|
4791
4866
|
*
|
|
@@ -5060,6 +5135,10 @@ declare class SliderManager {
|
|
|
5060
5135
|
/**
|
|
5061
5136
|
* When the method is called, a pop-up window with the application frame will be opened.
|
|
5062
5137
|
*
|
|
5138
|
+
* Settings are passed via `bx24_`-prefixed keys (e.g. `bx24_title`, `bx24_width`).
|
|
5139
|
+
* `bx24_title` sets the slider title; the portal also reflects it to the browser tab title
|
|
5140
|
+
* (`document.title`) — unlike `ParentManager.setTitle`, which only updates the in-layout `#pagetitle`.
|
|
5141
|
+
*
|
|
5063
5142
|
* @link https://apidocs.bitrix24.com/sdk/bx24-js-sdk/additional-functions/bx24-open-application.html
|
|
5064
5143
|
*/
|
|
5065
5144
|
openSliderAppPage(params?: any): Promise<any>;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1006,6 +1006,7 @@ interface IResult<T = any> {
|
|
|
1006
1006
|
* Retrieves an iterator for the errors collected in the result.
|
|
1007
1007
|
*
|
|
1008
1008
|
* @returns {IterableIterator<Error>} An iterator over the stored Error objects.
|
|
1009
|
+
* @see {@link IResult.getErrorsByKey} — keeps the request keys.
|
|
1009
1010
|
*/
|
|
1010
1011
|
getErrors: () => IterableIterator<Error>;
|
|
1011
1012
|
/**
|
|
@@ -1014,6 +1015,21 @@ interface IResult<T = any> {
|
|
|
1014
1015
|
* @returns {string[]} An array of strings representing the error messages.
|
|
1015
1016
|
*/
|
|
1016
1017
|
getErrorMessages: () => string[];
|
|
1018
|
+
/**
|
|
1019
|
+
* Retrieves all errors keyed by their identifier (e.g. the batch request key),
|
|
1020
|
+
* preserving which request produced each error. Unlike {@link getErrors}, the
|
|
1021
|
+
* keys are not discarded — useful for batch calls with `isHaltOnError: false`.
|
|
1022
|
+
*
|
|
1023
|
+
* @returns {Record<string, Error>} A map of error key to Error object.
|
|
1024
|
+
*/
|
|
1025
|
+
getErrorsByKey: () => Record<string, Error>;
|
|
1026
|
+
/**
|
|
1027
|
+
* Retrieves all error messages keyed by their identifier (e.g. the batch
|
|
1028
|
+
* request key). Unlike {@link getErrorMessages}, the keys are preserved.
|
|
1029
|
+
*
|
|
1030
|
+
* @returns {Record<string, string>} A map of error key to error message.
|
|
1031
|
+
*/
|
|
1032
|
+
getErrorMessagesByKey: () => Record<string, string>;
|
|
1017
1033
|
/**
|
|
1018
1034
|
* Checks for an error in a collection by key
|
|
1019
1035
|
* @param key - Error key
|
|
@@ -1050,6 +1066,27 @@ declare class Result<T = any> implements IResult<T> {
|
|
|
1050
1066
|
* contains the message of a corresponding error object.
|
|
1051
1067
|
*/
|
|
1052
1068
|
getErrorMessages(): string[];
|
|
1069
|
+
/**
|
|
1070
|
+
* Retrieves all errors as a plain object (a snapshot copy) keyed by their
|
|
1071
|
+
* identifier, preserving which request produced each error. Unlike
|
|
1072
|
+
* {@link Result.getErrors}, the keys are not discarded — useful for batch
|
|
1073
|
+
* calls with `isHaltOnError: false`.
|
|
1074
|
+
*
|
|
1075
|
+
* Keys are meaningful only when the error was added with an explicit key
|
|
1076
|
+
* (e.g. an object / named-command batch). Array-mode batches and
|
|
1077
|
+
* {@link Result.addErrors} fall back to generated UUID keys.
|
|
1078
|
+
*
|
|
1079
|
+
* @returns {Record<string, Error>} A map of error key to Error object.
|
|
1080
|
+
*/
|
|
1081
|
+
getErrorsByKey(): Record<string, Error>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Retrieves all error messages as a plain object (a snapshot copy) keyed by
|
|
1084
|
+
* their identifier. Unlike {@link Result.getErrorMessages}, the keys are
|
|
1085
|
+
* preserved. See {@link Result.getErrorsByKey} for when keys are meaningful.
|
|
1086
|
+
*
|
|
1087
|
+
* @returns {Record<string, string>} A map of error key to error message.
|
|
1088
|
+
*/
|
|
1089
|
+
getErrorMessagesByKey(): Record<string, string>;
|
|
1053
1090
|
/**
|
|
1054
1091
|
* Converts the Result object to a string.
|
|
1055
1092
|
*
|
|
@@ -1465,6 +1502,7 @@ type ActionCallListV2 = ActionOptions & {
|
|
|
1465
1502
|
method: string;
|
|
1466
1503
|
params?: Omit<TypeCallParams, 'start' | 'order'>;
|
|
1467
1504
|
idKey?: string;
|
|
1505
|
+
cursorIdKey?: string;
|
|
1468
1506
|
customKeyForResult?: string;
|
|
1469
1507
|
requestId?: string;
|
|
1470
1508
|
};
|
|
@@ -1481,12 +1519,16 @@ declare class CallListV2 extends AbstractAction {
|
|
|
1481
1519
|
*
|
|
1482
1520
|
* @param {ActionCallListV2} options - parameters for executing the request.
|
|
1483
1521
|
* - `method: string` - The name of the REST API method that returns a list of data (for example: `crm.item.list`, `tasks.task.list`)
|
|
1484
|
-
* - `params?: Omit<TypeCallParams, 'start'>` - Request parameters, excluding the `start`
|
|
1522
|
+
* - `params?: Omit<TypeCallParams, 'start' | 'order'>` - Request parameters, excluding the `start` and `order` parameters,
|
|
1485
1523
|
* since the method is designed to obtain all data in one call.
|
|
1486
1524
|
* Note: Use `filter`, `order`, and `select` to control the selection.
|
|
1487
|
-
* - `idKey?: string` - The name of the field
|
|
1488
|
-
* Default is 'ID' (uppercase).
|
|
1489
|
-
*
|
|
1525
|
+
* - `idKey?: string` - The name of the id field as it appears in each RESPONSE item; its value
|
|
1526
|
+
* drives the cursor. Default is 'ID' (uppercase). For methods that return a lowercase /
|
|
1527
|
+
* camelCase id (for example `tasks.task.list` returns `id`), set `idKey: 'id'`.
|
|
1528
|
+
* - `cursorIdKey?: string` - The field name used in the REQUEST for `order` and the `>` page
|
|
1529
|
+
* filter. Defaults to `idKey`. Set it only when the sortable / filterable field name differs
|
|
1530
|
+
* from the response field name — e.g. `tasks.task.list` sorts and filters by `ID` (uppercase)
|
|
1531
|
+
* but returns `id` (lowercase): pass `idKey: 'id', cursorIdKey: 'ID'`.
|
|
1490
1532
|
* - `customKeyForResult?: string` - A custom key indicating that the response REST API will be
|
|
1491
1533
|
* grouped by this field.
|
|
1492
1534
|
* Example: `items` to group a list of CRM items.
|
|
@@ -1528,6 +1570,7 @@ type ActionFetchListV2 = ActionOptions & {
|
|
|
1528
1570
|
method: string;
|
|
1529
1571
|
params?: Omit<TypeCallParams, 'start' | 'order'>;
|
|
1530
1572
|
idKey?: string;
|
|
1573
|
+
cursorIdKey?: string;
|
|
1531
1574
|
customKeyForResult?: string;
|
|
1532
1575
|
requestId?: string;
|
|
1533
1576
|
};
|
|
@@ -1545,12 +1588,16 @@ declare class FetchListV2 extends AbstractAction {
|
|
|
1545
1588
|
*
|
|
1546
1589
|
* @param {ActionFetchListV2} options - parameters for executing the request.
|
|
1547
1590
|
* - `method: string` - The name of the REST API method that returns a list of data (for example: `crm.item.list`, `tasks.task.list`)
|
|
1548
|
-
* - `params?: Omit<TypeCallParams, 'start'>` - Request parameters, excluding the `start`
|
|
1591
|
+
* - `params?: Omit<TypeCallParams, 'start' | 'order'>` - Request parameters, excluding the `start` and `order` parameters,
|
|
1549
1592
|
* since the method is designed to obtain all data in one call.
|
|
1550
1593
|
* Note: Use `filter`, `order`, and `select` to control the selection.
|
|
1551
|
-
* - `idKey?: string` - The name of the field
|
|
1552
|
-
* Default is 'ID' (uppercase).
|
|
1553
|
-
*
|
|
1594
|
+
* - `idKey?: string` - The name of the id field as it appears in each RESPONSE item; its value
|
|
1595
|
+
* drives the cursor. Default is 'ID' (uppercase). For methods that return a lowercase /
|
|
1596
|
+
* camelCase id (for example `tasks.task.list` returns `id`), set `idKey: 'id'`.
|
|
1597
|
+
* - `cursorIdKey?: string` - The field name used in the REQUEST for `order` and the `>` page
|
|
1598
|
+
* filter. Defaults to `idKey`. Set it only when the sortable / filterable field name differs
|
|
1599
|
+
* from the response field name — e.g. `tasks.task.list` sorts and filters by `ID` (uppercase)
|
|
1600
|
+
* but returns `id` (lowercase): pass `idKey: 'id', cursorIdKey: 'ID'`.
|
|
1554
1601
|
* - `customKeyForResult?: string` - A custom key indicating that the response REST API will be
|
|
1555
1602
|
* grouped by this field.
|
|
1556
1603
|
* Example: `items` to group a list of CRM items.
|
|
@@ -1659,7 +1706,7 @@ declare class BatchV2 extends AbstractBatch {
|
|
|
1659
1706
|
* const resultData = (response as Result<AjaxResult<{ item: Contact }>[]>).getData()
|
|
1660
1707
|
* resultData.forEach((resultRow, index) => {
|
|
1661
1708
|
* if (resultRow.isSuccess) {
|
|
1662
|
-
* console.log(`Item ${index + 1}:`, resultRow.getData()
|
|
1709
|
+
* console.log(`Item ${index + 1}:`, resultRow.getData()!.result.item)
|
|
1663
1710
|
* }
|
|
1664
1711
|
* })
|
|
1665
1712
|
*
|
|
@@ -1702,8 +1749,8 @@ declare class BatchV2 extends AbstractBatch {
|
|
|
1702
1749
|
* }
|
|
1703
1750
|
*
|
|
1704
1751
|
* const results = response.getData() as Record<string, AjaxResult<{ item: Contact } | { item: Deal }>>
|
|
1705
|
-
* console.log('Contact:', results.Contact.getData()
|
|
1706
|
-
* console.log('Deal:', results.Deal.getData()
|
|
1752
|
+
* console.log('Contact:', results.Contact.getData()?.result.item as Contact)
|
|
1753
|
+
* console.log('Deal:', results.Deal.getData()?.result.item as Deal)
|
|
1707
1754
|
*
|
|
1708
1755
|
* @warning The maximum number of commands in one batch request is 50.
|
|
1709
1756
|
* @note A batch request executes faster than sequential single calls,
|
|
@@ -1833,6 +1880,7 @@ type ActionCallListV3 = ActionOptions & {
|
|
|
1833
1880
|
method: string;
|
|
1834
1881
|
params?: Omit<TypeCallParams, 'pagination' | 'order'>;
|
|
1835
1882
|
idKey?: string;
|
|
1883
|
+
cursorIdKey?: string;
|
|
1836
1884
|
customKeyForResult: string;
|
|
1837
1885
|
requestId?: string;
|
|
1838
1886
|
limit?: number;
|
|
@@ -1850,11 +1898,15 @@ declare class CallListV3 extends AbstractAction {
|
|
|
1850
1898
|
*
|
|
1851
1899
|
* @param {ActionCallListV3} options - parameters for executing the request.
|
|
1852
1900
|
* - `method: string` - The name of the REST API method that returns a list of data (for example: `crm.item.list`, `tasks.task.list`)
|
|
1853
|
-
* - `params?: Omit<TypeCallParams, 'pagination'>` - Request parameters, excluding the `pagination`
|
|
1901
|
+
* - `params?: Omit<TypeCallParams, 'pagination' | 'order'>` - Request parameters, excluding the `pagination` and `order` parameters,
|
|
1854
1902
|
* since the method is designed to obtain all data in one call.
|
|
1855
1903
|
* Note: Use `filter`, `order`, and `select` to control the selection.
|
|
1856
|
-
* - `idKey?: string` - The name of the field
|
|
1857
|
-
* Default is 'id'.
|
|
1904
|
+
* - `idKey?: string` - The name of the id field as it appears in each RESPONSE item; its value
|
|
1905
|
+
* drives the cursor. Default is 'id'. Set it to match the id field the method returns.
|
|
1906
|
+
* - `cursorIdKey?: string` - The field name used in the REQUEST for `order` and the
|
|
1907
|
+
* `[field, '>', n]` page filter. Defaults to `idKey`. Set it only when the sortable /
|
|
1908
|
+
* filterable field name differs from the response field name (e.g. an uppercase request
|
|
1909
|
+
* field but a lowercase response id): pass `idKey: 'id', cursorIdKey: 'ID'`.
|
|
1858
1910
|
* - `customKeyForResult: string` - A custom key indicating that the response REST API will be
|
|
1859
1911
|
* grouped by this field.
|
|
1860
1912
|
* Example: `items` to group a list of CRM items.
|
|
@@ -1896,6 +1948,7 @@ type ActionFetchListV3 = ActionOptions & {
|
|
|
1896
1948
|
method: string;
|
|
1897
1949
|
params?: Omit<TypeCallParams, 'pagination' | 'order'>;
|
|
1898
1950
|
idKey?: string;
|
|
1951
|
+
cursorIdKey?: string;
|
|
1899
1952
|
customKeyForResult: string;
|
|
1900
1953
|
requestId?: string;
|
|
1901
1954
|
limit?: number;
|
|
@@ -1914,11 +1967,15 @@ declare class FetchListV3 extends AbstractAction {
|
|
|
1914
1967
|
*
|
|
1915
1968
|
* @param {ActionFetchListV3} options - parameters for executing the request.
|
|
1916
1969
|
* - `method: string` - The name of the REST API method that returns a list of data (for example: `crm.item.list`, `tasks.task.list`)
|
|
1917
|
-
* - `params?: Omit<TypeCallParams, 'pagination'>` - Request parameters, excluding the `pagination`
|
|
1970
|
+
* - `params?: Omit<TypeCallParams, 'pagination' | 'order'>` - Request parameters, excluding the `pagination` and `order` parameters,
|
|
1918
1971
|
* since the method is designed to obtain all data in one call.
|
|
1919
1972
|
* Note: Use `filter`, `order`, and `select` to control the selection.
|
|
1920
|
-
* - `idKey?: string` - The name of the field
|
|
1921
|
-
* Default is 'id'.
|
|
1973
|
+
* - `idKey?: string` - The name of the id field as it appears in each RESPONSE item; its value
|
|
1974
|
+
* drives the cursor. Default is 'id'. Set it to match the id field the method returns.
|
|
1975
|
+
* - `cursorIdKey?: string` - The field name used in the REQUEST for `order` and the
|
|
1976
|
+
* `[field, '>', n]` page filter. Defaults to `idKey`. Set it only when the sortable /
|
|
1977
|
+
* filterable field name differs from the response field name (e.g. an uppercase request
|
|
1978
|
+
* field but a lowercase response id): pass `idKey: 'id', cursorIdKey: 'ID'`.
|
|
1922
1979
|
* - `customKeyForResult: string` - A custom key indicating that the response REST API will be
|
|
1923
1980
|
* grouped by this field.
|
|
1924
1981
|
* Example: `items` to group a list of CRM items.
|
|
@@ -2012,7 +2069,7 @@ declare class BatchV3 extends AbstractBatch {
|
|
|
2012
2069
|
* const resultData = (response as Result<AjaxResult<{ item: TaskItem }>[]>).getData()
|
|
2013
2070
|
* resultData.forEach((resultRow, index) => {
|
|
2014
2071
|
* if (resultRow.isSuccess) {
|
|
2015
|
-
* console.log(`Item ${index + 1}:`, resultRow.getData()
|
|
2072
|
+
* console.log(`Item ${index + 1}:`, resultRow.getData()!.result.item)
|
|
2016
2073
|
* }
|
|
2017
2074
|
* })
|
|
2018
2075
|
*
|
|
@@ -2051,8 +2108,8 @@ declare class BatchV3 extends AbstractBatch {
|
|
|
2051
2108
|
* }
|
|
2052
2109
|
*
|
|
2053
2110
|
* const results = response.getData() as Record<string, AjaxResult<{ item: TaskItem } | { items: MainEventLogItem[] }>>
|
|
2054
|
-
* console.log('Task:', results.Task.getData()
|
|
2055
|
-
* console.log('MainEventLog:', results.MainEventLog.getData()
|
|
2111
|
+
* console.log('Task:', results.Task.getData()?.result.item as TaskItem)
|
|
2112
|
+
* console.log('MainEventLog:', results.MainEventLog.getData()?.result.items as MainEventLogItem[])
|
|
2056
2113
|
*
|
|
2057
2114
|
* @warning The maximum number of commands in one batch request is 50.
|
|
2058
2115
|
* @note A batch request executes faster than sequential single calls,
|
|
@@ -4053,7 +4110,9 @@ declare class RestrictionManager {
|
|
|
4053
4110
|
}
|
|
4054
4111
|
|
|
4055
4112
|
/**
|
|
4056
|
-
*
|
|
4113
|
+
* Decides which REST API version (v2 or v3) a method is routed through:
|
|
4114
|
+
* v3 only for methods on the published allowlist (`#supportMethods`); everything
|
|
4115
|
+
* else falls back to v2.
|
|
4057
4116
|
*/
|
|
4058
4117
|
declare class VersionManager {
|
|
4059
4118
|
#private;
|
|
@@ -4226,6 +4285,12 @@ declare abstract class AbstractHttp implements TypeHttp {
|
|
|
4226
4285
|
protected _authActions: AuthActions;
|
|
4227
4286
|
protected _requestIdGenerator: RequestIdGenerator;
|
|
4228
4287
|
protected _restrictionManager: RestrictionManager;
|
|
4288
|
+
/**
|
|
4289
|
+
* In-flight token refresh, shared so concurrent 401s coalesce into a single
|
|
4290
|
+
* `refreshAuth()` round-trip — avoids OAuth refresh-token reuse errors when a
|
|
4291
|
+
* burst of requests expires together. (#182)
|
|
4292
|
+
*/
|
|
4293
|
+
protected _pendingRefresh: Promise<AuthData> | null;
|
|
4229
4294
|
protected _logger: LoggerInterface;
|
|
4230
4295
|
protected _isClientSideWarning: boolean;
|
|
4231
4296
|
protected _clientSideWarningMessage: string;
|
|
@@ -4298,6 +4363,12 @@ declare abstract class AbstractHttp implements TypeHttp {
|
|
|
4298
4363
|
*/
|
|
4299
4364
|
protected _executeSingleCall<T = unknown>(requestId: string, method: string, params: TypeCallParams): Promise<AjaxResult<T>>;
|
|
4300
4365
|
protected _ensureAuth(requestId: string): Promise<AuthData>;
|
|
4366
|
+
/**
|
|
4367
|
+
* Refresh the auth token, coalescing concurrent callers onto a single
|
|
4368
|
+
* in-flight `refreshAuth()` so a burst of 401s triggers exactly one refresh
|
|
4369
|
+
* round-trip. The slot clears once the refresh settles. (#182)
|
|
4370
|
+
*/
|
|
4371
|
+
protected _refreshAuth(): Promise<AuthData>;
|
|
4301
4372
|
protected _makeRequestWithAuthRetry<T>(requestId: string, method: string, params: TypeCallParams, authData: AuthData): Promise<AjaxResponse<T>>;
|
|
4302
4373
|
protected _makeAxiosRequest<T>(requestId: string, method: string, params: TypeCallParams, authData: AuthData): Promise<AjaxResponse<T>>;
|
|
4303
4374
|
protected _isAuthError(error: unknown): boolean;
|
|
@@ -4785,7 +4856,11 @@ declare class ParentManager {
|
|
|
4785
4856
|
*/
|
|
4786
4857
|
reloadWindow(): Promise<void>;
|
|
4787
4858
|
/**
|
|
4788
|
-
*
|
|
4859
|
+
* Sets the in-layout page title (the `#pagetitle` element the portal renders around the app).
|
|
4860
|
+
*
|
|
4861
|
+
* Does NOT change the browser tab title (`document.title`): the portal applies this command to
|
|
4862
|
+
* `#pagetitle`, never to the tab. To set the browser tab title, open the view as a slider via
|
|
4863
|
+
* `SliderManager.openSliderAppPage` with a `bx24_title` option.
|
|
4789
4864
|
*
|
|
4790
4865
|
* @param {string} title
|
|
4791
4866
|
*
|
|
@@ -5060,6 +5135,10 @@ declare class SliderManager {
|
|
|
5060
5135
|
/**
|
|
5061
5136
|
* When the method is called, a pop-up window with the application frame will be opened.
|
|
5062
5137
|
*
|
|
5138
|
+
* Settings are passed via `bx24_`-prefixed keys (e.g. `bx24_title`, `bx24_width`).
|
|
5139
|
+
* `bx24_title` sets the slider title; the portal also reflects it to the browser tab title
|
|
5140
|
+
* (`document.title`) — unlike `ParentManager.setTitle`, which only updates the in-layout `#pagetitle`.
|
|
5141
|
+
*
|
|
5063
5142
|
* @link https://apidocs.bitrix24.com/sdk/bx24-js-sdk/additional-functions/bx24-open-application.html
|
|
5064
5143
|
*/
|
|
5065
5144
|
openSliderAppPage(params?: any): Promise<any>;
|
package/dist/esm/index.mjs
CHANGED