n8n-nodes-highlevelv2
Version:
n8n community node for HighLevel v2 API integration - comprehensive CRM, marketing automation, and business management platform
306 lines • 9.22 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.notesFields = exports.notesOperations = void 0;
const GenericFunctions_1 = require("../GenericFunctions");
exports.notesOperations = [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['notes'],
},
},
options: [
{
name: 'Create',
value: 'create',
routing: {
request: {
method: 'POST',
url: '=/contacts/{{$parameter.contactId}}/notes',
},
send: {
preSend: [GenericFunctions_1.addLocationIdPreSendAction],
},
output: {
postReceive: [
{
type: 'rootProperty',
properties: {
property: 'note',
},
},
],
},
},
action: 'Create a new note',
},
{
name: 'Get',
value: 'get',
routing: {
request: {
method: 'GET',
url: '=/contacts/{{$parameter.contactId}}/notes/{{$parameter.noteId}}',
},
send: {
preSend: [GenericFunctions_1.addLocationIdPreSendAction],
},
output: {
postReceive: [
{
type: 'rootProperty',
properties: {
property: 'note',
},
},
],
},
},
action: 'Get a specific note',
},
{
name: 'Get Many',
value: 'getAll',
routing: {
request: {
method: 'GET',
url: '=/contacts/{{$parameter.contactId}}/notes',
},
send: {
preSend: [GenericFunctions_1.addLocationIdPreSendAction],
},
output: {
postReceive: [
{
type: 'rootProperty',
properties: {
property: 'notes',
},
},
],
},
},
action: 'Get many notes for a contact',
},
{
name: 'Update',
value: 'update',
routing: {
request: {
method: 'PUT',
url: '=/contacts/{{$parameter.contactId}}/notes/{{$parameter.noteId}}',
},
send: {
preSend: [GenericFunctions_1.addLocationIdPreSendAction],
},
output: {
postReceive: [
{
type: 'rootProperty',
properties: {
property: 'note',
},
},
],
},
},
action: 'Update an existing note',
},
{
name: 'Delete',
value: 'delete',
routing: {
request: {
method: 'DELETE',
url: '=/contacts/{{$parameter.contactId}}/notes/{{$parameter.noteId}}',
},
output: {
postReceive: [
{
type: 'set',
properties: {
value: '={{ { "success": true } }}',
},
},
],
},
},
action: 'Delete a note',
},
],
default: 'getAll',
},
];
exports.notesFields = [
{
displayName: 'Contact ID',
name: 'contactId',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['notes'],
},
},
default: '',
description: 'ID of the contact to manage notes for',
},
{
displayName: 'Note ID',
name: 'noteId',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['notes'],
operation: ['get', 'update', 'delete'],
},
},
default: '',
description: 'ID of the note to get, update, or delete',
},
{
displayName: 'Body',
name: 'body',
type: 'string',
typeOptions: {
rows: 4,
},
required: true,
displayOptions: {
show: {
resource: ['notes'],
operation: ['create'],
},
},
default: '',
description: 'Content of the note',
routing: {
send: {
type: 'body',
property: 'body',
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['notes'],
operation: ['create'],
},
},
options: [
{
displayName: 'User ID',
name: 'userId',
type: 'string',
default: '',
description: 'ID of the user creating the note',
routing: {
send: {
type: 'body',
property: 'userId',
},
},
},
],
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['notes'],
operation: ['update'],
},
},
options: [
{
displayName: 'Body',
name: 'body',
type: 'string',
typeOptions: {
rows: 4,
},
default: '',
description: 'Updated content of the note',
routing: {
send: {
type: 'body',
property: 'body',
},
},
},
{
displayName: 'User ID',
name: 'userId',
type: 'string',
default: '',
description: 'ID of the user updating the note',
routing: {
send: {
type: 'body',
property: 'userId',
},
},
},
],
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
resource: ['notes'],
operation: ['getAll'],
},
},
options: [
{
displayName: 'Limit',
name: 'limit',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 50,
description: 'Max number of results to return',
routing: {
send: {
type: 'query',
property: 'limit',
},
},
},
{
displayName: 'Offset',
name: 'offset',
type: 'number',
default: 0,
description: 'Number of notes to skip',
routing: {
send: {
type: 'query',
property: 'offset',
},
},
},
],
},
];
//# sourceMappingURL=NotesDescription.js.map