mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
feat(HighLevel Node): Add support for calendar items (#10820)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
addCustomFieldsPreSendAction,
|
||||
addLocationIdPreSendAction,
|
||||
addNotePostReceiveAction,
|
||||
splitTagsPreSendAction,
|
||||
validEmailAndPhonePreSendAction,
|
||||
} from '../GenericFunctions';
|
||||
@@ -31,6 +33,7 @@ export const contactOperations: INodeProperties[] = [
|
||||
validEmailAndPhonePreSendAction,
|
||||
splitTagsPreSendAction,
|
||||
addLocationIdPreSendAction,
|
||||
addCustomFieldsPreSendAction,
|
||||
],
|
||||
},
|
||||
output: {
|
||||
@@ -41,6 +44,7 @@ export const contactOperations: INodeProperties[] = [
|
||||
property: 'contact',
|
||||
},
|
||||
},
|
||||
addNotePostReceiveAction,
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -165,44 +169,27 @@ const customFields: INodeProperties = {
|
||||
{
|
||||
displayName: 'Field Name or ID',
|
||||
name: 'fieldId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
type: 'resourceLocator',
|
||||
default: '',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptions: {
|
||||
routing: {
|
||||
request: {
|
||||
url: '/custom-fields',
|
||||
method: 'GET',
|
||||
},
|
||||
output: {
|
||||
postReceive: [
|
||||
{
|
||||
type: 'rootProperty',
|
||||
properties: {
|
||||
property: 'customFields',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'setKeyValue',
|
||||
properties: {
|
||||
name: '={{$responseItem.name}}',
|
||||
value: '={{$responseItem.id}}',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'sort',
|
||||
properties: {
|
||||
key: 'name',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
description: 'Choose from the list, or specify an ID using an expression',
|
||||
modes: [
|
||||
{
|
||||
displayName: 'List',
|
||||
name: 'list',
|
||||
type: 'list',
|
||||
typeOptions: {
|
||||
searchListMethod: 'searchCustomFields',
|
||||
searchable: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
placeholder: 'Enter Custom Field ID',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName: 'Field Value',
|
||||
@@ -211,15 +198,22 @@ const customFields: INodeProperties = {
|
||||
default: '',
|
||||
routing: {
|
||||
send: {
|
||||
value: '={{$value}}',
|
||||
property: '=customField.{{$parent.fieldId}}',
|
||||
type: 'body',
|
||||
property: 'customFields',
|
||||
value:
|
||||
'={{ $parent.values.map(field => ({ fieldId: { id: field.fieldId.id }, field_value: field.fieldValue })) }}',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
routing: {
|
||||
send: {
|
||||
type: 'body',
|
||||
property: 'customFields',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const createProperties: INodeProperties[] = [
|
||||
@@ -391,6 +385,12 @@ const createProperties: INodeProperties[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Note',
|
||||
name: 'notes',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Tags',
|
||||
name: 'tags',
|
||||
@@ -405,16 +405,29 @@ const createProperties: INodeProperties[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
|
||||
displayName: 'Timezone',
|
||||
name: 'timezone',
|
||||
type: 'options',
|
||||
placeholder: 'Select Timezone',
|
||||
type: 'resourceLocator',
|
||||
default: '',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTimezones',
|
||||
},
|
||||
description: 'Choose from the list, or specify a timezone using an expression',
|
||||
modes: [
|
||||
{
|
||||
displayName: 'List',
|
||||
name: 'list',
|
||||
type: 'list',
|
||||
typeOptions: {
|
||||
searchListMethod: 'searchTimezones',
|
||||
searchable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
placeholder: 'Enter Timezone ID',
|
||||
},
|
||||
],
|
||||
routing: {
|
||||
send: {
|
||||
type: 'body',
|
||||
@@ -608,16 +621,29 @@ const updateProperties: INodeProperties[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
|
||||
displayName: 'Timezone',
|
||||
name: 'timezone',
|
||||
type: 'options',
|
||||
placeholder: 'Select Timezone',
|
||||
type: 'resourceLocator',
|
||||
default: '',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getTimezones',
|
||||
},
|
||||
description: 'Choose from the list, or specify a timezone using an expression',
|
||||
modes: [
|
||||
{
|
||||
displayName: 'List',
|
||||
name: 'list',
|
||||
type: 'list',
|
||||
typeOptions: {
|
||||
searchListMethod: 'searchTimezones',
|
||||
searchable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'ID',
|
||||
name: 'id',
|
||||
type: 'string',
|
||||
placeholder: 'Enter Timezone ID',
|
||||
},
|
||||
],
|
||||
routing: {
|
||||
send: {
|
||||
type: 'body',
|
||||
@@ -700,9 +726,8 @@ const getAllProperties: INodeProperties[] = [
|
||||
},
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 100,
|
||||
},
|
||||
default: 20,
|
||||
default: 50,
|
||||
routing: {
|
||||
send: {
|
||||
type: 'query',
|
||||
|
||||
Reference in New Issue
Block a user