n8n-nodes-mautic-advanced 0.5.2 → 0.6.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.
- package/README.md +18 -0
- package/dist/nodes/MauticAdvanced/MauticAdvanced.node.js +36 -0
- package/dist/nodes/MauticAdvanced/RoleDescription.js +367 -0
- package/dist/nodes/MauticAdvanced/StatsDescription.js +177 -0
- package/dist/nodes/MauticAdvanced/UserDescription.js +546 -0
- package/dist/nodes/MauticAdvanced/operations/RoleOperations.js +143 -0
- package/dist/nodes/MauticAdvanced/operations/StatsOperations.js +109 -0
- package/dist/nodes/MauticAdvanced/operations/UserOperations.js +189 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,6 +125,24 @@ This enhanced version extends the standard n8n Mautic node with:
|
|
|
125
125
|
### 📧 Email Operations
|
|
126
126
|
- **Segment Email**: Send emails to segments
|
|
127
127
|
|
|
128
|
+
### 👤 Users
|
|
129
|
+
- **Create** a new Mautic user (administrator) with role, password, and profile fields
|
|
130
|
+
- **Get** a user by ID
|
|
131
|
+
- **Get Many** users with basic filtering and pagination
|
|
132
|
+
- **Update** user details including role, profile fields, and password
|
|
133
|
+
- **Delete** a user
|
|
134
|
+
|
|
135
|
+
### 🔐 Roles
|
|
136
|
+
- **Create** a new role with name, description, and permissions
|
|
137
|
+
- **Get** a role by ID
|
|
138
|
+
- **Get Many** roles with filtering and pagination
|
|
139
|
+
- **Update** role details including permissions
|
|
140
|
+
- **Delete** a role
|
|
141
|
+
|
|
142
|
+
### 📈 Stats
|
|
143
|
+
- **Get Available Tables** to list all statistical tables and their columns
|
|
144
|
+
- **Get Stats** from a specific table with filtering, ordering, and pagination
|
|
145
|
+
|
|
128
146
|
## Installation
|
|
129
147
|
|
|
130
148
|
### Method 1: npm (Recommended)
|
|
@@ -11,6 +11,9 @@ const SegmentOperations_1 = require("./operations/SegmentOperations");
|
|
|
11
11
|
const EmailOperations_1 = require("./operations/EmailOperations");
|
|
12
12
|
const ThemeOperations_1 = require("./operations/ThemeOperations");
|
|
13
13
|
const MiscellaneousOperations_1 = require("./operations/MiscellaneousOperations");
|
|
14
|
+
const UserOperations_1 = require("./operations/UserOperations");
|
|
15
|
+
const RoleOperations_1 = require("./operations/RoleOperations");
|
|
16
|
+
const StatsOperations_1 = require("./operations/StatsOperations");
|
|
14
17
|
const CampaignContactDescription_1 = require("./CampaignContactDescription");
|
|
15
18
|
const CampaignDescription_1 = require("./CampaignDescription");
|
|
16
19
|
const CategoryDescription_1 = require("./CategoryDescription");
|
|
@@ -26,6 +29,9 @@ const SegmentEmailDescription_1 = require("./SegmentEmailDescription");
|
|
|
26
29
|
const SegmentDescription_1 = require("./SegmentDescription");
|
|
27
30
|
const TagDescription_1 = require("./TagDescription");
|
|
28
31
|
const ThemeDescription_1 = require("./ThemeDescription");
|
|
32
|
+
const UserDescription_1 = require("./UserDescription");
|
|
33
|
+
const RoleDescription_1 = require("./RoleDescription");
|
|
34
|
+
const StatsDescription_1 = require("./StatsDescription");
|
|
29
35
|
class MauticAdvanced {
|
|
30
36
|
constructor() {
|
|
31
37
|
this.description = {
|
|
@@ -135,6 +141,11 @@ class MauticAdvanced {
|
|
|
135
141
|
value: 'notification',
|
|
136
142
|
description: 'Create, update, and retrieve notifications',
|
|
137
143
|
},
|
|
144
|
+
{
|
|
145
|
+
name: 'Role',
|
|
146
|
+
value: 'role',
|
|
147
|
+
description: 'Create, update, and retrieve roles',
|
|
148
|
+
},
|
|
138
149
|
{
|
|
139
150
|
name: 'Segment',
|
|
140
151
|
value: 'segment',
|
|
@@ -145,6 +156,11 @@ class MauticAdvanced {
|
|
|
145
156
|
value: 'segmentEmail',
|
|
146
157
|
description: 'Send an email',
|
|
147
158
|
},
|
|
159
|
+
{
|
|
160
|
+
name: 'Stats',
|
|
161
|
+
value: 'stats',
|
|
162
|
+
description: 'Get statistical data from Mautic tables',
|
|
163
|
+
},
|
|
148
164
|
{
|
|
149
165
|
name: 'Tag',
|
|
150
166
|
value: 'tag',
|
|
@@ -155,6 +171,11 @@ class MauticAdvanced {
|
|
|
155
171
|
value: 'theme',
|
|
156
172
|
description: 'Create, update, and retrieve themes',
|
|
157
173
|
},
|
|
174
|
+
{
|
|
175
|
+
name: 'User',
|
|
176
|
+
value: 'user',
|
|
177
|
+
description: 'Create, update, and retrieve users',
|
|
178
|
+
},
|
|
158
179
|
],
|
|
159
180
|
default: 'contact',
|
|
160
181
|
},
|
|
@@ -186,6 +207,12 @@ class MauticAdvanced {
|
|
|
186
207
|
...SegmentDescription_1.segmentFields,
|
|
187
208
|
...ThemeDescription_1.themeOperations,
|
|
188
209
|
...ThemeDescription_1.themeFields,
|
|
210
|
+
...UserDescription_1.userOperations,
|
|
211
|
+
...UserDescription_1.userFields,
|
|
212
|
+
...RoleDescription_1.roleOperations,
|
|
213
|
+
...RoleDescription_1.roleFields,
|
|
214
|
+
...StatsDescription_1.statsOperations,
|
|
215
|
+
...StatsDescription_1.statsFields,
|
|
189
216
|
],
|
|
190
217
|
};
|
|
191
218
|
this.methods = {
|
|
@@ -445,6 +472,15 @@ class MauticAdvanced {
|
|
|
445
472
|
case 'theme':
|
|
446
473
|
result = await (0, ThemeOperations_1.executeThemeOperation)(this, operation, i);
|
|
447
474
|
break;
|
|
475
|
+
case 'user':
|
|
476
|
+
result = await (0, UserOperations_1.executeUserOperation)(this, operation, i);
|
|
477
|
+
break;
|
|
478
|
+
case 'role':
|
|
479
|
+
result = await (0, RoleOperations_1.executeRoleOperation)(this, operation, i);
|
|
480
|
+
break;
|
|
481
|
+
case 'stats':
|
|
482
|
+
result = await (0, StatsOperations_1.executeStatsOperation)(this, operation, i);
|
|
483
|
+
break;
|
|
448
484
|
default:
|
|
449
485
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Resource '${resource}' is not supported.`, { itemIndex: i });
|
|
450
486
|
}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.roleFields = exports.roleOperations = void 0;
|
|
4
|
+
exports.roleOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['role'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Create',
|
|
18
|
+
value: 'create',
|
|
19
|
+
description: 'Create a new role',
|
|
20
|
+
action: 'Create a role',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Delete',
|
|
24
|
+
value: 'delete',
|
|
25
|
+
description: 'Delete a role',
|
|
26
|
+
action: 'Delete a role',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Get',
|
|
30
|
+
value: 'get',
|
|
31
|
+
description: 'Get data of a role',
|
|
32
|
+
action: 'Get a role',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Get Many',
|
|
36
|
+
value: 'getAll',
|
|
37
|
+
description: 'Get data of many roles',
|
|
38
|
+
action: 'Get many roles',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Update',
|
|
42
|
+
value: 'update',
|
|
43
|
+
description: 'Update a role',
|
|
44
|
+
action: 'Update a role',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
default: 'create',
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
exports.roleFields = [
|
|
51
|
+
/* -------------------------------------------------------------------------- */
|
|
52
|
+
/* role:create */
|
|
53
|
+
/* -------------------------------------------------------------------------- */
|
|
54
|
+
{
|
|
55
|
+
displayName: 'Name',
|
|
56
|
+
name: 'name',
|
|
57
|
+
type: 'string',
|
|
58
|
+
required: true,
|
|
59
|
+
displayOptions: {
|
|
60
|
+
show: {
|
|
61
|
+
resource: ['role'],
|
|
62
|
+
operation: ['create'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
default: '',
|
|
66
|
+
description: 'Name of the role',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Simplify',
|
|
70
|
+
name: 'simple',
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
displayOptions: {
|
|
73
|
+
show: {
|
|
74
|
+
resource: ['role'],
|
|
75
|
+
operation: ['create'],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
default: true,
|
|
79
|
+
description: 'Whether to return a simplified version of the response instead of the raw data',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
displayName: 'Additional Fields',
|
|
83
|
+
name: 'additionalFields',
|
|
84
|
+
type: 'collection',
|
|
85
|
+
placeholder: 'Add Field',
|
|
86
|
+
default: {},
|
|
87
|
+
displayOptions: {
|
|
88
|
+
show: {
|
|
89
|
+
resource: ['role'],
|
|
90
|
+
operation: ['create'],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
options: [
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Description',
|
|
96
|
+
name: 'description',
|
|
97
|
+
type: 'string',
|
|
98
|
+
default: '',
|
|
99
|
+
description: 'Description of the role',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Is Admin',
|
|
103
|
+
name: 'isAdmin',
|
|
104
|
+
type: 'boolean',
|
|
105
|
+
default: false,
|
|
106
|
+
description: 'Whether the role has full administrative access',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
displayName: 'Is Published',
|
|
110
|
+
name: 'isPublished',
|
|
111
|
+
type: 'boolean',
|
|
112
|
+
default: true,
|
|
113
|
+
description: 'Whether the role is published (enabled)',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
displayName: 'Raw Permissions (JSON)',
|
|
117
|
+
name: 'rawPermissions',
|
|
118
|
+
type: 'json',
|
|
119
|
+
default: '{}',
|
|
120
|
+
description: 'JSON object defining permissions. Example: {"email:emails": ["viewown", "viewother"]}',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
/* -------------------------------------------------------------------------- */
|
|
125
|
+
/* role:update */
|
|
126
|
+
/* -------------------------------------------------------------------------- */
|
|
127
|
+
{
|
|
128
|
+
displayName: 'Role ID',
|
|
129
|
+
name: 'roleId',
|
|
130
|
+
type: 'string',
|
|
131
|
+
displayOptions: {
|
|
132
|
+
show: {
|
|
133
|
+
operation: ['update'],
|
|
134
|
+
resource: ['role'],
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
default: '',
|
|
138
|
+
description: 'The ID of the role to update',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
displayName: 'Simplify',
|
|
142
|
+
name: 'simple',
|
|
143
|
+
type: 'boolean',
|
|
144
|
+
displayOptions: {
|
|
145
|
+
show: {
|
|
146
|
+
resource: ['role'],
|
|
147
|
+
operation: ['update'],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
default: true,
|
|
151
|
+
description: 'Whether to return a simplified version of the response instead of the raw data',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
displayName: 'Update Fields',
|
|
155
|
+
name: 'updateFields',
|
|
156
|
+
type: 'collection',
|
|
157
|
+
placeholder: 'Add Field',
|
|
158
|
+
default: {},
|
|
159
|
+
displayOptions: {
|
|
160
|
+
show: {
|
|
161
|
+
resource: ['role'],
|
|
162
|
+
operation: ['update'],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
options: [
|
|
166
|
+
{
|
|
167
|
+
displayName: 'Description',
|
|
168
|
+
name: 'description',
|
|
169
|
+
type: 'string',
|
|
170
|
+
default: '',
|
|
171
|
+
description: 'Description of the role',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
displayName: 'Is Admin',
|
|
175
|
+
name: 'isAdmin',
|
|
176
|
+
type: 'boolean',
|
|
177
|
+
default: false,
|
|
178
|
+
description: 'Whether the role has full administrative access',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
displayName: 'Is Published',
|
|
182
|
+
name: 'isPublished',
|
|
183
|
+
type: 'boolean',
|
|
184
|
+
default: true,
|
|
185
|
+
description: 'Whether the role is published (enabled)',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
displayName: 'Name',
|
|
189
|
+
name: 'name',
|
|
190
|
+
type: 'string',
|
|
191
|
+
default: '',
|
|
192
|
+
description: 'Name of the role',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
displayName: 'Raw Permissions (JSON)',
|
|
196
|
+
name: 'rawPermissions',
|
|
197
|
+
type: 'json',
|
|
198
|
+
default: '{}',
|
|
199
|
+
description: 'JSON object defining permissions. Example: {"email:emails": ["viewown", "viewother"]}',
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
/* -------------------------------------------------------------------------- */
|
|
204
|
+
/* role:get */
|
|
205
|
+
/* -------------------------------------------------------------------------- */
|
|
206
|
+
{
|
|
207
|
+
displayName: 'Role ID',
|
|
208
|
+
name: 'roleId',
|
|
209
|
+
type: 'string',
|
|
210
|
+
displayOptions: {
|
|
211
|
+
show: {
|
|
212
|
+
operation: ['get'],
|
|
213
|
+
resource: ['role'],
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
default: '',
|
|
217
|
+
description: 'The ID of the role to return',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
displayName: 'Simplify',
|
|
221
|
+
name: 'simple',
|
|
222
|
+
type: 'boolean',
|
|
223
|
+
displayOptions: {
|
|
224
|
+
show: {
|
|
225
|
+
resource: ['role'],
|
|
226
|
+
operation: ['get'],
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
default: true,
|
|
230
|
+
description: 'Whether to return a simplified version of the response instead of the raw data',
|
|
231
|
+
},
|
|
232
|
+
/* -------------------------------------------------------------------------- */
|
|
233
|
+
/* role:getAll */
|
|
234
|
+
/* -------------------------------------------------------------------------- */
|
|
235
|
+
{
|
|
236
|
+
displayName: 'Return All',
|
|
237
|
+
name: 'returnAll',
|
|
238
|
+
type: 'boolean',
|
|
239
|
+
displayOptions: {
|
|
240
|
+
show: {
|
|
241
|
+
resource: ['role'],
|
|
242
|
+
operation: ['getAll'],
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
default: false,
|
|
246
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
displayName: 'Limit',
|
|
250
|
+
name: 'limit',
|
|
251
|
+
type: 'number',
|
|
252
|
+
displayOptions: {
|
|
253
|
+
show: {
|
|
254
|
+
resource: ['role'],
|
|
255
|
+
operation: ['getAll'],
|
|
256
|
+
returnAll: [false],
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
typeOptions: {
|
|
260
|
+
minValue: 1,
|
|
261
|
+
},
|
|
262
|
+
default: 30,
|
|
263
|
+
description: 'Max number of results to return. If you request more than 30 records, the node will automatically use pagination to fetch up to the requested number.',
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
displayName: 'Simplify',
|
|
267
|
+
name: 'simple',
|
|
268
|
+
type: 'boolean',
|
|
269
|
+
displayOptions: {
|
|
270
|
+
show: {
|
|
271
|
+
resource: ['role'],
|
|
272
|
+
operation: ['getAll'],
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
default: true,
|
|
276
|
+
description: 'Whether to return a simplified version of the response instead of the raw data',
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
displayName: 'Additional Fields',
|
|
280
|
+
name: 'additionalFields',
|
|
281
|
+
type: 'collection',
|
|
282
|
+
placeholder: 'Add Field',
|
|
283
|
+
default: {},
|
|
284
|
+
displayOptions: {
|
|
285
|
+
show: {
|
|
286
|
+
resource: ['role'],
|
|
287
|
+
operation: ['getAll'],
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
options: [
|
|
291
|
+
{
|
|
292
|
+
displayName: 'Minimal',
|
|
293
|
+
name: 'minimal',
|
|
294
|
+
type: 'boolean',
|
|
295
|
+
default: false,
|
|
296
|
+
description: 'Whether to return array of entities without additional lists in it',
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
displayName: 'Order By',
|
|
300
|
+
name: 'orderBy',
|
|
301
|
+
type: 'string',
|
|
302
|
+
default: '',
|
|
303
|
+
description: 'Column to sort by. Can use any column listed in the response.',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
displayName: 'Order Direction',
|
|
307
|
+
name: 'orderByDir',
|
|
308
|
+
type: 'options',
|
|
309
|
+
options: [
|
|
310
|
+
{
|
|
311
|
+
name: 'ASC',
|
|
312
|
+
value: 'asc',
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: 'DESC',
|
|
316
|
+
value: 'desc',
|
|
317
|
+
},
|
|
318
|
+
],
|
|
319
|
+
default: '',
|
|
320
|
+
description: 'Sort direction: asc or desc',
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
displayName: 'Published Only',
|
|
324
|
+
name: 'publishedOnly',
|
|
325
|
+
type: 'boolean',
|
|
326
|
+
default: false,
|
|
327
|
+
description: 'Whether to return currently published entities',
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
displayName: 'Search',
|
|
331
|
+
name: 'search',
|
|
332
|
+
type: 'string',
|
|
333
|
+
default: '',
|
|
334
|
+
description: 'String or search command to filter entities by',
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
/* -------------------------------------------------------------------------- */
|
|
339
|
+
/* role:delete */
|
|
340
|
+
/* -------------------------------------------------------------------------- */
|
|
341
|
+
{
|
|
342
|
+
displayName: 'Role ID',
|
|
343
|
+
name: 'roleId',
|
|
344
|
+
type: 'string',
|
|
345
|
+
displayOptions: {
|
|
346
|
+
show: {
|
|
347
|
+
operation: ['delete'],
|
|
348
|
+
resource: ['role'],
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
default: '',
|
|
352
|
+
description: 'The ID of the role to delete',
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
displayName: 'Simplify',
|
|
356
|
+
name: 'simple',
|
|
357
|
+
type: 'boolean',
|
|
358
|
+
displayOptions: {
|
|
359
|
+
show: {
|
|
360
|
+
resource: ['role'],
|
|
361
|
+
operation: ['delete'],
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
default: true,
|
|
365
|
+
description: 'Whether to return a simplified version of the response instead of the raw data',
|
|
366
|
+
},
|
|
367
|
+
];
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.statsFields = exports.statsOperations = void 0;
|
|
4
|
+
exports.statsOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['stats'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get Available Tables',
|
|
18
|
+
value: 'getAvailableTables',
|
|
19
|
+
description: 'Get list of available statistical tables',
|
|
20
|
+
action: 'Get available tables',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Stats',
|
|
24
|
+
value: 'get',
|
|
25
|
+
description: 'Get statistics from a specific table',
|
|
26
|
+
action: 'Get stats from a table',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
default: 'getAvailableTables',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
exports.statsFields = [
|
|
33
|
+
/* -------------------------------------------------------------------------- */
|
|
34
|
+
/* stats:getAvailableTables */
|
|
35
|
+
/* -------------------------------------------------------------------------- */
|
|
36
|
+
// No additional fields needed for getAvailableTables
|
|
37
|
+
/* -------------------------------------------------------------------------- */
|
|
38
|
+
/* stats:get */
|
|
39
|
+
/* -------------------------------------------------------------------------- */
|
|
40
|
+
{
|
|
41
|
+
displayName: 'Table Name',
|
|
42
|
+
name: 'table',
|
|
43
|
+
type: 'options',
|
|
44
|
+
required: true,
|
|
45
|
+
displayOptions: {
|
|
46
|
+
show: {
|
|
47
|
+
resource: ['stats'],
|
|
48
|
+
operation: ['get'],
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
options: [
|
|
52
|
+
{ name: 'Asset Downloads', value: 'asset_downloads' },
|
|
53
|
+
{ name: 'Audit Log', value: 'audit_log' },
|
|
54
|
+
{ name: 'Campaign Lead Event Log', value: 'campaign_lead_event_log' },
|
|
55
|
+
{ name: 'Campaign Leads', value: 'campaign_leads' },
|
|
56
|
+
{ name: 'Channel URL Trackables', value: 'channel_url_trackables' },
|
|
57
|
+
{ name: 'Companies Leads', value: 'companies_leads' },
|
|
58
|
+
{ name: 'Dynamic Content Lead Data', value: 'dynamic_content_lead_data' },
|
|
59
|
+
{ name: 'Dynamic Content Stats', value: 'dynamic_content_stats' },
|
|
60
|
+
{ name: 'Email Stat Replies', value: 'email_stat_replies' },
|
|
61
|
+
{ name: 'Email Stats', value: 'email_stats' },
|
|
62
|
+
{ name: 'Email Stats Devices', value: 'email_stats_devices' },
|
|
63
|
+
{ name: 'Focus Stats', value: 'focus_stats' },
|
|
64
|
+
{ name: 'Form Submissions', value: 'form_submissions' },
|
|
65
|
+
{ name: 'IP Addresses', value: 'ip_addresses' },
|
|
66
|
+
{ name: 'Lead Categories', value: 'lead_categories' },
|
|
67
|
+
{ name: 'Lead Companies Change Log', value: 'lead_companies_change_log' },
|
|
68
|
+
{ name: 'Lead Devices', value: 'lead_devices' },
|
|
69
|
+
{ name: 'Lead Do Not Contact', value: 'lead_donotcontact' },
|
|
70
|
+
{ name: 'Lead Event Log', value: 'lead_event_log' },
|
|
71
|
+
{ name: 'Lead Frequency Rules', value: 'lead_frequencyrules' },
|
|
72
|
+
{ name: 'Lead Lists Leads', value: 'lead_lists_leads' },
|
|
73
|
+
{ name: 'Lead Points Change Log', value: 'lead_points_change_log' },
|
|
74
|
+
{ name: 'Lead Stages Change Log', value: 'lead_stages_change_log' },
|
|
75
|
+
{ name: 'Lead UTM Tags', value: 'lead_utmtags' },
|
|
76
|
+
{ name: 'Page Hits', value: 'page_hits' },
|
|
77
|
+
{ name: 'Page Redirects', value: 'page_redirects' },
|
|
78
|
+
{ name: 'Plugin Citrix Events', value: 'plugin_citrix_events' },
|
|
79
|
+
{ name: 'Point Lead Action Log', value: 'point_lead_action_log' },
|
|
80
|
+
{ name: 'Point Lead Event Log', value: 'point_lead_event_log' },
|
|
81
|
+
{ name: 'Push Notification Stats', value: 'push_notification_stats' },
|
|
82
|
+
{ name: 'SMS Message Stats', value: 'sms_message_stats' },
|
|
83
|
+
{ name: 'Stage Lead Action Log', value: 'stage_lead_action_log' },
|
|
84
|
+
{ name: 'Tweet Stats', value: 'tweet_stats' },
|
|
85
|
+
{ name: 'Video Hits', value: 'video_hits' },
|
|
86
|
+
{ name: 'Webhook Logs', value: 'webhook_logs' },
|
|
87
|
+
],
|
|
88
|
+
default: 'email_stats',
|
|
89
|
+
description: 'The statistical table to retrieve data from',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Return All',
|
|
93
|
+
name: 'returnAll',
|
|
94
|
+
type: 'boolean',
|
|
95
|
+
displayOptions: {
|
|
96
|
+
show: {
|
|
97
|
+
resource: ['stats'],
|
|
98
|
+
operation: ['get'],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
default: false,
|
|
102
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
displayName: 'Limit',
|
|
106
|
+
name: 'limit',
|
|
107
|
+
type: 'number',
|
|
108
|
+
displayOptions: {
|
|
109
|
+
show: {
|
|
110
|
+
resource: ['stats'],
|
|
111
|
+
operation: ['get'],
|
|
112
|
+
returnAll: [false],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
typeOptions: {
|
|
116
|
+
minValue: 1,
|
|
117
|
+
},
|
|
118
|
+
default: 50,
|
|
119
|
+
description: 'Max number of results to return',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
displayName: 'Additional Options',
|
|
123
|
+
name: 'additionalOptions',
|
|
124
|
+
type: 'collection',
|
|
125
|
+
placeholder: 'Add Option',
|
|
126
|
+
default: {},
|
|
127
|
+
displayOptions: {
|
|
128
|
+
show: {
|
|
129
|
+
resource: ['stats'],
|
|
130
|
+
operation: ['get'],
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
options: [
|
|
134
|
+
{
|
|
135
|
+
displayName: 'Order By',
|
|
136
|
+
name: 'orderBy',
|
|
137
|
+
type: 'string',
|
|
138
|
+
default: 'id',
|
|
139
|
+
description: 'Column to sort by (e.g. id, date_sent, lead_id)',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
displayName: 'Order Direction',
|
|
143
|
+
name: 'orderByDir',
|
|
144
|
+
type: 'options',
|
|
145
|
+
options: [
|
|
146
|
+
{
|
|
147
|
+
name: 'ASC',
|
|
148
|
+
value: 'asc',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: 'DESC',
|
|
152
|
+
value: 'desc',
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
default: 'asc',
|
|
156
|
+
description: 'Sort direction',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
displayName: 'Start',
|
|
160
|
+
name: 'start',
|
|
161
|
+
type: 'number',
|
|
162
|
+
typeOptions: {
|
|
163
|
+
minValue: 0,
|
|
164
|
+
},
|
|
165
|
+
default: 0,
|
|
166
|
+
description: 'Row offset to start from',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
displayName: 'Where Conditions (JSON)',
|
|
170
|
+
name: 'where',
|
|
171
|
+
type: 'json',
|
|
172
|
+
default: '[]',
|
|
173
|
+
description: 'JSON array of where conditions. Example: [{"col": "lead_id", "expr": "eq", "val": 123}]. Available expressions: eq, neq, gt, gte, lt, lte, like, notLike, in, notIn, isNull, isNotNull.',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
];
|