@bitrix24/b24jssdk 0.2.1 → 0.2.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.
@@ -35,6 +35,7 @@ type ISODate = string;
35
35
  type BoolString = 'Y' | 'N';
36
36
  type GenderString = 'M' | 'F' | '';
37
37
  type PlacementViewMode = 'view' | 'edit';
38
+ type TextType = 'text' | 'html';
38
39
  type Fields = {
39
40
  readonly [key: string]: {
40
41
  readonly type: string;
@@ -839,7 +840,8 @@ declare enum EnumCrmEntityType {
839
840
  oldInvoice = "CRM_INVOICE",
840
841
  invoice = "CRM_SMART_INVOICE",
841
842
  quote = "CRM_QUOTE",
842
- requisite = "CRM_REQUISITE"
843
+ requisite = "CRM_REQUISITE",
844
+ order = "ORDER"
843
845
  }
844
846
  declare enum EnumCrmEntityTypeId {
845
847
  undefined = 0,
@@ -850,7 +852,266 @@ declare enum EnumCrmEntityTypeId {
850
852
  oldInvoice = 5,
851
853
  invoice = 31,
852
854
  quote = 7,
853
- requisite = 8
855
+ requisite = 8,
856
+ order = 14
857
+ }
858
+ declare enum EnumCrmEntityTypeShort {
859
+ undefined = "?",
860
+ lead = "L",
861
+ deal = "D",
862
+ contact = "C",
863
+ company = "CO",
864
+ oldInvoice = "I",
865
+ invoice = "SI",
866
+ quote = "Q",
867
+ requisite = "RQ",
868
+ order = "O"
869
+ }
870
+
871
+ /**
872
+ * Data Types and Object Structure in the REST API Catalog
873
+ * @link https://apidocs.bitrix24.com/api-reference/catalog/data-types.html
874
+ */
875
+ declare enum CatalogProductType {
876
+ undefined = 0,
877
+ product = 1,
878
+ service = 7,
879
+ sku = 3,
880
+ skuEmpty = 6,
881
+ offer = 4,
882
+ offerEmpty = 5
883
+ }
884
+ declare enum CatalogProductImageType {
885
+ undefined = "UNDEFINED",
886
+ detail = "DETAIL_PICTURE",
887
+ preview = "PREVIEW_PICTURE",
888
+ morePhoto = "MORE_PHOTO"
889
+ }
890
+ declare enum CatalogRoundingRuleType {
891
+ undefined = 0,
892
+ mathematical = 1,
893
+ roundingUp = 2,
894
+ roundingDown = 4
895
+ }
896
+ interface CatalogCatalog {
897
+ id: number;
898
+ iblockId: number;
899
+ iblockTypeId: string | 'CRM_PRODUCT_CATALOG';
900
+ lid: string;
901
+ name: string;
902
+ productIblockId?: number;
903
+ skuPropertyId?: number;
904
+ subscription?: BoolString;
905
+ vatId: number;
906
+ }
907
+ interface BaseProduct {
908
+ id: number;
909
+ iblockId: number;
910
+ sort: number;
911
+ name: string;
912
+ active: BoolString;
913
+ available: BoolString;
914
+ code: string;
915
+ xmlId: string;
916
+ barcodeMulti: BoolString;
917
+ bundle: BoolString;
918
+ canBuyZero?: BoolString;
919
+ type: number;
920
+ vatId: number;
921
+ vatIncluded: BoolString;
922
+ weight?: number;
923
+ height?: number;
924
+ length?: number;
925
+ width?: number;
926
+ createdBy: number;
927
+ modifiedBy: number;
928
+ dateActiveFrom?: ISODate;
929
+ dateActiveTo?: ISODate;
930
+ dateCreate: ISODate;
931
+ timestampX: ISODate;
932
+ iblockSectionId?: number;
933
+ measure?: number;
934
+ previewText?: string;
935
+ previewTextType?: TextType;
936
+ detailText?: string;
937
+ detailTextType?: TextType;
938
+ previewPicture?: object;
939
+ detailPicture?: object;
940
+ subscribe: 'Y' | 'N' | 'D';
941
+ quantityTrace: 'Y' | 'N' | 'D';
942
+ purchasingCurrency: string;
943
+ purchasingPrice: number;
944
+ quantity: number;
945
+ quantityReserved: number;
946
+ [key: string]: any;
947
+ }
948
+ interface CatalogProduct extends BaseProduct {
949
+ type: CatalogProductType.product;
950
+ }
951
+ interface CatalogProductSku extends BaseProduct {
952
+ type: CatalogProductType.sku | CatalogProductType.skuEmpty;
953
+ }
954
+ interface CatalogProductOffer extends BaseProduct {
955
+ type: CatalogProductType.offer | CatalogProductType.offerEmpty;
956
+ }
957
+ interface CatalogProductService extends Omit<BaseProduct, 'quantityReserved' | 'quantity' | 'purchasingPrice' | 'purchasingCurrency' | 'quantityTrace' | 'subscribe' | 'weight' | 'height' | 'length' | 'width' | 'canBuyZero' | 'barcodeMulti'> {
958
+ type: CatalogProductType.service;
959
+ }
960
+ interface CatalogSection {
961
+ id: number;
962
+ xmlId: string;
963
+ code: string;
964
+ iblockId: number;
965
+ sort: number;
966
+ iblockSectionId: number;
967
+ name: string;
968
+ active: BoolString;
969
+ description: string;
970
+ descriptionType: TextType;
971
+ }
972
+ interface CatalogProductImage {
973
+ id: number;
974
+ name: string;
975
+ productId: number;
976
+ type: typeof CatalogProductImageType[keyof typeof CatalogProductImageType];
977
+ createTime?: ISODate;
978
+ downloadUrl?: string;
979
+ detailUrl?: string;
980
+ }
981
+ interface CatalogStore {
982
+ id: number;
983
+ code: string;
984
+ xmlId: string;
985
+ sort: number;
986
+ address: string;
987
+ title: string;
988
+ active: BoolString;
989
+ description?: string;
990
+ gpsN: number;
991
+ gpsS: number;
992
+ imageId: object;
993
+ dateModify: ISODate;
994
+ dateCreate: ISODate;
995
+ userId: number;
996
+ modifiedBy: number;
997
+ phone: string;
998
+ email: string;
999
+ schedule: string;
1000
+ issuingCenter: BoolString;
1001
+ }
1002
+ interface CatalogMeasure {
1003
+ id: number;
1004
+ code: string;
1005
+ isDefault: BoolString;
1006
+ measureTitle: string;
1007
+ symbol: string;
1008
+ symbolIntl: string;
1009
+ symbolLetterIntl: string;
1010
+ }
1011
+ interface CatalogRatio {
1012
+ id: number;
1013
+ productId: number;
1014
+ ratio: number;
1015
+ isDefault: BoolString;
1016
+ }
1017
+ interface CatalogPriceType {
1018
+ id: number;
1019
+ xmlId: string;
1020
+ sort: number;
1021
+ name: string;
1022
+ base: BoolString;
1023
+ createdBy: number;
1024
+ modifiedBy: number;
1025
+ dateCreate: ISODate;
1026
+ timestampX: ISODate;
1027
+ }
1028
+ interface CatalogVat {
1029
+ id: number;
1030
+ name: string;
1031
+ active: BoolString;
1032
+ rate: number;
1033
+ sort: number;
1034
+ timestampX: ISODate;
1035
+ }
1036
+ interface CatalogPriceTypeLang {
1037
+ id: number;
1038
+ catalogGroupId: number;
1039
+ name: string;
1040
+ lang: string;
1041
+ }
1042
+ interface CatalogLanguage {
1043
+ lid: string;
1044
+ name: string;
1045
+ active: BoolString;
1046
+ }
1047
+ interface CatalogRoundingRule {
1048
+ id: number;
1049
+ catalogGroupId: number;
1050
+ price: number;
1051
+ roundType: typeof CatalogRoundingRuleType[keyof typeof CatalogRoundingRuleType];
1052
+ roundPrecision: number;
1053
+ createdBy: number;
1054
+ modifiedBy: number;
1055
+ dateCreate: ISODate;
1056
+ dateModify: ISODate;
1057
+ }
1058
+ interface CatalogExtra {
1059
+ id: number;
1060
+ name: string;
1061
+ percentage: number;
1062
+ }
1063
+
1064
+ declare enum ProductRowDiscountTypeId {
1065
+ undefined = 0,
1066
+ absolute = 1,
1067
+ percentage = 2
1068
+ }
1069
+ interface CrmItemProductRow {
1070
+ id: number;
1071
+ ownerId: number;
1072
+ ownerType: typeof EnumCrmEntityTypeShort[keyof typeof EnumCrmEntityTypeShort];
1073
+ productId: number;
1074
+ productName: string;
1075
+ sort: number;
1076
+ price: number;
1077
+ priceAccount: number;
1078
+ priceExclusive: number;
1079
+ priceNetto: number;
1080
+ priceBrutto: number;
1081
+ customized: BoolString;
1082
+ quantity: number;
1083
+ measureCode: string;
1084
+ measureName: string;
1085
+ taxRate: number | null;
1086
+ taxIncluded: BoolString;
1087
+ discountRate: number;
1088
+ discountSum: number;
1089
+ discountTypeId: typeof ProductRowDiscountTypeId[keyof typeof ProductRowDiscountTypeId];
1090
+ xmlId: string;
1091
+ type: typeof CatalogProductType[keyof typeof CatalogProductType];
1092
+ storeId: number;
1093
+ }
1094
+
1095
+ interface CrmItemDelivery {
1096
+ id: number;
1097
+ accountNumber: string;
1098
+ deducted: BoolString;
1099
+ dateDeducted?: ISODate;
1100
+ deliveryId: number;
1101
+ deliveryName: string;
1102
+ priceDelivery: number;
1103
+ }
1104
+
1105
+ interface CrmItemPayment {
1106
+ id: number;
1107
+ accountNumber: string;
1108
+ paid: BoolString;
1109
+ datePaid?: ISODate;
1110
+ empPaidId?: number;
1111
+ sum: number;
1112
+ currency: string;
1113
+ paySystemId: number;
1114
+ paySystemName: string;
854
1115
  }
855
1116
 
856
1117
  /**
@@ -2244,6 +2505,15 @@ declare class PlacementManager {
2244
2505
  * @link https://apidocs.bitrix24.com/api-reference/widgets/ui-interaction/bx24-placement-call.html
2245
2506
  */
2246
2507
  call(command: string, parameters?: Record<string, any>): Promise<any>;
2508
+ /**
2509
+ * Set Up the Interface Event Handler
2510
+ * @param {string} command
2511
+ * @param {null | string | Record<string, any>} parameters
2512
+ * @param {(...args: any[]) => void} callBack
2513
+ *
2514
+ * @return {Promise<any>}
2515
+ */
2516
+ callCustomBind(command: string, parameters: (null | string | Record<string, any>) | undefined, callBack: (...args: any[]) => void): Promise<any>;
2247
2517
  }
2248
2518
 
2249
2519
  /**
@@ -2936,4 +3206,4 @@ declare class PullClient implements ConnectorParent {
2936
3206
 
2937
3207
  declare function initializeB24Frame(): Promise<B24Frame>;
2938
3208
 
2939
- 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, CloseReasons, type CommandHandlerFunctionV1, type CommandHandlerFunctionV2, ConnectionType, type ConnectorCallbacks, type ConnectorConfig, type ConnectorParent, type Currency, type CurrencyFormat, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, 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, 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, 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 };
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 };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @version @bitrix24/b24jssdk v0.2.1
2
+ * @version @bitrix24/b24jssdk v0.2.3
3
3
  * @copyright (c) 2025 Bitrix24
4
4
  * @licence MIT
5
5
  * @links https://github.com/bitrix24/b24jssdk - GitHub
@@ -915,6 +915,7 @@ var EnumCrmEntityType = /* @__PURE__ */ ((EnumCrmEntityType2) => {
915
915
  EnumCrmEntityType2["invoice"] = "CRM_SMART_INVOICE";
916
916
  EnumCrmEntityType2["quote"] = "CRM_QUOTE";
917
917
  EnumCrmEntityType2["requisite"] = "CRM_REQUISITE";
918
+ EnumCrmEntityType2["order"] = "ORDER";
918
919
  return EnumCrmEntityType2;
919
920
  })(EnumCrmEntityType || {});
920
921
  var EnumCrmEntityTypeId = /* @__PURE__ */ ((EnumCrmEntityTypeId2) => {
@@ -927,8 +928,54 @@ var EnumCrmEntityTypeId = /* @__PURE__ */ ((EnumCrmEntityTypeId2) => {
927
928
  EnumCrmEntityTypeId2[EnumCrmEntityTypeId2["invoice"] = 31] = "invoice";
928
929
  EnumCrmEntityTypeId2[EnumCrmEntityTypeId2["quote"] = 7] = "quote";
929
930
  EnumCrmEntityTypeId2[EnumCrmEntityTypeId2["requisite"] = 8] = "requisite";
931
+ EnumCrmEntityTypeId2[EnumCrmEntityTypeId2["order"] = 14] = "order";
930
932
  return EnumCrmEntityTypeId2;
931
933
  })(EnumCrmEntityTypeId || {});
934
+ var EnumCrmEntityTypeShort = /* @__PURE__ */ ((EnumCrmEntityTypeShort2) => {
935
+ EnumCrmEntityTypeShort2["undefined"] = "?";
936
+ EnumCrmEntityTypeShort2["lead"] = "L";
937
+ EnumCrmEntityTypeShort2["deal"] = "D";
938
+ EnumCrmEntityTypeShort2["contact"] = "C";
939
+ EnumCrmEntityTypeShort2["company"] = "CO";
940
+ EnumCrmEntityTypeShort2["oldInvoice"] = "I";
941
+ EnumCrmEntityTypeShort2["invoice"] = "SI";
942
+ EnumCrmEntityTypeShort2["quote"] = "Q";
943
+ EnumCrmEntityTypeShort2["requisite"] = "RQ";
944
+ EnumCrmEntityTypeShort2["order"] = "O";
945
+ return EnumCrmEntityTypeShort2;
946
+ })(EnumCrmEntityTypeShort || {});
947
+
948
+ var ProductRowDiscountTypeId = /* @__PURE__ */ ((ProductRowDiscountTypeId2) => {
949
+ ProductRowDiscountTypeId2[ProductRowDiscountTypeId2["undefined"] = 0] = "undefined";
950
+ ProductRowDiscountTypeId2[ProductRowDiscountTypeId2["absolute"] = 1] = "absolute";
951
+ ProductRowDiscountTypeId2[ProductRowDiscountTypeId2["percentage"] = 2] = "percentage";
952
+ return ProductRowDiscountTypeId2;
953
+ })(ProductRowDiscountTypeId || {});
954
+
955
+ var CatalogProductType = /* @__PURE__ */ ((CatalogProductType2) => {
956
+ CatalogProductType2[CatalogProductType2["undefined"] = 0] = "undefined";
957
+ CatalogProductType2[CatalogProductType2["product"] = 1] = "product";
958
+ CatalogProductType2[CatalogProductType2["service"] = 7] = "service";
959
+ CatalogProductType2[CatalogProductType2["sku"] = 3] = "sku";
960
+ CatalogProductType2[CatalogProductType2["skuEmpty"] = 6] = "skuEmpty";
961
+ CatalogProductType2[CatalogProductType2["offer"] = 4] = "offer";
962
+ CatalogProductType2[CatalogProductType2["offerEmpty"] = 5] = "offerEmpty";
963
+ return CatalogProductType2;
964
+ })(CatalogProductType || {});
965
+ var CatalogProductImageType = /* @__PURE__ */ ((CatalogProductImageType2) => {
966
+ CatalogProductImageType2["undefined"] = "UNDEFINED";
967
+ CatalogProductImageType2["detail"] = "DETAIL_PICTURE";
968
+ CatalogProductImageType2["preview"] = "PREVIEW_PICTURE";
969
+ CatalogProductImageType2["morePhoto"] = "MORE_PHOTO";
970
+ return CatalogProductImageType2;
971
+ })(CatalogProductImageType || {});
972
+ var CatalogRoundingRuleType = /* @__PURE__ */ ((CatalogRoundingRuleType2) => {
973
+ CatalogRoundingRuleType2[CatalogRoundingRuleType2["undefined"] = 0] = "undefined";
974
+ CatalogRoundingRuleType2[CatalogRoundingRuleType2["mathematical"] = 1] = "mathematical";
975
+ CatalogRoundingRuleType2[CatalogRoundingRuleType2["roundingUp"] = 2] = "roundingUp";
976
+ CatalogRoundingRuleType2[CatalogRoundingRuleType2["roundingDown"] = 4] = "roundingDown";
977
+ return CatalogRoundingRuleType2;
978
+ })(CatalogRoundingRuleType || {});
932
979
 
933
980
  var LoadDataType = /* @__PURE__ */ ((LoadDataType2) => {
934
981
  LoadDataType2["App"] = "app";
@@ -1481,9 +1528,16 @@ class Http {
1481
1528
  #isClientSideWarning = false;
1482
1529
  #clientSideWarningMessage = "";
1483
1530
  constructor(baseURL, authActions, options) {
1531
+ const defaultHeaders = {
1532
+ // 'X-Sdk': 'b24-js-sdk-v-0.2.3'
1533
+ };
1484
1534
  this.#clientAxios = axios.create({
1485
1535
  baseURL,
1486
- ...options
1536
+ headers: {
1537
+ ...defaultHeaders,
1538
+ ...options ? options.headers : {}
1539
+ },
1540
+ ...options && { ...options, headers: void 0 }
1487
1541
  });
1488
1542
  this.#authActions = authActions;
1489
1543
  this.#restrictionManager = new RestrictionManager();
@@ -1885,7 +1939,7 @@ class Http {
1885
1939
  result.logTag = this.#logTag;
1886
1940
  }
1887
1941
  result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
1888
- result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.2.1";
1942
+ result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.2.3";
1889
1943
  if (!!result.data && !!result.data.start) {
1890
1944
  delete result.data.start;
1891
1945
  }
@@ -3103,22 +3157,28 @@ class MessageManager {
3103
3157
  timeoutId: null
3104
3158
  };
3105
3159
  const keyPromise = this.#setCallbackPromise(promiseHandler);
3106
- const paramsSend = omit(params || {}, ["callBack", "isSafely", "safelyTime"]);
3107
- const { callBack } = params || {};
3160
+ let paramsSend = null;
3161
+ const optionsSend = omit(params || {}, ["singleOption", "callBack", "isSafely", "safelyTime"]);
3162
+ const { callBack, singleOption } = params || {};
3108
3163
  if (callBack) {
3109
3164
  this.#callbackSingletone.set(keyPromise, callBack);
3110
3165
  }
3166
+ if (singleOption) {
3167
+ paramsSend = singleOption;
3168
+ } else if (Object.keys(optionsSend).length > 0) {
3169
+ paramsSend = { ...optionsSend };
3170
+ }
3111
3171
  if (command.toString().includes(":")) {
3112
3172
  cmd = {
3113
3173
  method: command.toString(),
3114
- params: paramsSend ?? "",
3174
+ params: paramsSend || "",
3115
3175
  callback: keyPromise,
3116
3176
  appSid: this.#appFrame.getAppSid()
3117
3177
  };
3118
3178
  } else {
3119
3179
  cmd = command.toString();
3120
3180
  const listParams = [
3121
- params ? JSON.stringify(paramsSend) : null,
3181
+ paramsSend ? JSON.stringify(paramsSend) : "",
3122
3182
  keyPromise,
3123
3183
  this.#appFrame.getAppSid()
3124
3184
  ];
@@ -3936,6 +3996,30 @@ class PlacementManager {
3936
3996
  }
3937
3997
  );
3938
3998
  }
3999
+ /**
4000
+ * Set Up the Interface Event Handler
4001
+ * @param {string} command
4002
+ * @param {null | string | Record<string, any>} parameters
4003
+ * @param {(...args: any[]) => void} callBack
4004
+ *
4005
+ * @return {Promise<any>}
4006
+ */
4007
+ async callCustomBind(command, parameters = null, callBack) {
4008
+ let options = {};
4009
+ if (Type.isString(parameters)) {
4010
+ options["singleOption"] = parameters;
4011
+ } else if (Type.isObjectLike(parameters)) {
4012
+ options = { ...parameters };
4013
+ }
4014
+ return this.#messageManager.send(
4015
+ command,
4016
+ {
4017
+ ...options,
4018
+ callBack,
4019
+ isSafely: true
4020
+ }
4021
+ );
4022
+ }
3939
4023
  }
3940
4024
 
3941
4025
  class B24Frame extends AbstractB24 {
@@ -13549,5 +13633,5 @@ async function initializeB24Frame() {
13549
13633
  });
13550
13634
  }
13551
13635
 
13552
- export { AbstractB24, AjaxError, AjaxResult, AppFrame, AuthHookManager, AuthManager, B24Frame, B24Hook, B24LangList, PullClient as B24PullClientManager, Browser, CloseReasons, ConnectionType, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, MessageManager, OptionsManager$1 as OptionsManager, ParentManager, PlacementManager, PullStatus, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, RpcMethod, SenderType, ServerMode, SliderManager, StatusDescriptions, SubscriptionType, SystemCommands, Text, Type, TypeOption, TypeSpecificUrl, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
13636
+ export { AbstractB24, AjaxError, AjaxResult, AppFrame, AuthHookManager, AuthManager, B24Frame, B24Hook, B24LangList, PullClient as B24PullClientManager, Browser, CatalogProductImageType, CatalogProductType, CatalogRoundingRuleType, CloseReasons, ConnectionType, DataType, DialogManager, EnumAppStatus, EnumCrmEntityType, EnumCrmEntityTypeId, EnumCrmEntityTypeShort, ListRpcError, LoadDataType, LoggerBrowser, LoggerType, LsKeys, MessageCommands, MessageManager, OptionsManager$1 as OptionsManager, ParentManager, PlacementManager, ProductRowDiscountTypeId, PullStatus, RestrictionManagerParamsBase, RestrictionManagerParamsForEnterprise, Result, RpcMethod, SenderType, ServerMode, SliderManager, StatusDescriptions, SubscriptionType, SystemCommands, Text, Type, TypeOption, TypeSpecificUrl, initializeB24Frame, isArrayOfArray, omit, pick, useB24Helper, useFormatter };
13553
13637
  //# sourceMappingURL=index.mjs.map