@bitrix24/b24jssdk 0.4.2 → 0.4.4
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 +392 -171
- package/dist/esm/index.d.ts +392 -171
- package/dist/esm/index.mjs +359 -37
- package/dist/esm/index.mjs.map +1 -1
- package/dist/umd/index.js +366 -34
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.min.js +20 -20
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.d.mts
CHANGED
|
@@ -295,9 +295,25 @@ declare class TypeManager {
|
|
|
295
295
|
}
|
|
296
296
|
declare const Type: TypeManager;
|
|
297
297
|
|
|
298
|
+
/**
|
|
299
|
+
* @todo add docs
|
|
300
|
+
*/
|
|
298
301
|
declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
|
|
302
|
+
/**
|
|
303
|
+
* @todo add docs
|
|
304
|
+
*/
|
|
299
305
|
declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
|
|
306
|
+
/**
|
|
307
|
+
* @todo add docs
|
|
308
|
+
*/
|
|
300
309
|
declare function isArrayOfArray<A>(item: A[] | A[][]): item is A[][];
|
|
310
|
+
/**
|
|
311
|
+
* @todo add docs
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* const result = getEnumValue(EnumBizprocDocumentType, 'CCrmDocumentSmartOrder')
|
|
315
|
+
*/
|
|
316
|
+
declare function getEnumValue<T extends Record<string, string | number>>(enumObj: T, value: string | number): T[keyof T] | undefined;
|
|
301
317
|
|
|
302
318
|
/**
|
|
303
319
|
* The `Text` class provides a set of utility methods for working with text data.
|
|
@@ -606,6 +622,152 @@ declare const RestrictionManagerParamsBase: TypeRestrictionManagerParams;
|
|
|
606
622
|
*/
|
|
607
623
|
declare const RestrictionManagerParamsForEnterprise: TypeRestrictionManagerParams;
|
|
608
624
|
|
|
625
|
+
declare enum LoadDataType {
|
|
626
|
+
App = "app",
|
|
627
|
+
Profile = "profile",
|
|
628
|
+
Currency = "currency",
|
|
629
|
+
AppOptions = "appOptions",
|
|
630
|
+
UserOptions = "userOptions"
|
|
631
|
+
}
|
|
632
|
+
type TypeUser = {
|
|
633
|
+
readonly isAdmin: boolean;
|
|
634
|
+
readonly id: null | number;
|
|
635
|
+
readonly lastName: null | string;
|
|
636
|
+
readonly name: null | string;
|
|
637
|
+
readonly gender: GenderString;
|
|
638
|
+
readonly photo: null | string;
|
|
639
|
+
readonly TimeZone: null | string;
|
|
640
|
+
readonly TimeZoneOffset: null | number;
|
|
641
|
+
};
|
|
642
|
+
declare const EnumAppStatus: {
|
|
643
|
+
readonly Free: "F";
|
|
644
|
+
readonly Demo: "D";
|
|
645
|
+
readonly Trial: "T";
|
|
646
|
+
readonly Paid: "P";
|
|
647
|
+
readonly Local: "L";
|
|
648
|
+
readonly Subscription: "S";
|
|
649
|
+
};
|
|
650
|
+
declare const StatusDescriptions: Record<(typeof EnumAppStatus)[keyof typeof EnumAppStatus], string>;
|
|
651
|
+
type TypeEnumAppStatus = keyof typeof EnumAppStatus;
|
|
652
|
+
/**
|
|
653
|
+
* @link https://dev.1c-bitrix.ru/rest_help/general/app_info.php
|
|
654
|
+
*/
|
|
655
|
+
type TypeApp = {
|
|
656
|
+
/**
|
|
657
|
+
* Local application identifier on the portal
|
|
658
|
+
*/
|
|
659
|
+
readonly id: number;
|
|
660
|
+
/**
|
|
661
|
+
* application code
|
|
662
|
+
*/
|
|
663
|
+
readonly code: string;
|
|
664
|
+
/**
|
|
665
|
+
* installed version of the application
|
|
666
|
+
*/
|
|
667
|
+
readonly version: number;
|
|
668
|
+
/**
|
|
669
|
+
* application status
|
|
670
|
+
*/
|
|
671
|
+
readonly status: TypeEnumAppStatus;
|
|
672
|
+
/**
|
|
673
|
+
* application installed flag
|
|
674
|
+
*/
|
|
675
|
+
readonly isInstalled: boolean;
|
|
676
|
+
};
|
|
677
|
+
/**
|
|
678
|
+
* @link https://dev.1c-bitrix.ru/rest_help/general/app_info.php
|
|
679
|
+
*/
|
|
680
|
+
type TypePayment = {
|
|
681
|
+
/**
|
|
682
|
+
* flag indicating whether the paid period or trial period has expired
|
|
683
|
+
*/
|
|
684
|
+
readonly isExpired: boolean;
|
|
685
|
+
/**
|
|
686
|
+
* number of days remaining until the end of the paid period or trial period
|
|
687
|
+
*/
|
|
688
|
+
readonly days: number;
|
|
689
|
+
};
|
|
690
|
+
/**
|
|
691
|
+
* @link https://dev.1c-bitrix.ru/rest_help/general/app_info.php
|
|
692
|
+
*/
|
|
693
|
+
type TypeLicense = {
|
|
694
|
+
/**
|
|
695
|
+
* language code designation
|
|
696
|
+
*/
|
|
697
|
+
readonly languageId: null | string;
|
|
698
|
+
/**
|
|
699
|
+
* tariff designation with indication of the region as a prefix
|
|
700
|
+
*/
|
|
701
|
+
readonly license: null | string;
|
|
702
|
+
/**
|
|
703
|
+
* internal tariff designation without indication of region
|
|
704
|
+
*/
|
|
705
|
+
readonly licenseType: null | string;
|
|
706
|
+
/**
|
|
707
|
+
* past meaning of license
|
|
708
|
+
*/
|
|
709
|
+
readonly licensePrevious: null | string;
|
|
710
|
+
/**
|
|
711
|
+
* Tariff designation without specifying the region.
|
|
712
|
+
*/
|
|
713
|
+
readonly licenseFamily: null | string;
|
|
714
|
+
/**
|
|
715
|
+
* flag indicating whether it is a box (true) or a cloud (false)
|
|
716
|
+
*/
|
|
717
|
+
readonly isSelfHosted: boolean;
|
|
718
|
+
};
|
|
719
|
+
declare const TypeSpecificUrl: {
|
|
720
|
+
readonly MainSettings: "MainSettings";
|
|
721
|
+
readonly UfList: "UfList";
|
|
722
|
+
readonly UfPage: "UfPage";
|
|
723
|
+
};
|
|
724
|
+
type TypeB24Form = {
|
|
725
|
+
readonly app_code: string;
|
|
726
|
+
readonly app_status: string;
|
|
727
|
+
readonly payment_expired: BoolString;
|
|
728
|
+
readonly days: number;
|
|
729
|
+
/**
|
|
730
|
+
* B24 tariff plan identifier (if cloud)
|
|
731
|
+
*/
|
|
732
|
+
readonly b24_plan: string;
|
|
733
|
+
readonly c_name: string;
|
|
734
|
+
readonly c_last_name: string;
|
|
735
|
+
readonly hostname: string;
|
|
736
|
+
};
|
|
737
|
+
type CurrencyFormat = {
|
|
738
|
+
decimals: number;
|
|
739
|
+
decPoint: string;
|
|
740
|
+
formatString: string;
|
|
741
|
+
fullName: string;
|
|
742
|
+
isHideZero: boolean;
|
|
743
|
+
thousandsSep?: string;
|
|
744
|
+
thousandsVariant?: 'N' | 'D' | 'C' | 'S' | 'B' | 'OWN' | string;
|
|
745
|
+
};
|
|
746
|
+
type Currency = {
|
|
747
|
+
amount: number;
|
|
748
|
+
amountCnt: number;
|
|
749
|
+
isBase: boolean;
|
|
750
|
+
currencyCode: string;
|
|
751
|
+
dateUpdate: DateTime;
|
|
752
|
+
decimals: number;
|
|
753
|
+
decPoint: string;
|
|
754
|
+
formatString: string;
|
|
755
|
+
fullName: string;
|
|
756
|
+
lid: string;
|
|
757
|
+
sort: number;
|
|
758
|
+
thousandsSep?: string;
|
|
759
|
+
lang: Record<string, CurrencyFormat>;
|
|
760
|
+
};
|
|
761
|
+
declare enum TypeOption {
|
|
762
|
+
NotSet = "notSet",
|
|
763
|
+
JsonArray = "jsonArray",
|
|
764
|
+
JsonObject = "jsonObject",
|
|
765
|
+
FloatVal = "float",
|
|
766
|
+
IntegerVal = "integer",
|
|
767
|
+
BoolYN = "boolYN",
|
|
768
|
+
StringVal = "string"
|
|
769
|
+
}
|
|
770
|
+
|
|
609
771
|
type TypeDescriptionError = {
|
|
610
772
|
readonly error: 'invalid_token' | 'expired_token' | string;
|
|
611
773
|
readonly error_description: string;
|
|
@@ -689,8 +851,16 @@ interface B24OAuthParams {
|
|
|
689
851
|
/**
|
|
690
852
|
* @example 'L'
|
|
691
853
|
*/
|
|
692
|
-
status:
|
|
854
|
+
status: typeof EnumAppStatus[keyof typeof EnumAppStatus];
|
|
855
|
+
issuer?: 'request' | 'store' | string;
|
|
693
856
|
}
|
|
857
|
+
/**
|
|
858
|
+
* Callback called when OAuth authorization is updated
|
|
859
|
+
*/
|
|
860
|
+
type CallbackRefreshAuth = (params: {
|
|
861
|
+
authData: AuthData;
|
|
862
|
+
b24OAuthParams: B24OAuthParams;
|
|
863
|
+
}) => Promise<void>;
|
|
694
864
|
/**
|
|
695
865
|
* Parameters passed from the parent window when calling refreshAuth
|
|
696
866
|
*/
|
|
@@ -888,6 +1058,26 @@ type StatusClose = {
|
|
|
888
1058
|
isClose: boolean;
|
|
889
1059
|
};
|
|
890
1060
|
|
|
1061
|
+
/**
|
|
1062
|
+
* Special cases of data passed to handlers
|
|
1063
|
+
* @todo add docs
|
|
1064
|
+
*/
|
|
1065
|
+
interface HandlerAuthParams {
|
|
1066
|
+
access_token: string;
|
|
1067
|
+
expires: string;
|
|
1068
|
+
expires_in: string;
|
|
1069
|
+
scope: string;
|
|
1070
|
+
domain: string;
|
|
1071
|
+
server_endpoint: string;
|
|
1072
|
+
status: string;
|
|
1073
|
+
client_endpoint: string;
|
|
1074
|
+
member_id: string;
|
|
1075
|
+
user_id: string;
|
|
1076
|
+
refresh_token: string;
|
|
1077
|
+
application_token: string;
|
|
1078
|
+
}
|
|
1079
|
+
type PayloadOAuthToken = Pick<HandlerAuthParams, 'access_token' | 'refresh_token' | 'expires' | 'expires_in' | 'client_endpoint' | 'server_endpoint' | 'member_id' | 'status' | 'user_id'>;
|
|
1080
|
+
|
|
891
1081
|
/**
|
|
892
1082
|
* CRM Entity Types
|
|
893
1083
|
* @link https://dev.1c-bitrix.ru/rest_help/crm/constants.php
|
|
@@ -928,6 +1118,10 @@ declare enum EnumCrmEntityTypeShort {
|
|
|
928
1118
|
requisite = "RQ",
|
|
929
1119
|
order = "O"
|
|
930
1120
|
}
|
|
1121
|
+
/**
|
|
1122
|
+
* @todo add docs
|
|
1123
|
+
*/
|
|
1124
|
+
declare function getEnumCrmEntityTypeShort(id: EnumCrmEntityTypeId): EnumCrmEntityTypeShort;
|
|
931
1125
|
|
|
932
1126
|
/**
|
|
933
1127
|
* Data Types and Object Structure in the REST API Catalog
|
|
@@ -1215,150 +1409,181 @@ interface IPlacementUF {
|
|
|
1215
1409
|
XML_ID: string;
|
|
1216
1410
|
}
|
|
1217
1411
|
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1412
|
+
/**
|
|
1413
|
+
* List of supported languages in B24.Cloud
|
|
1414
|
+
*
|
|
1415
|
+
* It is worth remembering that there will be 1-2 languages for the B24.Box
|
|
1416
|
+
*/
|
|
1417
|
+
declare enum B24LangList {
|
|
1418
|
+
en = "en",
|
|
1419
|
+
de = "de",
|
|
1420
|
+
la = "la",
|
|
1421
|
+
br = "br",
|
|
1422
|
+
fr = "fr",
|
|
1423
|
+
it = "it",
|
|
1424
|
+
pl = "pl",
|
|
1425
|
+
ru = "ru",
|
|
1426
|
+
ua = "ua",
|
|
1427
|
+
tr = "tr",
|
|
1428
|
+
sc = "sc",
|
|
1429
|
+
tc = "tc",
|
|
1430
|
+
ja = "ja",
|
|
1431
|
+
vn = "vn",
|
|
1432
|
+
id = "id",
|
|
1433
|
+
ms = "ms",
|
|
1434
|
+
th = "th",
|
|
1435
|
+
ar = "ar"
|
|
1224
1436
|
}
|
|
1225
|
-
type TypeUser = {
|
|
1226
|
-
readonly isAdmin: boolean;
|
|
1227
|
-
readonly id: null | number;
|
|
1228
|
-
readonly lastName: null | string;
|
|
1229
|
-
readonly name: null | string;
|
|
1230
|
-
readonly gender: GenderString;
|
|
1231
|
-
readonly photo: null | string;
|
|
1232
|
-
readonly TimeZone: null | string;
|
|
1233
|
-
readonly TimeZoneOffset: null | number;
|
|
1234
|
-
};
|
|
1235
|
-
declare const EnumAppStatus: {
|
|
1236
|
-
readonly Free: "F";
|
|
1237
|
-
readonly Demo: "D";
|
|
1238
|
-
readonly Trial: "T";
|
|
1239
|
-
readonly Paid: "P";
|
|
1240
|
-
readonly Local: "L";
|
|
1241
|
-
readonly Subscription: "S";
|
|
1242
|
-
};
|
|
1243
|
-
declare const StatusDescriptions: Record<(typeof EnumAppStatus)[keyof typeof EnumAppStatus], string>;
|
|
1244
|
-
type TypeEnumAppStatus = keyof typeof EnumAppStatus;
|
|
1245
1437
|
/**
|
|
1246
|
-
* @
|
|
1438
|
+
* @todo add docs
|
|
1247
1439
|
*/
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
* Local application identifier on the portal
|
|
1251
|
-
*/
|
|
1252
|
-
readonly id: number;
|
|
1253
|
-
/**
|
|
1254
|
-
* application code
|
|
1255
|
-
*/
|
|
1256
|
-
readonly code: string;
|
|
1257
|
-
/**
|
|
1258
|
-
* installed version of the application
|
|
1259
|
-
*/
|
|
1260
|
-
readonly version: number;
|
|
1261
|
-
/**
|
|
1262
|
-
* application status
|
|
1263
|
-
*/
|
|
1264
|
-
readonly status: TypeEnumAppStatus;
|
|
1265
|
-
/**
|
|
1266
|
-
* application installed flag
|
|
1267
|
-
*/
|
|
1268
|
-
readonly isInstalled: boolean;
|
|
1269
|
-
};
|
|
1440
|
+
declare const B24LocaleMap: Record<B24LangList, string>;
|
|
1441
|
+
|
|
1270
1442
|
/**
|
|
1271
|
-
*
|
|
1443
|
+
* Data Types and Object Structure in the REST API bizproc activity and robot
|
|
1444
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-activity/index.html
|
|
1445
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-robot/index.html
|
|
1446
|
+
*
|
|
1447
|
+
* @todo add docs
|
|
1272
1448
|
*/
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1449
|
+
|
|
1450
|
+
interface ActivityHandlerParams {
|
|
1451
|
+
event_token: string;
|
|
1452
|
+
workflow_id: string;
|
|
1453
|
+
code: string;
|
|
1454
|
+
document_id: string[];
|
|
1455
|
+
document_type: string[];
|
|
1456
|
+
properties?: Record<string, string>;
|
|
1457
|
+
use_subscription: BoolString;
|
|
1458
|
+
timeout_duration: string;
|
|
1459
|
+
ts: string;
|
|
1460
|
+
[key: string]: any;
|
|
1461
|
+
auth: HandlerAuthParams;
|
|
1462
|
+
}
|
|
1463
|
+
type ActivityPropertyType = 'bool' | 'date' | 'datetime' | 'double' | 'int' | 'select' | 'string' | 'text' | 'user';
|
|
1464
|
+
interface ActivityProperty {
|
|
1465
|
+
Name: string | Partial<Record<B24LangList, string>>;
|
|
1466
|
+
Description?: string | Record<string, string>;
|
|
1467
|
+
Type: ActivityPropertyType;
|
|
1468
|
+
Options?: Record<string | number, string>;
|
|
1469
|
+
Required?: BoolString;
|
|
1470
|
+
Multiple?: BoolString;
|
|
1471
|
+
Default?: any;
|
|
1472
|
+
}
|
|
1473
|
+
interface ActivityConfig {
|
|
1474
|
+
CODE: string;
|
|
1475
|
+
HANDLER: string;
|
|
1476
|
+
NAME: string | Partial<Record<B24LangList, string>>;
|
|
1477
|
+
DESCRIPTION?: string | Partial<Record<B24LangList, string>>;
|
|
1478
|
+
DOCUMENT_TYPE?: [string, string, string];
|
|
1479
|
+
PROPERTIES?: Record<string, ActivityProperty>;
|
|
1480
|
+
RETURN_PROPERTIES?: Record<string, ActivityProperty>;
|
|
1481
|
+
FILTER?: {
|
|
1482
|
+
INCLUDE?: Array<string | string[]>;
|
|
1483
|
+
EXCLUDE?: Array<string | string[]>;
|
|
1484
|
+
};
|
|
1485
|
+
USE_PLACEMENT?: BoolString;
|
|
1486
|
+
PLACEMENT_HANDLER?: string;
|
|
1487
|
+
USE_SUBSCRIPTION?: BoolString;
|
|
1488
|
+
AUTH_USER_ID?: number;
|
|
1489
|
+
}
|
|
1490
|
+
interface ActivityOrRobotConfig extends Omit<ActivityConfig, 'HANDLER' | 'PLACEMENT_HANDLER' | 'NAME'> {
|
|
1491
|
+
type: 'activity' | 'robot';
|
|
1492
|
+
NAME?: ActivityConfig['NAME'];
|
|
1493
|
+
HANDLER?: ActivityConfig['HANDLER'];
|
|
1494
|
+
PLACEMENT_HANDLER?: ActivityConfig['PLACEMENT_HANDLER'];
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1283
1497
|
/**
|
|
1284
|
-
*
|
|
1498
|
+
* Data Types and Object Structure in the REST API bizproc
|
|
1499
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-activity/bizproc-activity-add.html
|
|
1500
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-robot/bizproc-robot-add.html
|
|
1501
|
+
* @todo add docs
|
|
1285
1502
|
*/
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-activity/bizproc-activity-add.html
|
|
1506
|
+
*/
|
|
1507
|
+
declare enum EnumBitrix24Edition {
|
|
1508
|
+
undefined = "undefined",
|
|
1509
|
+
b24 = "b24",
|
|
1510
|
+
box = "box"
|
|
1511
|
+
}
|
|
1512
|
+
declare enum EnumBizprocBaseType {
|
|
1513
|
+
undefined = "undefined",
|
|
1514
|
+
crm = "crm",
|
|
1515
|
+
disk = "disk",
|
|
1516
|
+
lists = "lists"
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-workflow-start.html
|
|
1520
|
+
*/
|
|
1521
|
+
declare enum EnumBizprocDocumentType {
|
|
1522
|
+
undefined = "undefined",
|
|
1523
|
+
lead = "CCrmDocumentLead",
|
|
1524
|
+
company = "CCrmDocumentCompany",
|
|
1525
|
+
contact = "CCrmDocumentContact",
|
|
1526
|
+
deal = "CCrmDocumentDeal",
|
|
1527
|
+
invoice = "Bitrix\\Crm\\Integration\\BizProc\\Document\\SmartInvoice",
|
|
1528
|
+
quote = "Bitrix\\Crm\\Integration\\BizProc\\Document\\Quote",
|
|
1529
|
+
order = "Bitrix\\Crm\\Integration\\BizProc\\Document\\Order",
|
|
1530
|
+
dynamic = "Bitrix\\Crm\\Integration\\BizProc\\Document\\Dynamic",
|
|
1531
|
+
disk = "Bitrix\\Disk\\BizProcDocument",
|
|
1532
|
+
lists = "BizprocDocument",
|
|
1533
|
+
listsList = "Bitrix\\Lists\\BizprocDocumentLists"
|
|
1534
|
+
}
|
|
1535
|
+
declare function convertBizprocDocumentTypeToCrmEntityTypeId(documentType: EnumBizprocDocumentType): EnumCrmEntityTypeId;
|
|
1536
|
+
/**
|
|
1537
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-activity/bizproc-activity-add.html
|
|
1538
|
+
*/
|
|
1539
|
+
declare function getDocumentType(documentType: EnumBizprocDocumentType, entityId?: number): string[];
|
|
1540
|
+
/**
|
|
1541
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-workflow-start.html
|
|
1542
|
+
*/
|
|
1543
|
+
declare function getDocumentId(documentType: EnumBizprocDocumentType, id: number, dynamicId?: number): string[];
|
|
1544
|
+
/**
|
|
1545
|
+
* @link https://apidocs.bitrix24.com/api-reference/bizproc/bizproc-workflow-start.html
|
|
1546
|
+
*/
|
|
1547
|
+
declare function getDocumentTypeForFilter(documentType: EnumBizprocDocumentType): string[];
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* Data Types and Object Structure in the REST API event handler
|
|
1551
|
+
* @link https://apidocs.bitrix24.com/api-reference/events/index.html
|
|
1552
|
+
* @todo add docs
|
|
1553
|
+
*/
|
|
1554
|
+
|
|
1555
|
+
interface EventHandlerParams {
|
|
1556
|
+
event: string;
|
|
1557
|
+
event_handler_id: string;
|
|
1558
|
+
ts: string;
|
|
1559
|
+
[key: string]: any;
|
|
1560
|
+
auth?: HandlerAuthParams;
|
|
1561
|
+
}
|
|
1562
|
+
interface EventOnAppInstallHandlerParams extends EventHandlerParams {
|
|
1563
|
+
data: {
|
|
1564
|
+
VERSION: string;
|
|
1565
|
+
ACTIVE: BoolString;
|
|
1566
|
+
INSTALLED: BoolString;
|
|
1567
|
+
LANGUAGE_ID: string;
|
|
1568
|
+
};
|
|
1569
|
+
auth: HandlerAuthParams;
|
|
1570
|
+
}
|
|
1571
|
+
/**
|
|
1572
|
+
* @todo fix this application_token
|
|
1573
|
+
* @see https://apidocs.bitrix24.com/api-reference/events/safe-event-handlers.html
|
|
1574
|
+
*/
|
|
1575
|
+
interface EventOnAppUnInstallHandlerParams {
|
|
1576
|
+
event: string;
|
|
1577
|
+
event_handler_id: string;
|
|
1578
|
+
ts: string;
|
|
1579
|
+
[key: string]: any;
|
|
1580
|
+
auth: {
|
|
1581
|
+
domain: string;
|
|
1582
|
+
client_endpoint: string;
|
|
1583
|
+
server_endpoint: string;
|
|
1584
|
+
member_id: string;
|
|
1585
|
+
application_token: string;
|
|
1586
|
+
};
|
|
1362
1587
|
}
|
|
1363
1588
|
|
|
1364
1589
|
type TypePullMessage = {
|
|
@@ -1821,32 +2046,6 @@ declare abstract class AbstractB24 implements TypeB24 {
|
|
|
1821
2046
|
protected _ensureInitialized(): void;
|
|
1822
2047
|
}
|
|
1823
2048
|
|
|
1824
|
-
/**
|
|
1825
|
-
* List of supported languages in B24.Cloud
|
|
1826
|
-
*
|
|
1827
|
-
* It is worth remembering that there will be 1-2 languages for the B24.Box
|
|
1828
|
-
*/
|
|
1829
|
-
declare enum B24LangList {
|
|
1830
|
-
en = "en",
|
|
1831
|
-
de = "de",
|
|
1832
|
-
la = "la",
|
|
1833
|
-
br = "br",
|
|
1834
|
-
fr = "fr",
|
|
1835
|
-
it = "it",
|
|
1836
|
-
pl = "pl",
|
|
1837
|
-
ru = "ru",
|
|
1838
|
-
ua = "ua",
|
|
1839
|
-
tr = "tr",
|
|
1840
|
-
sc = "sc",
|
|
1841
|
-
tc = "tc",
|
|
1842
|
-
ja = "ja",
|
|
1843
|
-
vn = "vn",
|
|
1844
|
-
id = "id",
|
|
1845
|
-
ms = "ms",
|
|
1846
|
-
th = "th",
|
|
1847
|
-
ar = "ar"
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
2049
|
declare class FormatterNumbers {
|
|
1851
2050
|
private static isInternalConstructing;
|
|
1852
2051
|
private static instance;
|
|
@@ -2018,6 +2217,7 @@ declare class B24Hook extends AbstractB24 implements TypeB24 {
|
|
|
2018
2217
|
* Get the account address BX24 with Path ( https://name.bitrix24.com/rest/1/xxxxx )
|
|
2019
2218
|
*/
|
|
2020
2219
|
getTargetOriginWithPath(): string;
|
|
2220
|
+
static fromWebhookUrl(url: string): B24Hook;
|
|
2021
2221
|
}
|
|
2022
2222
|
|
|
2023
2223
|
/**
|
|
@@ -2662,23 +2862,42 @@ declare class AuthManager implements AuthActions {
|
|
|
2662
2862
|
/**
|
|
2663
2863
|
* B24.OAuth Manager
|
|
2664
2864
|
* @todo add docs
|
|
2665
|
-
*
|
|
2865
|
+
*
|
|
2866
|
+
* @link https://apidocs.bitrix24.com/api-reference/oauth/index.html
|
|
2666
2867
|
*/
|
|
2667
2868
|
|
|
2668
2869
|
declare class B24OAuth extends AbstractB24 implements TypeB24 {
|
|
2669
2870
|
#private;
|
|
2670
2871
|
constructor(authOptions: B24OAuthParams, oAuthSecret: B24OAuthSecret);
|
|
2671
|
-
initIsAdmin(): Promise<void>;
|
|
2672
2872
|
setLogger(logger: LoggerBrowser): void;
|
|
2873
|
+
/**
|
|
2874
|
+
* Used to initialize information about the current user.
|
|
2875
|
+
*/
|
|
2876
|
+
initIsAdmin(): Promise<void>;
|
|
2877
|
+
/**
|
|
2878
|
+
* Sets an asynchronous Callback to receive updated authorization data
|
|
2879
|
+
* @param cb
|
|
2880
|
+
*/
|
|
2881
|
+
setCallbackRefreshAuth(cb: CallbackRefreshAuth): void;
|
|
2882
|
+
/**
|
|
2883
|
+
* Removes Callback to receive updated authorization data
|
|
2884
|
+
*/
|
|
2885
|
+
removeCallbackRefreshAuth(): void;
|
|
2886
|
+
/**
|
|
2887
|
+
* Disables warning about client-side query execution
|
|
2888
|
+
*/
|
|
2889
|
+
offClientSideWarning(): void;
|
|
2673
2890
|
get auth(): AuthActions;
|
|
2891
|
+
/**
|
|
2892
|
+
* Get the account address BX24 ( https://name.bitrix24.com )
|
|
2893
|
+
*/
|
|
2674
2894
|
getTargetOrigin(): string;
|
|
2895
|
+
/**
|
|
2896
|
+
* Get the account address BX24 with Path ( https://name.bitrix24.com/rest/1/xxxxx )
|
|
2897
|
+
*/
|
|
2675
2898
|
getTargetOriginWithPath(): string;
|
|
2676
2899
|
}
|
|
2677
2900
|
|
|
2678
|
-
/**
|
|
2679
|
-
* OAuth Authorization Manager
|
|
2680
|
-
*/
|
|
2681
|
-
|
|
2682
2901
|
declare class AuthOAuthManager implements AuthActions {
|
|
2683
2902
|
#private;
|
|
2684
2903
|
constructor(b24OAuthParams: B24OAuthParams, oAuthSecret: B24OAuthSecret);
|
|
@@ -2691,6 +2910,8 @@ declare class AuthOAuthManager implements AuthActions {
|
|
|
2691
2910
|
* Updates authorization data
|
|
2692
2911
|
*/
|
|
2693
2912
|
refreshAuth(): Promise<AuthData>;
|
|
2913
|
+
setCallbackRefreshAuth(cb: CallbackRefreshAuth): void;
|
|
2914
|
+
removeCallbackRefreshAuth(): void;
|
|
2694
2915
|
getUniq(prefix: string): string;
|
|
2695
2916
|
/**
|
|
2696
2917
|
* Get the account address BX24 ( https://name.bitrix24.com )
|
|
@@ -3315,4 +3536,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
3315
3536
|
|
|
3316
3537
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
3317
3538
|
|
|
3318
|
-
export { AbstractB24, 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, B24OAuth, type B24OAuthParams, type B24OAuthSecret, PullClient as B24PullClientManager, type BatchPayload, type BoolString, Browser, 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, EnumCrmEntityType, EnumCrmEntityTypeId, EnumCrmEntityTypeShort, type Fields, type GenderString, type GetPayload, 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 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, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
|
|
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 };
|