@virtuoussoftware/n8n-nodes-virtuous-crm 0.1.0

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.
Files changed (29) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +45 -0
  3. package/dist/credentials/VirtuousCrmApi.credentials.d.ts +10 -0
  4. package/dist/credentials/VirtuousCrmApi.credentials.js +39 -0
  5. package/dist/credentials/VirtuousCrmApi.credentials.js.map +1 -0
  6. package/dist/icons/virtuous-logo-mark.svg +1 -0
  7. package/dist/nodes/VirtuousCrm/VirtuousCrm.node.d.ts +5 -0
  8. package/dist/nodes/VirtuousCrm/VirtuousCrm.node.js +86 -0
  9. package/dist/nodes/VirtuousCrm/VirtuousCrm.node.js.map +1 -0
  10. package/dist/nodes/VirtuousCrm/VirtuousCrm.node.json +18 -0
  11. package/dist/nodes/VirtuousCrm/resources/contactTransaction/create.d.ts +12 -0
  12. package/dist/nodes/VirtuousCrm/resources/contactTransaction/create.js +742 -0
  13. package/dist/nodes/VirtuousCrm/resources/contactTransaction/create.js.map +1 -0
  14. package/dist/nodes/VirtuousCrm/resources/contactTransaction/index.d.ts +2 -0
  15. package/dist/nodes/VirtuousCrm/resources/contactTransaction/index.js +28 -0
  16. package/dist/nodes/VirtuousCrm/resources/contactTransaction/index.js.map +1 -0
  17. package/dist/nodes/VirtuousCrm/resources/giftTransaction/create.d.ts +12 -0
  18. package/dist/nodes/VirtuousCrm/resources/giftTransaction/create.js +1999 -0
  19. package/dist/nodes/VirtuousCrm/resources/giftTransaction/create.js.map +1 -0
  20. package/dist/nodes/VirtuousCrm/resources/giftTransaction/index.d.ts +2 -0
  21. package/dist/nodes/VirtuousCrm/resources/giftTransaction/index.js +28 -0
  22. package/dist/nodes/VirtuousCrm/resources/giftTransaction/index.js.map +1 -0
  23. package/dist/nodes/VirtuousCrm/shared/crmTransport.d.ts +2 -0
  24. package/dist/nodes/VirtuousCrm/shared/crmTransport.js +14 -0
  25. package/dist/nodes/VirtuousCrm/shared/crmTransport.js.map +1 -0
  26. package/dist/package.json +58 -0
  27. package/dist/tsconfig.tsbuildinfo +1 -0
  28. package/index.js +0 -0
  29. package/package.json +58 -0
