@ixiam/n8n-nodes-civicrm 1.1.30 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/nodes/CiviCrm/CiviCrm.node.js +32 -0
- package/dist/src/nodes/CiviCrm/descriptions/generic.js +4 -4
- package/dist/src/nodes/CiviCrm/descriptions/resources.js +2 -0
- package/package.json +1 -1
- package/src/nodes/CiviCrm/CiviCrm.node.ts +33 -0
- package/src/nodes/CiviCrm/descriptions/generic.ts +4 -4
- package/src/nodes/CiviCrm/descriptions/resources.ts +2 -0
|
@@ -61,6 +61,32 @@ class CiviCrm {
|
|
|
61
61
|
defaults: { name: 'CiviCRM' },
|
|
62
62
|
inputs: ['main'],
|
|
63
63
|
outputs: ['main'],
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
usableAsTool: true,
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
actions: [
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Get Contact',
|
|
70
|
+
name: 'getContact',
|
|
71
|
+
action: 'Get a contact',
|
|
72
|
+
description: 'Retrieve a contact from CiviCRM by ID or email.',
|
|
73
|
+
displayOptions: {
|
|
74
|
+
show: {
|
|
75
|
+
resource: ['contact'],
|
|
76
|
+
operation: ['get'],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
properties: [
|
|
80
|
+
{
|
|
81
|
+
displayName: 'ID',
|
|
82
|
+
name: 'id',
|
|
83
|
+
type: 'number',
|
|
84
|
+
default: 0,
|
|
85
|
+
description: 'The internal CiviCRM ID of the contact to retrieve.',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
64
90
|
credentials: [{ name: 'civiCrmApi', required: true }],
|
|
65
91
|
properties: [
|
|
66
92
|
//
|
|
@@ -76,6 +102,7 @@ class CiviCrm {
|
|
|
76
102
|
name: 'contactType',
|
|
77
103
|
type: 'options',
|
|
78
104
|
default: 'Individual',
|
|
105
|
+
description: 'Type of contact to create or search for.',
|
|
79
106
|
options: [
|
|
80
107
|
{ name: 'Individual', value: 'Individual' },
|
|
81
108
|
{ name: 'Organization', value: 'Organization' },
|
|
@@ -91,6 +118,7 @@ class CiviCrm {
|
|
|
91
118
|
name: 'emailLocation',
|
|
92
119
|
type: 'options',
|
|
93
120
|
default: 'Work',
|
|
121
|
+
description: 'Location type for the email address.',
|
|
94
122
|
options: [
|
|
95
123
|
{ name: 'Home', value: 'Home' },
|
|
96
124
|
{ name: 'Work', value: 'Work' },
|
|
@@ -103,6 +131,7 @@ class CiviCrm {
|
|
|
103
131
|
name: 'phoneLocation',
|
|
104
132
|
type: 'options',
|
|
105
133
|
default: 'Work',
|
|
134
|
+
description: 'Location type for the phone number.',
|
|
106
135
|
options: [
|
|
107
136
|
{ name: 'Home', value: 'Home' },
|
|
108
137
|
{ name: 'Work', value: 'Work' },
|
|
@@ -116,6 +145,7 @@ class CiviCrm {
|
|
|
116
145
|
name: 'addressLocation',
|
|
117
146
|
type: 'options',
|
|
118
147
|
default: 'Home',
|
|
148
|
+
description: 'Location type for the address.',
|
|
119
149
|
options: [
|
|
120
150
|
{ name: 'Home', value: 'Home' },
|
|
121
151
|
{ name: 'Work', value: 'Work' },
|
|
@@ -132,6 +162,7 @@ class CiviCrm {
|
|
|
132
162
|
name: 'isPrimary',
|
|
133
163
|
type: 'boolean',
|
|
134
164
|
default: true,
|
|
165
|
+
description: 'Whether this should be the primary email/phone/address for the contact.',
|
|
135
166
|
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
136
167
|
},
|
|
137
168
|
//
|
|
@@ -143,6 +174,7 @@ class CiviCrm {
|
|
|
143
174
|
type: 'number',
|
|
144
175
|
default: 0,
|
|
145
176
|
required: true,
|
|
177
|
+
description: 'The internal CiviCRM ID of the entity.',
|
|
146
178
|
displayOptions: {
|
|
147
179
|
show: {
|
|
148
180
|
operation: ['get', 'update', 'delete'],
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.upsertFields = exports.genericFields = void 0;
|
|
4
4
|
exports.genericFields = [
|
|
5
|
-
{ displayName: 'Return All', name: 'returnAll', type: 'boolean', default: false, displayOptions: { show: { operation: ['getMany'] } } },
|
|
6
|
-
{ displayName: 'Limit', name: 'limit', type: 'number', typeOptions: { minValue: 1, maxValue: 1000 }, default: 100, displayOptions: { show: { operation: ['getMany'], returnAll: [false] } } },
|
|
7
|
-
{ displayName: 'Where (JSON)', name: 'whereJson', type: 'string', default: '', placeholder: `[["first_name","=","Alice"]]`, displayOptions: { show: { operation: ['getMany'] } } },
|
|
5
|
+
{ displayName: 'Return All', name: 'returnAll', type: 'boolean', default: false, description: 'Whether to return all results or only up to a given limit.', displayOptions: { show: { operation: ['getMany'] } } },
|
|
6
|
+
{ displayName: 'Limit', name: 'limit', type: 'number', typeOptions: { minValue: 1, maxValue: 1000 }, default: 100, description: 'Max number of results to return.', displayOptions: { show: { operation: ['getMany'], returnAll: [false] } } },
|
|
7
|
+
{ displayName: 'Where (JSON)', name: 'whereJson', type: 'string', default: '', placeholder: `[["first_name","=","Alice"]]`, description: 'JSON array of arrays for filtering. Example: [["first_name","=","Alice"], ["contact_type","=","Individual"]]', displayOptions: { show: { operation: ['getMany'] } } },
|
|
8
8
|
];
|
|
9
9
|
exports.upsertFields = [
|
|
10
|
-
{ displayName: 'Fields', name: 'fields', type: 'fixedCollection', typeOptions: { multipleValues: true }, default: {}, options: [{ name: 'field', displayName: 'Field', values: [{ displayName: 'Name', name: 'fieldName', type: 'string', default: '' }, { displayName: 'Value', name: 'fieldValue', type: 'string', default: '' }] }], displayOptions: { show: { operation: ['create', 'update'] } } }
|
|
10
|
+
{ displayName: 'Fields', name: 'fields', type: 'fixedCollection', typeOptions: { multipleValues: true }, default: {}, description: 'Fields to set for the entity.', options: [{ name: 'field', displayName: 'Field', values: [{ displayName: 'Name', name: 'fieldName', type: 'string', default: '', description: 'Name of the field (e.g. first_name).' }, { displayName: 'Value', name: 'fieldValue', type: 'string', default: '', description: 'Value to set.' }] }], displayOptions: { show: { operation: ['create', 'update'] } } }
|
|
11
11
|
];
|
|
@@ -11,6 +11,7 @@ exports.resourceProp = {
|
|
|
11
11
|
name: 'resource',
|
|
12
12
|
type: 'options',
|
|
13
13
|
default: 'contact',
|
|
14
|
+
description: 'The entity to operate on. Choose "Custom API Call" to access any CiviCRM APIv4 entity not listed.',
|
|
14
15
|
options: [
|
|
15
16
|
{ name: 'Contact', value: 'contact' },
|
|
16
17
|
{ name: 'Membership', value: 'membership' },
|
|
@@ -31,6 +32,7 @@ exports.operationProp = {
|
|
|
31
32
|
type: 'options',
|
|
32
33
|
default: 'getMany',
|
|
33
34
|
noDataExpression: true,
|
|
35
|
+
description: 'The action to perform on the selected resource.',
|
|
34
36
|
options: [
|
|
35
37
|
{ name: 'Create', value: 'create' },
|
|
36
38
|
{ name: 'Delete', value: 'delete' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixiam/n8n-nodes-civicrm",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.31",
|
|
4
4
|
"description": "Full-featured CiviCRM API v4 integration for n8n with support for Contacts, Memberships, Groups, Relationships, Activities and structured sub-entities like Email, Phone, and Address.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -90,6 +90,33 @@ export class CiviCrm implements INodeType {
|
|
|
90
90
|
defaults: { name: 'CiviCRM' },
|
|
91
91
|
inputs: ['main'],
|
|
92
92
|
outputs: ['main'],
|
|
93
|
+
|
|
94
|
+
// @ts-ignore
|
|
95
|
+
usableAsTool: true,
|
|
96
|
+
// @ts-ignore
|
|
97
|
+
actions: [
|
|
98
|
+
{
|
|
99
|
+
displayName: 'Get Contact',
|
|
100
|
+
name: 'getContact',
|
|
101
|
+
action: 'Get a contact',
|
|
102
|
+
description: 'Retrieve a contact from CiviCRM by ID or email.',
|
|
103
|
+
displayOptions: {
|
|
104
|
+
show: {
|
|
105
|
+
resource: ['contact'],
|
|
106
|
+
operation: ['get'],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
properties: [
|
|
110
|
+
{
|
|
111
|
+
displayName: 'ID',
|
|
112
|
+
name: 'id',
|
|
113
|
+
type: 'number',
|
|
114
|
+
default: 0,
|
|
115
|
+
description: 'The internal CiviCRM ID of the contact to retrieve.',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
],
|
|
93
120
|
credentials: [{ name: 'civiCrmApi', required: true }],
|
|
94
121
|
|
|
95
122
|
properties: [
|
|
@@ -107,6 +134,7 @@ export class CiviCrm implements INodeType {
|
|
|
107
134
|
name: 'contactType',
|
|
108
135
|
type: 'options',
|
|
109
136
|
default: 'Individual',
|
|
137
|
+
description: 'Type of contact to create or search for.',
|
|
110
138
|
options: [
|
|
111
139
|
{ name: 'Individual', value: 'Individual' },
|
|
112
140
|
{ name: 'Organization', value: 'Organization' },
|
|
@@ -123,6 +151,7 @@ export class CiviCrm implements INodeType {
|
|
|
123
151
|
name: 'emailLocation',
|
|
124
152
|
type: 'options',
|
|
125
153
|
default: 'Work',
|
|
154
|
+
description: 'Location type for the email address.',
|
|
126
155
|
options: [
|
|
127
156
|
{ name: 'Home', value: 'Home' },
|
|
128
157
|
{ name: 'Work', value: 'Work' },
|
|
@@ -135,6 +164,7 @@ export class CiviCrm implements INodeType {
|
|
|
135
164
|
name: 'phoneLocation',
|
|
136
165
|
type: 'options',
|
|
137
166
|
default: 'Work',
|
|
167
|
+
description: 'Location type for the phone number.',
|
|
138
168
|
options: [
|
|
139
169
|
{ name: 'Home', value: 'Home' },
|
|
140
170
|
{ name: 'Work', value: 'Work' },
|
|
@@ -148,6 +178,7 @@ export class CiviCrm implements INodeType {
|
|
|
148
178
|
name: 'addressLocation',
|
|
149
179
|
type: 'options',
|
|
150
180
|
default: 'Home',
|
|
181
|
+
description: 'Location type for the address.',
|
|
151
182
|
options: [
|
|
152
183
|
{ name: 'Home', value: 'Home' },
|
|
153
184
|
{ name: 'Work', value: 'Work' },
|
|
@@ -165,6 +196,7 @@ export class CiviCrm implements INodeType {
|
|
|
165
196
|
name: 'isPrimary',
|
|
166
197
|
type: 'boolean',
|
|
167
198
|
default: true,
|
|
199
|
+
description: 'Whether this should be the primary email/phone/address for the contact.',
|
|
168
200
|
displayOptions: { show: { resource: ['contact'], operation: ['create', 'update'] } },
|
|
169
201
|
},
|
|
170
202
|
|
|
@@ -177,6 +209,7 @@ export class CiviCrm implements INodeType {
|
|
|
177
209
|
type: 'number',
|
|
178
210
|
default: 0,
|
|
179
211
|
required: true,
|
|
212
|
+
description: 'The internal CiviCRM ID of the entity.',
|
|
180
213
|
displayOptions: {
|
|
181
214
|
show: {
|
|
182
215
|
operation: ['get', 'update', 'delete'],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export const genericFields: INodeProperties[] = [
|
|
3
|
-
{ displayName: 'Return All', name: 'returnAll', type: 'boolean', default: false, displayOptions: { show: { operation: ['getMany'] } } },
|
|
4
|
-
{ displayName: 'Limit', name: 'limit', type: 'number', typeOptions: { minValue: 1, maxValue: 1000 }, default: 100, displayOptions: { show: { operation: ['getMany'], returnAll: [false] } } },
|
|
5
|
-
{ displayName: 'Where (JSON)', name: 'whereJson', type: 'string', default: '', placeholder: `[["first_name","=","Alice"]]`, displayOptions: { show: { operation: ['getMany'] } } },
|
|
3
|
+
{ displayName: 'Return All', name: 'returnAll', type: 'boolean', default: false, description: 'Whether to return all results or only up to a given limit.', displayOptions: { show: { operation: ['getMany'] } } },
|
|
4
|
+
{ displayName: 'Limit', name: 'limit', type: 'number', typeOptions: { minValue: 1, maxValue: 1000 }, default: 100, description: 'Max number of results to return.', displayOptions: { show: { operation: ['getMany'], returnAll: [false] } } },
|
|
5
|
+
{ displayName: 'Where (JSON)', name: 'whereJson', type: 'string', default: '', placeholder: `[["first_name","=","Alice"]]`, description: 'JSON array of arrays for filtering. Example: [["first_name","=","Alice"], ["contact_type","=","Individual"]]', displayOptions: { show: { operation: ['getMany'] } } },
|
|
6
6
|
];
|
|
7
7
|
export const upsertFields: INodeProperties[] = [
|
|
8
|
-
{ displayName: 'Fields', name: 'fields', type: 'fixedCollection', typeOptions: { multipleValues: true }, default: {}, options: [{ name:'field', displayName:'Field', values:[{displayName:'Name',name:'fieldName',type:'string',default:''},{displayName:'Value',name:'fieldValue',type:'string',default:''}]}], displayOptions: { show: { operation: ['create','update'] } } }
|
|
8
|
+
{ displayName: 'Fields', name: 'fields', type: 'fixedCollection', typeOptions: { multipleValues: true }, default: {}, description: 'Fields to set for the entity.', options: [{ name: 'field', displayName: 'Field', values: [{ displayName: 'Name', name: 'fieldName', type: 'string', default: '', description: 'Name of the field (e.g. first_name).' }, { displayName: 'Value', name: 'fieldValue', type: 'string', default: '', description: 'Value to set.' }] }], displayOptions: { show: { operation: ['create', 'update'] } } }
|
|
9
9
|
];
|
|
@@ -10,6 +10,7 @@ export const resourceProp: INodeProperties = {
|
|
|
10
10
|
name: 'resource',
|
|
11
11
|
type: 'options',
|
|
12
12
|
default: 'contact',
|
|
13
|
+
description: 'The entity to operate on. Choose "Custom API Call" to access any CiviCRM APIv4 entity not listed.',
|
|
13
14
|
options: [
|
|
14
15
|
{ name: 'Contact', value: 'contact' },
|
|
15
16
|
{ name: 'Membership', value: 'membership' },
|
|
@@ -31,6 +32,7 @@ export const operationProp: INodeProperties = {
|
|
|
31
32
|
type: 'options',
|
|
32
33
|
default: 'getMany',
|
|
33
34
|
noDataExpression: true,
|
|
35
|
+
description: 'The action to perform on the selected resource.',
|
|
34
36
|
options: [
|
|
35
37
|
{ name: 'Create', value: 'create' },
|
|
36
38
|
{ name: 'Delete', value: 'delete' },
|