n8n-nodes-base 0.220.2 → 0.222.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/dist/build.tsbuildinfo +1 -1
- package/dist/credentials/Postgres.credentials.js +115 -0
- package/dist/credentials/Postgres.credentials.js.map +1 -1
- package/dist/credentials/SshPrivateKey.credentials.js +1 -0
- package/dist/credentials/SshPrivateKey.credentials.js.map +1 -1
- package/dist/credentials/TotpApi.credentials.d.ts +7 -0
- package/dist/credentials/TotpApi.credentials.js +33 -0
- package/dist/credentials/TotpApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +8 -0
- package/dist/known/nodes.json +4 -0
- package/dist/nodes/ActionNetwork/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Autopilot/GenericFunctions.js +2 -1
- package/dist/nodes/Autopilot/GenericFunctions.js.map +1 -1
- package/dist/nodes/Aws/Rekognition/GenericFunctions.js +2 -1
- package/dist/nodes/Aws/Rekognition/GenericFunctions.js.map +1 -1
- package/dist/nodes/Aws/S3/FileDescription.js +1 -1
- package/dist/nodes/Aws/S3/FileDescription.js.map +1 -1
- package/dist/nodes/Aws/S3/GenericFunctions.js +2 -1
- package/dist/nodes/Aws/S3/GenericFunctions.js.map +1 -1
- package/dist/nodes/ClickUp/GenericFunctions.js +2 -1
- package/dist/nodes/ClickUp/GenericFunctions.js.map +1 -1
- package/dist/nodes/Clockify/GenericFunctions.js +2 -1
- package/dist/nodes/Clockify/GenericFunctions.js.map +1 -1
- package/dist/nodes/CompareDatasets/CompareDatasets.node.js +42 -6
- package/dist/nodes/CompareDatasets/CompareDatasets.node.js.map +1 -1
- package/dist/nodes/CompareDatasets/GenericFunctions.js +60 -18
- package/dist/nodes/CompareDatasets/GenericFunctions.js.map +1 -1
- package/dist/nodes/CompareDatasets/test/node/workflow.compareDatasets.fuzzy.missing_keys.json +232 -0
- package/dist/nodes/CompareDatasets/test/node/workflow.compareDatasets.skipFields.json +897 -0
- package/dist/nodes/CrateDb/CrateDb.node.js +7 -7
- package/dist/nodes/CrateDb/CrateDb.node.js.map +1 -1
- package/dist/nodes/DateTime/DateTime.node.js +11 -1
- package/dist/nodes/DateTime/DateTime.node.js.map +1 -1
- package/dist/nodes/DateTime/test/node/workflow.luxonDateTime.json +165 -0
- package/dist/nodes/Filter/Filter.node.js +12 -5
- package/dist/nodes/Filter/Filter.node.js.map +1 -1
- package/dist/nodes/Github/SearchFunctions.js +1 -1
- package/dist/nodes/Github/SearchFunctions.js.map +1 -1
- package/dist/nodes/GoToWebinar/GenericFunctions.d.ts +1 -1
- package/dist/nodes/GoToWebinar/GenericFunctions.js +5 -4
- package/dist/nodes/GoToWebinar/GenericFunctions.js.map +1 -1
- package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.utils.d.ts +7 -1
- package/dist/nodes/HelpScout/GenericFunctions.js +2 -1
- package/dist/nodes/HelpScout/GenericFunctions.js.map +1 -1
- package/dist/nodes/HtmlExtract/HtmlExtract.node.js +4 -2
- package/dist/nodes/HtmlExtract/HtmlExtract.node.js.map +1 -1
- package/dist/nodes/HtmlExtract/test/workflow.dotNotation.json +143 -0
- package/dist/nodes/HttpRequest/GenericFunctions.d.ts +9 -0
- package/dist/nodes/HttpRequest/GenericFunctions.js +18 -1
- package/dist/nodes/HttpRequest/GenericFunctions.js.map +1 -1
- package/dist/nodes/HttpRequest/HttpRequest.node.js +2 -1
- package/dist/nodes/HttpRequest/HttpRequest.node.js.map +1 -1
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +56 -6
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
- package/dist/nodes/Hubspot/GenericFunctions.js +2 -1
- package/dist/nodes/Hubspot/GenericFunctions.js.map +1 -1
- package/dist/nodes/LinkedIn/GenericFunctions.js +16 -4
- package/dist/nodes/LinkedIn/GenericFunctions.js.map +1 -1
- package/dist/nodes/LinkedIn/LinkedIn.node.js +33 -77
- package/dist/nodes/LinkedIn/LinkedIn.node.js.map +1 -1
- package/dist/nodes/Microsoft/Teams/GenericFunctions.js +2 -1
- package/dist/nodes/Microsoft/Teams/GenericFunctions.js.map +1 -1
- package/dist/nodes/Notion/GenericFunctions.js +2 -1
- package/dist/nodes/Notion/GenericFunctions.js.map +1 -1
- package/dist/nodes/Orbit/GenericFunctions.js +2 -1
- package/dist/nodes/Orbit/GenericFunctions.js.map +1 -1
- package/dist/nodes/Postgres/Postgres.node.d.ts +3 -9
- package/dist/nodes/Postgres/Postgres.node.js +9 -319
- package/dist/nodes/Postgres/Postgres.node.js.map +1 -1
- package/dist/nodes/Postgres/v1/PostgresV1.node.d.ts +12 -0
- package/dist/nodes/Postgres/v1/PostgresV1.node.js +345 -0
- package/dist/nodes/Postgres/v1/PostgresV1.node.js.map +1 -0
- package/dist/nodes/Postgres/{Postgres.node.functions.js → v1/genericFunctions.js} +1 -1
- package/dist/nodes/Postgres/v1/genericFunctions.js.map +1 -0
- package/dist/nodes/Postgres/v2/PostgresV2.node.d.ts +13 -0
- package/dist/nodes/Postgres/v2/PostgresV2.node.js +20 -0
- package/dist/nodes/Postgres/v2/PostgresV2.node.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/common.descriptions.d.ts +7 -0
- package/dist/nodes/Postgres/v2/actions/common.descriptions.js +317 -0
- package/dist/nodes/Postgres/v2/actions/common.descriptions.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/Database.resource.d.ts +9 -0
- package/dist/nodes/Postgres/v2/actions/database/Database.resource.js +100 -0
- package/dist/nodes/Postgres/v2/actions/database/Database.resource.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/deleteTable.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/deleteTable.operation.js +110 -0
- package/dist/nodes/Postgres/v2/actions/database/deleteTable.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js +60 -0
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/insert.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/insert.operation.js +129 -0
- package/dist/nodes/Postgres/v2/actions/database/insert.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/select.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/select.operation.js +87 -0
- package/dist/nodes/Postgres/v2/actions/database/select.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/update.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/update.operation.js +164 -0
- package/dist/nodes/Postgres/v2/actions/database/update.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/upsert.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/upsert.operation.js +165 -0
- package/dist/nodes/Postgres/v2/actions/database/upsert.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/node.type.d.ts +7 -0
- package/dist/nodes/Postgres/v2/actions/node.type.js +3 -0
- package/dist/nodes/Postgres/v2/actions/node.type.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/router.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/router.js +65 -0
- package/dist/nodes/Postgres/v2/actions/router.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/versionDescription.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/versionDescription.js +65 -0
- package/dist/nodes/Postgres/v2/actions/versionDescription.js.map +1 -0
- package/dist/nodes/Postgres/v2/helpers/interfaces.d.ts +37 -0
- package/dist/nodes/Postgres/v2/helpers/interfaces.js +3 -0
- package/dist/nodes/Postgres/v2/helpers/interfaces.js.map +1 -0
- package/dist/nodes/Postgres/v2/helpers/utils.d.ts +29 -0
- package/dist/nodes/Postgres/v2/helpers/utils.js +258 -0
- package/dist/nodes/Postgres/v2/helpers/utils.js.map +1 -0
- package/dist/nodes/Postgres/v2/methods/credentialTest.d.ts +2 -0
- package/dist/nodes/Postgres/v2/methods/credentialTest.js +47 -0
- package/dist/nodes/Postgres/v2/methods/credentialTest.js.map +1 -0
- package/dist/nodes/Postgres/v2/methods/index.d.ts +3 -0
- package/dist/nodes/Postgres/v2/methods/index.js +30 -0
- package/dist/nodes/Postgres/v2/methods/index.js.map +1 -0
- package/dist/nodes/Postgres/v2/methods/listSearch.d.ts +3 -0
- package/dist/nodes/Postgres/v2/methods/listSearch.js +42 -0
- package/dist/nodes/Postgres/v2/methods/listSearch.js.map +1 -0
- package/dist/nodes/Postgres/v2/methods/loadOptions.d.ts +4 -0
- package/dist/nodes/Postgres/v2/methods/loadOptions.js +40 -0
- package/dist/nodes/Postgres/v2/methods/loadOptions.js.map +1 -0
- package/dist/nodes/Postgres/v2/transport/index.d.ts +10 -0
- package/dist/nodes/Postgres/v2/transport/index.js +168 -0
- package/dist/nodes/Postgres/v2/transport/index.js.map +1 -0
- package/dist/nodes/QuestDb/QuestDb.node.js +3 -3
- package/dist/nodes/QuestDb/QuestDb.node.js.map +1 -1
- package/dist/nodes/Redis/Redis.node.js +35 -4
- package/dist/nodes/Redis/Redis.node.js.map +1 -1
- package/dist/nodes/S3/GenericFunctions.js +2 -1
- package/dist/nodes/S3/GenericFunctions.js.map +1 -1
- package/dist/nodes/Schedule/ScheduleTrigger.node.js +2 -2
- package/dist/nodes/Schedule/ScheduleTrigger.node.js.map +1 -1
- package/dist/nodes/SendGrid/GenericFunctions.js +2 -1
- package/dist/nodes/SendGrid/GenericFunctions.js.map +1 -1
- package/dist/nodes/SentryIo/GenericFunctions.js +2 -1
- package/dist/nodes/SentryIo/GenericFunctions.js.map +1 -1
- package/dist/nodes/ServiceNow/IncidentDescription.js +7 -0
- package/dist/nodes/ServiceNow/IncidentDescription.js.map +1 -1
- package/dist/nodes/Taiga/GenericFunctions.js +2 -1
- package/dist/nodes/Taiga/GenericFunctions.js.map +1 -1
- package/dist/nodes/TimescaleDb/TimescaleDb.node.js +4 -4
- package/dist/nodes/TimescaleDb/TimescaleDb.node.js.map +1 -1
- package/dist/nodes/Totp/Totp.node.d.ts +5 -0
- package/dist/nodes/Totp/Totp.node.js +157 -0
- package/dist/nodes/Totp/Totp.node.js.map +1 -0
- package/dist/nodes/Totp/Totp.node.json +16 -0
- package/dist/nodes/Totp/test/Totp.workflow.test.json +41 -0
- package/dist/nodes/Zendesk/GenericFunctions.js +2 -1
- package/dist/nodes/Zendesk/GenericFunctions.js.map +1 -1
- package/dist/types/credentials.json +3 -2
- package/dist/types/nodes.json +16 -13
- package/package.json +6 -3
- package/dist/nodes/Postgres/Postgres.node.functions.js.map +0 -1
- /package/dist/nodes/Postgres/{Postgres.node.functions.d.ts → v1/genericFunctions.d.ts} +0 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.combineConditionsCollection = exports.sortFixedCollection = exports.whereFixedCollection = exports.tableRLC = exports.schemaRLC = exports.optionsCollection = void 0;
|
|
4
|
+
exports.optionsCollection = {
|
|
5
|
+
displayName: 'Options',
|
|
6
|
+
name: 'options',
|
|
7
|
+
type: 'collection',
|
|
8
|
+
placeholder: 'Add Option',
|
|
9
|
+
default: {},
|
|
10
|
+
options: [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'Cascade',
|
|
13
|
+
name: 'cascade',
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
default: false,
|
|
16
|
+
description: 'Whether to drop all objects that depend on the table, such as views and sequences',
|
|
17
|
+
displayOptions: {
|
|
18
|
+
show: {
|
|
19
|
+
'/operation': ['deleteTable'],
|
|
20
|
+
},
|
|
21
|
+
hide: {
|
|
22
|
+
'/deleteCommand': ['delete'],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Connection Timeout',
|
|
28
|
+
name: 'connectionTimeout',
|
|
29
|
+
type: 'number',
|
|
30
|
+
default: 30,
|
|
31
|
+
description: 'Number of seconds reserved for connecting to the database',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Query Batching',
|
|
35
|
+
name: 'queryBatching',
|
|
36
|
+
type: 'options',
|
|
37
|
+
noDataExpression: true,
|
|
38
|
+
options: [
|
|
39
|
+
{
|
|
40
|
+
name: 'Single Query',
|
|
41
|
+
value: 'single',
|
|
42
|
+
description: 'A single query for all incoming items',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'Independently',
|
|
46
|
+
value: 'independently',
|
|
47
|
+
description: 'Execute one query per incoming item of the run',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Transaction',
|
|
51
|
+
value: 'transaction',
|
|
52
|
+
description: 'Execute all queries in a transaction, if a failure occurs, all changes are rolled back',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
default: 'single',
|
|
56
|
+
description: 'The way queries should be sent to the database',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Query Parameters',
|
|
60
|
+
name: 'queryReplacement',
|
|
61
|
+
type: 'string',
|
|
62
|
+
default: '',
|
|
63
|
+
description: 'Comma-separated list of the values you want to use as query parameters. <a href="https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#use-query-parameters">More info</a>.',
|
|
64
|
+
hint: 'Comma-separated list of values: reference them in your query as $1, $2, $3…',
|
|
65
|
+
placeholder: 'e.g. value1,value2,value3',
|
|
66
|
+
displayOptions: {
|
|
67
|
+
show: { '/operation': ['executeQuery'] },
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Output Columns',
|
|
72
|
+
name: 'outputColumns',
|
|
73
|
+
type: 'multiOptions',
|
|
74
|
+
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
75
|
+
typeOptions: {
|
|
76
|
+
loadOptionsMethod: 'getColumnsMultiOptions',
|
|
77
|
+
loadOptionsDependsOn: ['table.value'],
|
|
78
|
+
},
|
|
79
|
+
default: [],
|
|
80
|
+
displayOptions: {
|
|
81
|
+
show: { '/operation': ['select', 'insert', 'update', 'upsert'] },
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
displayName: 'Output Large-Format Numbers As',
|
|
86
|
+
name: 'largeNumbersOutput',
|
|
87
|
+
type: 'options',
|
|
88
|
+
options: [
|
|
89
|
+
{
|
|
90
|
+
name: 'Numbers',
|
|
91
|
+
value: 'numbers',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'Text',
|
|
95
|
+
value: 'text',
|
|
96
|
+
description: 'Use this if you expect numbers longer than 16 digits (otherwise numbers may be incorrect)',
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
hint: 'Applies to NUMERIC and BIGINT columns only',
|
|
100
|
+
default: 'text',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayName: 'Skip on Conflict',
|
|
104
|
+
name: 'skipOnConflict',
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
default: false,
|
|
107
|
+
description: 'Whether to skip the row and do not throw error if a unique constraint or exclusion constraint is violated',
|
|
108
|
+
displayOptions: {
|
|
109
|
+
show: {
|
|
110
|
+
'/operation': ['insert'],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Replace Empty Strings with NULL',
|
|
116
|
+
name: 'replaceEmptyStrings',
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
default: false,
|
|
119
|
+
description: 'Whether to replace empty strings with NULL in input, could be useful when data come from spreadsheet',
|
|
120
|
+
displayOptions: {
|
|
121
|
+
show: {
|
|
122
|
+
'/operation': ['insert', 'update', 'upsert', 'executeQuery'],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
};
|
|
128
|
+
exports.schemaRLC = {
|
|
129
|
+
displayName: 'Schema',
|
|
130
|
+
name: 'schema',
|
|
131
|
+
type: 'resourceLocator',
|
|
132
|
+
default: { mode: 'list', value: 'public' },
|
|
133
|
+
required: true,
|
|
134
|
+
placeholder: 'e.g. public',
|
|
135
|
+
description: 'The schema that contains the table you want to work on',
|
|
136
|
+
modes: [
|
|
137
|
+
{
|
|
138
|
+
displayName: 'From List',
|
|
139
|
+
name: 'list',
|
|
140
|
+
type: 'list',
|
|
141
|
+
typeOptions: {
|
|
142
|
+
searchListMethod: 'schemaSearch',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
displayName: 'By Name',
|
|
147
|
+
name: 'name',
|
|
148
|
+
type: 'string',
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
};
|
|
152
|
+
exports.tableRLC = {
|
|
153
|
+
displayName: 'Table',
|
|
154
|
+
name: 'table',
|
|
155
|
+
type: 'resourceLocator',
|
|
156
|
+
default: { mode: 'list', value: '' },
|
|
157
|
+
required: true,
|
|
158
|
+
description: 'The table you want to work on',
|
|
159
|
+
modes: [
|
|
160
|
+
{
|
|
161
|
+
displayName: 'From List',
|
|
162
|
+
name: 'list',
|
|
163
|
+
type: 'list',
|
|
164
|
+
typeOptions: {
|
|
165
|
+
searchListMethod: 'tableSearch',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
displayName: 'By Name',
|
|
170
|
+
name: 'name',
|
|
171
|
+
type: 'string',
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
};
|
|
175
|
+
exports.whereFixedCollection = {
|
|
176
|
+
displayName: 'Select Rows',
|
|
177
|
+
name: 'where',
|
|
178
|
+
type: 'fixedCollection',
|
|
179
|
+
typeOptions: {
|
|
180
|
+
multipleValues: true,
|
|
181
|
+
},
|
|
182
|
+
placeholder: 'Add Condition',
|
|
183
|
+
default: {},
|
|
184
|
+
description: 'If not set, all rows will be selected',
|
|
185
|
+
options: [
|
|
186
|
+
{
|
|
187
|
+
displayName: 'Values',
|
|
188
|
+
name: 'values',
|
|
189
|
+
values: [
|
|
190
|
+
{
|
|
191
|
+
displayName: 'Column',
|
|
192
|
+
name: 'column',
|
|
193
|
+
type: 'options',
|
|
194
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
195
|
+
default: '',
|
|
196
|
+
placeholder: 'e.g. ID',
|
|
197
|
+
typeOptions: {
|
|
198
|
+
loadOptionsMethod: 'getColumns',
|
|
199
|
+
loadOptionsDependsOn: ['schema.value', 'table.value'],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
displayName: 'Operator',
|
|
204
|
+
name: 'condition',
|
|
205
|
+
type: 'options',
|
|
206
|
+
description: "The operator to check the column against. When using 'LIKE' operator percent sign ( %) matches zero or more characters, underscore ( _ ) matches any single character.",
|
|
207
|
+
options: [
|
|
208
|
+
{
|
|
209
|
+
name: 'Equal',
|
|
210
|
+
value: 'equal',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: 'Not Equal',
|
|
214
|
+
value: '!=',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'Like',
|
|
218
|
+
value: 'LIKE',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: 'Greater Than',
|
|
222
|
+
value: '>',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'Less Than',
|
|
226
|
+
value: '<',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'Greater Than Or Equal',
|
|
230
|
+
value: '>=',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: 'Less Than Or Equal',
|
|
234
|
+
value: '<=',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: 'Is Null',
|
|
238
|
+
value: 'IS NULL',
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
default: 'equal',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
displayName: 'Value',
|
|
245
|
+
name: 'value',
|
|
246
|
+
type: 'string',
|
|
247
|
+
default: '',
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
};
|
|
253
|
+
exports.sortFixedCollection = {
|
|
254
|
+
displayName: 'Sort',
|
|
255
|
+
name: 'sort',
|
|
256
|
+
type: 'fixedCollection',
|
|
257
|
+
typeOptions: {
|
|
258
|
+
multipleValues: true,
|
|
259
|
+
},
|
|
260
|
+
placeholder: 'Add Sort Rule',
|
|
261
|
+
default: {},
|
|
262
|
+
options: [
|
|
263
|
+
{
|
|
264
|
+
displayName: 'Values',
|
|
265
|
+
name: 'values',
|
|
266
|
+
values: [
|
|
267
|
+
{
|
|
268
|
+
displayName: 'Column',
|
|
269
|
+
name: 'column',
|
|
270
|
+
type: 'options',
|
|
271
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
272
|
+
default: '',
|
|
273
|
+
typeOptions: {
|
|
274
|
+
loadOptionsMethod: 'getColumns',
|
|
275
|
+
loadOptionsDependsOn: ['schema.value', 'table.value'],
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
displayName: 'Direction',
|
|
280
|
+
name: 'direction',
|
|
281
|
+
type: 'options',
|
|
282
|
+
options: [
|
|
283
|
+
{
|
|
284
|
+
name: 'ASC',
|
|
285
|
+
value: 'ASC',
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: 'DESC',
|
|
289
|
+
value: 'DESC',
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
default: 'ASC',
|
|
293
|
+
},
|
|
294
|
+
],
|
|
295
|
+
},
|
|
296
|
+
],
|
|
297
|
+
};
|
|
298
|
+
exports.combineConditionsCollection = {
|
|
299
|
+
displayName: 'Combine Conditions',
|
|
300
|
+
name: 'combineConditions',
|
|
301
|
+
type: 'options',
|
|
302
|
+
description: 'How to combine the conditions defined in "Select Rows": AND requires all conditions to be true, OR requires at least one condition to be true',
|
|
303
|
+
options: [
|
|
304
|
+
{
|
|
305
|
+
name: 'AND',
|
|
306
|
+
value: 'AND',
|
|
307
|
+
description: 'Only rows that meet all the conditions are selected',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'OR',
|
|
311
|
+
value: 'OR',
|
|
312
|
+
description: 'Rows that meet at least one condition are selected',
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
default: 'AND',
|
|
316
|
+
};
|
|
317
|
+
//# sourceMappingURL=common.descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.descriptions.js","sourceRoot":"","sources":["../../../../../nodes/Postgres/v2/actions/common.descriptions.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAoB;IACjD,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE;QACR;YACC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;YACd,WAAW,EACV,mFAAmF;YACpF,cAAc,EAAE;gBACf,IAAI,EAAE;oBACL,YAAY,EAAE,CAAC,aAAa,CAAC;iBAC7B;gBACD,IAAI,EAAE;oBACL,gBAAgB,EAAE,CAAC,QAAQ,CAAC;iBAC5B;aACD;SACD;QACD;YACC,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,2DAA2D;SACxE;QACD;YACC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE;gBACR;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EW,QAAA,2BAA2B,GAAoB;IAC3D,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,SAAS;IACf,WAAW,EACV,+IAA+I;IAChJ,OAAO,EAAE;QACR;YACC,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,qDAAqD;SAClE;QACD;YACC,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,IAAI;YACX,WAAW,EAAE,oDAAoD;SACjE;KACD;IACD,OAAO,EAAE,KAAK;CACd,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
import * as deleteTable from './deleteTable.operation';
|
|
3
|
+
import * as executeQuery from './executeQuery.operation';
|
|
4
|
+
import * as insert from './insert.operation';
|
|
5
|
+
import * as select from './select.operation';
|
|
6
|
+
import * as update from './update.operation';
|
|
7
|
+
import * as upsert from './upsert.operation';
|
|
8
|
+
export { deleteTable, executeQuery, insert, select, update, upsert };
|
|
9
|
+
export declare const description: INodeProperties[];
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.description = exports.upsert = exports.update = exports.select = exports.insert = exports.executeQuery = exports.deleteTable = void 0;
|
|
27
|
+
const common_descriptions_1 = require("../common.descriptions");
|
|
28
|
+
const deleteTable = __importStar(require("./deleteTable.operation"));
|
|
29
|
+
exports.deleteTable = deleteTable;
|
|
30
|
+
const executeQuery = __importStar(require("./executeQuery.operation"));
|
|
31
|
+
exports.executeQuery = executeQuery;
|
|
32
|
+
const insert = __importStar(require("./insert.operation"));
|
|
33
|
+
exports.insert = insert;
|
|
34
|
+
const select = __importStar(require("./select.operation"));
|
|
35
|
+
exports.select = select;
|
|
36
|
+
const update = __importStar(require("./update.operation"));
|
|
37
|
+
exports.update = update;
|
|
38
|
+
const upsert = __importStar(require("./upsert.operation"));
|
|
39
|
+
exports.upsert = upsert;
|
|
40
|
+
exports.description = [
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Operation',
|
|
43
|
+
name: 'operation',
|
|
44
|
+
type: 'options',
|
|
45
|
+
noDataExpression: true,
|
|
46
|
+
options: [
|
|
47
|
+
{
|
|
48
|
+
name: 'Delete',
|
|
49
|
+
value: 'deleteTable',
|
|
50
|
+
description: 'Delete an entire table or rows in a table',
|
|
51
|
+
action: 'Delete table or rows',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'Execute Query',
|
|
55
|
+
value: 'executeQuery',
|
|
56
|
+
description: 'Execute an SQL query',
|
|
57
|
+
action: 'Execute a SQL query',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Insert',
|
|
61
|
+
value: 'insert',
|
|
62
|
+
description: 'Insert rows in a table',
|
|
63
|
+
action: 'Insert rows in a table',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Insert or Update',
|
|
67
|
+
value: 'upsert',
|
|
68
|
+
description: 'Insert or update rows in a table',
|
|
69
|
+
action: 'Insert or update rows in a table',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'Select',
|
|
73
|
+
value: 'select',
|
|
74
|
+
description: 'Select rows from a table',
|
|
75
|
+
action: 'Select rows from a table',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Update',
|
|
79
|
+
value: 'update',
|
|
80
|
+
description: 'Update rows in a table',
|
|
81
|
+
action: 'Update rows in a table',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
displayOptions: {
|
|
85
|
+
show: {
|
|
86
|
+
resource: ['database'],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
default: 'insert',
|
|
90
|
+
},
|
|
91
|
+
{ ...common_descriptions_1.schemaRLC, displayOptions: { hide: { operation: ['executeQuery'] } } },
|
|
92
|
+
{ ...common_descriptions_1.tableRLC, displayOptions: { hide: { operation: ['executeQuery'] } } },
|
|
93
|
+
...deleteTable.description,
|
|
94
|
+
...executeQuery.description,
|
|
95
|
+
...insert.description,
|
|
96
|
+
...select.description,
|
|
97
|
+
...update.description,
|
|
98
|
+
...upsert.description,
|
|
99
|
+
];
|
|
100
|
+
//# sourceMappingURL=Database.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Database.resource.js","sourceRoot":"","sources":["../../../../../../nodes/Postgres/v2/actions/database/Database.resource.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gEAA6D;AAE7D,qEAAuD;AAO9C,kCAAW;AANpB,uEAAyD;AAMnC,oCAAY;AALlC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AE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE;IAC1E,GAAG,WAAW,CAAC,WAAW;IAC1B,GAAG,YAAY,CAAC,WAAW;IAC3B,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,MAAM,CAAC,WAAW;CACrB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-core';
|
|
2
|
+
import type { IDataObject, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
3
|
+
import type { PgpDatabase, QueriesRunner } from '../../helpers/interfaces';
|
|
4
|
+
export declare const description: {
|
|
5
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
6
|
+
displayName: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
9
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions | undefined;
|
|
10
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
hint?: string | undefined;
|
|
13
|
+
options?: (INodeProperties | import("n8n-workflow").INodePropertyOptions | import("n8n-workflow").INodePropertyCollection)[] | undefined;
|
|
14
|
+
placeholder?: string | undefined;
|
|
15
|
+
isNodeSetting?: boolean | undefined;
|
|
16
|
+
noDataExpression?: boolean | undefined;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting | undefined;
|
|
19
|
+
credentialTypes?: ("extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth")[] | undefined;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractorRegex | undefined;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[] | undefined;
|
|
22
|
+
requiresDataPath?: "single" | "multiple" | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
export declare function execute(this: IExecuteFunctions, runQueries: QueriesRunner, items: INodeExecutionData[], nodeOptions: IDataObject, _db?: PgpDatabase): Promise<INodeExecutionData[]>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execute = exports.description = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const utilities_1 = require("../../../../../utils/utilities");
|
|
6
|
+
const utils_1 = require("../../helpers/utils");
|
|
7
|
+
const common_descriptions_1 = require("../common.descriptions");
|
|
8
|
+
const properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Command',
|
|
11
|
+
name: 'deleteCommand',
|
|
12
|
+
type: 'options',
|
|
13
|
+
default: 'truncate',
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
name: 'Truncate',
|
|
17
|
+
value: 'truncate',
|
|
18
|
+
description: "Only removes the table's data and preserves the table's structure",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Delete',
|
|
22
|
+
value: 'delete',
|
|
23
|
+
description: "Delete the rows that match the 'Select Rows' conditions below. If no selection is made, all rows in the table are deleted.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Drop',
|
|
27
|
+
value: 'drop',
|
|
28
|
+
description: "Deletes the table's data and also the table's structure permanently",
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Restart Sequences',
|
|
34
|
+
name: 'restartSequences',
|
|
35
|
+
type: 'boolean',
|
|
36
|
+
default: false,
|
|
37
|
+
description: 'Whether to reset identity (auto-increment) columns to their initial values',
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: {
|
|
40
|
+
deleteCommand: ['truncate'],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
...common_descriptions_1.whereFixedCollection,
|
|
46
|
+
displayOptions: {
|
|
47
|
+
show: {
|
|
48
|
+
deleteCommand: ['delete'],
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
...common_descriptions_1.combineConditionsCollection,
|
|
54
|
+
displayOptions: {
|
|
55
|
+
show: {
|
|
56
|
+
deleteCommand: ['delete'],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
common_descriptions_1.optionsCollection,
|
|
61
|
+
];
|
|
62
|
+
const displayOptions = {
|
|
63
|
+
show: {
|
|
64
|
+
resource: ['database'],
|
|
65
|
+
operation: ['deleteTable'],
|
|
66
|
+
},
|
|
67
|
+
hide: {
|
|
68
|
+
table: [''],
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, properties);
|
|
72
|
+
async function execute(runQueries, items, nodeOptions, _db) {
|
|
73
|
+
const queries = [];
|
|
74
|
+
for (let i = 0; i < items.length; i++) {
|
|
75
|
+
const options = this.getNodeParameter('options', i, {});
|
|
76
|
+
const schema = this.getNodeParameter('schema', i, undefined, {
|
|
77
|
+
extractValue: true,
|
|
78
|
+
});
|
|
79
|
+
const table = this.getNodeParameter('table', i, undefined, {
|
|
80
|
+
extractValue: true,
|
|
81
|
+
});
|
|
82
|
+
const deleteCommand = this.getNodeParameter('deleteCommand', i);
|
|
83
|
+
let query = '';
|
|
84
|
+
let values = [schema, table];
|
|
85
|
+
if (deleteCommand === 'drop') {
|
|
86
|
+
const cascade = options.cascade ? ' CASCADE' : '';
|
|
87
|
+
query = `DROP TABLE IF EXISTS $1:name.$2:name${cascade}`;
|
|
88
|
+
}
|
|
89
|
+
if (deleteCommand === 'truncate') {
|
|
90
|
+
const identity = this.getNodeParameter('restartSequences', i, false)
|
|
91
|
+
? ' RESTART IDENTITY'
|
|
92
|
+
: '';
|
|
93
|
+
const cascade = options.cascade ? ' CASCADE' : '';
|
|
94
|
+
query = `TRUNCATE TABLE $1:name.$2:name${identity}${cascade}`;
|
|
95
|
+
}
|
|
96
|
+
if (deleteCommand === 'delete') {
|
|
97
|
+
const whereClauses = this.getNodeParameter('where', i, []).values || [];
|
|
98
|
+
const combineConditions = this.getNodeParameter('combineConditions', i, 'AND');
|
|
99
|
+
[query, values] = (0, utils_1.addWhereClauses)(this.getNode(), i, 'DELETE FROM $1:name.$2:name', whereClauses, values, combineConditions);
|
|
100
|
+
}
|
|
101
|
+
if (query === '') {
|
|
102
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Invalid delete command, only drop, delete and truncate are supported ', { itemIndex: i });
|
|
103
|
+
}
|
|
104
|
+
const queryWithValues = { query, values };
|
|
105
|
+
queries.push(queryWithValues);
|
|
106
|
+
}
|
|
107
|
+
return runQueries(queries, items, nodeOptions);
|
|
108
|
+
}
|
|
109
|
+
exports.execute = execute;
|
|
110
|
+
//# sourceMappingURL=deleteTable.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteTable.operation.js","sourceRoot":"","sources":["../../../../../../nodes/Postgres/v2/actions/database/deleteTable.operation.ts"],"names":[],"mappings":";;;AAEA,+CAAkD;AAElD,8DAAsE;AAUtE,+CAAsD;AAEtD,gEAIgC;AAEhC,MAAM,UAAU,GAAsB;IACrC;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,mEAAmE;aAChF;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EACV,4HAA4H;aAC7H;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,qEAAqE;aAClF;SACD;KACD;IACD;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AM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,uEAAuE,EACvE,EAAE,SAAS,EAAE,CAAC,EAAE,CAChB,CAAC;SACF;QAED,MAAM,eAAe,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAE1C,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;KAC9B;IAED,OAAO,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;AAChD,CAAC;AApED,0BAoEC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IExecuteFunctions } from 'n8n-core';
|
|
2
|
+
import type { IDataObject, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
3
|
+
import type { PgpDatabase, QueriesRunner } from '../../helpers/interfaces';
|
|
4
|
+
export declare const description: {
|
|
5
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
6
|
+
displayName: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
9
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions | undefined;
|
|
10
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
hint?: string | undefined;
|
|
13
|
+
options?: (INodeProperties | import("n8n-workflow").INodePropertyOptions | import("n8n-workflow").INodePropertyCollection)[] | undefined;
|
|
14
|
+
placeholder?: string | undefined;
|
|
15
|
+
isNodeSetting?: boolean | undefined;
|
|
16
|
+
noDataExpression?: boolean | undefined;
|
|
17
|
+
required?: boolean | undefined;
|
|
18
|
+
routing?: import("n8n-workflow").INodePropertyRouting | undefined;
|
|
19
|
+
credentialTypes?: ("extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth")[] | undefined;
|
|
20
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractorRegex | undefined;
|
|
21
|
+
modes?: import("n8n-workflow").INodePropertyMode[] | undefined;
|
|
22
|
+
requiresDataPath?: "single" | "multiple" | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
export declare function execute(this: IExecuteFunctions, runQueries: QueriesRunner, items: INodeExecutionData[], nodeOptions: IDataObject, _db?: PgpDatabase): Promise<INodeExecutionData[]>;
|