@probo/n8n-nodes-probo 0.237.0 → 0.239.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.
|
@@ -48,16 +48,62 @@ exports.description = [
|
|
|
48
48
|
default: 50,
|
|
49
49
|
description: 'Max number of results to return',
|
|
50
50
|
},
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Filters',
|
|
53
|
+
name: 'filters',
|
|
54
|
+
type: 'collection',
|
|
55
|
+
placeholder: 'Add Filter',
|
|
56
|
+
default: {},
|
|
57
|
+
displayOptions: {
|
|
58
|
+
show: {
|
|
59
|
+
resource: ['task'],
|
|
60
|
+
operation: ['getAll'],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
options: [
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Assigned To ID',
|
|
66
|
+
name: 'assignedToId',
|
|
67
|
+
type: 'string',
|
|
68
|
+
default: '',
|
|
69
|
+
description: 'Filter by the profile ID the task is assigned to',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Query',
|
|
73
|
+
name: 'query',
|
|
74
|
+
type: 'string',
|
|
75
|
+
default: '',
|
|
76
|
+
description: 'Search tasks by name',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'State',
|
|
80
|
+
name: 'state',
|
|
81
|
+
type: 'options',
|
|
82
|
+
options: [
|
|
83
|
+
{ name: 'All', value: '' },
|
|
84
|
+
{ name: 'Backlog', value: 'BACKLOG' },
|
|
85
|
+
{ name: 'Canceled', value: 'CANCELED' },
|
|
86
|
+
{ name: 'Done', value: 'DONE' },
|
|
87
|
+
{ name: 'Duplicate', value: 'DUPLICATE' },
|
|
88
|
+
{ name: 'In Progress', value: 'IN_PROGRESS' },
|
|
89
|
+
{ name: 'Todo', value: 'TODO' },
|
|
90
|
+
],
|
|
91
|
+
default: '',
|
|
92
|
+
description: 'Filter by task state',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
51
96
|
];
|
|
52
97
|
async function execute(itemIndex) {
|
|
53
98
|
const organizationId = this.getNodeParameter('organizationId', itemIndex);
|
|
54
99
|
const returnAll = this.getNodeParameter('returnAll', itemIndex);
|
|
55
100
|
const limit = this.getNodeParameter('limit', itemIndex, 50);
|
|
101
|
+
const filters = this.getNodeParameter('filters', itemIndex, {});
|
|
56
102
|
const query = `
|
|
57
|
-
query GetTasks($organizationId: ID!, $first: Int, $after: CursorKey) {
|
|
103
|
+
query GetTasks($organizationId: ID!, $first: Int, $after: CursorKey, $filter: TaskFilter) {
|
|
58
104
|
node(id: $organizationId) {
|
|
59
105
|
... on Organization {
|
|
60
|
-
tasks(first: $first, after: $after) {
|
|
106
|
+
tasks(first: $first, after: $after, filter: $filter) {
|
|
61
107
|
edges {
|
|
62
108
|
node {
|
|
63
109
|
id
|
|
@@ -80,7 +126,21 @@ async function execute(itemIndex) {
|
|
|
80
126
|
}
|
|
81
127
|
}
|
|
82
128
|
`;
|
|
83
|
-
const
|
|
129
|
+
const variables = { organizationId };
|
|
130
|
+
const filter = {};
|
|
131
|
+
if (filters.query) {
|
|
132
|
+
filter.query = filters.query;
|
|
133
|
+
}
|
|
134
|
+
if (filters.state) {
|
|
135
|
+
filter.state = filters.state;
|
|
136
|
+
}
|
|
137
|
+
if (filters.assignedToId) {
|
|
138
|
+
filter.assignedToId = filters.assignedToId;
|
|
139
|
+
}
|
|
140
|
+
if (Object.keys(filter).length > 0) {
|
|
141
|
+
variables.filter = filter;
|
|
142
|
+
}
|
|
143
|
+
const tasks = await GenericFunctions_1.proboApiRequestAllItems.call(this, query, variables, (response) => {
|
|
84
144
|
const data = response === null || response === void 0 ? void 0 : response.data;
|
|
85
145
|
const node = data === null || data === void 0 ? void 0 : data.node;
|
|
86
146
|
return node === null || node === void 0 ? void 0 : node.tasks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/task/getAll.operation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/task/getAll.operation.ts"],"names":[],"mappings":";;;AAmHA,0BA6EC;AA3KD,6DAAuF;AAE1E,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;QACzC,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,2DAA2D;KACxE;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;SACX;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;KAC9C;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,E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