@bitrix24/b24jssdk 0.4.4 → 0.4.5
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/dist/esm/index.d.mts +47 -37
- package/dist/esm/index.d.ts +47 -37
- package/dist/esm/index.mjs +42 -40
- package/dist/esm/index.mjs.map +1 -1
- package/dist/umd/index.js +48 -42
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.min.js +14 -14
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +6 -6
package/dist/esm/index.d.mts
CHANGED
|
@@ -92,6 +92,16 @@ declare enum DataType {
|
|
|
92
92
|
crmCurrency = "crm_currency"
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
interface BlobLike {
|
|
96
|
+
readonly size: number;
|
|
97
|
+
readonly type: string;
|
|
98
|
+
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
99
|
+
}
|
|
100
|
+
interface FileLike extends BlobLike {
|
|
101
|
+
name: string;
|
|
102
|
+
lastModified?: number;
|
|
103
|
+
lastModifiedDate?: object;
|
|
104
|
+
}
|
|
95
105
|
/**
|
|
96
106
|
* The `Type` class is designed to check and determine data types
|
|
97
107
|
*
|
|
@@ -106,13 +116,13 @@ declare class TypeManager {
|
|
|
106
116
|
*
|
|
107
117
|
* @memo get from pull.client.Utils
|
|
108
118
|
*/
|
|
109
|
-
isString(value: any):
|
|
119
|
+
isString(value: any): value is string;
|
|
110
120
|
/**
|
|
111
121
|
* Returns true if a value is not an empty string
|
|
112
122
|
* @param value
|
|
113
123
|
* @returns {boolean}
|
|
114
124
|
*/
|
|
115
|
-
isStringFilled(value: any):
|
|
125
|
+
isStringFilled(value: any): value is string;
|
|
116
126
|
/**
|
|
117
127
|
* Checks that value is function
|
|
118
128
|
* @param value
|
|
@@ -120,25 +130,25 @@ declare class TypeManager {
|
|
|
120
130
|
*
|
|
121
131
|
* @memo get from pull.client.Utils
|
|
122
132
|
*/
|
|
123
|
-
isFunction(value: any):
|
|
133
|
+
isFunction(value: any): value is Function;
|
|
124
134
|
/**
|
|
125
135
|
* Checks that value is an object
|
|
126
136
|
* @param value
|
|
127
137
|
* @return {boolean}
|
|
128
138
|
*/
|
|
129
|
-
isObject(value: any):
|
|
139
|
+
isObject(value: any): value is object | Function;
|
|
130
140
|
/**
|
|
131
141
|
* Checks that value is object like
|
|
132
142
|
* @param value
|
|
133
143
|
* @return {boolean}
|
|
134
144
|
*/
|
|
135
|
-
isObjectLike(value: any):
|
|
145
|
+
isObjectLike<T>(value: any): value is T;
|
|
136
146
|
/**
|
|
137
147
|
* Checks that value is plain object
|
|
138
148
|
* @param value
|
|
139
149
|
* @return {boolean}
|
|
140
150
|
*/
|
|
141
|
-
isPlainObject(value: any):
|
|
151
|
+
isPlainObject(value: any): value is Record<string | number, any>;
|
|
142
152
|
isJsonRpcRequest(value: any): boolean;
|
|
143
153
|
isJsonRpcResponse(value: any): boolean;
|
|
144
154
|
/**
|
|
@@ -146,151 +156,151 @@ declare class TypeManager {
|
|
|
146
156
|
* @param value
|
|
147
157
|
* @return {boolean}
|
|
148
158
|
*/
|
|
149
|
-
isBoolean(value: any): boolean;
|
|
159
|
+
isBoolean(value: any): value is boolean;
|
|
150
160
|
/**
|
|
151
161
|
* Checks that value is number
|
|
152
162
|
* @param value
|
|
153
163
|
* @return {boolean}
|
|
154
164
|
*/
|
|
155
|
-
isNumber(value: any):
|
|
165
|
+
isNumber(value: any): value is number;
|
|
156
166
|
/**
|
|
157
167
|
* Checks that value is integer
|
|
158
168
|
* @param value
|
|
159
169
|
* @return {boolean}
|
|
160
170
|
*/
|
|
161
|
-
isInteger(value: any):
|
|
171
|
+
isInteger(value: any): value is number;
|
|
162
172
|
/**
|
|
163
173
|
* Checks that value is float
|
|
164
174
|
* @param value
|
|
165
175
|
* @return {boolean}
|
|
166
176
|
*/
|
|
167
|
-
isFloat(value: any):
|
|
177
|
+
isFloat(value: any): value is number;
|
|
168
178
|
/**
|
|
169
179
|
* Checks that value is nil
|
|
170
180
|
* @param value
|
|
171
181
|
* @return {boolean}
|
|
172
182
|
*/
|
|
173
|
-
isNil(value: any):
|
|
183
|
+
isNil(value: any): value is null | undefined;
|
|
174
184
|
/**
|
|
175
185
|
* Checks that value is an array
|
|
176
186
|
* @param value
|
|
177
187
|
* @return {boolean}
|
|
178
188
|
*/
|
|
179
|
-
isArray(value: any):
|
|
189
|
+
isArray(value: any): value is any[];
|
|
180
190
|
/**
|
|
181
191
|
* Returns true if a value is an array, and it has at least one element
|
|
182
192
|
* @param value
|
|
183
193
|
* @returns {boolean}
|
|
184
194
|
*/
|
|
185
|
-
isArrayFilled(value: any):
|
|
195
|
+
isArrayFilled(value: any): value is any[];
|
|
186
196
|
/**
|
|
187
197
|
* Checks that value is array like
|
|
188
198
|
* @param value
|
|
189
199
|
* @return {boolean}
|
|
190
200
|
*/
|
|
191
|
-
isArrayLike(value: any):
|
|
201
|
+
isArrayLike(value: any): value is ArrayLike<any>;
|
|
192
202
|
/**
|
|
193
203
|
* Checks that value is Date
|
|
194
204
|
* @param value
|
|
195
205
|
* @return {boolean}
|
|
196
206
|
*/
|
|
197
|
-
isDate(value: any):
|
|
207
|
+
isDate(value: any): value is Date;
|
|
198
208
|
/**
|
|
199
209
|
* Checks that is a DOM node
|
|
200
210
|
* @param value
|
|
201
211
|
* @return {boolean}
|
|
202
212
|
*/
|
|
203
|
-
isDomNode(value: any):
|
|
213
|
+
isDomNode(value: any): value is Node;
|
|
204
214
|
/**
|
|
205
215
|
* Checks that value is element node
|
|
206
216
|
* @param value
|
|
207
217
|
* @return {boolean}
|
|
208
218
|
*/
|
|
209
|
-
isElementNode(value: any):
|
|
219
|
+
isElementNode(value: any): value is HTMLElement;
|
|
210
220
|
/**
|
|
211
221
|
* Checks that value is a text node
|
|
212
222
|
* @param value
|
|
213
223
|
* @return {boolean}
|
|
214
224
|
*/
|
|
215
|
-
isTextNode(value: any):
|
|
225
|
+
isTextNode(value: any): value is Text;
|
|
216
226
|
/**
|
|
217
227
|
* Checks that value is Map
|
|
218
228
|
* @param value
|
|
219
229
|
* @return {boolean}
|
|
220
230
|
*/
|
|
221
|
-
isMap(value: any):
|
|
231
|
+
isMap(value: any): value is Map<unknown, unknown>;
|
|
222
232
|
/**
|
|
223
233
|
* Checks that value is Set
|
|
224
234
|
* @param value
|
|
225
235
|
* @return {boolean}
|
|
226
236
|
*/
|
|
227
|
-
isSet(value: any):
|
|
237
|
+
isSet(value: any): value is Set<unknown>;
|
|
228
238
|
/**
|
|
229
239
|
* Checks that value is WeakMap
|
|
230
240
|
* @param value
|
|
231
241
|
* @return {boolean}
|
|
232
242
|
*/
|
|
233
|
-
isWeakMap(value: any):
|
|
243
|
+
isWeakMap(value: any): value is WeakMap<object, unknown>;
|
|
234
244
|
/**
|
|
235
245
|
* Checks that value is WeakSet
|
|
236
246
|
* @param value
|
|
237
247
|
* @return {boolean}
|
|
238
248
|
*/
|
|
239
|
-
isWeakSet(value: any):
|
|
249
|
+
isWeakSet(value: any): value is WeakSet<object>;
|
|
240
250
|
/**
|
|
241
251
|
* Checks that value is prototype
|
|
242
252
|
* @param value
|
|
243
253
|
* @return {boolean}
|
|
244
254
|
*/
|
|
245
|
-
isPrototype(value: any):
|
|
255
|
+
isPrototype(value: any): value is object;
|
|
246
256
|
/**
|
|
247
257
|
* Checks that value is regexp
|
|
248
258
|
* @param value
|
|
249
259
|
* @return {boolean}
|
|
250
260
|
*/
|
|
251
|
-
isRegExp(value: any):
|
|
261
|
+
isRegExp(value: any): value is RegExp;
|
|
252
262
|
/**
|
|
253
263
|
* Checks that value is null
|
|
254
264
|
* @param value
|
|
255
265
|
* @return {boolean}
|
|
256
266
|
*/
|
|
257
|
-
isNull(value: any):
|
|
267
|
+
isNull(value: any): value is null;
|
|
258
268
|
/**
|
|
259
269
|
* Checks that value is undefined
|
|
260
270
|
* @param value
|
|
261
271
|
* @return {boolean}
|
|
262
272
|
*/
|
|
263
|
-
isUndefined(value: any):
|
|
273
|
+
isUndefined(value: any): value is undefined;
|
|
264
274
|
/**
|
|
265
275
|
* Checks that value is ArrayBuffer
|
|
266
276
|
* @param value
|
|
267
277
|
* @return {boolean}
|
|
268
278
|
*/
|
|
269
|
-
isArrayBuffer(value: any):
|
|
279
|
+
isArrayBuffer(value: any): value is ArrayBuffer;
|
|
270
280
|
/**
|
|
271
281
|
* Checks that value is typed array
|
|
272
282
|
* @param value
|
|
273
283
|
* @return {boolean}
|
|
274
284
|
*/
|
|
275
|
-
isTypedArray(value: any):
|
|
285
|
+
isTypedArray(value: any): value is Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
|
|
276
286
|
/**
|
|
277
287
|
* Checks that value is Blob
|
|
278
288
|
* @param value
|
|
279
289
|
* @return {boolean}
|
|
280
290
|
*/
|
|
281
|
-
isBlob(value: any):
|
|
291
|
+
isBlob(value: any): value is BlobLike;
|
|
282
292
|
/**
|
|
283
293
|
* Checks that value is File
|
|
284
294
|
* @param value
|
|
285
295
|
* @return {boolean}
|
|
286
296
|
*/
|
|
287
|
-
isFile(value: any):
|
|
297
|
+
isFile(value: any): value is FileLike;
|
|
288
298
|
/**
|
|
289
299
|
* Checks that value is FormData
|
|
290
300
|
* @param value
|
|
291
301
|
* @return {boolean}
|
|
292
302
|
*/
|
|
293
|
-
isFormData(value: any):
|
|
303
|
+
isFormData(value: any): value is FormData;
|
|
294
304
|
clone(obj: any, bCopyObj?: boolean): any;
|
|
295
305
|
}
|
|
296
306
|
declare const Type: TypeManager;
|
|
@@ -367,7 +377,7 @@ declare class TextManager {
|
|
|
367
377
|
getDateForLog(): string;
|
|
368
378
|
buildQueryString(params: any): string;
|
|
369
379
|
}
|
|
370
|
-
declare const Text: TextManager;
|
|
380
|
+
declare const Text$1: TextManager;
|
|
371
381
|
|
|
372
382
|
/**
|
|
373
383
|
* @see bitrix/js/main/core/src/lib/browser.js
|
|
@@ -592,7 +602,7 @@ declare class AjaxResult<T = unknown> extends Result<Payload<T>> implements IRes
|
|
|
592
602
|
type TypeHttp = {
|
|
593
603
|
setLogger(logger: LoggerBrowser): void;
|
|
594
604
|
getLogger(): LoggerBrowser;
|
|
595
|
-
batch(calls: any[] | object, isHaltOnError: boolean): Promise<Result>;
|
|
605
|
+
batch(calls: any[] | object, isHaltOnError: boolean, returnAjaxResult: boolean): Promise<Result>;
|
|
596
606
|
call(method: string, params: object, start: number): Promise<AjaxResult>;
|
|
597
607
|
setRestrictionManagerParams(params: TypeRestrictionManagerParams): void;
|
|
598
608
|
getRestrictionManagerParams(): TypeRestrictionManagerParams;
|
|
@@ -966,12 +976,13 @@ type TypeB24 = {
|
|
|
966
976
|
* calls = [{method:method,params:params},[method,params]]
|
|
967
977
|
* calls = {call_id:[method,params],...}
|
|
968
978
|
* @param {boolean} isHaltOnError Abort package execution when an error occurs
|
|
979
|
+
* @param {boolean} returnAjaxResult Return `Record<string | number, AjaxResult> | AjaxResult[]` in response
|
|
969
980
|
*
|
|
970
981
|
* @return {Promise} Promise
|
|
971
982
|
*
|
|
972
983
|
* @see https://apidocs.bitrix24.com/api-reference/bx24-js-sdk/how-to-call-rest-methods/bx24-call-batch.html
|
|
973
984
|
*/
|
|
974
|
-
callBatch(calls: Array<any> | object, isHaltOnError?: boolean): Promise<Result>;
|
|
985
|
+
callBatch(calls: Array<any> | object, isHaltOnError?: boolean, returnAjaxResult?: boolean): Promise<Result>;
|
|
975
986
|
/**
|
|
976
987
|
* Calls a batch request with any number of commands
|
|
977
988
|
*
|
|
@@ -2024,7 +2035,7 @@ declare abstract class AbstractB24 implements TypeB24 {
|
|
|
2024
2035
|
/**
|
|
2025
2036
|
* @inheritDoc
|
|
2026
2037
|
*/
|
|
2027
|
-
callBatch(calls: Array<any> | object, isHaltOnError?: boolean): Promise<Result>;
|
|
2038
|
+
callBatch(calls: Array<any> | object, isHaltOnError?: boolean, returnAjaxResult?: boolean): Promise<Result>;
|
|
2028
2039
|
chunkArray<T>(array: T[], chunkSize?: number): T[][];
|
|
2029
2040
|
/**
|
|
2030
2041
|
* @inheritDoc
|
|
@@ -2187,7 +2198,6 @@ declare class FormatterIban {
|
|
|
2187
2198
|
* @param bban the BBAN to check the validity of
|
|
2188
2199
|
*/
|
|
2189
2200
|
isValidBBAN(countryCode: string, bban: string): boolean;
|
|
2190
|
-
private _isString;
|
|
2191
2201
|
}
|
|
2192
2202
|
|
|
2193
2203
|
declare const useFormatter: () => {
|
|
@@ -3536,4 +3546,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
3536
3546
|
|
|
3537
3547
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
3538
3548
|
|
|
3539
|
-
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, 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 };
|
|
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 };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -92,6 +92,16 @@ declare enum DataType {
|
|
|
92
92
|
crmCurrency = "crm_currency"
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
interface BlobLike {
|
|
96
|
+
readonly size: number;
|
|
97
|
+
readonly type: string;
|
|
98
|
+
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
99
|
+
}
|
|
100
|
+
interface FileLike extends BlobLike {
|
|
101
|
+
name: string;
|
|
102
|
+
lastModified?: number;
|
|
103
|
+
lastModifiedDate?: object;
|
|
104
|
+
}
|
|
95
105
|
/**
|
|
96
106
|
* The `Type` class is designed to check and determine data types
|
|
97
107
|
*
|
|
@@ -106,13 +116,13 @@ declare class TypeManager {
|
|
|
106
116
|
*
|
|
107
117
|
* @memo get from pull.client.Utils
|
|
108
118
|
*/
|
|
109
|
-
isString(value: any):
|
|
119
|
+
isString(value: any): value is string;
|
|
110
120
|
/**
|
|
111
121
|
* Returns true if a value is not an empty string
|
|
112
122
|
* @param value
|
|
113
123
|
* @returns {boolean}
|
|
114
124
|
*/
|
|
115
|
-
isStringFilled(value: any):
|
|
125
|
+
isStringFilled(value: any): value is string;
|
|
116
126
|
/**
|
|
117
127
|
* Checks that value is function
|
|
118
128
|
* @param value
|
|
@@ -120,25 +130,25 @@ declare class TypeManager {
|
|
|
120
130
|
*
|
|
121
131
|
* @memo get from pull.client.Utils
|
|
122
132
|
*/
|
|
123
|
-
isFunction(value: any):
|
|
133
|
+
isFunction(value: any): value is Function;
|
|
124
134
|
/**
|
|
125
135
|
* Checks that value is an object
|
|
126
136
|
* @param value
|
|
127
137
|
* @return {boolean}
|
|
128
138
|
*/
|
|
129
|
-
isObject(value: any):
|
|
139
|
+
isObject(value: any): value is object | Function;
|
|
130
140
|
/**
|
|
131
141
|
* Checks that value is object like
|
|
132
142
|
* @param value
|
|
133
143
|
* @return {boolean}
|
|
134
144
|
*/
|
|
135
|
-
isObjectLike(value: any):
|
|
145
|
+
isObjectLike<T>(value: any): value is T;
|
|
136
146
|
/**
|
|
137
147
|
* Checks that value is plain object
|
|
138
148
|
* @param value
|
|
139
149
|
* @return {boolean}
|
|
140
150
|
*/
|
|
141
|
-
isPlainObject(value: any):
|
|
151
|
+
isPlainObject(value: any): value is Record<string | number, any>;
|
|
142
152
|
isJsonRpcRequest(value: any): boolean;
|
|
143
153
|
isJsonRpcResponse(value: any): boolean;
|
|
144
154
|
/**
|
|
@@ -146,151 +156,151 @@ declare class TypeManager {
|
|
|
146
156
|
* @param value
|
|
147
157
|
* @return {boolean}
|
|
148
158
|
*/
|
|
149
|
-
isBoolean(value: any): boolean;
|
|
159
|
+
isBoolean(value: any): value is boolean;
|
|
150
160
|
/**
|
|
151
161
|
* Checks that value is number
|
|
152
162
|
* @param value
|
|
153
163
|
* @return {boolean}
|
|
154
164
|
*/
|
|
155
|
-
isNumber(value: any):
|
|
165
|
+
isNumber(value: any): value is number;
|
|
156
166
|
/**
|
|
157
167
|
* Checks that value is integer
|
|
158
168
|
* @param value
|
|
159
169
|
* @return {boolean}
|
|
160
170
|
*/
|
|
161
|
-
isInteger(value: any):
|
|
171
|
+
isInteger(value: any): value is number;
|
|
162
172
|
/**
|
|
163
173
|
* Checks that value is float
|
|
164
174
|
* @param value
|
|
165
175
|
* @return {boolean}
|
|
166
176
|
*/
|
|
167
|
-
isFloat(value: any):
|
|
177
|
+
isFloat(value: any): value is number;
|
|
168
178
|
/**
|
|
169
179
|
* Checks that value is nil
|
|
170
180
|
* @param value
|
|
171
181
|
* @return {boolean}
|
|
172
182
|
*/
|
|
173
|
-
isNil(value: any):
|
|
183
|
+
isNil(value: any): value is null | undefined;
|
|
174
184
|
/**
|
|
175
185
|
* Checks that value is an array
|
|
176
186
|
* @param value
|
|
177
187
|
* @return {boolean}
|
|
178
188
|
*/
|
|
179
|
-
isArray(value: any):
|
|
189
|
+
isArray(value: any): value is any[];
|
|
180
190
|
/**
|
|
181
191
|
* Returns true if a value is an array, and it has at least one element
|
|
182
192
|
* @param value
|
|
183
193
|
* @returns {boolean}
|
|
184
194
|
*/
|
|
185
|
-
isArrayFilled(value: any):
|
|
195
|
+
isArrayFilled(value: any): value is any[];
|
|
186
196
|
/**
|
|
187
197
|
* Checks that value is array like
|
|
188
198
|
* @param value
|
|
189
199
|
* @return {boolean}
|
|
190
200
|
*/
|
|
191
|
-
isArrayLike(value: any):
|
|
201
|
+
isArrayLike(value: any): value is ArrayLike<any>;
|
|
192
202
|
/**
|
|
193
203
|
* Checks that value is Date
|
|
194
204
|
* @param value
|
|
195
205
|
* @return {boolean}
|
|
196
206
|
*/
|
|
197
|
-
isDate(value: any):
|
|
207
|
+
isDate(value: any): value is Date;
|
|
198
208
|
/**
|
|
199
209
|
* Checks that is a DOM node
|
|
200
210
|
* @param value
|
|
201
211
|
* @return {boolean}
|
|
202
212
|
*/
|
|
203
|
-
isDomNode(value: any):
|
|
213
|
+
isDomNode(value: any): value is Node;
|
|
204
214
|
/**
|
|
205
215
|
* Checks that value is element node
|
|
206
216
|
* @param value
|
|
207
217
|
* @return {boolean}
|
|
208
218
|
*/
|
|
209
|
-
isElementNode(value: any):
|
|
219
|
+
isElementNode(value: any): value is HTMLElement;
|
|
210
220
|
/**
|
|
211
221
|
* Checks that value is a text node
|
|
212
222
|
* @param value
|
|
213
223
|
* @return {boolean}
|
|
214
224
|
*/
|
|
215
|
-
isTextNode(value: any):
|
|
225
|
+
isTextNode(value: any): value is Text;
|
|
216
226
|
/**
|
|
217
227
|
* Checks that value is Map
|
|
218
228
|
* @param value
|
|
219
229
|
* @return {boolean}
|
|
220
230
|
*/
|
|
221
|
-
isMap(value: any):
|
|
231
|
+
isMap(value: any): value is Map<unknown, unknown>;
|
|
222
232
|
/**
|
|
223
233
|
* Checks that value is Set
|
|
224
234
|
* @param value
|
|
225
235
|
* @return {boolean}
|
|
226
236
|
*/
|
|
227
|
-
isSet(value: any):
|
|
237
|
+
isSet(value: any): value is Set<unknown>;
|
|
228
238
|
/**
|
|
229
239
|
* Checks that value is WeakMap
|
|
230
240
|
* @param value
|
|
231
241
|
* @return {boolean}
|
|
232
242
|
*/
|
|
233
|
-
isWeakMap(value: any):
|
|
243
|
+
isWeakMap(value: any): value is WeakMap<object, unknown>;
|
|
234
244
|
/**
|
|
235
245
|
* Checks that value is WeakSet
|
|
236
246
|
* @param value
|
|
237
247
|
* @return {boolean}
|
|
238
248
|
*/
|
|
239
|
-
isWeakSet(value: any):
|
|
249
|
+
isWeakSet(value: any): value is WeakSet<object>;
|
|
240
250
|
/**
|
|
241
251
|
* Checks that value is prototype
|
|
242
252
|
* @param value
|
|
243
253
|
* @return {boolean}
|
|
244
254
|
*/
|
|
245
|
-
isPrototype(value: any):
|
|
255
|
+
isPrototype(value: any): value is object;
|
|
246
256
|
/**
|
|
247
257
|
* Checks that value is regexp
|
|
248
258
|
* @param value
|
|
249
259
|
* @return {boolean}
|
|
250
260
|
*/
|
|
251
|
-
isRegExp(value: any):
|
|
261
|
+
isRegExp(value: any): value is RegExp;
|
|
252
262
|
/**
|
|
253
263
|
* Checks that value is null
|
|
254
264
|
* @param value
|
|
255
265
|
* @return {boolean}
|
|
256
266
|
*/
|
|
257
|
-
isNull(value: any):
|
|
267
|
+
isNull(value: any): value is null;
|
|
258
268
|
/**
|
|
259
269
|
* Checks that value is undefined
|
|
260
270
|
* @param value
|
|
261
271
|
* @return {boolean}
|
|
262
272
|
*/
|
|
263
|
-
isUndefined(value: any):
|
|
273
|
+
isUndefined(value: any): value is undefined;
|
|
264
274
|
/**
|
|
265
275
|
* Checks that value is ArrayBuffer
|
|
266
276
|
* @param value
|
|
267
277
|
* @return {boolean}
|
|
268
278
|
*/
|
|
269
|
-
isArrayBuffer(value: any):
|
|
279
|
+
isArrayBuffer(value: any): value is ArrayBuffer;
|
|
270
280
|
/**
|
|
271
281
|
* Checks that value is typed array
|
|
272
282
|
* @param value
|
|
273
283
|
* @return {boolean}
|
|
274
284
|
*/
|
|
275
|
-
isTypedArray(value: any):
|
|
285
|
+
isTypedArray(value: any): value is Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
|
|
276
286
|
/**
|
|
277
287
|
* Checks that value is Blob
|
|
278
288
|
* @param value
|
|
279
289
|
* @return {boolean}
|
|
280
290
|
*/
|
|
281
|
-
isBlob(value: any):
|
|
291
|
+
isBlob(value: any): value is BlobLike;
|
|
282
292
|
/**
|
|
283
293
|
* Checks that value is File
|
|
284
294
|
* @param value
|
|
285
295
|
* @return {boolean}
|
|
286
296
|
*/
|
|
287
|
-
isFile(value: any):
|
|
297
|
+
isFile(value: any): value is FileLike;
|
|
288
298
|
/**
|
|
289
299
|
* Checks that value is FormData
|
|
290
300
|
* @param value
|
|
291
301
|
* @return {boolean}
|
|
292
302
|
*/
|
|
293
|
-
isFormData(value: any):
|
|
303
|
+
isFormData(value: any): value is FormData;
|
|
294
304
|
clone(obj: any, bCopyObj?: boolean): any;
|
|
295
305
|
}
|
|
296
306
|
declare const Type: TypeManager;
|
|
@@ -367,7 +377,7 @@ declare class TextManager {
|
|
|
367
377
|
getDateForLog(): string;
|
|
368
378
|
buildQueryString(params: any): string;
|
|
369
379
|
}
|
|
370
|
-
declare const Text: TextManager;
|
|
380
|
+
declare const Text$1: TextManager;
|
|
371
381
|
|
|
372
382
|
/**
|
|
373
383
|
* @see bitrix/js/main/core/src/lib/browser.js
|
|
@@ -592,7 +602,7 @@ declare class AjaxResult<T = unknown> extends Result<Payload<T>> implements IRes
|
|
|
592
602
|
type TypeHttp = {
|
|
593
603
|
setLogger(logger: LoggerBrowser): void;
|
|
594
604
|
getLogger(): LoggerBrowser;
|
|
595
|
-
batch(calls: any[] | object, isHaltOnError: boolean): Promise<Result>;
|
|
605
|
+
batch(calls: any[] | object, isHaltOnError: boolean, returnAjaxResult: boolean): Promise<Result>;
|
|
596
606
|
call(method: string, params: object, start: number): Promise<AjaxResult>;
|
|
597
607
|
setRestrictionManagerParams(params: TypeRestrictionManagerParams): void;
|
|
598
608
|
getRestrictionManagerParams(): TypeRestrictionManagerParams;
|
|
@@ -966,12 +976,13 @@ type TypeB24 = {
|
|
|
966
976
|
* calls = [{method:method,params:params},[method,params]]
|
|
967
977
|
* calls = {call_id:[method,params],...}
|
|
968
978
|
* @param {boolean} isHaltOnError Abort package execution when an error occurs
|
|
979
|
+
* @param {boolean} returnAjaxResult Return `Record<string | number, AjaxResult> | AjaxResult[]` in response
|
|
969
980
|
*
|
|
970
981
|
* @return {Promise} Promise
|
|
971
982
|
*
|
|
972
983
|
* @see https://apidocs.bitrix24.com/api-reference/bx24-js-sdk/how-to-call-rest-methods/bx24-call-batch.html
|
|
973
984
|
*/
|
|
974
|
-
callBatch(calls: Array<any> | object, isHaltOnError?: boolean): Promise<Result>;
|
|
985
|
+
callBatch(calls: Array<any> | object, isHaltOnError?: boolean, returnAjaxResult?: boolean): Promise<Result>;
|
|
975
986
|
/**
|
|
976
987
|
* Calls a batch request with any number of commands
|
|
977
988
|
*
|
|
@@ -2024,7 +2035,7 @@ declare abstract class AbstractB24 implements TypeB24 {
|
|
|
2024
2035
|
/**
|
|
2025
2036
|
* @inheritDoc
|
|
2026
2037
|
*/
|
|
2027
|
-
callBatch(calls: Array<any> | object, isHaltOnError?: boolean): Promise<Result>;
|
|
2038
|
+
callBatch(calls: Array<any> | object, isHaltOnError?: boolean, returnAjaxResult?: boolean): Promise<Result>;
|
|
2028
2039
|
chunkArray<T>(array: T[], chunkSize?: number): T[][];
|
|
2029
2040
|
/**
|
|
2030
2041
|
* @inheritDoc
|
|
@@ -2187,7 +2198,6 @@ declare class FormatterIban {
|
|
|
2187
2198
|
* @param bban the BBAN to check the validity of
|
|
2188
2199
|
*/
|
|
2189
2200
|
isValidBBAN(countryCode: string, bban: string): boolean;
|
|
2190
|
-
private _isString;
|
|
2191
2201
|
}
|
|
2192
2202
|
|
|
2193
2203
|
declare const useFormatter: () => {
|
|
@@ -3536,4 +3546,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
3536
3546
|
|
|
3537
3547
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
3538
3548
|
|
|
3539
|
-
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, 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 };
|
|
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 };
|