2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2019-12-03 13:48:17 -08:00
2021-12-03 00:44:16 -08:00
export const dealOperations : INodeProperties [ ] = [
2019-12-03 13:48:17 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2019-12-03 13:48:17 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
2019-12-03 13:48:17 -08:00
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
description : 'Create a deal' ,
2022-07-10 13:50:51 -07:00
action : 'Create a deal' ,
2019-12-03 13:48:17 -08:00
} ,
2019-12-04 09:21:02 -08:00
{
2020-04-07 21:35:50 -07:00
name : 'Delete' ,
value : 'delete' ,
2020-07-24 03:56:41 -07:00
description : 'Delete a deal' ,
2022-07-10 13:50:51 -07:00
action : 'Delete a deal' ,
2019-12-04 09:21:02 -08:00
} ,
2019-12-03 13:48:17 -08:00
{
name : 'Get' ,
value : 'get' ,
description : 'Get a deal' ,
2022-07-10 13:50:51 -07:00
action : 'Get a deal' ,
2019-12-03 13:48:17 -08:00
} ,
2019-12-04 09:21:02 -08:00
{
name : 'Get All' ,
value : 'getAll' ,
description : 'Get all deals' ,
2022-07-10 13:50:51 -07:00
action : 'Get all deals' ,
2019-12-04 09:21:02 -08:00
} ,
{
2019-12-07 13:21:04 -08:00
name : 'Get Recently Created' ,
value : 'getRecentlyCreated' ,
2019-12-04 09:21:02 -08:00
description : 'Get recently created deals' ,
2022-07-10 13:50:51 -07:00
action : 'Get recently created deals' ,
2019-12-04 09:21:02 -08:00
} ,
{
2019-12-07 13:21:04 -08:00
name : 'Get Recently Modified' ,
value : 'getRecentlyModified' ,
2019-12-04 09:21:02 -08:00
description : 'Get recently modified deals' ,
2022-07-10 13:50:51 -07:00
action : 'Get recently modified deals' ,
2019-12-04 09:21:02 -08:00
} ,
2020-12-02 04:25:13 -08:00
{
name : 'Search' ,
value : 'search' ,
description : 'Search deals' ,
2022-07-10 13:50:51 -07:00
action : 'Search for deals' ,
2020-12-02 04:25:13 -08:00
} ,
2020-04-07 21:35:50 -07:00
{
name : 'Update' ,
value : 'update' ,
description : 'Update a deal' ,
2022-07-10 13:50:51 -07:00
action : 'Update a deal' ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-03 13:48:17 -08:00
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2019-12-03 13:48:17 -08:00
2021-12-03 00:44:16 -08:00
export const dealFields : INodeProperties [ ] = [
2020-12-02 04:25:13 -08:00
/* -------------------------------------------------------------------------- */
/* deal:create */
/* -------------------------------------------------------------------------- */
2019-12-03 13:48:17 -08:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Deal Stage Name or ID' ,
2019-12-03 19:21:52 -08:00
name : 'stage' ,
2019-12-03 13:48:17 -08:00
type : 'options' ,
required : true ,
typeOptions : {
2020-10-22 06:46:03 -07:00
loadOptionsMethod : 'getDealStages' ,
2019-12-03 13:48:17 -08:00
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'create' ] ,
2019-12-03 13:48:17 -08:00
} ,
} ,
default : '' ,
options : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'The dealstage is required when creating a deal. See the CRM Pipelines API for details on managing pipelines and stages. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2019-12-03 13:48:17 -08:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'create' ] ,
2019-12-03 13:48:17 -08:00
} ,
} ,
options : [
{
displayName : 'Amount' ,
name : 'amount' ,
type : 'string' ,
default : '' ,
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Associated Company Names or IDs' ,
2019-12-03 13:48:17 -08:00
name : 'associatedCompany' ,
type : 'multiOptions' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2019-12-03 13:48:17 -08:00
typeOptions : {
2020-12-02 04:25:13 -08:00
loadOptionsMethod : 'getCompanies' ,
2019-12-03 13:48:17 -08:00
} ,
default : [ ] ,
} ,
{
2022-06-23 10:45:56 -07:00
displayName : 'Associated Vid Names or IDs' ,
2019-12-03 13:48:17 -08:00
name : 'associatedVids' ,
type : 'multiOptions' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2019-12-03 13:48:17 -08:00
typeOptions : {
2020-12-02 04:25:13 -08:00
loadOptionsMethod : 'getContacts' ,
2019-12-03 13:48:17 -08:00
} ,
default : [ ] ,
} ,
2020-11-08 08:14:43 -08:00
{
displayName : 'Close Date' ,
name : 'closeDate' ,
type : 'dateTime' ,
default : '' ,
} ,
2020-11-08 05:43:16 -08:00
{
displayName : 'Custom Properties' ,
name : 'customPropertiesUi' ,
placeholder : 'Add Custom Property' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'customPropertiesValues' ,
displayName : 'Custom Property' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Property Name or ID' ,
2020-11-08 05:43:16 -08:00
name : 'property' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getDealCustomProperties' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Name of the property. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-11-08 05:43:16 -08:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
description : 'Value of the property' ,
} ,
] ,
} ,
] ,
2020-11-08 08:14:43 -08:00
} ,
2021-01-28 09:38:57 -08:00
{
displayName : 'Deal Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
} ,
2020-11-08 08:14:43 -08:00
{
displayName : 'Deal Name' ,
name : 'dealName' ,
type : 'string' ,
default : '' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Deal Type Name or ID' ,
2020-11-08 08:14:43 -08:00
name : 'dealType' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-11-08 08:14:43 -08:00
typeOptions : {
loadOptionsMethod : 'getDealTypes' ,
} ,
default : '' ,
} ,
{
displayName : 'Pipeline' ,
name : 'pipeline' ,
type : 'string' ,
default : '' ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-03 13:48:17 -08:00
} ,
2020-12-02 04:25:13 -08:00
/* -------------------------------------------------------------------------- */
/* deal:update */
/* -------------------------------------------------------------------------- */
2020-04-07 21:35:50 -07:00
{
displayName : 'Deal ID' ,
name : 'dealId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'update' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
default : '' ,
description : 'Unique identifier for a particular deal' ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Update Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'update' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
options : [
{
2020-11-08 08:14:43 -08:00
displayName : 'Amount' ,
name : 'amount' ,
2020-04-07 21:35:50 -07:00
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Close Date' ,
name : 'closeDate' ,
type : 'dateTime' ,
default : '' ,
} ,
2020-11-08 05:43:16 -08:00
{
displayName : 'Custom Properties' ,
name : 'customPropertiesUi' ,
placeholder : 'Add Custom Property' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'customPropertiesValues' ,
displayName : 'Custom Property' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Property Name or ID' ,
2020-11-08 05:43:16 -08:00
name : 'property' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getDealCustomProperties' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Name of the property. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-11-08 05:43:16 -08:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
description : 'Value of the property' ,
} ,
] ,
} ,
] ,
2020-11-08 08:14:43 -08:00
} ,
2021-03-08 05:44:37 -08:00
{
displayName : 'Deal Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
} ,
2020-11-08 08:14:43 -08:00
{
displayName : 'Deal Name' ,
name : 'dealName' ,
type : 'string' ,
default : '' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Deal Stage Name or ID' ,
2020-11-08 08:14:43 -08:00
name : 'stage' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getDealStages' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The dealstage is required when creating a deal. See the CRM Pipelines API for details on managing pipelines and stages. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-11-08 08:14:43 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Deal Type Name or ID' ,
2020-11-08 08:14:43 -08:00
name : 'dealType' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-11-08 08:14:43 -08:00
typeOptions : {
loadOptionsMethod : 'getDealTypes' ,
} ,
default : '' ,
} ,
{
displayName : 'Pipeline' ,
name : 'pipeline' ,
type : 'string' ,
default : '' ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-04 09:21:02 -08:00
} ,
2020-12-02 04:25:13 -08:00
/* -------------------------------------------------------------------------- */
/* deal:get */
/* -------------------------------------------------------------------------- */
2020-04-07 21:35:50 -07:00
{
displayName : 'Deal ID' ,
name : 'dealId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'get' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
default : '' ,
description : 'Unique identifier for a particular deal' ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'get' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
options : [
{
2022-05-20 14:47:24 -07:00
displayName : 'Include Property Versions' ,
2020-04-07 21:35:50 -07:00
name : 'includePropertyVersions' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
2022-08-17 08:50:24 -07:00
description :
'By default, you will only get data for the most recent version of a property in the "versions" data. If you include this parameter, you will get data for all previous versions.' ,
2020-04-07 21:35:50 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2019-12-04 09:21:02 -08:00
} ,
2020-12-02 04:25:13 -08:00
/* -------------------------------------------------------------------------- */
/* deal:getAll */
/* -------------------------------------------------------------------------- */
2020-04-07 21:35:50 -07:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'getAll' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
typeOptions : {
minValue : 1 ,
maxValue : 250 ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Filter' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'getAll' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
options : [
{
displayName : 'Include Associations' ,
name : 'includeAssociations' ,
type : 'boolean' ,
default : false ,
2022-08-17 08:50:24 -07:00
description :
'Whether to include the IDs of the associated contacts and companies in the results. This will also automatically include the num_associated_contacts property.' ,
2020-04-07 21:35:50 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Property Names or IDs' ,
2020-04-07 21:35:50 -07:00
name : 'properties' ,
2021-09-05 05:35:16 -07:00
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getDealProperties' ,
} ,
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'<p>Used to include specific deal properties in the results. By default, the results will only include Deal ID and will not include the values for any properties for your Deals.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-07 21:35:50 -07:00
} ,
{
2022-06-23 10:45:56 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName : 'Properties with History' ,
2020-04-07 21:35:50 -07:00
name : 'propertiesWithHistory' ,
2021-09-05 05:35:16 -07:00
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getDealProperties' ,
} ,
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'Works similarly to properties=, but this parameter will include the history for the specified property, instead of just including the current value. Use this parameter when you need the full history of changes to a property\'s value. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-07 21:35:50 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-04-07 21:35:50 -07:00
} ,
2020-12-02 04:25:13 -08:00
/* -------------------------------------------------------------------------- */
/* deal:delete */
/* -------------------------------------------------------------------------- */
2020-04-07 21:35:50 -07:00
{
displayName : 'Deal ID' ,
name : 'dealId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'delete' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
default : '' ,
description : 'Unique identifier for a particular deal' ,
2019-12-04 09:21:02 -08:00
} ,
2020-12-02 04:25:13 -08:00
/* -------------------------------------------------------------------------- */
/* deal:getRecentlyCreated deal:getRecentlyModified */
/* -------------------------------------------------------------------------- */
2020-04-07 21:35:50 -07:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'getRecentlyCreated' , 'getRecentlyModified' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'getRecentlyCreated' , 'getRecentlyModified' ] ,
returnAll : [ false ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
typeOptions : {
minValue : 1 ,
maxValue : 250 ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Filter' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'getRecentlyCreated' , 'getRecentlyModified' ] ,
2020-04-07 21:35:50 -07:00
} ,
2019-12-04 09:21:02 -08:00
} ,
2020-04-07 21:35:50 -07:00
options : [
{
displayName : 'Since' ,
name : 'since' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Only return deals created after timestamp x' ,
2020-04-07 21:35:50 -07:00
} ,
{
displayName : 'Include Property Versions' ,
name : 'includePropertyVersions' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
2022-08-17 08:50:24 -07:00
description :
'By default, you will only get data for the most recent version of a property in the "versions" data. If you include this parameter, you will get data for all previous versions.' ,
2020-04-07 21:35:50 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-04-07 21:35:50 -07:00
} ,
2020-12-02 04:25:13 -08:00
/*--------------------------------------------------------------------------- */
/* deal:search */
/* -------------------------------------------------------------------------- */
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'search' ] ,
2020-12-02 04:25:13 -08:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-12-02 04:25:13 -08:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'search' ] ,
returnAll : [ false ] ,
2020-12-02 04:25:13 -08:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 250 ,
} ,
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-12-02 04:25:13 -08:00
} ,
{
displayName : 'Filter Groups' ,
name : 'filterGroupsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-12-02 04:25:13 -08:00
placeholder : 'Add Filter Group' ,
typeOptions : {
multipleValues : true ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'search' ] ,
2020-12-02 04:25:13 -08:00
} ,
} ,
options : [
{
name : 'filterGroupsValues' ,
displayName : 'Filter Group' ,
values : [
{
displayName : 'Filters' ,
name : 'filtersUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-12-02 04:25:13 -08:00
placeholder : 'Add Filter' ,
typeOptions : {
multipleValues : true ,
} ,
options : [
{
name : 'filterValues' ,
displayName : 'Filter' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Property Name or ID' ,
2020-12-02 04:25:13 -08:00
name : 'propertyName' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-12-02 04:25:13 -08:00
typeOptions : {
loadOptionsMethod : 'getDealProperties' ,
} ,
default : '' ,
} ,
{
displayName : 'Operator' ,
name : 'operator' ,
type : 'options' ,
options : [
{
2022-06-03 10:23:49 -07:00
name : 'Contains Exactly' ,
value : 'CONSTAIN_TOKEN' ,
2020-12-02 04:25:13 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Equal' ,
value : 'EQ' ,
2020-12-02 04:25:13 -08:00
} ,
{
name : 'Greater Than' ,
value : 'GT' ,
} ,
{
name : 'Greater Than Or Equal' ,
value : 'GTE' ,
} ,
{
name : 'Is Known' ,
value : 'HAS_PROPERTY' ,
} ,
{
name : 'Is Unknown' ,
value : 'NOT_HAS_PROPERTY' ,
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Less Than' ,
value : 'LT' ,
2020-12-02 04:25:13 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Less Than Or Equal' ,
value : 'LTE' ,
} ,
{
name : 'Not Equal' ,
value : 'NEQ' ,
2020-12-02 04:25:13 -08:00
} ,
] ,
default : 'EQ' ,
} ,
{
displayName : 'Value' ,
name : 'value' ,
displayOptions : {
hide : {
2022-08-17 08:50:24 -07:00
operator : [ 'HAS_PROPERTY' , 'NOT_HAS_PROPERTY' ] ,
2020-12-02 04:25:13 -08:00
} ,
} ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
2022-08-17 08:50:24 -07:00
description :
'Use filters to limit the results to only CRM objects with matching property values. More info <a href="https://developers.hubspot.com/docs/api/crm/search">here</a>.' ,
2020-12-02 04:25:13 -08:00
} ,
] ,
} ,
] ,
2022-08-17 08:50:24 -07:00
description :
'When multiple filters are provided within a filterGroup, they will be combined using a logical AND operator. When multiple filterGroups are provided, they will be combined using a logical OR operator. The system supports a maximum of three filterGroups with up to three filters each. More info <a href="https://developers.hubspot.com/docs/api/crm/search">here</a>' ,
2020-12-02 04:25:13 -08:00
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'deal' ] ,
operation : [ 'search' ] ,
2020-12-02 04:25:13 -08:00
} ,
} ,
options : [
{
displayName : 'Direction' ,
name : 'direction' ,
type : 'options' ,
options : [
{
name : 'ASC' ,
value : 'ASCENDING' ,
} ,
{
name : 'DESC' ,
value : 'DESCENDING' ,
} ,
] ,
default : 'DESCENDING' ,
2022-08-17 08:50:24 -07:00
description :
'Defines the direction in which search results are ordered. Default value is DESC.' ,
2020-12-02 04:25:13 -08:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Field Names or IDs' ,
2020-12-02 04:25:13 -08:00
name : 'properties' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getDealProperties' ,
} ,
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'<p>Used to include specific deal properties in the results. By default, the results will only include Deal ID and will not include the values for any properties for your company.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-12-02 04:25:13 -08:00
} ,
{
displayName : 'Query' ,
name : 'query' ,
type : 'string' ,
default : '' ,
description : 'Perform a text search against all property values for an object type' ,
} ,
{
2022-06-03 10:23:49 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
2020-12-02 04:25:13 -08:00
displayName : 'Sort By' ,
name : 'sortBy' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2020-12-02 04:25:13 -08:00
typeOptions : {
loadOptionsMethod : 'getDealProperties' ,
} ,
default : 'createdate' ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;