n8n-nodes-base 0.164.0 → 0.167.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/LICENSE.md +54 -230
- package/README.md +2 -2
- package/dist/credentials/HubspotAppToken.credentials.d.ts +7 -0
- package/dist/credentials/HubspotAppToken.credentials.js +20 -0
- package/dist/credentials/HubspotAppToken.credentials.js.map +1 -0
- package/dist/credentials/KoBoToolboxApi.credentials.d.ts +19 -0
- package/dist/credentials/KoBoToolboxApi.credentials.js +27 -0
- package/dist/credentials/KoBoToolboxApi.credentials.js.map +1 -0
- package/dist/credentials/MailjetEmailApi.credentials.js +7 -0
- package/dist/credentials/MailjetEmailApi.credentials.js.map +1 -1
- package/dist/credentials/Redis.credentials.js +1 -1
- package/dist/credentials/Redis.credentials.js.map +1 -1
- package/dist/credentials/SeaTableApi.credentials.js +15 -0
- package/dist/credentials/SeaTableApi.credentials.js.map +1 -1
- package/dist/credentials/StrapiApi.credentials.js +19 -0
- package/dist/credentials/StrapiApi.credentials.js.map +1 -1
- package/dist/credentials/WordpressApi.credentials.js +3 -0
- package/dist/credentials/WordpressApi.credentials.js.map +1 -1
- package/dist/nodes/EmailReadImap/EmailReadImap.node.js +20 -14
- package/dist/nodes/EmailReadImap/EmailReadImap.node.js.map +1 -1
- package/dist/nodes/Facebook/FacebookGraphApi.node.js +4 -0
- package/dist/nodes/Facebook/FacebookGraphApi.node.js.map +1 -1
- package/dist/nodes/Function/Function.node.js +3 -1
- package/dist/nodes/Function/Function.node.js.map +1 -1
- package/dist/nodes/FunctionItem/FunctionItem.node.js +3 -1
- package/dist/nodes/FunctionItem/FunctionItem.node.js.map +1 -1
- package/dist/nodes/Github/Github.node.js +8 -3
- package/dist/nodes/Github/Github.node.js.map +1 -1
- package/dist/nodes/Google/Calendar/CalendarDescription.js.map +1 -1
- package/dist/nodes/Google/Calendar/EventDescription.js +0 -20
- package/dist/nodes/Google/Calendar/EventDescription.js.map +1 -1
- package/dist/nodes/Google/Calendar/GoogleCalendar.node.js +32 -28
- package/dist/nodes/Google/Calendar/GoogleCalendar.node.js.map +1 -1
- package/dist/nodes/HttpRequest/HttpRequest.node.js +2 -0
- package/dist/nodes/HttpRequest/HttpRequest.node.js.map +1 -1
- package/dist/nodes/Hubspot/GenericFunctions.d.ts +2 -1
- package/dist/nodes/Hubspot/GenericFunctions.js +25 -1
- package/dist/nodes/Hubspot/GenericFunctions.js.map +1 -1
- package/dist/nodes/Hubspot/Hubspot.node.d.ts +4 -1
- package/dist/nodes/Hubspot/Hubspot.node.js +38 -0
- package/dist/nodes/Hubspot/Hubspot.node.js.map +1 -1
- package/dist/nodes/If/If.node.js +47 -6
- package/dist/nodes/If/If.node.js.map +1 -1
- package/dist/nodes/KoBoToolbox/FormDescription.d.ts +3 -0
- package/dist/nodes/KoBoToolbox/FormDescription.js +194 -0
- package/dist/nodes/KoBoToolbox/FormDescription.js.map +1 -0
- package/dist/nodes/KoBoToolbox/GenericFunctions.d.ts +7 -0
- package/dist/nodes/KoBoToolbox/GenericFunctions.js +179 -0
- package/dist/nodes/KoBoToolbox/GenericFunctions.js.map +1 -0
- package/dist/nodes/KoBoToolbox/HookDescription.d.ts +3 -0
- package/dist/nodes/KoBoToolbox/HookDescription.js +176 -0
- package/dist/nodes/KoBoToolbox/HookDescription.js.map +1 -0
- package/dist/nodes/KoBoToolbox/KoBoToolbox.node.d.ts +15 -0
- package/dist/nodes/KoBoToolbox/KoBoToolbox.node.js +253 -0
- package/dist/nodes/KoBoToolbox/KoBoToolbox.node.js.map +1 -0
- package/dist/nodes/KoBoToolbox/KoBoToolboxTrigger.node.d.ts +18 -0
- package/dist/nodes/KoBoToolbox/KoBoToolboxTrigger.node.js +145 -0
- package/dist/nodes/KoBoToolbox/KoBoToolboxTrigger.node.js.map +1 -0
- package/dist/nodes/KoBoToolbox/Options.d.ts +2 -0
- package/dist/nodes/KoBoToolbox/Options.js +87 -0
- package/dist/nodes/KoBoToolbox/Options.js.map +1 -0
- package/dist/nodes/KoBoToolbox/SubmissionDescription.d.ts +3 -0
- package/dist/nodes/KoBoToolbox/SubmissionDescription.js +289 -0
- package/dist/nodes/KoBoToolbox/SubmissionDescription.js.map +1 -0
- package/dist/nodes/KoBoToolbox/koBoToolbox.svg +1 -0
- package/dist/nodes/Linear/GenericFunctions.d.ts +4 -1
- package/dist/nodes/Linear/GenericFunctions.js +46 -1
- package/dist/nodes/Linear/GenericFunctions.js.map +1 -1
- package/dist/nodes/Linear/IssueDescription.d.ts +3 -0
- package/dist/nodes/Linear/IssueDescription.js +324 -0
- package/dist/nodes/Linear/IssueDescription.js.map +1 -0
- package/dist/nodes/Linear/Linear.node.d.ts +16 -0
- package/dist/nodes/Linear/Linear.node.js +226 -0
- package/dist/nodes/Linear/Linear.node.js.map +1 -0
- package/dist/nodes/Linear/LinearTrigger.node.js +1 -0
- package/dist/nodes/Linear/LinearTrigger.node.js.map +1 -1
- package/dist/nodes/Linear/Queries.d.ts +10 -0
- package/dist/nodes/Linear/Queries.js +212 -0
- package/dist/nodes/Linear/Queries.js.map +1 -0
- package/dist/nodes/Mailjet/EmailDescription.js +84 -1
- package/dist/nodes/Mailjet/EmailDescription.js.map +1 -1
- package/dist/nodes/Mailjet/GenericFunctions.d.ts +3 -1
- package/dist/nodes/Mailjet/GenericFunctions.js +37 -3
- package/dist/nodes/Mailjet/GenericFunctions.js.map +1 -1
- package/dist/nodes/Mailjet/Mailjet.node.d.ts +4 -1
- package/dist/nodes/Mailjet/Mailjet.node.js +44 -4
- package/dist/nodes/Mailjet/Mailjet.node.js.map +1 -1
- package/dist/nodes/Mattermost/v1/actions/Interfaces.d.ts +1 -1
- package/dist/nodes/Mattermost/v1/actions/channel/index.d.ts +2 -1
- package/dist/nodes/Mattermost/v1/actions/channel/index.js +9 -1
- package/dist/nodes/Mattermost/v1/actions/channel/index.js.map +1 -1
- package/dist/nodes/Mattermost/v1/actions/channel/search/description.d.ts +2 -0
- package/dist/nodes/Mattermost/v1/actions/channel/search/description.js +88 -0
- package/dist/nodes/Mattermost/v1/actions/channel/search/description.js.map +1 -0
- package/dist/nodes/Mattermost/v1/actions/channel/search/execute.d.ts +3 -0
- package/dist/nodes/Mattermost/v1/actions/channel/search/execute.js +21 -0
- package/dist/nodes/Mattermost/v1/actions/channel/search/execute.js.map +1 -0
- package/dist/nodes/Mattermost/v1/actions/channel/search/index.d.ts +3 -0
- package/dist/nodes/Mattermost/v1/actions/channel/search/index.js +8 -0
- package/dist/nodes/Mattermost/v1/actions/channel/search/index.js.map +1 -0
- package/dist/nodes/MongoDb/MongoDb.node.js +22 -1
- package/dist/nodes/MongoDb/MongoDb.node.js.map +1 -1
- package/dist/nodes/MongoDb/mongo.node.options.js +25 -0
- package/dist/nodes/MongoDb/mongo.node.options.js.map +1 -1
- package/dist/nodes/Odoo/odoo.svg +1 -1
- package/dist/nodes/Onfleet/Onfleet.node.json +20 -0
- package/dist/nodes/Onfleet/OnfleetTrigger.node.json +20 -0
- package/dist/nodes/Redis/Redis.node.js +47 -1
- package/dist/nodes/Redis/Redis.node.js.map +1 -1
- package/dist/nodes/Redis/RedisTrigger.node.d.ts +6 -0
- package/dist/nodes/Redis/RedisTrigger.node.js +121 -0
- package/dist/nodes/Redis/RedisTrigger.node.js.map +1 -0
- package/dist/nodes/Redis/RedisTrigger.node.json +21 -0
- package/dist/nodes/SeaTable/SeaTableTrigger.node.js +11 -1
- package/dist/nodes/SeaTable/SeaTableTrigger.node.js.map +1 -1
- package/dist/nodes/Strapi/EntryDescription.js +14 -13
- package/dist/nodes/Strapi/EntryDescription.js.map +1 -1
- package/dist/nodes/Strapi/GenericFunctions.js +24 -11
- package/dist/nodes/Strapi/GenericFunctions.js.map +1 -1
- package/dist/nodes/Strapi/Strapi.node.d.ts +6 -1
- package/dist/nodes/Strapi/Strapi.node.js +85 -22
- package/dist/nodes/Strapi/Strapi.node.js.map +1 -1
- package/dist/nodes/Switch/Switch.node.js +35 -5
- package/dist/nodes/Switch/Switch.node.js.map +1 -1
- package/dist/nodes/Telegram/Telegram.node.js +2 -0
- package/dist/nodes/Telegram/Telegram.node.js.map +1 -1
- package/dist/nodes/Wordpress/GenericFunctions.js +1 -0
- package/dist/nodes/Wordpress/GenericFunctions.js.map +1 -1
- package/dist/nodes/Wordpress/PostDescription.js +103 -74
- package/dist/nodes/Wordpress/PostDescription.js.map +1 -1
- package/dist/nodes/Wordpress/Wordpress.node.js +3 -0
- package/dist/nodes/Wordpress/Wordpress.node.js.map +1 -1
- package/package.json +12 -6
- package/dist/test/placeholder.test.d.ts +0 -0
- package/dist/test/placeholder.test.js +0 -7
- package/dist/test/placeholder.test.js.map +0 -1
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.submissionFields = exports.submissionOperations = void 0;
|
|
4
|
+
exports.submissionOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: [
|
|
12
|
+
'submission',
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Delete',
|
|
19
|
+
value: 'delete',
|
|
20
|
+
description: 'Delete a single submission',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get',
|
|
24
|
+
value: 'get',
|
|
25
|
+
description: 'Get a single submission',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Get All',
|
|
29
|
+
value: 'getAll',
|
|
30
|
+
description: 'Get all submissions',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Get Validation Status',
|
|
34
|
+
value: 'getValidation',
|
|
35
|
+
description: 'Get the validation status for the submission',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Update Validation Status',
|
|
39
|
+
value: 'setValidation',
|
|
40
|
+
description: 'Set the validation status of the submission',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
default: 'getAll',
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
exports.submissionFields = [
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Form ID',
|
|
49
|
+
name: 'formId',
|
|
50
|
+
type: 'options',
|
|
51
|
+
typeOptions: {
|
|
52
|
+
loadOptionsMethod: 'loadForms',
|
|
53
|
+
},
|
|
54
|
+
required: true,
|
|
55
|
+
default: '',
|
|
56
|
+
displayOptions: {
|
|
57
|
+
show: {
|
|
58
|
+
resource: [
|
|
59
|
+
'submission',
|
|
60
|
+
],
|
|
61
|
+
operation: [
|
|
62
|
+
'get',
|
|
63
|
+
'delete',
|
|
64
|
+
'getValidation',
|
|
65
|
+
'setValidation',
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
description: 'Form ID (e.g. aSAvYreNzVEkrWg5Gdcvg)',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Submission ID',
|
|
73
|
+
name: 'submissionId',
|
|
74
|
+
type: 'string',
|
|
75
|
+
required: true,
|
|
76
|
+
default: '',
|
|
77
|
+
displayOptions: {
|
|
78
|
+
show: {
|
|
79
|
+
resource: [
|
|
80
|
+
'submission',
|
|
81
|
+
],
|
|
82
|
+
operation: [
|
|
83
|
+
'get',
|
|
84
|
+
'delete',
|
|
85
|
+
'getValidation',
|
|
86
|
+
'setValidation',
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
description: 'Submission ID (number, e.g. 245128)',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
displayName: 'Validation Status',
|
|
94
|
+
name: 'validationStatus',
|
|
95
|
+
type: 'options',
|
|
96
|
+
required: true,
|
|
97
|
+
displayOptions: {
|
|
98
|
+
show: {
|
|
99
|
+
resource: [
|
|
100
|
+
'submission',
|
|
101
|
+
],
|
|
102
|
+
operation: [
|
|
103
|
+
'setValidation',
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
default: '',
|
|
108
|
+
options: [
|
|
109
|
+
{
|
|
110
|
+
name: 'Approved',
|
|
111
|
+
value: 'validation_status_approved',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'Not Approved',
|
|
115
|
+
value: 'validation_status_not_approved',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'On Hold',
|
|
119
|
+
value: 'validation_status_on_hold',
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
description: 'Desired Validation Status',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
displayName: 'Form Name/ID',
|
|
126
|
+
name: 'formId',
|
|
127
|
+
type: 'options',
|
|
128
|
+
typeOptions: {
|
|
129
|
+
loadOptionsMethod: 'loadForms',
|
|
130
|
+
},
|
|
131
|
+
required: true,
|
|
132
|
+
default: '',
|
|
133
|
+
displayOptions: {
|
|
134
|
+
show: {
|
|
135
|
+
resource: [
|
|
136
|
+
'submission',
|
|
137
|
+
],
|
|
138
|
+
operation: [
|
|
139
|
+
'getAll',
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
description: 'Form ID (e.g. aSAvYreNzVEkrWg5Gdcvg)',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
displayName: 'Return All',
|
|
147
|
+
name: 'returnAll',
|
|
148
|
+
type: 'boolean',
|
|
149
|
+
required: true,
|
|
150
|
+
default: false,
|
|
151
|
+
displayOptions: {
|
|
152
|
+
show: {
|
|
153
|
+
resource: [
|
|
154
|
+
'submission',
|
|
155
|
+
],
|
|
156
|
+
operation: [
|
|
157
|
+
'getAll',
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
description: 'Whether to return all results',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
displayName: 'Limit',
|
|
165
|
+
name: 'limit',
|
|
166
|
+
type: 'number',
|
|
167
|
+
required: false,
|
|
168
|
+
typeOptions: {
|
|
169
|
+
maxValue: 3000,
|
|
170
|
+
},
|
|
171
|
+
displayOptions: {
|
|
172
|
+
show: {
|
|
173
|
+
resource: [
|
|
174
|
+
'submission',
|
|
175
|
+
],
|
|
176
|
+
operation: [
|
|
177
|
+
'getAll',
|
|
178
|
+
],
|
|
179
|
+
returnAll: [
|
|
180
|
+
false,
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
default: 100,
|
|
185
|
+
description: 'The number of results to return',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
displayName: 'Options',
|
|
189
|
+
name: 'options',
|
|
190
|
+
type: 'collection',
|
|
191
|
+
displayOptions: {
|
|
192
|
+
show: {
|
|
193
|
+
resource: [
|
|
194
|
+
'submission',
|
|
195
|
+
],
|
|
196
|
+
operation: [
|
|
197
|
+
'get',
|
|
198
|
+
'getAll',
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
default: {},
|
|
203
|
+
placeholder: 'Add Option',
|
|
204
|
+
options: [
|
|
205
|
+
{
|
|
206
|
+
displayName: 'Attachments Prefix',
|
|
207
|
+
name: 'dataPropertyAttachmentsPrefixName',
|
|
208
|
+
type: 'string',
|
|
209
|
+
displayOptions: {
|
|
210
|
+
show: {
|
|
211
|
+
download: [
|
|
212
|
+
true,
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
default: 'attachment_',
|
|
217
|
+
description: 'Prefix for name of the binary property to which to write the attachments. An index starting with 0 will be added. So if name is "attachment_" the first attachment is saved to "attachment_0"',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
displayName: 'Download Attachments',
|
|
221
|
+
name: 'download',
|
|
222
|
+
type: 'boolean',
|
|
223
|
+
default: false,
|
|
224
|
+
description: 'Download submitted attachments',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
displayName: 'Fields to Retrieve',
|
|
228
|
+
name: 'fields',
|
|
229
|
+
type: 'string',
|
|
230
|
+
default: '',
|
|
231
|
+
description: 'Comma-separated list of fields to retrieve (e.g. _submission_time,_submitted_by). If left blank, all fields are retrieved',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
displayName: 'File Size',
|
|
235
|
+
name: 'version',
|
|
236
|
+
type: 'options',
|
|
237
|
+
displayOptions: {
|
|
238
|
+
show: {
|
|
239
|
+
download: [
|
|
240
|
+
true,
|
|
241
|
+
],
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
default: 'download_url',
|
|
245
|
+
description: 'Attachment size to retrieve, if multiple versions are available',
|
|
246
|
+
options: [
|
|
247
|
+
{
|
|
248
|
+
name: 'Original',
|
|
249
|
+
value: 'download_url',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: 'Small',
|
|
253
|
+
value: 'download_small_url',
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: 'Medium',
|
|
257
|
+
value: 'download_medium_url',
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'Large',
|
|
261
|
+
value: 'download_large_url',
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
displayName: 'Multiselect Mask',
|
|
267
|
+
name: 'selectMask',
|
|
268
|
+
type: 'string',
|
|
269
|
+
default: 'select_*',
|
|
270
|
+
description: 'Comma-separated list of wildcard-style selectors for fields that should be treated as multiselect fields, i.e. parsed as arrays',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
displayName: 'Number Mask',
|
|
274
|
+
name: 'numberMask',
|
|
275
|
+
type: 'string',
|
|
276
|
+
default: 'n_*, f_*',
|
|
277
|
+
description: 'Comma-separated list of wildcard-style selectors for fields that should be treated as numbers',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
displayName: 'Reformat',
|
|
281
|
+
name: 'reformat',
|
|
282
|
+
type: 'boolean',
|
|
283
|
+
default: false,
|
|
284
|
+
description: 'Apply some reformatting to the submission data, such as parsing GeoJSON coordinates',
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
];
|
|
289
|
+
//# sourceMappingURL=SubmissionDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubmissionDescription.js","sourceRoot":"","sources":["../../../nodes/KoBoToolbox/SubmissionDescription.ts"],"names":[],"mappings":";;;AAIa,QAAA,oBAAoB,GAAsB;IACtD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE;oBACT,YAAY;iBACZ;aACD;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,4BAA4B;aACzC;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,yBAAyB;aACtC;YACD;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,qBAAqB;aAClC;YACD;gBACC,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,8CAA8C;aAC3D;YACD;gBACC,IAAI,EAAE,0BAA0B;gBAChC,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,6CAA6C;aAC1D;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;CACD,CAAC;AAEW,QAAA,gBAAgB,GAAsB;IAKlD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,WAAW;SAC9B;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EA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
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="23.17 23.5 19.18 28.6"><style>.st79{fill:#64c0ff}</style><g id="Layer_4"><path class="st79" d="M38.6 42.8v2.8c0 1.6-1.3 2.8-2.8 2.8h-6.1c-1.6 0-2.8-1.3-2.8-2.8V30c0-1.6 1.3-2.8 2.8-2.8h6.1c1.6 0 2.8 1.3 2.8 2.8v.4c.5-.2 1.1-.3 1.7-.3.7 0 1.4.1 2 .4V30c0-3.6-2.9-6.5-6.5-6.5h-6.1c-3.6 0-6.5 2.9-6.5 6.5v15.6c0 3.6 2.9 6.5 6.5 6.5h6.1c3.6 0 6.5-2.9 6.5-6.5v-7.1l-3.7 4.3z"/><path class="st79" d="M35.6 41.9l6.6-7.6c.2-.2.2-.6-.1-.8-1.2-1-2.9-.9-3.9.3l-4.1 4.7c-.1.1-.3.1-.3 0l-1.5-1.9c-.3-.4-.8-.4-1.2 0-1 1-1 2.6-.1 3.7l1.2 1.5c.8 1.2 2.5 1.2 3.4.1z"/></g></svg>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
|
2
|
-
import { IDataObject, IHookFunctions, IWebhookFunctions } from 'n8n-workflow';
|
|
2
|
+
import { ICredentialDataDecryptedObject, ICredentialTestFunctions, IDataObject, IHookFunctions, IWebhookFunctions } from 'n8n-workflow';
|
|
3
3
|
export declare function linearApiRequest(this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, body?: any, option?: IDataObject): Promise<any>;
|
|
4
4
|
export declare function capitalizeFirstLetter(data: string): string;
|
|
5
|
+
export declare function linearApiRequestAllItems(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, body?: any): Promise<any>;
|
|
6
|
+
export declare function validateCrendetials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject): Promise<any>;
|
|
7
|
+
export declare const sort: (a: any, b: any) => 1 | -1 | 0;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.capitalizeFirstLetter = exports.linearApiRequest = void 0;
|
|
3
|
+
exports.sort = exports.validateCrendetials = exports.linearApiRequestAllItems = exports.capitalizeFirstLetter = exports.linearApiRequest = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const get = require("lodash.get");
|
|
6
|
+
const Queries_1 = require("./Queries");
|
|
5
7
|
async function linearApiRequest(body = {}, option = {}) {
|
|
6
8
|
const credentials = await this.getCredentials('linearApi');
|
|
7
9
|
const endpoint = 'https://api.linear.app/graphql';
|
|
@@ -28,4 +30,47 @@ function capitalizeFirstLetter(data) {
|
|
|
28
30
|
return data.charAt(0).toUpperCase() + data.slice(1);
|
|
29
31
|
}
|
|
30
32
|
exports.capitalizeFirstLetter = capitalizeFirstLetter;
|
|
33
|
+
async function linearApiRequestAllItems(propertyName, body = {}) {
|
|
34
|
+
const returnData = [];
|
|
35
|
+
let responseData;
|
|
36
|
+
body.variables.first = 50;
|
|
37
|
+
body.variables.after = null;
|
|
38
|
+
do {
|
|
39
|
+
responseData = await linearApiRequest.call(this, body);
|
|
40
|
+
returnData.push.apply(returnData, get(responseData, `${propertyName}.nodes`));
|
|
41
|
+
body.variables.after = get(responseData, `${propertyName}.pageInfo.endCursor`);
|
|
42
|
+
} while (get(responseData, `${propertyName}.pageInfo.hasNextPage`));
|
|
43
|
+
return returnData;
|
|
44
|
+
}
|
|
45
|
+
exports.linearApiRequestAllItems = linearApiRequestAllItems;
|
|
46
|
+
async function validateCrendetials(decryptedCredentials) {
|
|
47
|
+
const credentials = decryptedCredentials;
|
|
48
|
+
const options = {
|
|
49
|
+
headers: {
|
|
50
|
+
'Content-Type': 'application/json',
|
|
51
|
+
Authorization: credentials.apiKey,
|
|
52
|
+
},
|
|
53
|
+
method: 'POST',
|
|
54
|
+
body: {
|
|
55
|
+
query: Queries_1.query.getIssues(),
|
|
56
|
+
variables: {
|
|
57
|
+
first: 1,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
uri: 'https://api.linear.app/graphql',
|
|
61
|
+
json: true,
|
|
62
|
+
};
|
|
63
|
+
return this.helpers.request(options);
|
|
64
|
+
}
|
|
65
|
+
exports.validateCrendetials = validateCrendetials;
|
|
66
|
+
const sort = (a, b) => {
|
|
67
|
+
if (a.name.toLocaleLowerCase() < b.name.toLocaleLowerCase()) {
|
|
68
|
+
return -1;
|
|
69
|
+
}
|
|
70
|
+
if (a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase()) {
|
|
71
|
+
return 1;
|
|
72
|
+
}
|
|
73
|
+
return 0;
|
|
74
|
+
};
|
|
75
|
+
exports.sort = sort;
|
|
31
76
|
//# sourceMappingURL=GenericFunctions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/Linear/GenericFunctions.ts"],"names":[],"mappings":";;;AASA,+
|
|
1
|
+
{"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/Linear/GenericFunctions.ts"],"names":[],"mappings":";;;AASA,+CAQsB;AAEtB,kCAAmC;AAEnC,uCAEmB;AAEZ,KAAK,UAAU,gBAAgB,CAAuF,OAAY,EAAE,EAAE,SAAsB,EAAE;IACpK,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAgB,CAAC;IAE1E,MAAM,QAAQ,GAAG,gCAAgC,CAAC;IAElD,IAAI,OAAO,GAAmB;QAC7B,OAAO,EAAE;YACR,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,WAAW,CAAC,MAAM;SACjC;QACD,MAAM,EAAE,MAAM;QACd,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,IAAI,EAAE,IAAI;KACV,CAAC;IACF,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE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