n8n-nodes-mautic-advanced 0.7.1 → 0.7.2

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 (28) hide show
  1. package/dist/credentials/MauticAdvancedApi.credentials.js +19 -0
  2. package/dist/credentials/MauticAdvancedOAuth2Api.credentials.js +19 -0
  3. package/dist/nodes/MauticAdvanced/CampaignDescription.js +20 -20
  4. package/dist/nodes/MauticAdvanced/CategoryDescription.js +163 -29
  5. package/dist/nodes/MauticAdvanced/CompanyDescription.js +10 -10
  6. package/dist/nodes/MauticAdvanced/ContactDescription.js +52 -0
  7. package/dist/nodes/MauticAdvanced/EmailDescription.js +612 -0
  8. package/dist/nodes/MauticAdvanced/FieldDescription.js +68 -68
  9. package/dist/nodes/MauticAdvanced/GenericFunctions.js +2 -2
  10. package/dist/nodes/MauticAdvanced/MauticAdvanced.node.js +117 -1
  11. package/dist/nodes/MauticAdvanced/MauticAdvanced.svg +1 -1
  12. package/dist/nodes/MauticAdvanced/NotificationDescription.js +52 -34
  13. package/dist/nodes/MauticAdvanced/RoleDescription.js +367 -0
  14. package/dist/nodes/MauticAdvanced/SegmentDescription.js +21 -21
  15. package/dist/nodes/MauticAdvanced/StatsDescription.js +177 -0
  16. package/dist/nodes/MauticAdvanced/TagDescription.js +14 -14
  17. package/dist/nodes/MauticAdvanced/ThemeDescription.js +175 -0
  18. package/dist/nodes/MauticAdvanced/UserDescription.js +546 -0
  19. package/dist/nodes/MauticAdvanced/operations/ContactOperations.js +27 -2
  20. package/dist/nodes/MauticAdvanced/operations/EmailOperations.js +202 -0
  21. package/dist/nodes/MauticAdvanced/operations/MiscellaneousOperations.js +24 -62
  22. package/dist/nodes/MauticAdvanced/operations/RoleOperations.js +143 -0
  23. package/dist/nodes/MauticAdvanced/operations/StatsOperations.js +109 -0
  24. package/dist/nodes/MauticAdvanced/operations/TagOperations.js +203 -0
  25. package/dist/nodes/MauticAdvanced/operations/ThemeOperations.js +209 -0
  26. package/dist/nodes/MauticAdvanced/operations/UserOperations.js +189 -0
  27. package/dist/nodes/MauticAdvanced/utils/ApiHelpers.js +2 -2
  28. package/package.json +3 -2
@@ -14,6 +14,25 @@ class MauticAdvancedApi {
14
14
  default: '',
15
15
  placeholder: 'https://name.mautic.net',
16
16
  },
