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,132 @@
1
+ "use strict";
2
+ /**
3
+ * Bitrix24 Sign — Нода электронной подписи
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.Bitrix24Sign = void 0;
17
+ const Helpers_1 = require("../Bitrix24/Helpers");
18
+ class Bitrix24Sign {
19
+ constructor() {
20
+ this.description = {
21
+ displayName: 'Bitrix24 Подпись (КЭДО)',
22
+ name: 'bitrix24Sign',
23
+ icon: 'file:bitrix24.svg',
24
+ group: ['transform'],
25
+ version: 1,
26
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
27
+ description: 'Электронная подпись и кадровый документооборот',
28
+ defaults: {
29
+ name: 'Bitrix24 Подпись',
30
+ },
31
+ inputs: ['main'],
32
+ outputs: ['main'],
33
+ credentials: [
34
+ {
35
+ name: 'bitrix24Api',
36
+ required: true,
37
+ },
38
+ ],
39
+ properties: [
40
+ {
41
+ displayName: 'Resource',
42
+ name: 'resource',
43
+ type: 'options',
44
+ noDataExpression: true,
45
+ options: [
46
+ {
47
+ name: 'B2E (HR)',
48
+ value: 'b2e',
49
+ description: 'HR Employee Signing (KEDO)',
50
+ },
51
+ ],
52
+ default: 'b2e',
53
+ required: true,
54
+ },
55
+ {
56
+ displayName: 'Operation',
57
+ name: 'operation',
58
+ type: 'options',
59
+ noDataExpression: true,
60
+ options: [
61
+ {
62
+ name: 'List Personal Documents',
63
+ value: 'psList', // sign.b2e.personal.tail
64
+ action: 'List my signed documents',
65
+ displayOptions: { show: { resource: ['b2e'] } },
66
+ },
67
+ {
68
+ name: 'List Company Safe',
69
+ value: 'safeList', // sign.b2e.mysafe.tail
70
+ action: 'List company signed documents',
71
+ displayOptions: { show: { resource: ['b2e'] } },
72
+ },
73
+ ],
74
+ default: 'psList',
75
+ required: true,
76
+ },
77
+ // Fields (Simple list for now, as API is limited in documentation)
78
+ {
79
+ displayName: 'Limit',
80
+ name: 'limit',
81
+ type: 'number',
82
+ default: 50,
83
+ displayOptions: { show: { resource: ['b2e'] } },
84
+ description: 'Max results',
85
+ },
86
+ ],
87
+ };
88
+ }
89
+ async execute() {
90
+ const items = this.getInputData();
91
+ const returnData = [];
92
+ const resource = this.getNodeParameter('resource', 0);
93
+ const operation = this.getNodeParameter('operation', 0);
94
+ for (let i = 0; i < items.length; i++) {
95
+ try {
96
+ let endpoint = '';
97
+ let body = {};
98
+ if (resource === 'b2e') {
99
+ const limit = this.getNodeParameter('limit', i);
100
+ // Note: .tail methods might accept limit/offset, usually standard list params
101
+ // But docs didn't detail params, assuming standard list.
102
+ // Actually "tail" implies "recent" or stream.
103
+ if (operation === 'psList') {
104
+ endpoint = 'sign.b2e.personal.tail';
105
+ }
106
+ else if (operation === 'safeList') {
107
+ endpoint = 'sign.b2e.mysafe.tail';
108
+ }
109
+ }
110
+ const response = await Helpers_1.bitrixRequestWithRetry.call(this, 'POST', endpoint, body);
111
+ let result = response.result;
112
+ if (Array.isArray(result)) {
113
+ for (const item of result) {
114
+ returnData.push({ json: item, pairedItem: { item: i } });
115
+ }
116
+ }
117
+ else {
118
+ returnData.push({ json: result, pairedItem: { item: i } });
119
+ }
120
+ }
121
+ catch (error) {
122
+ if (this.continueOnFail()) {
123
+ returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
124
+ continue;
125
+ }
126
+ throw error;
127
+ }
128
+ }
129
+ return [returnData];
130
+ }
131
+ }
132
+ exports.Bitrix24Sign = Bitrix24Sign;
@@ -0,0 +1,224 @@
1
+ "use strict";
2
+ /**
3
+ * Bitrix24 Social — Нода социальной сети
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.Bitrix24Social = void 0;
17
+ const Helpers_1 = require("../Bitrix24/Helpers");
18
+ class Bitrix24Social {
19
+ constructor() {
20
+ this.description = {
21
+ displayName: 'Bitrix24 Соцсеть',
22
+ name: 'bitrix24Social',
23
+ icon: 'file:bitrix24.svg',
24
+ group: ['transform'],
25
+ version: 1,
26
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
27
+ description: 'Социальная сеть: посты, уведомления и подписки',
28
+ defaults: {
29
+ name: 'Bitrix24 Соцсеть',
30
+ },
31
+ inputs: ['main'],
32
+ outputs: ['main'],
33
+ credentials: [
34
+ {
35
+ name: 'bitrix24Api',
36
+ required: true,
37
+ },
38
+ ],
39
+ properties: [
40
+ {
41
+ displayName: 'Resource',
42
+ name: 'resource',
43
+ type: 'options',
44
+ noDataExpression: true,
45
+ options: [
46
+ {
47
+ name: 'Live Feed',
48
+ value: 'feed',
49
+ description: 'Post and comment in Live Feed',
50
+ },
51
+ {
52
+ name: 'Workgroup',
53
+ value: 'workgroup',
54
+ description: 'Manage Social Network groups',
55
+ },
56
+ {
57
+ name: 'Company Pulse',
58
+ value: 'pulse',
59
+ description: 'Get company activity metrics',
60
+ },
61
+ ],
62
+ default: 'feed',
63
+ required: true,
64
+ },
65
+ {
66
+ displayName: 'Operation',
67
+ name: 'operation',
68
+ type: 'options',
69
+ noDataExpression: true,
70
+ options: [
71
+ // Feed
72
+ {
73
+ name: 'Post Message',
74
+ value: 'post',
75
+ action: 'Create a new post',
76
+ displayOptions: { show: { resource: ['feed'] } },
77
+ },
78
+ {
79
+ name: 'Add Comment',
80
+ value: 'comment',
81
+ action: 'Add comment to post',
82
+ displayOptions: { show: { resource: ['feed'] } },
83
+ },
84
+ // Workgroup
85
+ {
86
+ name: 'Invite User',
87
+ value: 'invite',
88
+ action: 'Invite user to group',
89
+ displayOptions: { show: { resource: ['workgroup'] } },
90
+ },
91
+ {
92
+ name: 'Set Moderator',
93
+ value: 'set_moderator',
94
+ action: 'Set group moderators',
95
+ displayOptions: { show: { resource: ['workgroup'] } },
96
+ },
97
+ // Pulse
98
+ {
99
+ name: 'Get Metrics',
100
+ value: 'get',
101
+ action: 'Get pulse data',
102
+ displayOptions: { show: { resource: ['pulse'] } },
103
+ },
104
+ ],
105
+ default: 'post',
106
+ required: true,
107
+ },
108
+ // Feed Fields
109
+ {
110
+ displayName: 'Title',
111
+ name: 'title',
112
+ type: 'string',
113
+ default: '',
114
+ displayOptions: { show: { resource: ['feed'], operation: ['post'] } },
115
+ description: 'Post title',
116
+ required: true,
117
+ },
118
+ {
119
+ displayName: 'Message',
120
+ name: 'message',
121
+ type: 'string',
122
+ default: '',
123
+ displayOptions: { show: { resource: ['feed'], operation: ['post', 'comment'] } },
124
+ description: 'Post body or comment text',
125
+ required: true,
126
+ },
127
+ {
128
+ displayName: 'Post ID',
129
+ name: 'postId',
130
+ type: 'string',
131
+ default: '',
132
+ displayOptions: { show: { resource: ['feed'], operation: ['comment'] } },
133
+ required: true,
134
+ },
135
+ {
136
+ displayName: 'Recipients (Dest)',
137
+ name: 'dest',
138
+ type: 'string', // Should be array, but string for simple comma separation or JSON
139
+ default: 'UA',
140
+ displayOptions: { show: { resource: ['feed'], operation: ['post'] } },
141
+ description: 'Target audience code (e.g. UA = All Users, SG1 = Group 1, U5 = User 5)',
142
+ },
143
+ // Workgroup Fields
144
+ {
145
+ displayName: 'Group ID',
146
+ name: 'groupId',
147
+ type: 'string',
148
+ default: '',
149
+ displayOptions: { show: { resource: ['workgroup'] } },
150
+ required: true,
151
+ },
152
+ {
153
+ displayName: 'User ID',
154
+ name: 'userId',
155
+ type: 'string',
156
+ default: '',
157
+ displayOptions: { show: { resource: ['workgroup'] } },
158
+ required: true,
159
+ },
160
+ ],
161
+ };
162
+ }
163
+ async execute() {
164
+ const items = this.getInputData();
165
+ const returnData = [];
166
+ const resource = this.getNodeParameter('resource', 0);
167
+ const operation = this.getNodeParameter('operation', 0);
168
+ for (let i = 0; i < items.length; i++) {
169
+ try {
170
+ let endpoint = '';
171
+ let body = {};
172
+ if (resource === 'feed') {
173
+ if (operation === 'post') {
174
+ endpoint = 'log.blogpost.add';
175
+ body.TITLE = this.getNodeParameter('title', i);
176
+ body.POST_MESSAGE = this.getNodeParameter('message', i);
177
+ const dest = this.getNodeParameter('dest', i);
178
+ // Convert dest string to array if needed, or API takes array
179
+ // log.blogpost.add allows DEST: ['UA']
180
+ body.DEST = dest.split(',').map(d => d.trim());
181
+ }
182
+ if (operation === 'comment') {
183
+ endpoint = 'log.blogcomment.add';
184
+ body.POST_ID = this.getNodeParameter('postId', i);
185
+ body.POST_MESSAGE = this.getNodeParameter('message', i);
186
+ }
187
+ }
188
+ if (resource === 'workgroup') {
189
+ if (operation === 'invite') {
190
+ endpoint = 'sonet_group.user.add';
191
+ body.GROUP_ID = this.getNodeParameter('groupId', i);
192
+ body.USER_ID = this.getNodeParameter('userId', i);
193
+ }
194
+ if (operation === 'set_moderator') {
195
+ endpoint = 'sonet_group.user.update'; // update role
196
+ body.GROUP_ID = this.getNodeParameter('groupId', i);
197
+ body.USER_ID = this.getNodeParameter('userId', i);
198
+ body.ROLE = 'E'; // E = Moderator? Checks docs.
199
+ // A = Owner, E = Moderator, K = User?
200
+ // Docs: ROLE: A (owner), E (moderator), K (member).
201
+ body.ROLE = 'E';
202
+ }
203
+ }
204
+ if (resource === 'pulse') {
205
+ if (operation === 'get') {
206
+ endpoint = 'pulse.get'; // Might require strict permissions
207
+ // Usually pulse.get returns company activity
208
+ }
209
+ }
210
+ const response = await Helpers_1.bitrixRequestWithRetry.call(this, 'POST', endpoint + '.json', body);
211
+ returnData.push({ json: { result: response.result }, pairedItem: { item: i } });
212
+ }
213
+ catch (error) {
214
+ if (this.continueOnFail()) {
215
+ returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
216
+ continue;
217
+ }
218
+ throw error;
219
+ }
220
+ }
221
+ return [returnData];
222
+ }
223
+ }
224
+ exports.Bitrix24Social = Bitrix24Social;