n8n-nodes-mautic-advanced 0.5.2 → 0.7.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/credentials/MauticAdvancedApi.credentials.js +19 -0
- package/dist/credentials/MauticAdvancedOAuth2Api.credentials.js +19 -0
- package/dist/nodes/MauticAdvanced/GenericFunctions.js +2 -2
- 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/TagDescription.js +2 -2
- package/dist/nodes/MauticAdvanced/UserDescription.js +546 -0
- package/dist/nodes/MauticAdvanced/mauticadvanced.svg +1 -1
- package/dist/nodes/MauticAdvanced/operations/MiscellaneousOperations.js +8 -53
- package/dist/nodes/MauticAdvanced/operations/RoleOperations.js +143 -0
- package/dist/nodes/MauticAdvanced/operations/StatsOperations.js +109 -0
- package/dist/nodes/MauticAdvanced/operations/TagOperations.js +203 -0
- package/dist/nodes/MauticAdvanced/operations/UserOperations.js +189 -0
- package/dist/nodes/MauticAdvanced/utils/ApiHelpers.js +2 -2
- 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)
|
|
@@ -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',
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateJSON = exports.serialiseMauticWhere = exports.mauticApiRequestAllItems = exports.mauticApiRequest = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
async function mauticApiRequest(method, endpoint, body = {}, query, uri) {
|
|
5
|
+
async function mauticApiRequest(method, endpoint, body = {}, query, uri, headers) {
|
|
6
6
|
const authenticationMethod = this.getNodeParameter('authentication', 0, 'credentials');
|
|
7
7
|
const options = {
|
|
8
|
-
headers: {},
|
|
8
|
+
headers: headers || {},
|
|
9
9
|
method,
|
|
10
10
|
qs: query,
|
|
11
11
|
uri: uri || `/api${endpoint}`,
|
|
@@ -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
|
+
];
|