17
+ {
18
+ displayName: 'Mautic Version',
19
+ name: 'mauticVersion',
20
+ type: 'options',
21
+ default: 'v6',
22
+ options: [
23
+ {
24
+ name: 'v6 or lower',
25
+ value: 'v6',
26
+ description: 'Use legacy v1 API endpoints.',
27
+ },
28
+ {
29
+ name: 'v7 or higher',
30
+ value: 'v7',
31
+ description: 'Use v2 API endpoints where available.',
32
+ },
33
+ ],
34
+ description: 'Select the major Mautic version of this instance so the node can route API calls correctly.',
35
+ },
17
36
  {
18
37
  displayName: 'Username',
19
38
  name: 'username',
@@ -21,6 +21,25 @@ class MauticAdvancedOAuth2Api {
21
21
  default: '',
22
22
  placeholder: 'https://name.mautic.net',
23
23
  },
24
+ {
25
+ displayName: 'Mautic Version',
26
+ name: 'mauticVersion',
27
+ type: 'options',
28
+ default: 'v6',
29
+ options: [
30
+ {
31
+ name: 'v6 or lower',
32
+ value: 'v6',
33
+ description: 'Use legacy v1 API endpoints.',
34
+ },
35
+ {
36
+ name: 'v7 or higher',
37
+ value: 'v7',
38
+ description: 'Use v2 API endpoints where available.',
39
+ },
40
+ ],
41
+ description: 'Select the major Mautic version of this instance so the node can route API calls correctly.',
42
+ },
24
43
  {
25
44
  displayName: 'Authorization URL',
26
45
  name: 'authUrl',
@@ -90,6 +90,13 @@ exports.campaignFields = [
90
90
  default: {},
91
91
  placeholder: 'Add Field',
92
92
  options: [
93
+ {
94
+ displayName: 'Alias',
95
+ name: 'alias',
96
+ type: 'string',
97
+ default: '',
98
+ description: 'Used to generate the URL for the campaign',
99
+ },
93
100
  {
94
101
  displayName: 'Description',
95
102
  name: 'description',
@@ -118,13 +125,6 @@ exports.campaignFields = [
118
125
  default: '',
119
126
  description: 'Date/time when the campaign should be published',
120
127
  },
121
- {
122
- displayName: 'Alias',
123
- name: 'alias',
124
- type: 'string',
125
- default: '',
126
- description: 'Used to generate the URL for the campaign',
127
- },
128
128
  ],
129
129
  },
130
130
  /* -------------------------------------------------------------------------- */
@@ -170,18 +170,18 @@ exports.campaignFields = [
170
170
  placeholder: 'Add Field',
171
171
  options: [
172
172
  {
173
- displayName: 'Description',
174
- name: 'description',
173
+ displayName: 'Alias',
174
+ name: 'alias',
175
175
  type: 'string',
176
176
  default: '',
177
- description: 'Description of the campaign',
177
+ description: 'Used to generate the URL for the campaign',
178
178
  },
179
179
  {
180
- displayName: 'Name',
181
- name: 'name',
180
+ displayName: 'Description',
181
+ name: 'description',
182
182
  type: 'string',
183
183
  default: '',
184
- description: 'Name of the campaign',
184
+ description: 'Description of the campaign',
185
185
  },
186
186
  {
187
187
  displayName: 'Is Published',
@@ -190,6 +190,13 @@ exports.campaignFields = [
190
190
  default: false,
191
191
  description: 'Whether the campaign is published',
192
192
  },
193
+ {
194
+ displayName: 'Name',
195
+ name: 'name',
196
+ type: 'string',
197
+ default: '',
198
+ description: 'Name of the campaign',
199
+ },
193
200
  {
194
201
  displayName: 'Publish Down',
195
202
  name: 'publishDown',
@@ -204,13 +211,6 @@ exports.campaignFields = [
204
211
  default: '',
205
212
  description: 'Date/time when the campaign should be published',
206
213
  },
207
- {
208
- displayName: 'Alias',
209
- name: 'alias',
210
- type: 'string',
211
- default: '',
212
- description: 'Used to generate the URL for the campaign',
213
- },
214
214
  ],
215
215
  },
216
216
  /* -------------------------------------------------------------------------- */
@@ -63,12 +63,12 @@ exports.categoryFields = [
63
63
  },
64
64
  },
65
65
  default: '',
66
- description: 'The title of the category to create',
66
+ description: 'The title or name of the category',
67
67
  },
68
68
  {
69
69
  displayName: 'Bundle',
70
70
  name: 'bundle',
71
- type: 'string',
71
+ type: 'options',
72
72
  required: true,
73
73
  displayOptions: {
74
74
  show: {
@@ -76,8 +76,75 @@ exports.categoryFields = [
76
76
  operation: ['create'],
77
77
  },
78
78
  },
79
- default: '',
80
- description: 'The bundle where the category will be available',
79
+ options: [
80
+ {
81
+ name: 'Global',
82
+ value: 'global',
83
+ description: 'Available across all Mautic elements',
84
+ },
85
+ {
86
+ name: 'Asset',
87
+ value: 'asset',
88
+ description: 'For downloadable assets',
89
+ },
90
+ {
91
+ name: 'Campaign',
92
+ value: 'campaign',
93
+ description: 'For marketing campaigns',
94
+ },
95
+ {
96
+ name: 'Email',
97
+ value: 'email',
98
+ description: 'For email templates',
99
+ },
100
+ {
101
+ name: 'Focus Items',
102
+ value: 'plugin:focus',
103
+ description: 'For focus items',
104
+ },
105
+ {
106
+ name: 'Form',
107
+ value: 'form',
108
+ description: 'For forms',
109
+ },
110
+ {
111
+ name: 'Marketing Messages',
112
+ value: 'messages',
113
+ description: 'For marketing messages',
114
+ },
115
+ {
116
+ name: 'Page',
117
+ value: 'page',
118
+ description: 'For landing pages',
119
+ },
120
+ {
121
+ name: 'Point',
122
+ value: 'point',
123
+ description: 'For point actions',
124
+ },
125
+ {
126
+ name: 'Segment',
127
+ value: 'segment',
128
+ description: 'For contact segments',
129
+ },
130
+ {
131
+ name: 'Text Message',
132
+ value: 'sms',
133
+ description: 'For SMS/text messages',
134
+ },
135
+ {
136
+ name: 'Social Monitoring',
137
+ value: 'plugin:mauticSocial',
138
+ description: 'For social monitoring',
139
+ },
140
+ {
141
+ name: 'Stage',
142
+ value: 'stage',
143
+ description: 'For contact stages',
144
+ },
145
+ ],
146
+ default: 'global',
147
+ description: 'The bundle where the category will be available. Determines which Mautic elements can use this category',
81
148
  },
82
149
  {
83
150
  displayName: 'Description',
@@ -90,12 +157,12 @@ exports.categoryFields = [
90
157
  },
91
158
  },
92
159
  default: '',
93
- description: 'The description of the category',
160
+ description: 'Optional description of the category to help identify its purpose',
94
161
  },
95
162
  {
96
163
  displayName: 'Color',
97
164
  name: 'color',
98
- type: 'string',
165
+ type: 'color',
99
166
  displayOptions: {
100
167
  show: {
101
168
  resource: ['category'],
@@ -103,7 +170,7 @@ exports.categoryFields = [
103
170
  },
104
171
  },
105
172
  default: '',
106
- description: 'The color of the category',
173
+ description: 'Color for visual organisation and identification of the category in Mautic',
107
174
  },
108
175
  /* -------------------------------------------------------------------------- */
109
176
  /* category:update */
@@ -149,32 +216,99 @@ exports.categoryFields = [
149
216
  },
150
217
  options: [
151
218
  {
152
- displayName: 'Title',
153
- name: 'title',
154
- type: 'string',
219
+ displayName: 'Bundle',
220
+ name: 'bundle',
221
+ type: 'options',
155
222
  default: '',
156
- description: 'The new title of the category',
223
+ options: [
224
+ {
225
+ name: 'Global',
226
+ value: 'global',
227
+ description: 'Available across all Mautic elements',
228
+ },
229
+ {
230
+ name: 'Asset',
231
+ value: 'asset',
232
+ description: 'For downloadable assets',
233
+ },
234
+ {
235
+ name: 'Campaign',
236
+ value: 'campaign',
237
+ description: 'For marketing campaigns',
238
+ },
239
+ {
240
+ name: 'Email',
241
+ value: 'email',
242
+ description: 'For email templates',
243
+ },
244
+ {
245
+ name: 'Focus Items',
246
+ value: 'plugin:focus',
247
+ description: 'For focus items',
248
+ },
249
+ {
250
+ name: 'Form',
251
+ value: 'form',
252
+ description: 'For forms',
253
+ },
254
+ {
255
+ name: 'Marketing Messages',
256
+ value: 'messages',
257
+ description: 'For marketing messages',
258
+ },
259
+ {
260
+ name: 'Page',
261
+ value: 'page',
262
+ description: 'For landing pages',
263
+ },
264
+ {
265
+ name: 'Point',
266
+ value: 'point',
267
+ description: 'For point actions',
268
+ },
269
+ {
270
+ name: 'Segment',
271
+ value: 'segment',
272
+ description: 'For contact segments',
273
+ },
274
+ {
275
+ name: 'Text Message',
276
+ value: 'sms',
277
+ description: 'For SMS/text messages',
278
+ },
279
+ {
280
+ name: 'Social Monitoring',
281
+ value: 'plugin:mauticSocial',
282
+ description: 'For social monitoring',
283
+ },
284
+ {
285
+ name: 'Stage',
286
+ value: 'stage',
287
+ description: 'For contact stages',
288
+ },
289
+ ],
290
+ description: 'The bundle where the category will be available. Determines which Mautic elements can use this category',
157
291
  },
158
292
  {
159
- displayName: 'Bundle',
160
- name: 'bundle',
161
- type: 'string',
293
+ displayName: 'Color',
294
+ name: 'color',
295
+ type: 'color',
162
296
  default: '',
163
- description: 'The new bundle of the category',
297
+ description: 'Color for visual organisation and identification of the category in Mautic',
164
298
  },
165
299
  {
166
300
  displayName: 'Description',
167
301
  name: 'description',
168
302
  type: 'string',
169
303
  default: '',
170
- description: 'The new description of the category',
304
+ description: 'Optional description of the category to help identify its purpose',
171
305
  },
172
306
  {
173
- displayName: 'Color',
174
- name: 'color',
307
+ displayName: 'Title',
308
+ name: 'title',
175
309
  type: 'string',
176
310
  default: '',
177
- description: 'The new color of the category',
311
+ description: 'The new title or name of the category',
178
312
  },
179
313
  ],
180
314
  },
@@ -242,11 +376,11 @@ exports.categoryFields = [
242
376
  },
243
377
  options: [
244
378
  {
245
- displayName: 'Search',
246
- name: 'search',
247
- type: 'string',
248
- default: '',
249
- description: 'String or search command to filter categories by.',
379
+ displayName: 'Minimal',
380
+ name: 'minimal',
381
+ type: 'boolean',
382
+ default: false,
383
+ description: 'Whether to return a minimal set of data',
250
384
  },
251
385
  {
252
386
  displayName: 'Order By',
@@ -280,11 +414,11 @@ exports.categoryFields = [
280
414
  description: 'Whether to return only currently published entities',
281
415
  },
282
416
  {
283
- displayName: 'Minimal',
284
- name: 'minimal',
285
- type: 'boolean',
286
- default: false,
287
- description: 'Whether to return a minimal set of data',
417
+ displayName: 'Search',
418
+ name: 'search',
419
+ type: 'string',
420
+ default: '',
421
+ description: 'String or search command to filter categories by.',
288
422
  },
289
423
  ],
290
424
  },
@@ -540,6 +540,16 @@ exports.companyFields = [
540
540
  },
541
541
  },
542
542
  options: [
543
+ {
544
+ displayName: 'Order By Name or ID',
545
+ name: 'orderBy',
546
+ type: 'options',
547
+ typeOptions: {
548
+ loadOptionsMethod: 'getCompanyFields',
549
+ },
550
+ default: '',
551
+ description: 'Column to sort by. Can use any column listed in the response. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
552
+ },
543
553
  {
544
554
  displayName: 'Order Direction',
545
555
  name: 'orderByDir',
@@ -557,16 +567,6 @@ exports.companyFields = [
557
567
  default: '',
558
568
  description: 'Sort direction: asc or desc',
559
569
  },
560
- {
561
- displayName: 'Order By Name or ID',
562
- name: 'orderBy',
563
- type: 'options',
564
- typeOptions: {
565
- loadOptionsMethod: 'getCompanyFields',
566
- },
567
- default: '',
568
- description: 'Column to sort by. Can use any column listed in the response. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
569
- },
570
570
  {
571
571
  displayName: 'Search',
572
572
  name: 'search',
@@ -1727,6 +1727,58 @@ exports.contactFields = [
1727
1727
  },
1728
1728
  default: '',
1729
1729
  },
1730
+ {
1731
+ displayName: 'Tokens',
1732
+ name: 'tokensUi',
1733
+ type: 'fixedCollection',
1734
+ typeOptions: {
1735
+ multipleValues: true,
1736
+ },
1737
+ placeholder: 'Add Token',
1738
+ description: 'Custom tokens to pass to the email template. These will be available as {token_name} in your email template.',
1739
+ default: {},
1740
+ displayOptions: {
1741
+ show: {
1742
+ resource: ['contact'],
1743
+ operation: ['sendEmail'],
1744
+ },
1745
+ },
1746
+ options: [
1747
+ {
1748
+ name: 'tokenValues',
1749
+ displayName: 'Token',
1750
+ values: [
1751
+ {
1752
+ displayName: 'Token Name',
1753
+ name: 'tokenKey',
1754
+ type: 'string',
1755
+ default: '',
1756
+ description: 'The token name (e.g., "order_id", "customer_name")',
1757
+ },
1758
+ {
1759
+ displayName: 'Token Value',
1760
+ name: 'tokenValue',
1761
+ type: 'string',
1762
+ default: '',
1763
+ description: 'The token value (e.g., "12345", "John")',
1764
+ },
1765
+ ],
1766
+ },
1767
+ ],
1768
+ },
1769
+ {
1770
+ displayName: 'Asset Attachments',
1771
+ name: 'assetAttachments',
1772
+ type: 'string',
1773
+ description: 'Comma-separated list of asset IDs to attach to the email',
1774
+ default: '',
1775
+ displayOptions: {
1776
+ show: {
1777
+ resource: ['contact'],
1778
+ operation: ['sendEmail'],
1779
+ },
1780
+ },
1781
+ },
1730
1782
  /* -------------------------------------------------------------------------- */
1731
1783
  /* contact:getNotes */
1732
1784
  /* -------------------------------------------------------------------------- */