n8n-nodes-pragma-bitrix24 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/LICENSE +51 -0
  2. package/README.md +340 -0
  3. package/dist/credentials/Bitrix24Api.credentials.js +55 -0
  4. package/dist/nodes/Bitrix24/Bitrix24.node.js +1410 -0
  5. package/dist/nodes/Bitrix24/Company.js +17 -0
  6. package/dist/nodes/Bitrix24/Contact.js +31 -0
  7. package/dist/nodes/Bitrix24/Deal.js +17 -0
  8. package/dist/nodes/Bitrix24/Helpers.js +300 -0
  9. package/dist/nodes/Bitrix24/Lead.js +17 -0
  10. package/dist/nodes/Bitrix24/SmartProcess.js +1 -0
  11. package/dist/nodes/Bitrix24/bitrix24.svg +7 -0
  12. package/dist/nodes/Bitrix24/types.js +58 -0
  13. package/dist/nodes/Bitrix24AI/Bitrix24AI.node.js +205 -0
  14. package/dist/nodes/Bitrix24App/Bitrix24App.node.js +179 -0
  15. package/dist/nodes/Bitrix24Auxiliary/Bitrix24Auxiliary.node.js +566 -0
  16. package/dist/nodes/Bitrix24Booking/Bitrix24Booking.node.js +871 -0
  17. package/dist/nodes/Bitrix24Calendar/Bitrix24Calendar.node.js +471 -0
  18. package/dist/nodes/Bitrix24ChatBot/Bitrix24ChatBot.node.js +522 -0
  19. package/dist/nodes/Bitrix24Commerce/Bitrix24Commerce.node.js +431 -0
  20. package/dist/nodes/Bitrix24Department/Bitrix24Department.node.js +317 -0
  21. package/dist/nodes/Bitrix24Disk/Bitrix24Disk.node.js +334 -0
  22. package/dist/nodes/Bitrix24Document/Bitrix24Document.node.js +280 -0
  23. package/dist/nodes/Bitrix24Entity/Bitrix24Entity.node.js +263 -0
  24. package/dist/nodes/Bitrix24Group/Bitrix24Group.node.js +327 -0
  25. package/dist/nodes/Bitrix24Lists/Bitrix24Lists.node.js +406 -0
  26. package/dist/nodes/Bitrix24Log/Bitrix24Log.node.js +309 -0
  27. package/dist/nodes/Bitrix24Mail/Bitrix24Mail.node.js +109 -0
  28. package/dist/nodes/Bitrix24MessageService/Bitrix24MessageService.node.js +218 -0
  29. package/dist/nodes/Bitrix24OpenChannels/Bitrix24OpenChannels.node.js +379 -0
  30. package/dist/nodes/Bitrix24PaySystem/Bitrix24PaySystem.node.js +241 -0
  31. package/dist/nodes/Bitrix24Pipeline/Bitrix24Pipeline.node.js +553 -0
  32. package/dist/nodes/Bitrix24Pipeline/bitrix24.svg +7 -0
  33. package/dist/nodes/Bitrix24Sale/Bitrix24Sale.node.js +391 -0
  34. package/dist/nodes/Bitrix24Scrum/Bitrix24Scrum.node.js +555 -0
  35. package/dist/nodes/Bitrix24Scrum/bitrix24.svg +7 -0
  36. package/dist/nodes/Bitrix24Sign/Bitrix24Sign.node.js +132 -0
  37. package/dist/nodes/Bitrix24Social/Bitrix24Social.node.js +224 -0
  38. package/dist/nodes/Bitrix24Task/Bitrix24Task.node.js +444 -0
  39. package/dist/nodes/Bitrix24Telephony/Bitrix24Telephony.node.js +511 -0
  40. package/dist/nodes/Bitrix24Timeman/Bitrix24Timeman.node.js +196 -0
  41. package/dist/nodes/Bitrix24Tool/Bitrix24Tool.node.js +1035 -0
  42. package/dist/nodes/Bitrix24Tool/bitrix24.svg +7 -0
  43. package/dist/nodes/Bitrix24Trigger/Bitrix24Trigger.node.js +184 -0
  44. package/dist/nodes/Bitrix24User/Bitrix24User.node.js +351 -0
  45. package/dist/nodes/Bitrix24UserField/Bitrix24UserField.node.js +386 -0
  46. package/dist/nodes/Bitrix24UserField/bitrix24.svg +7 -0
  47. package/dist/nodes/shared/bitrix24.svg +7 -0
  48. package/dist/nodes/shared/localization.js +189 -0
  49. package/dist/nodes/shared/types.js +22 -0
  50. package/index.js +10 -0
  51. package/package.json +108 -0
