Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡ Add filters to all get:All operations #1292

Merged
merged 4 commits into from Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
123 changes: 95 additions & 28 deletions packages/nodes-base/nodes/Salesforce/AccountDescription.ts
Expand Up @@ -58,9 +58,9 @@ export const accountOperations = [

export const accountFields = [

/* -------------------------------------------------------------------------- */
/* account:create */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* account:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'Name',
name: 'name',
Expand Down Expand Up @@ -104,7 +104,7 @@ export const accountFields = [
loadOptionsMethod: 'getAccountSources',
},
default: '',
description: 'The source of the account record',
description: 'The source of the account record.',
},
{
displayName: 'Annual Revenue',
Expand Down Expand Up @@ -209,7 +209,7 @@ export const accountFields = [
name: 'jigsaw',
type: 'string',
default: '',
description: 'references the ID of a company in Data.com',
description: 'References the ID of a company in Data.com',
},
{
displayName: 'Industry',
Expand Down Expand Up @@ -262,7 +262,7 @@ export const accountFields = [
description: 'Type of account',
},
{
displayName: 'Parent Id',
displayName: 'Parent ID',
name: 'parentId',
type: 'string',
default: '',
Expand Down Expand Up @@ -312,9 +312,10 @@ export const accountFields = [
},
],
},
/* -------------------------------------------------------------------------- */
/* account:update */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* account:update */
/* -------------------------------------------------------------------------- */
{
displayName: 'Account ID',
name: 'accountId',
Expand All @@ -331,7 +332,7 @@ export const accountFields = [
],
},
},
description: 'Id of account that needs to be fetched',
description: 'ID of account that needs to be fetched.',
},
{
displayName: 'Update Fields',
Expand All @@ -358,7 +359,7 @@ export const accountFields = [
loadOptionsMethod: 'getAccountSources',
},
default: '',
description: 'The source of the account record',
description: 'The source of the account record.',
},
{
displayName: 'Annual Revenue',
Expand Down Expand Up @@ -470,7 +471,7 @@ export const accountFields = [
name: 'jigsaw',
type: 'string',
default: '',
description: 'references the ID of a company in Data.com',
description: 'References the ID of a company in Data.com',
},
{
displayName: 'Owner',
Expand Down Expand Up @@ -514,7 +515,7 @@ export const accountFields = [
description: 'Number of employees',
},
{
displayName: 'Parent Id',
displayName: 'Parent ID',
name: 'parentId',
type: 'string',
default: '',
Expand Down Expand Up @@ -574,9 +575,9 @@ export const accountFields = [
],
},

/* -------------------------------------------------------------------------- */
/* account:get */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* account:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'Account ID',
name: 'accountId',
Expand All @@ -593,11 +594,12 @@ export const accountFields = [
],
},
},
description: 'Id of account that needs to be fetched',
description: 'ID of account that needs to be fetched.',
},
/* -------------------------------------------------------------------------- */
/* account:delete */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* account:delete */
/* -------------------------------------------------------------------------- */
{
displayName: 'Account ID',
name: 'accountId',
Expand All @@ -614,11 +616,12 @@ export const accountFields = [
],
},
},
description: 'Id of account that needs to be fetched',
description: 'ID of account that needs to be fetched.',
},
/* -------------------------------------------------------------------------- */
/* account:getAll */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* account:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Return All',
name: 'returnAll',
Expand Down Expand Up @@ -684,11 +687,75 @@ export const accountFields = [
default: '',
description: 'Fields to include separated by ,',
},
{
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: 'getAccountFields',
},
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: '',
},
],
},
],
},
],
},
/* -------------------------------------------------------------------------- */
/* account:addNote */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* account:addNote */
/* -------------------------------------------------------------------------- */
{
displayName: 'Account ID',
name: 'accountId',
Expand All @@ -705,7 +772,7 @@ export const accountFields = [
],
},
},
description: 'Id of account that needs to be fetched',
description: 'ID of account that needs to be fetched.',
},
{
displayName: 'Title',
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Salesforce/AccountInterface.ts
Expand Up @@ -13,7 +13,7 @@ export interface IAccount {
Description?: string;
BillingState?: string;
ShippingStreet?: string;
ShippingCity?:string;
ShippingCity?: string;
AccountSource?: string;
AnnualRevenue?: number;
BillingStreet?: string;
Expand Down
104 changes: 85 additions & 19 deletions packages/nodes-base/nodes/Salesforce/AttachmentDescription.ts
Expand Up @@ -51,9 +51,9 @@ export const attachmentOperations = [

export const attachmentFields = [

/* -------------------------------------------------------------------------- */
/* attachment:create */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* attachment:create */
/* -------------------------------------------------------------------------- */
{
displayName: 'Parent ID',
name: 'parentId',
Expand Down Expand Up @@ -152,9 +152,10 @@ export const attachmentFields = [
},
],
},
/* -------------------------------------------------------------------------- */
/* attachment:update */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* attachment:update */
/* -------------------------------------------------------------------------- */
{
displayName: 'Attachment ID',
name: 'attachmentId',
Expand All @@ -171,7 +172,7 @@ export const attachmentFields = [
],
},
},
description: 'Id of attachment that needs to be fetched',
description: 'ID of attachment that needs to be fetched.',
},
{
displayName: 'Update Fields',
Expand Down Expand Up @@ -224,17 +225,17 @@ export const attachmentFields = [
name: 'owner',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getUsers',
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the User who owns the attachment.',
},
],
},

/* -------------------------------------------------------------------------- */
/* attachment:get */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* attachment:get */
/* -------------------------------------------------------------------------- */
{
displayName: 'Attachment ID',
name: 'attachmentId',
Expand All @@ -251,11 +252,12 @@ export const attachmentFields = [
],
},
},
description: 'Id of attachment that needs to be fetched',
description: 'ID of attachment that needs to be fetched.',
},
/* -------------------------------------------------------------------------- */
/* attachment:delete */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* attachment:delete */
/* -------------------------------------------------------------------------- */
{
displayName: 'Attachment ID',
name: 'attachmentId',
Expand All @@ -272,11 +274,12 @@ export const attachmentFields = [
],
},
},
description: 'Id of attachment that needs to be fetched',
description: 'ID of attachment that needs to be fetched.',
},
/* -------------------------------------------------------------------------- */
/* attachment:getAll */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/* attachment:getAll */
/* -------------------------------------------------------------------------- */
{
displayName: 'Return All',
name: 'returnAll',
Expand Down Expand Up @@ -335,6 +338,69 @@ export const attachmentFields = [
},
},
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: 'getAtachmentFields',
},
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',
Expand Down