mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
⚡ Small improvements to Hubspot-Node
This commit is contained in:
parent
f9f88cbfd0
commit
ad67d020c0
|
@ -884,52 +884,6 @@ export const contactFields = [
|
|||
default: 100,
|
||||
description: 'How many results to return.',
|
||||
},
|
||||
{
|
||||
displayName: 'Sort By',
|
||||
name: 'sorts',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getContactProperties',
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'contact',
|
||||
],
|
||||
operation: [
|
||||
'search',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: [],
|
||||
},
|
||||
{
|
||||
displayName: 'Direction',
|
||||
name: 'direction',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'ASC',
|
||||
value: 'ASCENDING',
|
||||
},
|
||||
{
|
||||
name: 'DESC',
|
||||
value: 'DESCENDING',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'contact',
|
||||
],
|
||||
operation: [
|
||||
'search',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: 'DESCENDING',
|
||||
description: 'Defines the direction in which search results are ordered. Default value is DESC.',
|
||||
},
|
||||
{
|
||||
displayName: 'Filter Groups',
|
||||
name: 'filterGroupsUi',
|
||||
|
@ -1071,6 +1025,23 @@ export const contactFields = [
|
|||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Direction',
|
||||
name: 'direction',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'ASC',
|
||||
value: 'ASCENDING',
|
||||
},
|
||||
{
|
||||
name: 'DESC',
|
||||
value: 'DESCENDING',
|
||||
},
|
||||
],
|
||||
default: 'DESCENDING',
|
||||
description: 'Defines the direction in which search results are ordered. Default value is DESC.',
|
||||
},
|
||||
{
|
||||
displayName: 'Fields',
|
||||
name: 'properties',
|
||||
|
@ -1095,6 +1066,15 @@ export const contactFields = [
|
|||
default: '',
|
||||
description: 'Perform a text search against all property values for an object type',
|
||||
},
|
||||
{
|
||||
displayName: 'Sort By',
|
||||
name: 'sortBy',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getContactProperties',
|
||||
},
|
||||
default: 'createdate',
|
||||
},
|
||||
],
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
|
|
@ -1171,13 +1171,13 @@ export class Hubspot implements INodeType {
|
|||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
|
||||
const filtersGroupsUi = this.getNodeParameter('filterGroupsUi', i) as IDataObject;
|
||||
const sorts = this.getNodeParameter('sorts', i) as string;
|
||||
const direction = this.getNodeParameter('direction', i) as string;
|
||||
const sortBy = additionalFields.sortBy || 'createdate';
|
||||
const direction = additionalFields.direction || 'DESCENDING';
|
||||
|
||||
const body: IDataObject = {
|
||||
sorts: [
|
||||
{
|
||||
propertyName: sorts,
|
||||
propertyName: sortBy,
|
||||
direction,
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue