n8n-nodes-didar-crm 0.0.7 → 0.0.9

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.
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.companyUpdate = companyUpdate;
4
+ const http_1 = require("../../lib/http");
5
+ async function companyUpdate(i, returnData) {
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
7
+ // Required
8
+ const id = this.getNodeParameter('Id', i, '');
9
+ if (!id)
10
+ throw new Error('Id is required.');
11
+ const name = this.getNodeParameter('FirstName', i, '');
12
+ if (!name)
13
+ throw new Error('Name is required.');
14
+ // Owner selection
15
+ const ownerMode = this.getNodeParameter('OwnerMode', i);
16
+ const ownerId = ownerMode === 'select'
17
+ ? this.getNodeParameter('OwnerIdSelect', i, '')
18
+ : this.getNodeParameter('OwnerIdManual', i, '');
19
+ if (!ownerId)
20
+ throw new Error('OwnerId is required (select from list or enter manually).');
21
+ // Main fields
22
+ const mobile = this.getNodeParameter('MobilePhone', i, '');
23
+ const workPhone = this.getNodeParameter('WorkPhone', i, '');
24
+ // Additional fields
25
+ const add = this.getNodeParameter('additionalFields', i, {}) || {};
26
+ const workPhoneExt = (_a = add.WorkPhoneExtension) !== null && _a !== void 0 ? _a : '';
27
+ const fax = (_b = add.Fax) !== null && _b !== void 0 ? _b : '';
28
+ const email = (_c = add.Email) !== null && _c !== void 0 ? _c : '';
29
+ const isVip = (_d = add.IsVIP) !== null && _d !== void 0 ? _d : false;
30
+ const backgroundInfo = (_e = add.BackgroundInfo) !== null && _e !== void 0 ? _e : '';
31
+ const customerCode = (_f = add.CustomerCode) !== null && _f !== void 0 ? _f : '';
32
+ const economicIssue = (_g = add.EconomicIssue) !== null && _g !== void 0 ? _g : '';
33
+ const registrationNumber = (_h = add.RegistrationNumber) !== null && _h !== void 0 ? _h : '';
34
+ const nationalId = (_j = add.NationalID) !== null && _j !== void 0 ? _j : '';
35
+ const zipCode = (_k = add.ZipCode) !== null && _k !== void 0 ? _k : '';
36
+ const visibilityType = (_l = add.VisibilityType) !== null && _l !== void 0 ? _l : 'Owner';
37
+ // Fields (JSON or object)
38
+ let fields;
39
+ if (typeof add.Fields === 'string' && add.Fields.trim()) {
40
+ try {
41
+ fields = JSON.parse(add.Fields);
42
+ }
43
+ catch {
44
+ throw new Error('Invalid JSON in "Custom Fields (JSON)".');
45
+ }
46
+ }
47
+ else if (typeof add.Fields === 'object' && add.Fields) {
48
+ fields = add.Fields;
49
+ }
50
+ // Helpers
51
+ const toKeyValues = (obj) => {
52
+ var _a;
53
+ if (!obj || typeof obj !== 'object')
54
+ return undefined;
55
+ const list = (_a = obj.KeyValues) !== null && _a !== void 0 ? _a : [];
56
+ if (!Array.isArray(list) || !list.length)
57
+ return undefined;
58
+ return { KeyValues: list.map(e => { var _a, _b; return ({ Key: (_a = e.Key) !== null && _a !== void 0 ? _a : '', Value: (_b = e.Value) !== null && _b !== void 0 ? _b : '' }); }) };
59
+ };
60
+ const websites = toKeyValues(add.Websites);
61
+ const otherPhones = toKeyValues(add.OtherPhones);
62
+ const otherEmails = toKeyValues(add.OtherEmails);
63
+ const addresses = toKeyValues(add.Addresses);
64
+ let bankAccounts;
65
+ if (add.BankAccounts && typeof add.BankAccounts === 'object') {
66
+ const vals = add.BankAccounts.Values;
67
+ if (Array.isArray(vals) && vals.length) {
68
+ bankAccounts = { Values: vals.map(v => {
69
+ var _a, _b, _c, _d;
70
+ return ({
71
+ Value1: (_a = v.Value1) !== null && _a !== void 0 ? _a : '', Value2: (_b = v.Value2) !== null && _b !== void 0 ? _b : '', Value3: (_c = v.Value3) !== null && _c !== void 0 ? _c : '', Value4: (_d = v.Value4) !== null && _d !== void 0 ? _d : '',
72
+ });
73
+ }) };
74
+ }
75
+ }
76
+ let segmentIds;
77
+ const seg = add.SegmentIds;
78
+ if (Array.isArray(seg))
79
+ segmentIds = seg.filter(Boolean);
80
+ else if (typeof seg === 'string' && seg)
81
+ segmentIds = [seg];
82
+ // Contact body (Type = Company)
83
+ const contact = {
84
+ Id: id,
85
+ Type: 'Company',
86
+ FirstName: name, // UI "Name"
87
+ OwnerId: ownerId,
88
+ MobilePhone: mobile,
89
+ WorkPhone: workPhone,
90
+ WorkPhoneExtension: workPhoneExt,
91
+ Fax: fax,
92
+ Email: email,
93
+ IsVIP: isVip,
94
+ BackgroundInfo: backgroundInfo,
95
+ CustomerCode: customerCode,
96
+ EconomicIssue: economicIssue,
97
+ RegistrationNumber: registrationNumber,
98
+ NationalID: nationalId,
99
+ ZipCode: zipCode,
100
+ VisibilityType: visibilityType,
101
+ };
102
+ if (fields)
103
+ contact['Fields'] = fields;
104
+ if (websites)
105
+ contact['Websites'] = websites;
106
+ if (otherPhones)
107
+ contact['OtherPhones'] = otherPhones;
108
+ if (otherEmails)
109
+ contact['OtherEmails'] = otherEmails;
110
+ if (addresses)
111
+ contact['Addresses'] = addresses;
112
+ if (bankAccounts)
113
+ contact['BankAccounts'] = bankAccounts;
114
+ const body = { Contact: contact };
115
+ if (segmentIds && segmentIds.length)
116
+ body['SegmentIds'] = segmentIds;
117
+ const resp = await (0, http_1.didarRequest)(this, i, {
118
+ method: 'POST',
119
+ path: '/api/contact/save',
120
+ body,
121
+ });
122
+ returnData.push({ json: resp });
123
+ }
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const companyUpdateProperties: INodeProperties[];
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.companyUpdateProperties = void 0;
4
+ const showForCompanyUpdate = { show: { resource: ['company'], operation: ['update'] } };
5
+ exports.companyUpdateProperties = [
6
+ // === REQUIRED: Id ===
7
+ {
8
+ displayName: 'Id',
9
+ name: 'Id',
10
+ type: 'string',
11
+ default: '',
12
+ required: true,
13
+ displayOptions: showForCompanyUpdate,
14
+ description: 'Company Id to update (required).',
15
+ },
16
+ // === MAIN fields (same as create) ===
17
+ {
18
+ displayName: 'Name',
19
+ name: 'FirstName', // UI Name → API FirstName
20
+ type: 'string',
21
+ default: '',
22
+ required: true,
23
+ displayOptions: showForCompanyUpdate,
24
+ description: 'Company name (required).',
25
+ },
26
+ {
27
+ displayName: 'Mobile Phone',
28
+ name: 'MobilePhone',
29
+ type: 'string',
30
+ default: '',
31
+ displayOptions: showForCompanyUpdate,
32
+ description: 'Primary mobile phone number.',
33
+ },
34
+ {
35
+ displayName: 'Work Phone',
36
+ name: 'WorkPhone',
37
+ type: 'string',
38
+ default: '',
39
+ displayOptions: showForCompanyUpdate,
40
+ description: 'Work phone number.',
41
+ },
42
+ // Owner (select/manual)
43
+ {
44
+ displayName: 'Owner Input Mode',
45
+ name: 'OwnerMode',
46
+ type: 'options',
47
+ options: [
48
+ { name: 'Select from list', value: 'select' },
49
+ { name: 'Enter ID manually', value: 'manual' },
50
+ ],
51
+ default: 'select',
52
+ displayOptions: showForCompanyUpdate,
53
+ description: 'Choose how to set the owner of this company.',
54
+ },
55
+ {
56
+ displayName: 'Owner',
57
+ name: 'OwnerIdSelect',
58
+ type: 'options',
59
+ typeOptions: { loadOptionsMethod: 'getUsers' },
60
+ default: '',
61
+ displayOptions: { show: { ...showForCompanyUpdate.show, OwnerMode: ['select'] } },
62
+ description: 'Select the owner user (required if select mode).',
63
+ },
64
+ {
65
+ displayName: 'Owner ID',
66
+ name: 'OwnerIdManual',
67
+ type: 'string',
68
+ default: '',
69
+ displayOptions: { show: { ...showForCompanyUpdate.show, OwnerMode: ['manual'] } },
70
+ description: 'Enter owner user ID manually (required if manual mode).',
71
+ },
72
+ // Additional Fields (exact mirror of create)
73
+ {
74
+ displayName: 'Additional Fields',
75
+ name: 'additionalFields',
76
+ type: 'collection',
77
+ placeholder: 'Add field',
78
+ default: {},
79
+ displayOptions: showForCompanyUpdate,
80
+ options: [
81
+ { displayName: 'Work Phone Extension', name: 'WorkPhoneExtension', type: 'string', default: '', description: 'Extension for the work phone.' },
82
+ { displayName: 'Fax', name: 'Fax', type: 'string', default: '', description: 'Fax number.' },
83
+ { displayName: 'Email', name: 'Email', type: 'string', default: '', description: 'Primary email address.' },
84
+ { displayName: 'Is VIP', name: 'IsVIP', type: 'boolean', default: false, description: 'Mark this company as VIP.' },
85
+ { displayName: 'Background Info', name: 'BackgroundInfo', type: 'string', default: '', description: 'Notes or background information.' },
86
+ { displayName: 'Customer Code', name: 'CustomerCode', type: 'string', default: '', description: 'Internal or CRM customer code.' },
87
+ { displayName: 'Economic Issue', name: 'EconomicIssue', type: 'string', default: '', description: 'Economic issue code (company-specific).' },
88
+ { displayName: 'Registration Number', name: 'RegistrationNumber', type: 'string', default: '', description: 'Company registration number.' },
89
+ { displayName: 'National ID', name: 'NationalID', type: 'string', default: '', description: 'Company national ID.' },
90
+ { displayName: 'Zip Code', name: 'ZipCode', type: 'string', default: '', description: 'Postal/ZIP code.' },
91
+ {
92
+ displayName: 'Visibility Type',
93
+ name: 'VisibilityType',
94
+ type: 'options',
95
+ options: [
96
+ { name: 'Owner', value: 'Owner' },
97
+ { name: 'Owner Group', value: 'OwnerGroup' },
98
+ { name: 'Owner SubGroup', value: 'OwnerSubGroup' },
99
+ { name: 'All', value: 'All' },
100
+ ],
101
+ default: 'Owner',
102
+ description: 'Visibility setting for this company.',
103
+ },
104
+ { displayName: 'Custom Fields (JSON)', name: 'Fields', type: 'json', default: '', placeholder: '{ "Field_996_0_7": "value" }', description: 'JSON object of custom fields.' },
105
+ // Key/Value lists
106
+ {
107
+ displayName: 'Websites',
108
+ name: 'Websites',
109
+ type: 'fixedCollection',
110
+ typeOptions: { multipleValues: true },
111
+ default: {},
112
+ options: [{ name: 'KeyValues', displayName: 'Website', values: [
113
+ { displayName: 'Key', name: 'Key', type: 'string', default: '' },
114
+ { displayName: 'Value', name: 'Value', type: 'string', default: '' },
115
+ ] }],
116
+ description: 'List of websites as key/value pairs.',
117
+ },
118
+ {
119
+ displayName: 'Other Phones',
120
+ name: 'OtherPhones',
121
+ type: 'fixedCollection',
122
+ typeOptions: { multipleValues: true },
123
+ default: {},
124
+ options: [{ name: 'KeyValues', displayName: 'Phone', values: [
125
+ { displayName: 'Key', name: 'Key', type: 'string', default: '' },
126
+ { displayName: 'Value', name: 'Value', type: 'string', default: '' },
127
+ ] }],
128
+ description: 'Additional phone numbers as key/value pairs.',
129
+ },
130
+ {
131
+ displayName: 'Other Emails',
132
+ name: 'OtherEmails',
133
+ type: 'fixedCollection',
134
+ typeOptions: { multipleValues: true },
135
+ default: {},
136
+ options: [{ name: 'KeyValues', displayName: 'Email', values: [
137
+ { displayName: 'Key', name: 'Key', type: 'string', default: '' },
138
+ { displayName: 'Value', name: 'Value', type: 'string', default: '' },
139
+ ] }],
140
+ description: 'Additional emails as key/value pairs.',
141
+ },
142
+ {
143
+ displayName: 'Addresses',
144
+ name: 'Addresses',
145
+ type: 'fixedCollection',
146
+ typeOptions: { multipleValues: true },
147
+ default: {},
148
+ options: [{ name: 'KeyValues', displayName: 'Address', values: [
149
+ { displayName: 'Key', name: 'Key', type: 'string', default: '' },
150
+ { displayName: 'Value', name: 'Value', type: 'string', default: '' },
151
+ ] }],
152
+ description: 'Addresses as key/value pairs (e.g., HQ/Branch/etc.).',
153
+ },
154
+ // Bank accounts
155
+ {
156
+ displayName: 'Bank Accounts',
157
+ name: 'BankAccounts',
158
+ type: 'fixedCollection',
159
+ typeOptions: { multipleValues: true },
160
+ default: {},
161
+ options: [{ name: 'Values', displayName: 'Bank Account', values: [
162
+ { displayName: 'Value1', name: 'Value1', type: 'string', default: '' },
163
+ { displayName: 'Value2', name: 'Value2', type: 'string', default: '' },
164
+ { displayName: 'Value3', name: 'Value3', type: 'string', default: '' },
165
+ { displayName: 'Value4', name: 'Value4', type: 'string', default: '' },
166
+ ] }],
167
+ description: 'Bank account details (four flexible fields per entry).',
168
+ },
169
+ // Segments
170
+ {
171
+ displayName: 'Segment IDs',
172
+ name: 'SegmentIds',
173
+ type: 'string',
174
+ typeOptions: { multipleValues: true },
175
+ default: [],
176
+ description: 'List of segment IDs (GUIDs).',
177
+ },
178
+ ],
179
+ },
180
+ ];
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function personGet(this: IExecuteFunctions, i: number, returnData: INodeExecutionData[]): Promise<void>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.personGet = personGet;
4
+ const http_1 = require("../../lib/http");
5
+ async function personGet(i, returnData) {
6
+ const personId = this.getNodeParameter('personId', i, '');
7
+ if (!personId)
8
+ throw new Error('Person Id is required.');
9
+ const resp = await (0, http_1.didarRequest)(this, i, {
10
+ method: 'POST',
11
+ path: '/api/contact/GetContactDetail',
12
+ body: { Id: personId },
13
+ });
14
+ returnData.push({ json: resp });
15
+ }
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const personGetProperties: INodeProperties[];
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.personGetProperties = void 0;
4
+ exports.personGetProperties = [
5
+ {
6
+ displayName: 'Person Id',
7
+ name: 'personId',
8
+ type: 'string',
9
+ default: '',
10
+ required: true,
11
+ displayOptions: { show: { resource: ['person'], operation: ['get'] } },
12
+ description: 'Person Id to fetch (required).',
13
+ },
14
+ ];
@@ -1,2 +1,6 @@
1
1
  export { personCreate } from './create.operation';