@@ -0,0 +1,386 @@
1
+ "use strict";
2
+ /**
3
+ * Bitrix24 UserField — Нода пользовательских полей
4
+ *
5
+ * Bitrix24 PRAGMA.by nodes for n8n
6
+ * Профессиональная интеграция с Битрикс24.
7
+ *
8
+ * @author PRAGMA & Азбука Решений
9
+ * @copyright 2026 PRAGMA (https://pragma.by/) & Азбука Решений (https://abc-solution.ru/)
10
+ *
11
+ * Контакты:
12
+ * 🇧🇾 PRAGMA: +375 (44) 702-70-90 | https://pragma.by/
13
+ * 🇷🇺 Азбука Решений: +7 (939) 555-19-60 | https://abc-solution.ru/
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Bitrix24UserField = void 0;
17
+ const n8n_workflow_1 = require("n8n-workflow");
18
+ const Helpers_1 = require("../Bitrix24/Helpers");
19
+ class Bitrix24UserField {
20
+ constructor() {
21
+ this.description = {
22
+ displayName: 'Bitrix24 Пользовательские поля',
23
+ name: 'bitrix24UserField',
24
+ icon: 'file:bitrix24.svg',
25
+ group: ['transform'],
26
+ version: 1,
27
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
28
+ description: 'Создание и управление пользовательскими (UF_*) полями CRM',
29
+ defaults: {
30
+ name: 'Bitrix24 UF',
31
+ },
32
+ inputs: ['main'],
33
+ outputs: ['main'],
34
+ credentials: [
35
+ {
36
+ name: 'bitrix24Api',
37
+ required: true,
38
+ },
39
+ ],
40
+ properties: [
41
+ {
42
+ displayName: 'Resource',
43
+ name: 'resource',
44
+ type: 'options',
45
+ noDataExpression: true,
46
+ options: [
47
+ {
48
+ name: 'Lead',
49
+ value: 'lead',
50
+ },
51
+ {
52
+ name: 'Deal',
53
+ value: 'deal',
54
+ },
55
+ {
56
+ name: 'Contact',
57
+ value: 'contact',
58
+ },
59
+ {
60
+ name: 'Company',
61
+ value: 'company',
62
+ },
63
+ ],
64
+ default: 'lead',
65
+ required: true,
66
+ },
67
+ {
68
+ displayName: 'Operation',
69
+ name: 'operation',
70
+ type: 'options',
71
+ noDataExpression: true,
72
+ options: [
73
+ {
74
+ name: 'Create',
75
+ value: 'create',
76
+ description: 'Create a user field',
77
+ action: 'Create a user field',
78
+ },
79
+ {
80
+ name: 'Update',
81
+ value: 'update',
82
+ description: 'Update a user field',
83
+ action: 'Update a user field',
84
+ },
85
+ {
86
+ name: 'Get',
87
+ value: 'get',
88
+ description: 'Get a user field',
89
+ action: 'Get a user field',
90
+ },
91
+ {
92
+ name: 'Get All',
93
+ value: 'getAll',
94
+ description: 'Get all user fields',
95
+ action: 'Get all user fields',
96
+ },
97
+ {
98
+ name: 'Delete',
99
+ value: 'delete',
100
+ description: 'Delete a user field',
101
+ action: 'Delete a user field',
102
+ },
103
+ ],
104
+ default: 'create',
105
+ },
106
+ // Field ID
107
+ {
108
+ displayName: 'Field ID',
109
+ name: 'fieldId',
110
+ type: 'string',
111
+ default: '',
112
+ required: true,
113
+ displayOptions: {
114
+ show: {
115
+ operation: ['update', 'get', 'delete'],
116
+ },
117
+ },
118
+ description: 'ID of the user field',
119
+ },
120
+ // Create/Update Fields
121
+ {
122
+ displayName: 'Field Name',
123
+ name: 'fieldName',
124
+ type: 'string',
125
+ default: '',
126
+ required: true,
127
+ displayOptions: {
128
+ show: {
129
+ operation: ['create'],
130
+ },
131
+ },
132
+ description: 'Name of the field (e.g. UF_CRM_CUSTOM_FIELD)',
133
+ },
134
+ {
135
+ displayName: 'Field Label',
136
+ name: 'fieldLabel',
137
+ type: 'string',
138
+ default: '',
139
+ required: true,
140
+ displayOptions: {
141
+ show: {
142
+ operation: ['create', 'update'],
143
+ },
144
+ },
145
+ description: 'Label of the field',
146
+ },
147
+ {
148
+ displayName: 'Field Type',
149
+ name: 'userTypeId',
150
+ type: 'options',
151
+ options: [
152
+ { name: 'String', value: 'string' },
153
+ { name: 'Integer', value: 'integer' },
154
+ { name: 'Double', value: 'double' },
155
+ { name: 'Boolean', value: 'boolean' },
156
+ { name: 'Enumeration', value: 'enumeration' },
157
+ { name: 'Date', value: 'date' },
158
+ { name: 'DateTime', value: 'datetime' },
159
+ { name: 'File', value: 'file' },
160
+ { name: 'Money', value: 'money' },
161
+ { name: 'URL', value: 'url' },
162
+ ],
163
+ default: 'string',
164
+ required: true,
165
+ displayOptions: {
166
+ show: {
167
+ operation: ['create'],
168
+ },
169
+ },
170
+ description: 'Type of the user field',
171
+ },
172
+ // List Values
173
+ {
174
+ displayName: 'List Values',
175
+ name: 'listValues',
176
+ type: 'fixedCollection',
177
+ typeOptions: {
178
+ multipleValues: true,
179
+ sortable: true,
180
+ },
181
+ displayOptions: {
182
+ show: {
183
+ operation: ['create', 'update'],
184
+ userTypeId: ['enumeration'],
185
+ },
186
+ },
187
+ description: 'Values for the enumeration list',
188
+ default: {},
189
+ options: [
190
+ {
191
+ name: 'values',
192
+ displayName: 'Values',
193
+ values: [
194
+ {
195
+ displayName: 'Value',
196
+ name: 'value',
197
+ type: 'string',
198
+ default: '',
199
+ description: 'Value of the list item',
200
+ },
201
+ ],
202
+ },
203
+ ],
204
+ },
205
+ // Options
206
+ {
207
+ displayName: 'Multiple',
208
+ name: 'multiple',
209
+ type: 'boolean',
210
+ default: false,
211
+ displayOptions: {
212
+ show: {
213
+ operation: ['create', 'update'],
214
+ },
215
+ },
216
+ description: 'Whether the field is multiple',
217
+ },
218
+ {
219
+ displayName: 'Mandatory',
220
+ name: 'mandatory',
221
+ type: 'boolean',
222
+ default: false,
223
+ displayOptions: {
224
+ show: {
225
+ operation: ['create', 'update'],
226
+ },
227
+ },
228
+ description: 'Whether the field is mandatory',
229
+ },
230
+ {
231
+ displayName: 'Show Filter',
232
+ name: 'showFilter',
233
+ type: 'boolean',
234
+ default: true,
235
+ displayOptions: {
236
+ show: {
237
+ operation: ['create', 'update'],
238
+ },
239
+ },
240
+ description: 'Show in filter',
241
+ },
242
+ {
243
+ displayName: 'Show In List',
244
+ name: 'showInList',
245
+ type: 'boolean',
246
+ default: true,
247
+ displayOptions: {
248
+ show: {
249
+ operation: ['create', 'update'],
250
+ },
251
+ },
252
+ description: 'Show in list',
253
+ },
254
+ ],
255
+ };
256
+ }
257
+ async execute() {
258
+ const items = this.getInputData();
259
+ const returnData = [];
260
+ const resource = this.getNodeParameter('resource', 0);
261
+ const operation = this.getNodeParameter('operation', 0);
262
+ try {
263
+ for (let i = 0; i < items.length; i++) {
264
+ try {
265
+ if (operation === 'create') {
266
+ const fieldName = this.getNodeParameter('fieldName', i);
267
+ const fieldLabel = this.getNodeParameter('fieldLabel', i);
268
+ const userTypeId = this.getNodeParameter('userTypeId', i);
269
+ const multiple = this.getNodeParameter('multiple', i);
270
+ const mandatory = this.getNodeParameter('mandatory', i);
271
+ const showFilter = this.getNodeParameter('showFilter', i);
272
+ const showInList = this.getNodeParameter('showInList', i);
273
+ const params = {
274
+ fields: {
275
+ FIELD_NAME: fieldName,
276
+ EDIT_FORM_LABEL: fieldLabel,
277
+ LIST_COLUMN_LABEL: fieldLabel,
278
+ USER_TYPE_ID: userTypeId,
279
+ MULTIPLE: multiple ? 'Y' : 'N',
280
+ MANDATORY: mandatory ? 'Y' : 'N',
281
+ SHOW_FILTER: showFilter ? 'Y' : 'N',
282
+ SHOW_IN_LIST: showInList ? 'Y' : 'N',
283
+ },
284
+ };
285
+ if (showFilter) {
286
+ params.fields.FILTER_LABEL = fieldLabel;
287
+ }
288
+ if (showInList) {
289
+ params.fields.LIST_FILTER_LABEL = fieldLabel;
290
+ }
291
+ if (userTypeId === 'enumeration') {
292
+ const listValues = this.getNodeParameter('listValues', i);
293
+ if (listValues.values && listValues.values.length > 0) {
294
+ params.fields.LIST = listValues.values.map((item, index) => ({
295
+ SORT: (index + 1) * 100,
296
+ VALUE: item.value,
297
+ }));
298
+ }
299
+ }
300
+ const endpoint = `crm.${resource}.userfield.add`;
301
+ const response = await Helpers_1.bitrixRequestWithRetry.call(this, 'POST', endpoint, params);
302
+ returnData.push({
303
+ json: response,
304
+ pairedItem: { item: i },
305
+ });
306
+ }
307
+ if (operation === 'update') {
308
+ const fieldId = this.getNodeParameter('fieldId', i);
309
+ const fieldLabel = this.getNodeParameter('fieldLabel', i);
310
+ const multiple = this.getNodeParameter('multiple', i);
311
+ const mandatory = this.getNodeParameter('mandatory', i);
312
+ const showFilter = this.getNodeParameter('showFilter', i);
313
+ const showInList = this.getNodeParameter('showInList', i);
314
+ const params = {
315
+ id: fieldId,
316
+ fields: {
317
+ EDIT_FORM_LABEL: fieldLabel,
318
+ LIST_COLUMN_LABEL: fieldLabel,
319
+ MULTIPLE: multiple ? 'Y' : 'N',
320
+ MANDATORY: mandatory ? 'Y' : 'N',
321
+ SHOW_FILTER: showFilter ? 'Y' : 'N',
322
+ SHOW_IN_LIST: showInList ? 'Y' : 'N',
323
+ },
324
+ };
325
+ if (showFilter)
326
+ params.fields.FILTER_LABEL = fieldLabel;
327
+ if (showInList)
328
+ params.fields.LIST_FILTER_LABEL = fieldLabel;
329
+ const endpoint = `crm.${resource}.userfield.update`;
330
+ const response = await Helpers_1.bitrixRequestWithRetry.call(this, 'POST', endpoint, params);
331
+ returnData.push({
332
+ json: response,
333
+ pairedItem: { item: i },
334
+ });
335
+ }
336
+ if (operation === 'get') {
337
+ const fieldId = this.getNodeParameter('fieldId', i);
338
+ const endpoint = `crm.${resource}.userfield.get`;
339
+ const response = await Helpers_1.bitrixRequestWithRetry.call(this, 'POST', endpoint, { id: fieldId });
340
+ returnData.push({
341
+ json: response,
342
+ pairedItem: { item: i },
343
+ });
344
+ }
345
+ if (operation === 'getAll') {
346
+ const endpoint = `crm.${resource}.userfield.list`;
347
+ const response = await Helpers_1.bitrixRequestWithRetry.call(this, 'POST', endpoint);
348
+ const result = response.result;
349
+ if (Array.isArray(result)) {
350
+ for (const item of result) {
351
+ returnData.push({
352
+ json: item,
353
+ pairedItem: { item: i },
354
+ });
355
+ }
356
+ }
357
+ }
358
+ if (operation === 'delete') {
359
+ const fieldId = this.getNodeParameter('fieldId', i);
360
+ const endpoint = `crm.${resource}.userfield.delete`;
361
+ const response = await Helpers_1.bitrixRequestWithRetry.call(this, 'POST', endpoint, { id: fieldId });
362
+ returnData.push({
363
+ json: response,
364
+ pairedItem: { item: i },
365
+ });
366
+ }
367
+ }
368
+ catch (error) {
369
+ if (this.continueOnFail()) {
370
+ returnData.push({
371
+ json: { error: error.message },
372
+ pairedItem: { item: i },
373
+ });
374
+ continue;
375
+ }
376
+ throw error;
377
+ }
378
+ }
379
+ return [returnData];
380
+ }
381
+ catch (error) {
382
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error);
383
+ }
384
+ }
385
+ }
386
+ exports.Bitrix24UserField = Bitrix24UserField;
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
3
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
4
+ <path d="M16,0 C24.8365,0 32,7.1635 32,16 C32,24.8365 24.8365,32 16,32 C7.1635,32 0,24.8365 0,16 C0,7.1635 7.1635,0 16,0" fill="#2FC7F7"/>
5
+ <path d="M13.3333,8 L18.6667,8 C21.6122,8 24,10.3878 24,13.3333 L24,18.6667 C24,21.6122 21.6122,24 18.6667,24 L13.3333,24 C10.3878,24 8,21.6122 8,18.6667 L8,13.3333 C8,10.3878 10.3878,8 13.3333,8" fill="#FFFFFF"/>
6
+ </g>
7
+ </svg>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
3
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
4
+ <path d="M16,0 C24.8365,0 32,7.1635 32,16 C32,24.8365 24.8365,32 16,32 C7.1635,32 0,24.8365 0,16 C0,7.1635 7.1635,0 16,0" fill="#2FC7F7"/>
5
+ <path d="M13.3333,8 L18.6667,8 C21.6122,8 24,10.3878 24,13.3333 L24,18.6667 C24,21.6122 21.6122,24 18.6667,24 L13.3333,24 C10.3878,24 8,21.6122 8,18.6667 L8,13.3333 C8,10.3878 10.3878,8 13.3333,8" fill="#FFFFFF"/>
6
+ </g>
7
+ </svg>
@@ -0,0 +1,189 @@
1
+ "use strict";
2
+ /**
3
+ * Стандарт Локализации n8n 2.6+
4
+ * Bitrix24 PRAGMA.by nodes for n8n
5
+ *
6
+ * Этот файл определяет стандарты для:
7
+ * - displayName на русском языке
8
+ * - description с детальными объяснениями
9
+ * - hint с контекстными подсказками
10
+ * - placeholder с примерами
11
+ *
12
+ * Все тексты следуют лучшим практикам n8n 2.6 (2026)
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.LIST_OPTIONS_RU = exports.JSON_FIELDS_RU = exports.FIELDS_RU = exports.RESOURCES_RU = exports.OPERATIONS_RU = void 0;
16
+ // ============================================
17
+ // СТАНДАРТНЫЕ ОПЕРАЦИИ CRM (на русском)
18
+ // ============================================
19
+ exports.OPERATIONS_RU = {
20
+ create: {
21
+ name: 'Создать',
22
+ action: 'Создать запись',
23
+ description: 'Создать новую запись в Битрикс24',
24
+ },
25
+ get: {
26
+ name: 'Получить',
27
+ action: 'Получить запись',
28
+ description: 'Получить запись по ID. Можно указать несколько ID через запятую.',
29
+ },
30
+ list: {
31
+ name: 'Список',
32
+ action: 'Получить список',
33
+ description: 'Получить список записей с фильтрацией и сортировкой',
34
+ },
35
+ update: {
36
+ name: 'Обновить',
37
+ action: 'Обновить запись',
38
+ description: 'Обновить существующую запись по ID',
39
+ },
40
+ delete: {
41
+ name: 'Удалить',
42
+ action: 'Удалить запись',
43
+ description: 'Удалить запись по ID. Действие необратимо!',
44
+ },
45
+ };
46
+ // ============================================
47
+ // СТАНДАРТНЫЕ РЕСУРСЫ CRM (на русском)
48
+ // ============================================
49
+ exports.RESOURCES_RU = {
50
+ lead: {
51
+ name: 'Лид',
52
+ description: 'Потенциальный клиент, первичное обращение. Лиды можно конвертировать в сделки, контакты и компании.',
53
+ hint: 'API: crm.lead.*',
54
+ },
55
+ deal: {
56
+ name: 'Сделка',
57
+ description: 'Коммерческая сделка с клиентом. Содержит сумму, стадию, связанные контакты и компанию.',
58
+ hint: 'API: crm.deal.*',
59
+ },
60
+ contact: {
61
+ name: 'Контакт',
62
+ description: 'Физическое лицо — клиент, партнёр или сотрудник клиента. Содержит телефоны, email, соцсети.',
63
+ hint: 'API: crm.contact.*',
64
+ },
65
+ company: {
66
+ name: 'Компания',
67
+ description: 'Юридическое лицо — организация-клиент. Содержит реквизиты, контакты, связанные сделки.',
68
+ hint: 'API: crm.company.*',
69
+ },
70
+ smart_process: {
71
+ name: 'Смарт-процесс (SPA)',
72
+ description: 'Динамические сущности для кастомных бизнес-процессов. Позволяют создавать свои типы записей.',
73
+ hint: 'Предварительно создайте тип SPA в Битрикс24',
74
+ },
75
+ quote: {
76
+ name: 'Предложение',
77
+ description: 'Коммерческое предложение клиенту с товарами/услугами и ценами.',
78
+ hint: 'API: crm.quote.*',
79
+ },
80
+ };
81
+ // ============================================
82
+ // СТАНДАРТНЫЕ ПОЛЯ (на русском с placeholder и hint)
83
+ // ============================================
84
+ exports.FIELDS_RU = {
85
+ id: {
86
+ displayName: 'ID',
87
+ description: 'Уникальный идентификатор записи в Битрикс24',
88
+ placeholder: '123',
89
+ hint: 'Для получения нескольких записей укажите ID через запятую: 1,2,3',
90
+ },
91
+ title: {
92
+ displayName: 'Название',
93
+ description: 'Название записи — отображается в списках и карточке',
94
+ placeholder: 'Новая сделка с ООО "Компания"',
95
+ hint: 'Используйте понятные названия для быстрого поиска',
96
+ },
97
+ assignedById: {
98
+ displayName: 'Ответственный',
99
+ description: 'Пользователь, ответственный за запись. Получает уведомления и задачи по ней.',
100
+ placeholder: '1',
101
+ hint: 'ID пользователя или выберите из списка',
102
+ },
103
+ phone: {
104
+ displayName: 'Телефон',
105
+ description: 'Номер телефона контакта. Поддерживает множественные значения с типами (рабочий, мобильный и т.д.)',
106
+ placeholder: '+7 (999) 123-45-67',
107
+ hint: 'Формат: +7 (XXX) XXX-XX-XX или международный',
108
+ },
109
+ email: {
110
+ displayName: 'Email',
111
+ description: 'Электронная почта. Поддерживает множественные значения с типами (рабочий, личный).',
112
+ placeholder: 'client@company.ru',
113
+ hint: 'Используется для рассылок и уведомлений',
114
+ },
115
+ opportunity: {
116
+ displayName: 'Сумма',
117
+ description: 'Сумма сделки или предложения в валюте по умолчанию',
118
+ placeholder: '100000',
119
+ hint: 'Только число без пробелов и символов валюты',
120
+ },
121
+ stageId: {
122
+ displayName: 'Стадия',
123
+ description: 'Текущая стадия сделки или лида в воронке продаж',
124
+ placeholder: 'NEW',
125
+ hint: 'Коды стадий: NEW, PREPARATION, NEGOTIATION, WON, LOST',
126
+ },
127
+ sourceId: {
128
+ displayName: 'Источник',
129
+ description: 'Откуда пришёл клиент: сайт, звонок, реклама и т.д.',
130
+ placeholder: 'WEB',
131
+ hint: 'Стандартные: CALL, WEB, ADVERTISING, PARTNER, RECOMMENDATION',
132
+ },
133
+ comments: {
134
+ displayName: 'Комментарий',
135
+ description: 'Произвольный текстовый комментарий к записи',
136
+ placeholder: 'Клиент заинтересован в услуге X, перезвонить завтра',
137
+ hint: 'Поддерживает HTML-форматирование',
138
+ },
139
+ };
140
+ // ============================================
141
+ // СТАНДАРТНЫЕ JSON-ПОЛЯ (на русском)
142
+ // ============================================
143
+ exports.JSON_FIELDS_RU = {
144
+ filter: {
145
+ displayName: 'Фильтр (JSON)',
146
+ description: 'JSON-объект фильтрации записей. Поддерживает операторы сравнения (>, <, >=, <=, !) и логику.',
147
+ placeholder: '{"STAGE_ID": "NEW", ">OPPORTUNITY": 50000}',
148
+ hint: 'Операторы: > (больше), < (меньше), ! (не равно), % (содержит)',
149
+ },
150
+ select: {
151
+ displayName: 'Поля для выборки (JSON)',
152
+ description: 'Массив полей, которые нужно вернуть. По умолчанию возвращаются все поля.',
153
+ placeholder: '["ID", "TITLE", "STAGE_ID", "OPPORTUNITY"]',
154
+ hint: 'Для ускорения запросов указывайте только нужные поля',
155
+ },
156
+ order: {
157
+ displayName: 'Сортировка (JSON)',
158
+ description: 'JSON-объект сортировки результатов',
159
+ placeholder: '{"OPPORTUNITY": "DESC", "DATE_CREATE": "ASC"}',
160
+ hint: 'ASC — по возрастанию, DESC — по убыванию',
161
+ },
162
+ fields: {
163
+ displayName: 'Поля (JSON)',
164
+ description: 'JSON-объект с полями для создания/обновления записи',
165
+ placeholder: '{"TITLE": "Новая сделка", "OPPORTUNITY": 100000, "STAGE_ID": "NEW"}',
166
+ hint: 'Полный список полей в документации API Битрикс24',
167
+ },
168
+ };
169
+ // ============================================
170
+ // СТАНДАРТНЫЕ ПАРАМЕТРЫ СПИСКА
171
+ // ============================================
172
+ exports.LIST_OPTIONS_RU = {
173
+ returnAll: {
174
+ displayName: 'Получить все',
175
+ description: 'Получить все записи без ограничения количества. Внимание: может занять много времени для больших объёмов данных.',
176
+ hint: 'Для больших списков используйте фильтры или ограничение',
177
+ },
178
+ limit: {
179
+ displayName: 'Лимит',
180
+ description: 'Максимальное количество записей для получения',
181
+ placeholder: '50',
182
+ hint: 'Максимум 50 записей за один запрос API',
183
+ },
184
+ useFilter: {
185
+ displayName: 'Использовать фильтр',
186
+ description: 'Включить расширенную фильтрацию записей',
187
+ hint: 'Позволяет настроить условия выборки',
188
+ },
189
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Centralized TypeScript types for Bitrix24 n8n nodes
4
+ * Standard 2026: Strong typing for all API interactions
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.isBitrixApiError = isBitrixApiError;
8
+ exports.isBitrixApiResponse = isBitrixApiResponse;
9
+ // ============================================
10
+ // Type Guards
11
+ // ============================================
12
+ function isBitrixApiError(response) {
13
+ return (typeof response === 'object' &&
14
+ response !== null &&
15
+ 'error' in response &&
16
+ typeof response.error === 'string');
17
+ }
18
+ function isBitrixApiResponse(response) {
19
+ return (typeof response === 'object' &&
20
+ response !== null &&
21
+ 'result' in response);
22
+ }
package/index.js ADDED
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ nodeTypes: [
5
+ require('./dist/nodes/Bitrix24/Bitrix24.node.js'),
6
+ ],
7
+ credentialTypes: [
8
+ require('./dist/credentials/Bitrix24Api.credentials.js'),
9
+ ],
10
+ };