Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10360509
HttpVerbDescription.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
HttpVerbDescription.ts
View Options
import
{
INodeProperties
}
from
'n8n-workflow'
;
// When the resource `httpVerb` is selected, this `operation` parameter will be shown.
export
const
httpVerbOperations
:
INodeProperties
[]
=
[
{
displayName
:
'Operation'
,
name
:
'operation'
,
type
:
'options'
,
noDataExpression
:
true
,
displayOptions
:
{
show
:
{
resource
:
[
'httpVerb'
],
},
},
options
:
[
{
name
:
'GET'
,
value
:
'get'
,
action
:
'Perform a GET request'
,
routing
:
{
request
:
{
method
:
'GET'
,
url
:
'/get'
,
},
},
},
{
name
:
'DELETE'
,
value
:
'delete'
,
action
:
'Perform a DELETE request'
,
routing
:
{
request
:
{
method
:
'DELETE'
,
url
:
'/delete'
,
},
},
},
],
default
:
'get'
,
},
];
// Here we define what to show when the `get` operation is selected.
// We do that by adding `operation: ["get"]` to `displayOptions.show`
const
getOperation
:
INodeProperties
[]
=
[
{
displayName
:
'Type of Data'
,
name
:
'typeofData'
,
default
:
'queryParameter'
,
description
:
'Select type of data to send [Query Parameters]'
,
displayOptions
:
{
show
:
{
resource
:
[
'httpVerb'
],
operation
:
[
'get'
],
},
},
type
:
'options'
,
options
:
[
{
name
:
'Query'
,
value
:
'queryParameter'
,
},
],
required
:
true
,
},
{
displayName
:
'Query Parameters'
,
name
:
'arguments'
,
default
:
{},
description
:
"The request's query parameters"
,
displayOptions
:
{
show
:
{
resource
:
[
'httpVerb'
],
operation
:
[
'get'
],
},
},
options
:
[
{
name
:
'keyvalue'
,
displayName
:
'Key:Value'
,
values
:
[
{
displayName
:
'Key'
,
name
:
'key'
,
type
:
'string'
,
default
:
''
,
required
:
true
,
description
:
'Key of query parameter'
,
},
{
displayName
:
'Value'
,
name
:
'value'
,
type
:
'string'
,
default
:
''
,
routing
:
{
send
:
{
property
:
'={{$parent.key}}'
,
type
:
'query'
,
},
},
required
:
true
,
description
:
'Value of query parameter'
,
},
],
},
],
type
:
'fixedCollection'
,
typeOptions
:
{
multipleValues
:
true
,
},
},
];
// Here we define what to show when the DELETE Operation is selected.
// We do that by adding `operation: ["delete"]` to `displayOptions.show`
const
deleteOperation
:
INodeProperties
[]
=
[
{
displayName
:
'Type of Data'
,
name
:
'typeofData'
,
default
:
'queryParameter'
,
description
:
'Select type of data to send [Query Parameter Arguments, JSON-Body]'
,
displayOptions
:
{
show
:
{
resource
:
[
'httpVerb'
],
operation
:
[
'delete'
],
},
},
options
:
[
{
name
:
'Query'
,
value
:
'queryParameter'
,
},
{
name
:
'JSON'
,
value
:
'jsonData'
,
},
],
required
:
true
,
type
:
'options'
,
},
{
displayName
:
'Query Parameters'
,
name
:
'arguments'
,
default
:
{},
description
:
"The request's query parameters"
,
displayOptions
:
{
show
:
{
resource
:
[
'httpVerb'
],
operation
:
[
'delete'
],
typeofData
:
[
'queryParameter'
],
},
},
options
:
[
{
name
:
'keyvalue'
,
displayName
:
'Key:Value'
,
values
:
[
{
displayName
:
'Key'
,
name
:
'key'
,
type
:
'string'
,
default
:
''
,
required
:
true
,
description
:
'Key of query parameter'
,
},
{
displayName
:
'Value'
,
name
:
'value'
,
type
:
'string'
,
default
:
''
,
routing
:
{
send
:
{
property
:
'={{$parent.key}}'
,
type
:
'query'
,
},
},
required
:
true
,
description
:
'Value of query parameter'
,
},
],
},
],
type
:
'fixedCollection'
,
typeOptions
:
{
multipleValues
:
true
,
},
},
{
displayName
:
'JSON Object'
,
name
:
'arguments'
,
default
:
{},
description
:
"The request's JSON properties"
,
displayOptions
:
{
show
:
{
resource
:
[
'httpVerb'
],
operation
:
[
'delete'
],
typeofData
:
[
'jsonData'
],
},
},
options
:
[
{
name
:
'keyvalue'
,
displayName
:
'Key:Value'
,
values
:
[
{
displayName
:
'Key'
,
name
:
'key'
,
type
:
'string'
,
default
:
''
,
required
:
true
,
description
:
'Key of JSON property'
,
},
{
displayName
:
'Value'
,
name
:
'value'
,
type
:
'string'
,
default
:
''
,
routing
:
{
send
:
{
property
:
'={{$parent.key}}'
,
type
:
'body'
,
},
},
required
:
true
,
description
:
'Value of JSON property'
,
},
],
},
],
type
:
'fixedCollection'
,
typeOptions
:
{
multipleValues
:
true
,
},
},
];
export
const
httpVerbFields
:
INodeProperties
[]
=
[
/* -------------------------------------------------------------------------- */
/* httpVerb:get */
/* -------------------------------------------------------------------------- */
...
getOperation
,
/* -------------------------------------------------------------------------- */
/* httpVerb:delete */
/* -------------------------------------------------------------------------- */
...
deleteOperation
,
];
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sat, Nov 8, 07:04 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034259
Default Alt Text
HttpVerbDescription.ts (5 KB)
Attached To
Mode
rNPN n8n-phabricator-node
Attached
Detach File
Event Timeline
Log In to Comment