Add filters to all getAll operations to Salesforce Node (#1292)

*  Add filters to all get:All operations

*  Small fix

* Add description to condition fields

*  Minor improvements to Salesforce-Node

Co-authored-by: Harshil <ghagrawal17@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Ricardo Espinoza
2021-01-13 04:45:41 -05:00
committed by GitHub
parent 6759e2e72a
commit 63a459ac92
20 changed files with 1132 additions and 324 deletions

View File

@@ -48,7 +48,7 @@ export const leadOperations = [
{
name: 'Get Summary',
value: 'getSummary',
description: `Returns an overview of Lead's metadata.`,
description: `Returns an overview of Lead's metadata`,
},
{
name: 'Update',
@@ -63,9 +63,9 @@ export const leadOperations = [
export const leadFields = [
/* -------------------------------------------------------------------------- */
/* lead:create */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* lead:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'Company',
name: 'company',
@@ -299,7 +299,7 @@ export const leadFields = [
name: 'street',
type: 'string',
default: '',
description: 'Street number and name for the address of the lead',
description: 'Street number and name for the address of the lead.',
},
{
displayName: 'Title',
@@ -317,9 +317,10 @@ export const leadFields = [
},
],
},
/* -------------------------------------------------------------------------- */
/* lead:update */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* lead:update */
/* -------------------------------------------------------------------------- */
{
displayName: 'Lead ID',
name: 'leadId',
@@ -336,7 +337,7 @@ export const leadFields = [
],
},
},
description: 'Id of Lead that needs to be fetched',
description: 'ID of Lead that needs to be fetched.',
},
{
displayName: 'Update Fields',
@@ -549,7 +550,7 @@ export const leadFields = [
name: 'street',
type: 'string',
default: '',
description: 'Street number and name for the address of the lead',
description: 'Street number and name for the address of the lead.',
},
{
displayName: 'Title',
@@ -568,9 +569,9 @@ export const leadFields = [
],
},
/* -------------------------------------------------------------------------- */
/* lead:get */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* lead:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'Lead ID',
name: 'leadId',
@@ -587,11 +588,12 @@ export const leadFields = [
],
},
},
description: 'Id of Lead that needs to be fetched',
description: 'ID of Lead that needs to be fetched.',
},
/* -------------------------------------------------------------------------- */
/* lead:delete */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* lead:delete */
/* -------------------------------------------------------------------------- */
{
displayName: 'Lead ID',
name: 'leadId',
@@ -608,11 +610,12 @@ export const leadFields = [
],
},
},
description: 'Id of Lead that needs to be fetched',
description: 'ID of Lead that needs to be fetched.',
},
/* -------------------------------------------------------------------------- */
/* lead:getAll */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* lead:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Return All',
name: 'returnAll',
@@ -671,6 +674,69 @@ export const leadFields = [
},
},
options: [
{
displayName: 'Conditions',
name: 'conditionsUi',
placeholder: 'Add Condition',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
description: 'The condition to set.',
default: {},
options: [
{
name: 'conditionValues',
displayName: 'Condition',
values: [
{
displayName: 'Field',
name: 'field',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getLeadFields',
},
default: '',
description: 'For date, number, or boolean, please use expressions.',
},
{
displayName: 'Operation',
name: 'operation',
type: 'options',
options: [
{
name: '=',
value: 'equal',
},
{
name: '>',
value: '>',
},
{
name: '<',
value: '<',
},
{
name: '>=',
value: '>=',
},
{
name: '<=',
value: '<=',
},
],
default: 'equal',
},
{
displayName: 'Value',
name: 'value',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Fields',
name: 'fields',
@@ -680,9 +746,10 @@ export const leadFields = [
},
],
},
/* -------------------------------------------------------------------------- */
/* contact:addToCampaign */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* contact:addToCampaign */
/* -------------------------------------------------------------------------- */
{
displayName: 'Lead ID',
name: 'leadId',
@@ -699,7 +766,7 @@ export const leadFields = [
],
},
},
description: 'Id of contact that needs to be fetched',
description: 'ID of contact that needs to be fetched.',
},
{
displayName: 'Campaign',
@@ -720,7 +787,7 @@ export const leadFields = [
],
},
},
description: 'Id of the campaign that needs to be fetched',
description: 'ID of the campaign that needs to be fetched.',
},
{
displayName: 'Options',
@@ -744,13 +811,14 @@ export const leadFields = [
name: 'status',
type: 'string',
default: '',
description: 'Controls the HasResponded flag on this object',
description: 'Controls the HasResponded flag on this object.',
},
],
},
/* -------------------------------------------------------------------------- */
/* lead:addNote */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* lead:addNote */
/* -------------------------------------------------------------------------- */
{
displayName: 'Lead ID',
name: 'leadId',
@@ -767,7 +835,7 @@ export const leadFields = [
],
},
},
description: 'Id of lead that needs to be fetched',
description: 'ID of lead that needs to be fetched.',
},
{
displayName: 'Title',