@@ -0,0 +1,742 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contactTransactionCreateDescription = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const crmTransport_1 = require("../../shared/crmTransport");
6
+ exports.contactTransactionCreateDescription = {
7
+ description: {
8
+ properties: [
9
+ {
10
+ displayName: 'Input Method',
11
+ name: 'inputMethod',
12
+ type: 'options',
13
+ displayOptions: {
14
+ show: {
15
+ resource: ['contact'],
16
+ operation: ['singleContactTransaction'],
17
+ },
18
+ },
19
+ options: [
20
+ {
21
+ name: 'Using Fields Below',
22
+ value: 'fields',
23
+ },
24
+ {
25
+ name: 'Using JSON',
26
+ value: 'json',
27
+ },
28
+ ],
29
+ default: 'fields',
30
+ },
31
+ {
32
+ displayName: 'Reference Source',
33
+ name: 'referenceSource',
34
+ type: 'string',
35
+ default: '',
36
+ displayOptions: {
37
+ show: {
38
+ resource: ['contact'],
39
+ operation: ['singleContactTransaction'],
40
+ inputMethod: ['fields'],
41
+ },
42
+ },
43
+ description: 'The reference source of the contact',
44
+ },
45
+ {
46
+ displayName: 'Reference ID',
47
+ name: 'referenceId',
48
+ type: 'string',
49
+ default: '',
50
+ displayOptions: {
51
+ show: {
52
+ resource: ['contact'],
53
+ operation: ['singleContactTransaction'],
54
+ inputMethod: ['fields'],
55
+ },
56
+ },
57
+ description: 'The reference ID of the contact',
58
+ },
59
+ {
60
+ displayName: 'Contact Type',
61
+ name: 'contactType',
62
+ type: 'string',
63
+ default: '',
64
+ displayOptions: {
65
+ show: {
66
+ resource: ['contact'],
67
+ operation: ['singleContactTransaction'],
68
+ inputMethod: ['fields'],
69
+ },
70
+ },
71
+ description: 'The type of contact. Examples: Household, Organization, Foundation. Configurable via CRM.',
72
+ },
73
+ {
74
+ displayName: 'Full Name',
75
+ name: 'name',
76
+ type: 'string',
77
+ default: '',
78
+ displayOptions: {
79
+ show: {
80
+ resource: ['contact'],
81
+ operation: ['singleContactTransaction'],
82
+ inputMethod: ['fields'],
83
+ },
84
+ },
85
+ description: 'The name of the contact',
86
+ },
87
+ {
88
+ displayName: 'Title',
89
+ name: 'title',
90
+ type: 'string',
91
+ default: '',
92
+ displayOptions: {
93
+ show: {
94
+ resource: ['contact'],
95
+ operation: ['singleContactTransaction'],
96
+ inputMethod: ['fields'],
97
+ },
98
+ },
99
+ description: 'The title of the contact',
100
+ },
101
+ {
102
+ displayName: 'First Name',
103
+ name: 'firstName',
104
+ type: 'string',
105
+ required: true,
106
+ default: '',
107
+ displayOptions: {
108
+ show: {
109
+ resource: ['contact'],
110
+ operation: ['singleContactTransaction'],
111
+ inputMethod: ['fields'],
112
+ },
113
+ },
114
+ description: 'The first name of the contact',
115
+ },
116
+ {
117
+ displayName: 'Middle Name',
118
+ name: 'middleName',
119
+ type: 'string',
120
+ default: '',
121
+ displayOptions: {
122
+ show: {
123
+ resource: ['contact'],
124
+ operation: ['singleContactTransaction'],
125
+ inputMethod: ['fields'],
126
+ },
127
+ },
128
+ description: 'The middle name of the contact',
129
+ },
130
+ {
131
+ displayName: 'Last Name',
132
+ name: 'lastName',
133
+ type: 'string',
134
+ required: true,
135
+ default: '',
136
+ displayOptions: {
137
+ show: {
138
+ resource: ['contact'],
139
+ operation: ['singleContactTransaction'],
140
+ inputMethod: ['fields'],
141
+ },
142
+ },
143
+ description: 'The last name of the contact',
144
+ },
145
+ {
146
+ displayName: 'Suffix',
147
+ name: 'suffix',
148
+ type: 'string',
149
+ default: '',
150
+ displayOptions: {
151
+ show: {
152
+ resource: ['contact'],
153
+ operation: ['singleContactTransaction'],
154
+ inputMethod: ['fields'],
155
+ },
156
+ },
157
+ description: 'The suffix of the contact',
158
+ },
159
+ {
160
+ displayName: 'Birth Month',
161
+ name: 'birthMonth',
162
+ type: 'string',
163
+ default: '',
164
+ displayOptions: {
165
+ show: {
166
+ resource: ['contact'],
167
+ operation: ['singleContactTransaction'],
168
+ inputMethod: ['fields'],
169
+ },
170
+ },
171
+ description: 'The birth month of the contact',
172
+ },
173
+ {
174
+ displayName: 'Birth Day',
175
+ name: 'birthDay',
176
+ type: 'string',
177
+ default: '',
178
+ displayOptions: {
179
+ show: {
180
+ resource: ['contact'],
181
+ operation: ['singleContactTransaction'],
182
+ inputMethod: ['fields'],
183
+ },
184
+ },
185
+ description: 'The birth day of the contact',
186
+ },
187
+ {
188
+ displayName: 'Birth Year',
189
+ name: 'birthYear',
190
+ type: 'string',
191
+ default: '',
192
+ displayOptions: {
193
+ show: {
194
+ resource: ['contact'],
195
+ operation: ['singleContactTransaction'],
196
+ inputMethod: ['fields'],
197
+ },
198
+ },
199
+ description: 'The birth year of the contact',
200
+ },
201
+ {
202
+ displayName: 'Gender',
203
+ name: 'gender',
204
+ type: 'string',
205
+ default: '',
206
+ displayOptions: {
207
+ show: {
208
+ resource: ['contact'],
209
+ operation: ['singleContactTransaction'],
210
+ inputMethod: ['fields'],
211
+ },
212
+ },
213
+ description: 'The gender of the contact',
214
+ },
215
+ {
216
+ displayName: 'Email Type',
217
+ name: 'emailType',
218
+ type: 'string',
219
+ default: '',
220
+ displayOptions: {
221
+ show: {
222
+ resource: ['contact'],
223
+ operation: ['singleContactTransaction'],
224
+ inputMethod: ['fields'],
225
+ },
226
+ },
227
+ description: 'The email type of the contact. Examples: Primary Email, Secondary Email, Home Email, Work Email, Other Email.',
228
+ },
229
+ {
230
+ displayName: 'Email',
231
+ name: 'contactEmail',
232
+ type: 'string',
233
+ default: '',
234
+ displayOptions: {
235
+ show: {
236
+ resource: ['contact'],
237
+ operation: ['singleContactTransaction'],
238
+ inputMethod: ['fields'],
239
+ },
240
+ },
241
+ description: 'The email of the contact',
242
+ },
243
+ {
244
+ displayName: 'Phone Type',
245
+ name: 'phoneType',
246
+ type: 'string',
247
+ default: '',
248
+ displayOptions: {
249
+ show: {
250
+ resource: ['contact'],
251
+ operation: ['singleContactTransaction'],
252
+ inputMethod: ['fields'],
253
+ },
254
+ },
255
+ description: 'The phone type of the contact. Examples: Home Phone, Mobile Phone, Work Phone, Other Phone.',
256
+ },
257
+ {
258
+ displayName: 'Phone Number',
259
+ name: 'phone',
260
+ type: 'string',
261
+ default: '',
262
+ displayOptions: {
263
+ show: {
264
+ resource: ['contact'],
265
+ operation: ['singleContactTransaction'],
266
+ inputMethod: ['fields'],
267
+ },
268
+ },
269
+ description: 'The phone number of the contact',
270
+ },
271
+ {
272
+ displayName: 'Address Line 1',
273
+ name: 'address1',
274
+ type: 'string',
275
+ default: '',
276
+ displayOptions: {
277
+ show: {
278
+ resource: ['contact'],
279
+ operation: ['singleContactTransaction'],
280
+ inputMethod: ['fields'],
281
+ },
282
+ },
283
+ description: 'The address line 1 of the contact',
284
+ },
285
+ {
286
+ displayName: 'Address Line 2',
287
+ name: 'address2',
288
+ type: 'string',
289
+ default: '',
290
+ displayOptions: {
291
+ show: {
292
+ resource: ['contact'],
293
+ operation: ['singleContactTransaction'],
294
+ inputMethod: ['fields'],
295
+ },
296
+ },
297
+ description: 'The address line 2 of the contact',
298
+ },
299
+ {
300
+ displayName: 'City',
301
+ name: 'city',
302
+ type: 'string',
303
+ default: '',
304
+ displayOptions: {
305
+ show: {
306
+ resource: ['contact'],
307
+ operation: ['singleContactTransaction'],
308
+ inputMethod: ['fields'],
309
+ },
310
+ },
311
+ description: 'The city of the contact',
312
+ },
313
+ {
314
+ displayName: 'State',
315
+ name: 'state',
316
+ type: 'string',
317
+ default: '',
318
+ displayOptions: {
319
+ show: {
320
+ resource: ['contact'],
321
+ operation: ['singleContactTransaction'],
322
+ inputMethod: ['fields'],
323
+ },
324
+ },
325
+ description: 'The state of the contact',
326
+ },
327
+ {
328
+ displayName: 'Postal Code',
329
+ name: 'postal',
330
+ type: 'string',
331
+ default: '',
332
+ displayOptions: {
333
+ show: {
334
+ resource: ['contact'],
335
+ operation: ['singleContactTransaction'],
336
+ inputMethod: ['fields'],
337
+ },
338
+ },
339
+ description: 'The postal code of the contact',
340
+ },
341
+ {
342
+ displayName: 'Country',
343
+ name: 'country',
344
+ type: 'string',
345
+ default: '',
346
+ displayOptions: {
347
+ show: {
348
+ resource: ['contact'],
349
+ operation: ['singleContactTransaction'],
350
+ inputMethod: ['fields'],
351
+ },
352
+ },
353
+ description: 'The country of the contact',
354
+ },
355
+ {
356
+ displayName: 'Event ID',
357
+ name: 'eventId',
358
+ type: 'number',
359
+ default: 0,
360
+ displayOptions: {
361
+ show: {
362
+ resource: ['contact'],
363
+ operation: ['singleContactTransaction'],
364
+ inputMethod: ['fields'],
365
+ },
366
+ },
367
+ description: 'The event ID for the contact',
368
+ },
369
+ {
370
+ displayName: 'Event Name',
371
+ name: 'eventName',
372
+ type: 'string',
373
+ default: '',
374
+ displayOptions: {
375
+ show: {
376
+ resource: ['contact'],
377
+ operation: ['singleContactTransaction'],
378
+ inputMethod: ['fields'],
379
+ },
380
+ },
381
+ description: 'The event name for the contact',
382
+ },
383
+ {
384
+ displayName: 'Invited',
385
+ name: 'invited',
386
+ type: 'boolean',
387
+ default: false,
388
+ displayOptions: {
389
+ show: {
390
+ resource: ['contact'],
391
+ operation: ['singleContactTransaction'],
392
+ inputMethod: ['fields'],
393
+ },
394
+ },
395
+ description: 'Whether the contacted was invited to the event',
396
+ },
397
+ {
398
+ displayName: 'RSVP Response',
399
+ name: 'rsvpResponse',
400
+ type: 'boolean',
401
+ default: false,
402
+ displayOptions: {
403
+ show: {
404
+ resource: ['contact'],
405
+ operation: ['singleContactTransaction'],
406
+ inputMethod: ['fields'],
407
+ },
408
+ },
409
+ description: 'Whether contact rsvped to the event',
410
+ },
411
+ {
412
+ displayName: 'Attended',
413
+ name: 'attended',
414
+ type: 'boolean',
415
+ default: false,
416
+ displayOptions: {
417
+ show: {
418
+ resource: ['contact'],
419
+ operation: ['singleContactTransaction'],
420
+ inputMethod: ['fields'],
421
+ },
422
+ },
423
+ description: 'Whether the contact attended',
424
+ },
425
+ {
426
+ displayName: 'Tags',
427
+ name: 'tags',
428
+ type: 'string',
429
+ default: '',
430
+ displayOptions: {
431
+ show: {
432
+ resource: ['contact'],
433
+ operation: ['singleContactTransaction'],
434
+ inputMethod: ['fields'],
435
+ },
436
+ },
437
+ description: 'The tags of the contact',
438
+ hint: 'Multiple tags can be separated by semicolons. Example: tag1;tag2;tag3',
439
+ },
440
+ {
441
+ displayName: 'Origin Segment Code',
442
+ name: 'originSegmentCode',
443
+ type: 'string',
444
+ default: '',
445
+ displayOptions: {
446
+ show: {
447
+ resource: ['contact'],
448
+ operation: ['singleContactTransaction'],
449
+ inputMethod: ['fields'],
450
+ },
451
+ },
452
+ description: 'The origin segment code of the contact',
453
+ },
454
+ {
455
+ displayName: 'Email Lists',
456
+ name: 'emailLists',
457
+ type: 'json',
458
+ default: '[]',
459
+ displayOptions: {
460
+ show: {
461
+ resource: ['contact'],
462
+ operation: ['singleContactTransaction'],
463
+ inputMethod: ['fields'],
464
+ },
465
+ },
466
+ description: 'Example: ["list1", "list2", "list3"]',
467
+ hint: 'Provide a JSON array of email list names.',
468
+ },
469
+ {
470
+ displayName: 'Custom Fields',
471
+ name: 'customFields',
472
+ type: 'json',
473
+ default: '{}',
474
+ displayOptions: {
475
+ show: {
476
+ resource: ['contact'],
477
+ operation: ['singleContactTransaction'],
478
+ inputMethod: ['fields'],
479
+ },
480
+ },
481
+ description: 'Example: {"fieldName": "fieldValue", "fieldName2": "fieldValue2"}',
482
+ hint: 'Provide a JSON object of key-value pairs for custom fields.',
483
+ },
484
+ {
485
+ displayName: 'Custom Objects',
486
+ name: 'customObjects',
487
+ type: 'json',
488
+ default: '[]',
489
+ displayOptions: {
490
+ show: {
491
+ resource: ['contact'],
492
+ operation: ['singleContactTransaction'],
493
+ inputMethod: ['fields'],
494
+ },
495
+ },
496
+ description: 'Example: [{"name": "<string>", "fields": [{"name": "<string>", "value": "<string>"}]}, {"name": "<string>", "fields": [{"name": "<string>", "value": "<string>"}]}]',
497
+ hint: 'Provide a JSON array of custom objects with their fields.',
498
+ },
499
+ {
500
+ displayName: 'Volunteer Attendances',
501
+ name: 'volunteerAttendances',
502
+ type: 'json',
503
+ displayOptions: {
504
+ show: {
505
+ resource: ['contact'],
506
+ operation: ['singleContactTransaction'],
507
+ inputMethod: ['fields'],
508
+ },
509
+ },
510
+ description: 'Example: [{"volunteerOpportunityId": <integer>, "volunteerOpportunityName": "<string>", "date": "<string>", "hours": "<string>"}, {"volunteerOpportunityId": <integer>, "volunteerOpportunityName": "<string>", "date": "<string>", "hours": "<string>"}]',
511
+ hint: 'Provide a JSON array of volunteer attendance objects.',
512
+ default: '[]',
513
+ },
514
+ {
515
+ displayName: 'JSON Data',
516
+ name: 'jsonData',
517
+ type: 'json',
518
+ default: `{
519
+ "referenceSource": "<string>",
520
+ "referenceId": "<string>",
521
+ "contactType": "<string>",
522
+ "name": "<string>",
523
+ "title": "<string>",
524
+ "firstName": "<string>",
525
+ "middleName": "<string>",
526
+ "lastName": "<string>",
527
+ "suffix": "<string>",
528
+ "birthMonth": "<string>",
529
+ "birthDay": "<string>",
530
+ "birthYear": "<string>",
531
+ "gender": "<string>",
532
+ "emailType": "<string>",
533
+ "email": "<string>",
534
+ "phoneType": "<string>",
535
+ "phone": "<string>",
536
+ "address1": "<string>",
537
+ "address2": "<string>",
538
+ "city": "<string>",
539
+ "state": "<string>",
540
+ "postal": "<string>",
541
+ "country": "<string>",
542
+ "eventId": "<integer>",
543
+ "eventName": "<string>",
544
+ "invited": "<boolean>",
545
+ "rsvp": "<boolean>",
546
+ "rsvpResponse": "<boolean>",
547
+ "attended": "<boolean>",
548
+ "tags": "<string>",
549
+ "originSegmentCode": "<string>",
550
+ "emailLists": [
551
+ "<string>",
552
+ "<string>"
553
+ ],
554
+ "customFields": {
555
+ "fieldName": "fieldValue",
556
+ "fieldName2": "fieldValue2"
557
+ },
558
+ "customObjects": [
559
+ {
560
+ "name": "<string>",
561
+ "fields": [
562
+ {
563
+ "name": "<string>",
564
+ "value": "<string>"
565
+ },
566
+ {
567
+ "name": "<string>",
568
+ "value": "<string>"
569
+ }
570
+ ]
571
+ },
572
+ {
573
+ "name": "<string>",
574
+ "fields": [
575
+ {
576
+ "name": "<string>",
577
+ "value": "<string>"
578
+ },
579
+ {
580
+ "name": "<string>",
581
+ "value": "<string>"
582
+ }
583
+ ]
584
+ }
585
+ ],
586
+ "volunteerAttendances": [
587
+ {
588
+ "volunteerOpportunityId": "<integer>",
589
+ "volunteerOpportunityName": "<string>",
590
+ "date": "<string>",
591
+ "hours": "<string>"
592
+ },
593
+ {
594
+ "volunteerOpportunityId": "<integer>",
595
+ "volunteerOpportunityName": "<string>",
596
+ "date": "<string>",
597
+ "hours": "<string>"
598
+ }
599
+ ]
600
+ }`,
601
+ displayOptions: {
602
+ show: {
603
+ resource: ['contact'],
604
+ operation: ['singleContactTransaction'],
605
+ inputMethod: ['json'],
606
+ },
607
+ },
608
+ description: 'Complete JSON payload',
609
+ },
610
+ ],
611
+ },
612
+ cleanFieldsForApi(rawFields) {
613
+ const cleanedData = {};
614
+ const defaultValues = {
615
+ emailLists: '[]',
616
+ customObjects: '[]',
617
+ volunteerAttendances: '[]',
618
+ customFields: '{}',
619
+ invited: false,
620
+ rsvpResponse: false,
621
+ attended: false,
622
+ eventId: 0,
623
+ };
624
+ const shouldExclude = (key, value) => {
625
+ if (value === '' || value === null || value === undefined) {
626
+ return true;
627
+ }
628
+ if (defaultValues.hasOwnProperty(key) && value === defaultValues[key]) {
629
+ return true;
630
+ }
631
+ if (Array.isArray(value) && value.length === 0) {
632
+ return true;
633
+ }
634
+ if (typeof value === 'string') {
635
+ try {
636
+ const parsed = JSON.parse(value);
637
+ if ((Array.isArray(parsed) && parsed.length === 0) ||
638
+ (typeof parsed === 'object' && parsed !== null && Object.keys(parsed).length === 0)) {
639
+ return true;
640
+ }
641
+ }
642
+ catch (e) {
643
+ }
644
+ }
645
+ return false;
646
+ };
647
+ Object.entries(rawFields).forEach(([key, value]) => {
648
+ if (!shouldExclude(key, value)) {
649
+ if (key === 'emailLists' || key === 'customObjects' || key === 'volunteerAttendances') {
650
+ try {
651
+ const parsed = typeof value === 'string' ? JSON.parse(value) : value;
652
+ if (Array.isArray(parsed) && parsed.length > 0) {
653
+ cleanedData[key] = parsed;
654
+ }
655
+ }
656
+ catch (e) {
657
+ if (value && value !== '[]' && value !== '') {
658
+ cleanedData[key] = value;
659
+ }
660
+ }
661
+ }
662
+ else if (key === 'customFields') {
663
+ try {
664
+ const parsed = typeof value === 'string' ? JSON.parse(value) : value;
665
+ if (parsed && typeof parsed === 'object' && Object.keys(parsed).length > 0) {
666
+ cleanedData[key] = parsed;
667
+ }
668
+ }
669
+ catch (e) {
670
+ if (value && value !== '{}' && value !== '[]' && value !== '') {
671
+ cleanedData[key] = value;
672
+ }
673
+ }
674
+ }
675
+ else {
676
+ cleanedData[key] = value;
677
+ }
678
+ }
679
+ });
680
+ return cleanedData;
681
+ },
682
+ async execute(itemIndex) {
683
+ const inputMethod = this.getNodeParameter('inputMethod', itemIndex);
684
+ let bodyData;
685
+ if (inputMethod === 'json') {
686
+ const jsonData = this.getNodeParameter('jsonData', itemIndex);
687
+ try {
688
+ bodyData = typeof jsonData === 'string' ? JSON.parse(jsonData) : jsonData;
689
+ }
690
+ catch (error) {
691
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
692
+ }
693
+ }
694
+ else {
695
+ const rawFields = {
696
+ referenceSource: this.getNodeParameter('referenceSource', itemIndex),
697
+ referenceId: this.getNodeParameter('referenceId', itemIndex),
698
+ contactType: this.getNodeParameter('contactType', itemIndex),
699
+ name: this.getNodeParameter('name', itemIndex),
700
+ title: this.getNodeParameter('title', itemIndex),
701
+ firstName: this.getNodeParameter('firstName', itemIndex),
702
+ middleName: this.getNodeParameter('middleName', itemIndex),
703
+ lastName: this.getNodeParameter('lastName', itemIndex),
704
+ suffix: this.getNodeParameter('suffix', itemIndex),
705
+ birthMonth: this.getNodeParameter('birthMonth', itemIndex),
706
+ birthDay: this.getNodeParameter('birthDay', itemIndex),
707
+ birthYear: this.getNodeParameter('birthYear', itemIndex),
708
+ gender: this.getNodeParameter('gender', itemIndex),
709
+ emailType: this.getNodeParameter('emailType', itemIndex),
710
+ email: this.getNodeParameter('contactEmail', itemIndex),
711
+ phoneType: this.getNodeParameter('phoneType', itemIndex),
712
+ phone: this.getNodeParameter('phone', itemIndex),
713
+ address1: this.getNodeParameter('address1', itemIndex),
714
+ address2: this.getNodeParameter('address2', itemIndex),
715
+ city: this.getNodeParameter('city', itemIndex),
716
+ state: this.getNodeParameter('state', itemIndex),
717
+ postal: this.getNodeParameter('postal', itemIndex),
718
+ country: this.getNodeParameter('country', itemIndex),
719
+ eventId: this.getNodeParameter('eventId', itemIndex),
720
+ eventName: this.getNodeParameter('eventName', itemIndex),
721
+ invited: this.getNodeParameter('invited', itemIndex),
722
+ rsvpResponse: this.getNodeParameter('rsvpResponse', itemIndex),
723
+ attended: this.getNodeParameter('attended', itemIndex),
724
+ tags: this.getNodeParameter('tags', itemIndex),
725
+ originSegmentCode: this.getNodeParameter('originSegmentCode', itemIndex),
726
+ emailLists: this.getNodeParameter('emailLists', itemIndex),
727
+ customFields: this.getNodeParameter('customFields', itemIndex),
728
+ customObjects: this.getNodeParameter('customObjects', itemIndex),
729
+ volunteerAttendances: this.getNodeParameter('volunteerAttendances', itemIndex),
730
+ };
731
+ bodyData = exports.contactTransactionCreateDescription.cleanFieldsForApi(rawFields);
732
+ }
733
+ try {
734
+ const response = crmTransport_1.virtuousCrmApiRequest.call(this, 'POST', '/api/Contact/Transaction', {}, bodyData);
735
+ return response;
736
+ }
737
+ catch (error) {
738
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
739
+ }
740
+ },
741
+ };
742
+ //# sourceMappingURL=create.js.map