2
+ export { personUpdate } from './update.operation';
3
+ export { personGet } from './get.operation';
2
4
  export { personCreateProperties } from './create.properties';
5
+ export { personUpdateProperties } from './update.properties';
6
+ export { personGetProperties } from './get.properties';
@@ -1,8 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.personCreateProperties = exports.personCreate = void 0;
4
- // src/nodes/person/index.ts
3
+ exports.personGetProperties = exports.personUpdateProperties = exports.personCreateProperties = exports.personGet = exports.personUpdate = exports.personCreate = void 0;
5
4
  var create_operation_1 = require("./create.operation");
6
5
  Object.defineProperty(exports, "personCreate", { enumerable: true, get: function () { return create_operation_1.personCreate; } });
6
+ var update_operation_1 = require("./update.operation");
7
+ Object.defineProperty(exports, "personUpdate", { enumerable: true, get: function () { return update_operation_1.personUpdate; } });
8
+ var get_operation_1 = require("./get.operation");
9
+ Object.defineProperty(exports, "personGet", { enumerable: true, get: function () { return get_operation_1.personGet; } });
7
10
  var create_properties_1 = require("./create.properties");
8
11
  Object.defineProperty(exports, "personCreateProperties", { enumerable: true, get: function () { return create_properties_1.personCreateProperties; } });
