@bitrix24/b24jssdk 0.4.1 → 0.4.3
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 +483 -164
- package/dist/esm/index.d.ts +483 -164
- package/dist/esm/index.mjs +470 -86
- package/dist/esm/index.mjs.map +1 -1
- package/dist/umd/index.js +481 -85
- 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 +3 -3
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;
|
|
@@ -630,6 +792,75 @@ type B24FrameQueryParams = {
|
|
|
630
792
|
LANG: string | null | undefined;
|
|
631
793
|
APP_SID: string | null | undefined;
|
|
632
794
|
};
|
|
795
|
+
/**
|
|
796
|
+
* Parameters for application for OAuth
|
|
797
|
+
*/
|
|
798
|
+
type B24OAuthSecret = {
|
|
799
|
+
clientId: string;
|
|
800
|
+
clientSecret: string;
|
|
801
|
+
};
|
|
802
|
+
/**
|
|
803
|
+
* Parameters for OAuth
|
|
804
|
+
* @memo We get from b24 event this data
|
|
805
|
+
*/
|
|
806
|
+
interface B24OAuthParams {
|
|
807
|
+
/**
|
|
808
|
+
* @example '1xxxxx1694'
|
|
809
|
+
*/
|
|
810
|
+
applicationToken: string;
|
|
811
|
+
/**
|
|
812
|
+
* @example 1
|
|
813
|
+
*/
|
|
814
|
+
userId: number;
|
|
815
|
+
/**
|
|
816
|
+
* @example '3xx2030386cyy1b'
|
|
817
|
+
*/
|
|
818
|
+
memberId: string;
|
|
819
|
+
/**
|
|
820
|
+
* @example '1xxxxx1694'
|
|
821
|
+
*/
|
|
822
|
+
accessToken: string;
|
|
823
|
+
/**
|
|
824
|
+
* @example '0xxxx4e000011e700000001000000260dc83b47c40e9b5fd501093674c4f5'
|
|
825
|
+
*/
|
|
826
|
+
refreshToken: string;
|
|
827
|
+
/**
|
|
828
|
+
* @example 1745997853
|
|
829
|
+
*/
|
|
830
|
+
expires: number;
|
|
831
|
+
/**
|
|
832
|
+
* @example 3600
|
|
833
|
+
*/
|
|
834
|
+
expiresIn: number;
|
|
835
|
+
/**
|
|
836
|
+
* @example 'crm,catalog,bizproc,placement,user_brief'
|
|
837
|
+
*/
|
|
838
|
+
scope: string;
|
|
839
|
+
/**
|
|
840
|
+
* @example 'xxx.bitrix24.com'
|
|
841
|
+
*/
|
|
842
|
+
domain: string;
|
|
843
|
+
/**
|
|
844
|
+
* @example 'https://xxx.bitrix24.com/rest/'
|
|
845
|
+
*/
|
|
846
|
+
clientEndpoint: string;
|
|
847
|
+
/**
|
|
848
|
+
* @example 'https://oauth.bitrix.info/rest/'
|
|
849
|
+
*/
|
|
850
|
+
serverEndpoint: string;
|
|
851
|
+
/**
|
|
852
|
+
* @example 'L'
|
|
853
|
+
*/
|
|
854
|
+
status: typeof EnumAppStatus[keyof typeof EnumAppStatus];
|
|
855
|
+
issuer?: 'request' | 'store' | string;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Callback called when OAuth authorization is updated
|
|
859
|
+
*/
|
|
860
|
+
type CallbackRefreshAuth = (params: {
|
|
861
|
+
authData: AuthData;
|
|
862
|
+
b24OAuthParams: B24OAuthParams;
|
|
863
|
+
}) => Promise<void>;
|
|
633
864
|
/**
|
|
634
865
|
* Parameters passed from the parent window when calling refreshAuth
|
|
635
866
|
*/
|
|
@@ -827,6 +1058,26 @@ type StatusClose = {
|
|
|
827
1058
|
isClose: boolean;
|
|
828
1059
|
};
|
|
829
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
|
+
|
|
830
1081
|
/**
|
|
831
1082
|
* CRM Entity Types
|
|
832
1083
|
* @link https://dev.1c-bitrix.ru/rest_help/crm/constants.php
|
|
@@ -867,6 +1118,10 @@ declare enum EnumCrmEntityTypeShort {
|
|
|
867
1118
|
requisite = "RQ",
|
|
868
1119
|
order = "O"
|
|
869
1120
|
}
|
|
1121
|
+
/**
|
|
1122
|
+
* @todo add docs
|
|
1123
|
+
*/
|
|
1124
|
+
declare function getEnumCrmEntityTypeShort(id: EnumCrmEntityTypeId): EnumCrmEntityTypeShort;
|
|
870
1125
|
|
|
871
1126
|
/**
|
|
872
1127
|
* Data Types and Object Structure in the REST API Catalog
|
|
@@ -1154,150 +1409,171 @@ interface IPlacementUF {
|
|
|
1154
1409
|
XML_ID: string;
|
|
1155
1410
|
}
|
|
1156
1411
|
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
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"
|
|
1163
1436
|
}
|
|
1164
|
-
type TypeUser = {
|
|
1165
|
-
readonly isAdmin: boolean;
|
|
1166
|
-
readonly id: null | number;
|
|
1167
|
-
readonly lastName: null | string;
|
|
1168
|
-
readonly name: null | string;
|
|
1169
|
-
readonly gender: GenderString;
|
|
1170
|
-
readonly photo: null | string;
|
|
1171
|
-
readonly TimeZone: null | string;
|
|
1172
|
-
readonly TimeZoneOffset: null | number;
|
|
1173
|
-
};
|
|
1174
|
-
declare const EnumAppStatus: {
|
|
1175
|
-
readonly Free: "F";
|
|
1176
|
-
readonly Demo: "D";
|
|
1177
|
-
readonly Trial: "T";
|
|
1178
|
-
readonly Paid: "P";
|
|
1179
|
-
readonly Local: "L";
|
|
1180
|
-
readonly Subscription: "S";
|
|
1181
|
-
};
|
|
1182
|
-
declare const StatusDescriptions: Record<(typeof EnumAppStatus)[keyof typeof EnumAppStatus], string>;
|
|
1183
|
-
type TypeEnumAppStatus = keyof typeof EnumAppStatus;
|
|
1184
1437
|
/**
|
|
1185
|
-
* @
|
|
1438
|
+
* @todo add docs
|
|
1186
1439
|
*/
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
* Local application identifier on the portal
|
|
1190
|
-
*/
|
|
1191
|
-
readonly id: number;
|
|
1192
|
-
/**
|
|
1193
|
-
* application code
|
|
1194
|
-
*/
|
|
1195
|
-
readonly code: string;
|
|
1196
|
-
/**
|
|
1197
|
-
* installed version of the application
|
|
1198
|
-
*/
|
|
1199
|
-
readonly version: number;
|
|
1200
|
-
/**
|
|
1201
|
-
* application status
|
|
1202
|
-
*/
|
|
1203
|
-
readonly status: TypeEnumAppStatus;
|
|
1204
|
-
/**
|
|
1205
|
-
* application installed flag
|
|
1206
|
-
*/
|
|
1207
|
-
readonly isInstalled: boolean;
|
|
1208
|
-
};
|
|
1440
|
+
declare const B24LocaleMap: Record<B24LangList, string>;
|
|
1441
|
+
|
|
1209
1442
|
/**
|
|
1210
|
-
*
|
|
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
|
|
1211
1448
|
*/
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
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
|
+
|
|
1222
1497
|
/**
|
|
1223
|
-
*
|
|
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
|
|
1224
1502
|
*/
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
BoolYN = "boolYN",
|
|
1300
|
-
StringVal = "string"
|
|
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 extends EventHandlerParams {
|
|
1576
|
+
[key: string]: any;
|
|
1301
1577
|
}
|
|
1302
1578
|
|
|
1303
1579
|
type TypePullMessage = {
|
|
@@ -1760,32 +2036,6 @@ declare abstract class AbstractB24 implements TypeB24 {
|
|
|
1760
2036
|
protected _ensureInitialized(): void;
|
|
1761
2037
|
}
|
|
1762
2038
|
|
|
1763
|
-
/**
|
|
1764
|
-
* List of supported languages in B24.Cloud
|
|
1765
|
-
*
|
|
1766
|
-
* It is worth remembering that there will be 1-2 languages for the B24.Box
|
|
1767
|
-
*/
|
|
1768
|
-
declare enum B24LangList {
|
|
1769
|
-
en = "en",
|
|
1770
|
-
de = "de",
|
|
1771
|
-
la = "la",
|
|
1772
|
-
br = "br",
|
|
1773
|
-
fr = "fr",
|
|
1774
|
-
it = "it",
|
|
1775
|
-
pl = "pl",
|
|
1776
|
-
ru = "ru",
|
|
1777
|
-
ua = "ua",
|
|
1778
|
-
tr = "tr",
|
|
1779
|
-
sc = "sc",
|
|
1780
|
-
tc = "tc",
|
|
1781
|
-
ja = "ja",
|
|
1782
|
-
vn = "vn",
|
|
1783
|
-
id = "id",
|
|
1784
|
-
ms = "ms",
|
|
1785
|
-
th = "th",
|
|
1786
|
-
ar = "ar"
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
2039
|
declare class FormatterNumbers {
|
|
1790
2040
|
private static isInternalConstructing;
|
|
1791
2041
|
private static instance;
|
|
@@ -2598,6 +2848,75 @@ declare class AuthManager implements AuthActions {
|
|
|
2598
2848
|
get isAdmin(): boolean;
|
|
2599
2849
|
}
|
|
2600
2850
|
|
|
2851
|
+
/**
|
|
2852
|
+
* B24.OAuth Manager
|
|
2853
|
+
* @todo add docs
|
|
2854
|
+
*
|
|
2855
|
+
* @link https://apidocs.bitrix24.com/api-reference/oauth/index.html
|
|
2856
|
+
*/
|
|
2857
|
+
|
|
2858
|
+
declare class B24OAuth extends AbstractB24 implements TypeB24 {
|
|
2859
|
+
#private;
|
|
2860
|
+
constructor(authOptions: B24OAuthParams, oAuthSecret: B24OAuthSecret);
|
|
2861
|
+
setLogger(logger: LoggerBrowser): void;
|
|
2862
|
+
/**
|
|
2863
|
+
* Used to initialize information about the current user.
|
|
2864
|
+
*/
|
|
2865
|
+
initIsAdmin(): Promise<void>;
|
|
2866
|
+
/**
|
|
2867
|
+
* Sets an asynchronous Callback to receive updated authorization data
|
|
2868
|
+
* @param cb
|
|
2869
|
+
*/
|
|
2870
|
+
setCallbackRefreshAuth(cb: CallbackRefreshAuth): void;
|
|
2871
|
+
/**
|
|
2872
|
+
* Removes Callback to receive updated authorization data
|
|
2873
|
+
*/
|
|
2874
|
+
removeCallbackRefreshAuth(): void;
|
|
2875
|
+
/**
|
|
2876
|
+
* Disables warning about client-side query execution
|
|
2877
|
+
*/
|
|
2878
|
+
offClientSideWarning(): void;
|
|
2879
|
+
get auth(): AuthActions;
|
|
2880
|
+
/**
|
|
2881
|
+
* Get the account address BX24 ( https://name.bitrix24.com )
|
|
2882
|
+
*/
|
|
2883
|
+
getTargetOrigin(): string;
|
|
2884
|
+
/**
|
|
2885
|
+
* Get the account address BX24 with Path ( https://name.bitrix24.com/rest/1/xxxxx )
|
|
2886
|
+
*/
|
|
2887
|
+
getTargetOriginWithPath(): string;
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2890
|
+
declare class AuthOAuthManager implements AuthActions {
|
|
2891
|
+
#private;
|
|
2892
|
+
constructor(b24OAuthParams: B24OAuthParams, oAuthSecret: B24OAuthSecret);
|
|
2893
|
+
/**
|
|
2894
|
+
* Returns authorization data
|
|
2895
|
+
* @see Http.#prepareParams
|
|
2896
|
+
*/
|
|
2897
|
+
getAuthData(): false | AuthData;
|
|
2898
|
+
/**
|
|
2899
|
+
* Updates authorization data
|
|
2900
|
+
*/
|
|
2901
|
+
refreshAuth(): Promise<AuthData>;
|
|
2902
|
+
setCallbackRefreshAuth(cb: CallbackRefreshAuth): void;
|
|
2903
|
+
removeCallbackRefreshAuth(): void;
|
|
2904
|
+
getUniq(prefix: string): string;
|
|
2905
|
+
/**
|
|
2906
|
+
* Get the account address BX24 ( https://name.bitrix24.com )
|
|
2907
|
+
*/
|
|
2908
|
+
getTargetOrigin(): string;
|
|
2909
|
+
/**
|
|
2910
|
+
* Get the account address BX24 with Path ( https://name.bitrix24.com/rest )
|
|
2911
|
+
*/
|
|
2912
|
+
getTargetOriginWithPath(): string;
|
|
2913
|
+
/**
|
|
2914
|
+
* Determines whether the current user has administrator rights
|
|
2915
|
+
*/
|
|
2916
|
+
get isAdmin(): boolean;
|
|
2917
|
+
initIsAdmin(http: TypeHttp): Promise<void>;
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2601
2920
|
declare abstract class AbstractHelper {
|
|
2602
2921
|
protected _b24: TypeB24;
|
|
2603
2922
|
protected _logger: null | LoggerBrowser;
|
|
@@ -3206,4 +3525,4 @@ declare class PullClient implements ConnectorParent {
|
|
|
3206
3525
|
|
|
3207
3526
|
declare function initializeB24Frame(): Promise<B24Frame>;
|
|
3208
3527
|
|
|
3209
|
-
export { AbstractB24, AjaxError, type AjaxErrorParams, type AjaxQuery, AjaxResult, type AjaxResultParams, type AnswerError, AppFrame, type AuthActions, type AuthData, AuthHookManager, AuthManager, B24Frame, type B24FrameQueryParams, B24Hook, type B24HookParams, B24LangList, 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 };
|
|
3528
|
+
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 };
|