2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2020-08-15 14:25:15 -07:00
2021-12-03 00:44:16 -08:00
export const contactOperations : INodeProperties [ ] = [
2020-08-15 14:25:15 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-08-15 14:25:15 -07:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
description : 'Create a contact' ,
2022-07-10 13:50:51 -07:00
action : 'Create a contact' ,
2020-08-15 14:25:15 -07:00
} ,
{
name : 'Delete' ,
value : 'delete' ,
description : 'Delete a contact' ,
2022-07-10 13:50:51 -07:00
action : 'Delete a contact' ,
2020-08-15 14:25:15 -07:00
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get a contact' ,
2022-07-10 13:50:51 -07:00
action : 'Get a contact' ,
2020-08-15 14:25:15 -07:00
} ,
{
2022-09-07 07:51:14 -07:00
name : 'Get Many' ,
2020-08-15 14:25:15 -07:00
value : 'getAll' ,
2022-09-13 03:36:36 -07:00
description : 'Retrieve many contacts' ,
2022-09-08 08:10:13 -07:00
action : 'Get many contacts' ,
2020-08-15 14:25:15 -07:00
} ,
2020-09-03 02:21:23 -07:00
{
name : 'Update' ,
value : 'update' ,
description : 'Update a contact' ,
2022-07-10 13:50:51 -07:00
action : 'Update a contact' ,
2020-09-03 02:21:23 -07:00
} ,
2020-08-15 14:25:15 -07:00
] ,
default : 'create' ,
2020-10-22 06:46:03 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-08-15 14:25:15 -07:00
2021-12-03 00:44:16 -08:00
export const contactFields : INodeProperties [ ] = [
2020-08-15 14:25:15 -07:00
/* -------------------------------------------------------------------------- */
/* contact:create */
/* -------------------------------------------------------------------------- */
{
displayName : 'Family Name' ,
name : 'familyName' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
default : '' ,
} ,
{
displayName : 'Given Name' ,
name : 'givenName' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
default : '' ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
options : [
{
displayName : 'Addresses' ,
name : 'addressesUi' ,
placeholder : 'Add Address' ,
type : 'fixedCollection' ,
default : { } ,
options : [
{
displayName : 'Address' ,
name : 'addressesValues' ,
values : [
{
displayName : 'Street Address' ,
name : 'streetAddress' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'City' ,
name : 'city' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Region' ,
name : 'region' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Country Code' ,
name : 'countryCode' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Postal Code' ,
name : 'postalCode' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
name : 'Home' ,
value : 'home' ,
} ,
{
name : 'Work' ,
value : 'work' ,
} ,
{
name : 'Other' ,
value : 'other' ,
} ,
] ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Birthday' ,
name : 'birthday' ,
type : 'dateTime' ,
default : '' ,
} ,
{
displayName : 'Company' ,
name : 'companyUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-08-15 14:25:15 -07:00
placeholder : 'Add Company' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-08-15 14:25:15 -07:00
} ,
options : [
{
name : 'companyValues' ,
displayName : 'Company' ,
values : [
{
displayName : 'Current' ,
name : 'current' ,
type : 'boolean' ,
default : false ,
} ,
{
displayName : 'Domain' ,
name : 'domain' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Title' ,
name : 'title' ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Custom Fields' ,
name : 'customFieldsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-08-15 14:25:15 -07:00
placeholder : 'Add Custom Field' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-08-15 14:25:15 -07:00
} ,
options : [
{
name : 'customFieldsValues' ,
displayName : 'Custom Field' ,
values : [
{
displayName : 'Key' ,
name : 'key' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The end user specified key of the user defined data' ,
2020-08-15 14:25:15 -07:00
default : '' ,
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The end user specified value of the user defined data' ,
2020-08-15 14:25:15 -07:00
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Emails' ,
name : 'emailsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-08-15 14:25:15 -07:00
placeholder : 'Add Email' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-08-15 14:25:15 -07:00
} ,
options : [
{
name : 'emailsValues' ,
displayName : 'Email' ,
values : [
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
name : 'Home' ,
value : 'home' ,
} ,
{
name : 'Work' ,
value : 'work' ,
} ,
{
name : 'Other' ,
value : 'other' ,
} ,
] ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The type of the email address. The type can be custom or one of these predefined values.' ,
2020-08-15 14:25:15 -07:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The email address' ,
2020-08-15 14:25:15 -07:00
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Events' ,
name : 'eventsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-08-15 14:25:15 -07:00
placeholder : 'Add Event' ,
2022-05-06 14:01:25 -07:00
description : 'An event related to the person' ,
2020-08-15 14:25:15 -07:00
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-08-15 14:25:15 -07:00
} ,
options : [
{
name : 'eventsValues' ,
displayName : 'Event' ,
values : [
{
displayName : 'Date' ,
name : 'date' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The date of the event' ,
2020-08-15 14:25:15 -07:00
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
name : 'Anniversary' ,
value : 'anniversary' ,
} ,
{
name : 'Other' ,
value : 'other' ,
} ,
] ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The type of the event. The type can be custom or one of these predefined values.' ,
2020-08-15 14:25:15 -07:00
} ,
] ,
} ,
] ,
} ,
{
displayName : 'File As' ,
name : 'fileAs' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The name that should be used to sort the person in a list' ,
2020-08-15 14:25:15 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Group Names or IDs' ,
2020-08-15 14:25:15 -07:00
name : 'group' ,
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>' ,
2020-08-15 14:25:15 -07:00
typeOptions : {
loadOptionsMethod : 'getGroups' ,
} ,
default : [ ] ,
} ,
2020-09-03 02:21:23 -07:00
{
displayName : 'Honorific Prefix' ,
name : 'honorificPrefix' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Honorific Suffix' ,
name : 'honorificSuffix' ,
type : 'string' ,
default : '' ,
} ,
2020-08-15 14:25:15 -07:00
{
displayName : 'Middle Name' ,
name : 'middleName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Notes' ,
name : 'biographies' ,
type : 'string' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
} ,
{
displayName : 'Phone' ,
name : 'phoneUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-08-15 14:25:15 -07:00
placeholder : 'Add Phone' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-08-15 14:25:15 -07:00
} ,
options : [
{
name : 'phoneValues' ,
displayName : 'Phone' ,
values : [
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
2022-06-03 10:23:49 -07:00
{
name : 'Google Voice' ,
value : 'googleVoice' ,
} ,
2020-08-15 14:25:15 -07:00
{
name : 'Home' ,
value : 'home' ,
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Home Fax' ,
value : 'homeFax' ,
2020-08-15 14:25:15 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Main' ,
value : 'main' ,
2020-08-15 14:25:15 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Mobile' ,
value : 'mobile' ,
2020-08-15 14:25:15 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Other' ,
value : 'other' ,
2020-08-15 14:25:15 -07:00
} ,
{
name : 'Other Fax' ,
value : 'otherFax' ,
} ,
{
name : 'Pager' ,
value : 'pager' ,
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Work' ,
value : 'work' ,
2020-08-15 14:25:15 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Work Fax' ,
value : 'workFax' ,
2020-08-15 14:25:15 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Work Mobile' ,
value : 'workMobile' ,
2020-08-15 14:25:15 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Work Pager' ,
value : 'workPager' ,
2020-08-15 14:25:15 -07:00
} ,
] ,
default : '' ,
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The phone number' ,
2020-08-15 14:25:15 -07:00
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Relations' ,
name : 'relationsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-08-15 14:25:15 -07:00
placeholder : 'Add Relation' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-08-15 14:25:15 -07:00
} ,
options : [
{
name : 'relationsValues' ,
displayName : 'Relation' ,
values : [
{
displayName : 'Person' ,
name : 'person' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The name of the other person this relation refers to' ,
2020-08-15 14:25:15 -07:00
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
2020-08-15 14:26:01 -07:00
name : 'Assistant' ,
value : 'assistant' ,
} ,
{
name : 'Brother' ,
value : 'brother' ,
2020-08-15 14:25:15 -07:00
} ,
{
name : 'Child' ,
value : 'child' ,
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Domestic Partner' ,
value : 'domesticPartner' ,
2020-08-15 14:25:15 -07:00
} ,
{
name : 'Father' ,
value : 'father' ,
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Friend' ,
value : 'friend' ,
2020-08-15 14:25:15 -07:00
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Manager' ,
value : 'manager' ,
2020-08-15 14:25:15 -07:00
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Mother' ,
value : 'mother' ,
2020-08-15 14:25:15 -07:00
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Parent' ,
value : 'parent' ,
2020-08-15 14:25:15 -07:00
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Referred By' ,
value : 'referredBy' ,
2020-08-15 14:25:15 -07:00
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Relative' ,
value : 'relative' ,
2020-08-15 14:25:15 -07:00
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Sister' ,
value : 'sister' ,
2020-08-15 14:25:15 -07:00
} ,
{
2020-08-15 14:26:01 -07:00
name : 'Spouse' ,
value : 'spouse' ,
2020-08-15 14:25:15 -07:00
} ,
] ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
"The person's relation to the other person. The type can be custom or one of these predefined values." ,
2020-08-15 14:25:15 -07:00
} ,
] ,
} ,
] ,
} ,
] ,
} ,
/* -------------------------------------------------------------------------- */
/* contact:delete */
/* -------------------------------------------------------------------------- */
{
displayName : 'Contact ID' ,
name : 'contactId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'delete' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
default : '' ,
} ,
/* -------------------------------------------------------------------------- */
/* contact:get */
/* -------------------------------------------------------------------------- */
{
displayName : 'Contact ID' ,
name : 'contactId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'get' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
default : '' ,
} ,
{
displayName : 'Fields' ,
name : 'fields' ,
type : 'multiOptions' ,
options : [
{
name : '*' ,
value : '*' ,
} ,
{
name : 'Addresses' ,
value : 'addresses' ,
} ,
{
name : 'Biographies' ,
value : 'biographies' ,
} ,
{
name : 'Birthdays' ,
value : 'birthdays' ,
} ,
{
name : 'Cover Photos' ,
value : 'coverPhotos' ,
} ,
{
name : 'Email Addresses' ,
value : 'emailAddresses' ,
} ,
{
name : 'Events' ,
value : 'events' ,
} ,
{
name : 'Genders' ,
value : 'genders' ,
} ,
{
name : 'IM Clients' ,
value : 'imClients' ,
} ,
{
name : 'Interests' ,
value : 'interests' ,
} ,
{
name : 'Locales' ,
value : 'locales' ,
} ,
{
name : 'Memberships' ,
value : 'memberships' ,
} ,
{
name : 'Metadata' ,
value : 'metadata' ,
} ,
{
name : 'Names' ,
value : 'names' ,
} ,
{
name : 'Nicknames' ,
value : 'nicknames' ,
} ,
{
name : 'Occupations' ,
value : 'occupations' ,
} ,
{
name : 'Organizations' ,
value : 'organizations' ,
} ,
{
name : 'Phone Numbers' ,
value : 'phoneNumbers' ,
} ,
{
name : 'Photos' ,
value : 'photos' ,
} ,
{
name : 'Relations' ,
value : 'relations' ,
} ,
{
name : 'Residences' ,
value : 'residences' ,
} ,
{
name : 'Sip Addresses' ,
value : 'sipAddresses' ,
} ,
{
name : 'Skills' ,
value : 'skills' ,
} ,
{
name : 'URLs' ,
value : 'urls' ,
} ,
{
name : 'User Defined' ,
value : 'userDefined' ,
} ,
] ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'get' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas.' ,
2020-08-15 14:25:15 -07:00
} ,
{
displayName : 'RAW Data' ,
name : 'rawData' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'get' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether to return the data exactly in the way it got received from the API' ,
2020-08-15 14:25:15 -07:00
} ,
/* -------------------------------------------------------------------------- */
/* contact:getAll */
/* -------------------------------------------------------------------------- */
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -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' ,
2020-08-15 14:25:15 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'contact' ] ,
returnAll : [ false ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 500 ,
} ,
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-08-15 14:25:15 -07:00
} ,
{
displayName : 'Fields' ,
name : 'fields' ,
type : 'multiOptions' ,
options : [
{
name : '*' ,
value : '*' ,
} ,
{
name : 'Addresses' ,
value : 'addresses' ,
} ,
{
name : 'Biographies' ,
value : 'biographies' ,
} ,
{
name : 'Birthdays' ,
value : 'birthdays' ,
} ,
{
name : 'Cover Photos' ,
value : 'coverPhotos' ,
} ,
{
name : 'Email Addresses' ,
value : 'emailAddresses' ,
} ,
{
name : 'Events' ,
value : 'events' ,
} ,
{
name : 'Genders' ,
value : 'genders' ,
} ,
{
name : 'IM Clients' ,
value : 'imClients' ,
} ,
{
name : 'Interests' ,
value : 'interests' ,
} ,
{
name : 'Locales' ,
value : 'locales' ,
} ,
{
name : 'Memberships' ,
value : 'memberships' ,
} ,
{
name : 'Metadata' ,
value : 'metadata' ,
} ,
{
name : 'Names' ,
value : 'names' ,
} ,
{
name : 'Nicknames' ,
value : 'nicknames' ,
} ,
{
name : 'Occupations' ,
value : 'occupations' ,
} ,
{
name : 'Organizations' ,
value : 'organizations' ,
} ,
{
name : 'Phone Numbers' ,
value : 'phoneNumbers' ,
} ,
{
name : 'Photos' ,
value : 'photos' ,
} ,
{
name : 'Relations' ,
value : 'relations' ,
} ,
{
name : 'Residences' ,
value : 'residences' ,
} ,
{
name : 'Sip Addresses' ,
value : 'sipAddresses' ,
} ,
{
name : 'Skills' ,
value : 'skills' ,
} ,
{
name : 'URLs' ,
value : 'urls' ,
} ,
{
name : 'User Defined' ,
value : 'userDefined' ,
} ,
] ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas.' ,
2020-08-15 14:25:15 -07:00
} ,
2021-12-11 08:00:47 -08:00
{
displayName : 'Use Query' ,
name : 'useQuery' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'contact' ] ,
2021-12-11 08:00:47 -08:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether or not to use a query to filter the results' ,
2021-12-11 08:00:47 -08:00
} ,
{
displayName : 'Query' ,
name : 'query' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'contact' ] ,
useQuery : [ true ] ,
2021-12-11 08:00:47 -08:00
} ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name "foo name" matches queries such as "f", "fo", "foo", "foo n", "nam", etc., but not "oo n".' ,
2021-12-11 08:00:47 -08:00
} ,
2020-08-15 14:25:15 -07:00
{
displayName : 'RAW Data' ,
name : 'rawData' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'contact' ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether to return the data exactly in the way it got received from the API' ,
2020-08-15 14:25:15 -07:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Option' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'contact' ] ,
useQuery : [ false ] ,
2020-08-15 14:25:15 -07:00
} ,
} ,
options : [
{
displayName : 'Sort Order' ,
name : 'sortOrder' ,
type : 'options' ,
options : [
{
name : 'Last Modified Ascending' ,
value : 'LAST_MODIFIED_ASCENDING' ,
2022-05-06 14:01:25 -07:00
description : 'Sort people by when they were changed; older entries first' ,
2020-08-15 14:25:15 -07:00
} ,
{
name : 'Last Modified Descending' ,
value : 'LAST_MODIFIED_DESCENDING' ,
2022-05-06 14:01:25 -07:00
description : 'Sort people by when they were changed; newer entries first' ,
2020-08-15 14:25:15 -07:00
} ,
{
name : 'First Name Ascending' ,
value : 'FIRST_NAME_ASCENDING' ,
2022-05-06 14:01:25 -07:00
description : 'Sort people by first name' ,
2020-08-15 14:25:15 -07:00
} ,
{
name : 'Last Name Ascending' ,
value : 'LAST_NAME_ASCENDING' ,
2022-05-06 14:01:25 -07:00
description : 'Sort people by last name' ,
2020-08-15 14:25:15 -07:00
} ,
] ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The order of the contacts returned in the result' ,
2020-08-15 14:25:15 -07:00
} ,
] ,
} ,
2020-09-03 02:21:23 -07:00
/* -------------------------------------------------------------------------- */
/* contact:update */
/* -------------------------------------------------------------------------- */
{
displayName : 'Contact ID' ,
name : 'contactId' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'update' ] ,
resource : [ 'contact' ] ,
2020-09-03 02:21:23 -07:00
} ,
} ,
default : '' ,
} ,
{
displayName : 'Fields' ,
name : 'fields' ,
type : 'multiOptions' ,
options : [
{
name : '*' ,
value : '*' ,
} ,
{
name : 'Addresses' ,
value : 'addresses' ,
} ,
{
name : 'Biographies' ,
value : 'biographies' ,
} ,
{
name : 'Birthdays' ,
value : 'birthdays' ,
} ,
{
name : 'Cover Photos' ,
value : 'coverPhotos' ,
} ,
{
name : 'Email Addresses' ,
value : 'emailAddresses' ,
} ,
{
name : 'Events' ,
value : 'events' ,
} ,
{
name : 'Genders' ,
value : 'genders' ,
} ,
{
name : 'IM Clients' ,
value : 'imClients' ,
} ,
{
name : 'Interests' ,
value : 'interests' ,
} ,
{
name : 'Locales' ,
value : 'locales' ,
} ,
{
name : 'Memberships' ,
value : 'memberships' ,
} ,
{
name : 'Metadata' ,
value : 'metadata' ,
} ,
{
name : 'Names' ,
value : 'names' ,
} ,
{
name : 'Nicknames' ,
value : 'nicknames' ,
} ,
{
name : 'Occupations' ,
value : 'occupations' ,
} ,
{
name : 'Organizations' ,
value : 'organizations' ,
} ,
{
name : 'Phone Numbers' ,
value : 'phoneNumbers' ,
} ,
{
name : 'Photos' ,
value : 'photos' ,
} ,
{
name : 'Relations' ,
value : 'relations' ,
} ,
{
name : 'Residences' ,
value : 'residences' ,
} ,
{
name : 'Sip Addresses' ,
value : 'sipAddresses' ,
} ,
{
name : 'Skills' ,
value : 'skills' ,
} ,
{
name : 'URLs' ,
value : 'urls' ,
} ,
{
name : 'User Defined' ,
value : 'userDefined' ,
} ,
] ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'update' ] ,
resource : [ 'contact' ] ,
2020-09-03 02:21:23 -07:00
} ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
'A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas.' ,
2020-09-03 02:21:23 -07:00
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'update' ] ,
resource : [ 'contact' ] ,
2020-09-03 02:21:23 -07:00
} ,
} ,
options : [
{
displayName : 'Etag' ,
name : 'etag' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The etag field in the person is nedded to make sure the contact has not changed since your last read' ,
2020-09-03 02:21:23 -07:00
} ,
{
displayName : 'Family Name' ,
name : 'familyName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Given Name' ,
name : 'givenName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Addresses' ,
name : 'addressesUi' ,
placeholder : 'Add Address' ,
type : 'fixedCollection' ,
default : { } ,
options : [
{
displayName : 'Address' ,
name : 'addressesValues' ,
values : [
{
displayName : 'Street Address' ,
name : 'streetAddress' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'City' ,
name : 'city' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Region' ,
name : 'region' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Country Code' ,
name : 'countryCode' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Postal Code' ,
name : 'postalCode' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
name : 'Home' ,
value : 'home' ,
} ,
{
name : 'Work' ,
value : 'work' ,
} ,
{
name : 'Other' ,
value : 'other' ,
} ,
] ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Birthday' ,
name : 'birthday' ,
type : 'dateTime' ,
default : '' ,
} ,
{
displayName : 'Company' ,
name : 'companyUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-09-03 02:21:23 -07:00
placeholder : 'Add Company' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-09-03 02:21:23 -07:00
} ,
options : [
{
name : 'companyValues' ,
displayName : 'Company' ,
values : [
{
displayName : 'Current' ,
name : 'current' ,
type : 'boolean' ,
default : false ,
} ,
{
displayName : 'Domain' ,
name : 'domain' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Title' ,
name : 'title' ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Custom Fields' ,
name : 'customFieldsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-09-03 02:21:23 -07:00
placeholder : 'Add Custom Field' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-09-03 02:21:23 -07:00
} ,
options : [
{
name : 'customFieldsValues' ,
displayName : 'Custom Field' ,
values : [
{
displayName : 'Key' ,
name : 'key' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The end user specified key of the user defined data' ,
2020-09-03 02:21:23 -07:00
default : '' ,
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The end user specified value of the user defined data' ,
2020-09-03 02:21:23 -07:00
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Emails' ,
name : 'emailsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-09-03 02:21:23 -07:00
placeholder : 'Add Email' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-09-03 02:21:23 -07:00
} ,
options : [
{
name : 'emailsValues' ,
displayName : 'Email' ,
values : [
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
name : 'Home' ,
value : 'home' ,
} ,
{
name : 'Work' ,
value : 'work' ,
} ,
{
name : 'Other' ,
value : 'other' ,
} ,
] ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The type of the email address. The type can be custom or one of these predefined values.' ,
2020-09-03 02:21:23 -07:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The email address' ,
2020-09-03 02:21:23 -07:00
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Events' ,
name : 'eventsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-09-03 02:21:23 -07:00
placeholder : 'Add Event' ,
2022-05-06 14:01:25 -07:00
description : 'An event related to the person' ,
2020-09-03 02:21:23 -07:00
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-09-03 02:21:23 -07:00
} ,
options : [
{
name : 'eventsValues' ,
displayName : 'Event' ,
values : [
{
displayName : 'Date' ,
name : 'date' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The date of the event' ,
2020-09-03 02:21:23 -07:00
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
name : 'Anniversary' ,
value : 'anniversary' ,
} ,
{
name : 'Other' ,
value : 'other' ,
} ,
] ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The type of the event. The type can be custom or one of these predefined values.' ,
2020-09-03 02:21:23 -07:00
} ,
] ,
} ,
] ,
} ,
{
displayName : 'File As' ,
name : 'fileAs' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The name that should be used to sort the person in a list' ,
2020-09-03 02:21:23 -07:00
} ,
{
2022-06-20 07:54:01 -07:00
displayName : 'Group Names or IDs' ,
2020-09-03 02:21:23 -07:00
name : 'group' ,
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>' ,
2020-09-03 02:21:23 -07:00
typeOptions : {
loadOptionsMethod : 'getGroups' ,
} ,
default : [ ] ,
} ,
{
displayName : 'Honorific Prefix' ,
name : 'honorificPrefix' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Honorific Suffix' ,
name : 'honorificSuffix' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Middle Name' ,
name : 'middleName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Notes' ,
name : 'biographies' ,
type : 'string' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
} ,
{
displayName : 'Phone' ,
name : 'phoneUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-09-03 02:21:23 -07:00
placeholder : 'Add Phone' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-09-03 02:21:23 -07:00
} ,
options : [
{
name : 'phoneValues' ,
displayName : 'Phone' ,
values : [
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
2022-06-03 10:23:49 -07:00
{
name : 'Google Voice' ,
value : 'googleVoice' ,
} ,
2020-09-03 02:21:23 -07:00
{
name : 'Home' ,
value : 'home' ,
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Home Fax' ,
value : 'homeFax' ,
2020-09-03 02:21:23 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Main' ,
value : 'main' ,
2020-09-03 02:21:23 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Mobile' ,
value : 'mobile' ,
2020-09-03 02:21:23 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Other' ,
value : 'other' ,
2020-09-03 02:21:23 -07:00
} ,
{
name : 'Other Fax' ,
value : 'otherFax' ,
} ,
{
name : 'Pager' ,
value : 'pager' ,
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Work' ,
value : 'work' ,
2020-09-03 02:21:23 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Work Fax' ,
value : 'workFax' ,
2020-09-03 02:21:23 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Work Mobile' ,
value : 'workMobile' ,
2020-09-03 02:21:23 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'Work Pager' ,
value : 'workPager' ,
2020-09-03 02:21:23 -07:00
} ,
] ,
default : '' ,
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The phone number' ,
2020-09-03 02:21:23 -07:00
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Relations' ,
name : 'relationsUi' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-09-03 02:21:23 -07:00
placeholder : 'Add Relation' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
multipleValues : true ,
2020-09-03 02:21:23 -07:00
} ,
options : [
{
name : 'relationsValues' ,
displayName : 'Relation' ,
values : [
{
displayName : 'Person' ,
name : 'person' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The name of the other person this relation refers to' ,
2020-09-03 02:21:23 -07:00
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
name : 'Assistant' ,
value : 'assistant' ,
} ,
{
name : 'Brother' ,
value : 'brother' ,
} ,
{
name : 'Child' ,
value : 'child' ,
} ,
{
name : 'Domestic Partner' ,
value : 'domesticPartner' ,
} ,
{
name : 'Father' ,
value : 'father' ,
} ,
{
name : 'Friend' ,
value : 'friend' ,
} ,
{
name : 'Manager' ,
value : 'manager' ,
} ,
{
name : 'Mother' ,
value : 'mother' ,
} ,
{
name : 'Parent' ,
value : 'parent' ,
} ,
{
name : 'Referred By' ,
value : 'referredBy' ,
} ,
{
name : 'Relative' ,
value : 'relative' ,
} ,
{
name : 'Sister' ,
value : 'sister' ,
} ,
{
name : 'Spouse' ,
value : 'spouse' ,
} ,
] ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
"The person's relation to the other person. The type can be custom or one of these predefined values." ,
2020-09-03 02:21:23 -07:00
} ,
] ,
} ,
] ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;