12
+ var update_properties_1 = require("./update.properties");
13
+ Object.defineProperty(exports, "personUpdateProperties", { enumerable: true, get: function () { return update_properties_1.personUpdateProperties; } });
14
+ var get_properties_1 = require("./get.properties");
15
+ Object.defineProperty(exports, "personGetProperties", { enumerable: true, get: function () { return get_properties_1.personGetProperties; } });
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function personUpdate(this: IExecuteFunctions, i: number, returnData: INodeExecutionData[]): Promise<void>;
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.personUpdate = personUpdate;
4
+ const http_1 = require("../../lib/http");
5
+ async function personUpdate(i, returnData) {
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
7
+ const id = this.getNodeParameter('Id', i, '');
8
+ if (!id)
9
+ throw new Error('Id is required.');
10
+ const lastName = this.getNodeParameter('LastName', i, '');
11
+ if (!lastName)
12
+ throw new Error('LastName is required.');
13
+ const firstName = this.getNodeParameter('FirstName', i, '');
14
+ const mobile = this.getNodeParameter('MobilePhone', i, '');
15
+ const workPhone = this.getNodeParameter('WorkPhone', i, '');
16
+ // Owner
17
+ const ownerMode = this.getNodeParameter('OwnerMode', i);
18
+ const ownerId = ownerMode === 'select'
19
+ ? this.getNodeParameter('OwnerIdSelect', i, '')
20
+ : this.getNodeParameter('OwnerIdManual', i, '');
21
+ if (!ownerId)
22
+ throw new Error('OwnerId is required (select from list or enter manually).');
23
+ const add = this.getNodeParameter('additionalFields', i, {}) || {};
24
+ const title = (_a = add.Title) !== null && _a !== void 0 ? _a : '';
25
+ const companyName = (_b = add.CompanyName) !== null && _b !== void 0 ? _b : '';
26
+ const companyId = (_c = add.CompanyId) !== null && _c !== void 0 ? _c : '00000000-0000-0000-0000-000000000000';
27
+ const birthDate = (_d = add.BirthDate) !== null && _d !== void 0 ? _d : '';
28
+ const birthDateMessageId = (_e = add.BirthDateMessageId) !== null && _e !== void 0 ? _e : '00000000-0000-0000-0000-000000000000';
29
+ const workPhoneExt = (_f = add.WorkPhoneExtension) !== null && _f !== void 0 ? _f : '';
30
+ const fax = (_g = add.Fax) !== null && _g !== void 0 ? _g : '';
31
+ const email = (_h = add.Email) !== null && _h !== void 0 ? _h : '';
32
+ const isVip = (_j = add.IsVIP) !== null && _j !== void 0 ? _j : false;
33
+ const backgroundInfo = (_k = add.BackgroundInfo) !== null && _k !== void 0 ? _k : '';
34
+ const position = (_l = add.Position) !== null && _l !== void 0 ? _l : '';
35
+ const customerCode = (_m = add.CustomerCode) !== null && _m !== void 0 ? _m : '';
36
+ const nationalCode = (_o = add.NationalCode) !== null && _o !== void 0 ? _o : '';
37
+ const zipCode = (_p = add.ZipCode) !== null && _p !== void 0 ? _p : '';
38
+ const visibilityType = (_q = add.VisibilityType) !== null && _q !== void 0 ? _q : 'Owner';
39
+ // Fields
40
+ let fields;
41
+ if (typeof add.Fields === 'string' && add.Fields.trim()) {
42
+ try {
43
+ fields = JSON.parse(add.Fields);
44
+ }
45
+ catch {
46
+ throw new Error('Invalid JSON in "Custom Fields (JSON)".');
47
+ }
48
+ }
49
+ else if (typeof add.Fields === 'object' && add.Fields) {
50
+ fields = add.Fields;
51
+ }
52
+ // helpers
53
+ const toKeyValues = (obj) => {
54
+ var _a;
55
+ if (!obj || typeof obj !== 'object')
56
+ return undefined;
57
+ const list = (_a = obj.KeyValues) !== null && _a !== void 0 ? _a : [];
58
+ if (!Array.isArray(list) || !list.length)
59
+ return undefined;
60
+ return { KeyValues: list.map(e => { var _a, _b; return ({ Key: (_a = e.Key) !== null && _a !== void 0 ? _a : '', Value: (_b = e.Value) !== null && _b !== void 0 ? _b : '' }); }) };
61
+ };
62
+ const websites = toKeyValues(add.Websites);
63
+ const otherPhones = toKeyValues(add.OtherPhones);
64
+ const otherEmails = toKeyValues(add.OtherEmails);
65
+ const addresses = toKeyValues(add.Addresses);
66
+ let bankAccounts;
67
+ if (add.BankAccounts && typeof add.BankAccounts === 'object') {
68
+ const vals = add.BankAccounts.Values;
69
+ if (Array.isArray(vals) && vals.length) {
70
+ bankAccounts = { Values: vals.map(v => {
71
+ var _a, _b, _c, _d;
72
+ return ({
73
+ Value1: (_a = v.Value1) !== null && _a !== void 0 ? _a : '', Value2: (_b = v.Value2) !== null && _b !== void 0 ? _b : '', Value3: (_c = v.Value3) !== null && _c !== void 0 ? _c : '', Value4: (_d = v.Value4) !== null && _d !== void 0 ? _d : '',
74
+ });
75
+ }) };
76
+ }
77
+ }
78
+ let segmentIds;
79
+ const seg = add.SegmentIds;
80
+ if (Array.isArray(seg))
81
+ segmentIds = seg.filter(Boolean);
82
+ else if (typeof seg === 'string' && seg)
83
+ segmentIds = [seg];
84
+ // Contact body (Type همیشه Person)
85
+ const contact = {
86
+ Id: id,
87
+ Type: 'Person',
88
+ FirstName: firstName,
89
+ LastName: lastName,
90
+ Title: title,
91
+ OwnerId: ownerId,
92
+ CompanyName: companyName,
93
+ CompanyId: companyId,
94
+ BirthDate: birthDate || undefined,
95
+ BirthDateMessageId: birthDateMessageId,
96
+ MobilePhone: mobile,
97
+ WorkPhone: workPhone,
98
+ WorkPhoneExtension: workPhoneExt,
99
+ Fax: fax,
100
+ Email: email,
101
+ IsVIP: isVip,
102
+ BackgroundInfo: backgroundInfo,
103
+ Position: position,
104
+ CustomerCode: customerCode,
105
+ NationalCode: nationalCode,
106
+ ZipCode: zipCode,
107
+ VisibilityType: visibilityType,
108
+ };
109
+ if (fields)
110
+ contact['Fields'] = fields;
111
+ if (websites)
112
+ contact['Websites'] = websites;
113
+ if (otherPhones)
114
+ contact['OtherPhones'] = otherPhones;
115
+ if (otherEmails)
116
+ contact['OtherEmails'] = otherEmails;
117
+ if (addresses)
118
+ contact['Addresses'] = addresses;
119
+ if (bankAccounts)
120
+ contact['BankAccounts'] = bankAccounts;
121
+ const body = { Contact: contact };
122
+ if (segmentIds && segmentIds.length)
123
+ body['SegmentIds'] = segmentIds;
124
+ const resp = await (0, http_1.didarRequest)(this, i, {
125
+ method: 'POST',
126
+ path: '/api/contact/save',
127
+ body,
128
+ });
129
+ returnData.push({ json: resp });
130
+ }
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const personUpdateProperties: INodeProperties[];