n8n-nodes-didar-crm 0.0.8 → 0.0.10

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 (30) hide show
  1. package/dist/lib/loadOptions.d.ts +1 -0
  2. package/dist/lib/loadOptions.js +25 -0
  3. package/dist/nodes/DidarCrm.node.d.ts +1 -0
  4. package/dist/nodes/DidarCrm.node.js +63 -0
  5. package/dist/nodes/activity/create.operation.d.ts +2 -0
  6. package/dist/nodes/activity/create.operation.js +90 -0
  7. package/dist/nodes/activity/create.properties.d.ts +2 -0
  8. package/dist/nodes/activity/create.properties.js +162 -0
  9. package/dist/nodes/activity/index.d.ts +4 -0
  10. package/dist/nodes/activity/index.js +11 -0
  11. package/dist/nodes/activity/update.operation.d.ts +2 -0
  12. package/dist/nodes/activity/update.operation.js +93 -0
  13. package/dist/nodes/activity/update.properties.d.ts +2 -0
  14. package/dist/nodes/activity/update.properties.js +173 -0
  15. package/dist/nodes/company/create.operation.d.ts +2 -0
  16. package/dist/nodes/company/create.operation.js +121 -0
  17. package/dist/nodes/company/create.properties.d.ts +2 -0
  18. package/dist/nodes/company/create.properties.js +210 -0
  19. package/dist/nodes/company/get.operation.d.ts +2 -0
  20. package/dist/nodes/company/get.operation.js +15 -0
  21. package/dist/nodes/company/get.properties.d.ts +2 -0
  22. package/dist/nodes/company/get.properties.js +14 -0
  23. package/dist/nodes/company/index.d.ts +6 -0
  24. package/dist/nodes/company/index.js +15 -0
  25. package/dist/nodes/company/update.operation.d.ts +2 -0
  26. package/dist/nodes/company/update.operation.js +123 -0
  27. package/dist/nodes/company/update.properties.d.ts +2 -0
  28. package/dist/nodes/company/update.properties.js +180 -0
  29. package/package.json +1 -1
  30. package/dist/nodes/didar.svg +0 -12
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.activityUpdateProperties = void 0;
4
+ const showForActivityUpdate = { show: { resource: ['activity'], operation: ['update'] } };
5
+ exports.activityUpdateProperties = [
6
+ // === REQUIRED: Id
7
+ {
8
+ displayName: 'Id',
9
+ name: 'Id',
10
+ type: 'string',
11
+ default: '',
12
+ required: true,
13
+ displayOptions: showForActivityUpdate,
14
+ description: 'Activity Id to update (required).',
15
+ },
16
+ // ===== MAIN (مثل ایجاد، با همان ترتیب) =====
17
+ {
18
+ displayName: 'Title',
19
+ name: 'Title',
20
+ type: 'string',
21
+ default: '',
22
+ required: true,
23
+ displayOptions: showForActivityUpdate,
24
+ description: 'Activity title (required).',
25
+ },
26
+ // ActivityTypeId: Select / Manual
27
+ {
28
+ displayName: 'Activity Type Input Mode',
29
+ name: 'ActivityTypeMode',
30
+ type: 'options',
31
+ options: [
32
+ { name: 'Select from list', value: 'select' },
33
+ { name: 'Enter ID manually', value: 'manual' },
34
+ ],
35
+ default: 'select',
36
+ displayOptions: showForActivityUpdate,
37
+ description: 'Choose how to set the activity type.',
38
+ },
39
+ {
40
+ displayName: 'Activity Type',
41
+ name: 'ActivityTypeIdSelect',
42
+ type: 'options',
43
+ typeOptions: { loadOptionsMethod: 'getActivityTypes' },
44
+ default: '',
45
+ displayOptions: { show: { resource: ['activity'], operation: ['update'], ActivityTypeMode: ['select'] } },
46
+ description: 'Select the activity type (required if select mode).',
47
+ },
48
+ {
49
+ displayName: 'Activity Type ID',
50
+ name: 'ActivityTypeIdManual',
51
+ type: 'string',
52
+ default: '',
53
+ displayOptions: { show: { resource: ['activity'], operation: ['update'], ActivityTypeMode: ['manual'] } },
54
+ description: 'Enter activity type ID manually (required if manual mode).',
55
+ },
56
+ // // Owner (فقط این‌جا، نه در Additional Fields)
57
+ // {
58
+ // displayName: 'Owner Input Mode',
59
+ // name: 'OwnerMode',
60
+ // type: 'options',
61
+ // options: [
62
+ // { name: 'Select from list', value: 'select' },
63
+ // { name: 'Enter ID manually', value: 'manual' },
64
+ // ],
65
+ // default: 'select',
66
+ // displayOptions: showForActivityUpdate,
67
+ // description: 'Choose how to set the owner.',
68
+ // },
69
+ // {
70
+ // displayName: 'Owner',
71
+ // name: 'OwnerIdSelect',
72
+ // type: 'options',
73
+ // typeOptions: { loadOptionsMethod: 'getUsers' },
74
+ // default: '',
75
+ // displayOptions: { show: { resource: ['activity'], operation: ['update'], OwnerMode: ['select'] } },
76
+ // description: 'Select the owner user (required if select mode).',
77
+ // },
78
+ // {
79
+ // displayName: 'Owner ID',
80
+ // name: 'OwnerIdManual',
81
+ // type: 'string',
82
+ // default: '',
83
+ // displayOptions: { show: { resource: ['activity'], operation: ['update'], OwnerMode: ['manual'] } },
84
+ // description: 'Enter owner user ID manually (required if manual mode).',
85
+ // },
86
+ // {
87
+ // displayName: 'Is Done',
88
+ // name: 'IsDone',
89
+ // type: 'boolean',
90
+ // default: false,
91
+ // displayOptions: showForActivityUpdate,
92
+ // description: 'Mark the activity as completed.',
93
+ // },
94
+ // ===== Additional Fields (بدون Owner) =====
95
+ {
96
+ displayName: 'Additional Fields',
97
+ name: 'additionalFields',
98
+ type: 'collection',
99
+ placeholder: 'Add field',
100
+ default: {},
101
+ displayOptions: showForActivityUpdate,
102
+ options: [
103
+ { displayName: 'Note', name: 'Note', type: 'string', default: '', description: 'Activity note/description.' },
104
+ { displayName: 'Result Note', name: 'ResultNote', type: 'string', default: '', description: 'Result/Outcome notes.' },
105
+ { displayName: 'Is Deleted', name: 'IsDeleted', type: 'boolean', default: false, description: 'Soft-delete flag.' },
106
+ { displayName: 'Is Pinned', name: 'IsPinned', type: 'boolean', default: false, description: 'Pin this activity.' },
107
+ { displayName: 'Due Date', name: 'DueDate', type: 'dateTime', default: '', description: 'Planned due date/time (ISO).' },
108
+ { displayName: 'Duration', name: 'Duration', type: 'number', default: 0, description: 'Duration in minutes (>= 0). Only sent if > 0.' },
109
+ { displayName: 'Done Date', name: 'DoneDate', type: 'dateTime', default: '', description: 'Completion date/time (ISO).' },
110
+ {
111
+ displayName: 'Deal ID',
112
+ name: 'DealId',
113
+ type: 'string',
114
+ default: '00000000-0000-0000-0000-000000000000',
115
+ description: 'Related deal ID (zero-guid if none).',
116
+ },
117
+ {
118
+ displayName: 'Case ID',
119
+ name: 'CaseId',
120
+ type: 'string',
121
+ default: '00000000-0000-0000-0000-000000000000',
122
+ description: 'Related case ID (zero-guid if none).',
123
+ },
124
+ // ContactIds: string[]
125
+ {
126
+ displayName: 'Contact IDs',
127
+ name: 'ContactIds',
128
+ type: 'string',
129
+ typeOptions: { multipleValues: true },
130
+ default: [],
131
+ description: 'List of related contact IDs.',
132
+ },
133
+ {
134
+ displayName: 'Creator ID',
135
+ name: 'CreatorId',
136
+ type: 'string',
137
+ default: '00000000-0000-0000-0000-000000000000',
138
+ description: 'Creator user ID (GUID).',
139
+ },
140
+ // Recurrence
141
+ {
142
+ displayName: 'Recurrence Type',
143
+ name: 'RecurrenceType',
144
+ type: 'options',
145
+ options: [
146
+ { name: '—', value: '' },
147
+ { name: 'OneTime', value: 'OneTime' },
148
+ { name: 'Hourly', value: 'Hourly' },
149
+ { name: 'Daily', value: 'Daily' },
150
+ { name: 'Weekly', value: 'Weekly' },
151
+ { name: 'Monthly', value: 'Monthly' },
152
+ { name: 'Yearly', value: 'Yearly' },
153
+ ],
154
+ default: '',
155
+ description: 'Recurrence pattern; leave empty for non-recurring.',
156
+ },
157
+ {
158
+ displayName: 'Recurrence Data',
159
+ name: 'RecurrenceData',
160
+ type: 'number',
161
+ default: 0,
162
+ description: 'Positive integer. Only sent if > 0.',
163
+ },
164
+ {
165
+ displayName: 'Recurrence End Date',
166
+ name: 'RecurrenceEndDate',
167
+ type: 'dateTime',
168
+ default: '',
169
+ description: 'End date/time for recurrence (ISO).',
170
+ },
171
+ ],
172
+ },
173
+ ];
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function companyCreate(this: IExecuteFunctions, i: number, returnData: INodeExecutionData[]): Promise<void>;
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.companyCreate = companyCreate;
4
+ const http_1 = require("../../lib/http");
5
+ async function companyCreate(i, returnData) {
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
7
+ // Name (maps to FirstName) is required
8
+ const name = this.getNodeParameter('FirstName', i, '');
9
+ if (!name)
10
+ throw new Error('Name is required.');
11
+ // Owner selection
12
+ const ownerMode = this.getNodeParameter('OwnerMode', i);
13
+ const ownerId = ownerMode === 'select'
14
+ ? this.getNodeParameter('OwnerIdSelect', i, '')
15
+ : this.getNodeParameter('OwnerIdManual', i, '');
16
+ if (!ownerId)
17
+ throw new Error('OwnerId is required (select from list or enter manually).');
18
+ // Main fields
19
+ const mobile = this.getNodeParameter('MobilePhone', i, '');
20
+ const workPhone = this.getNodeParameter('WorkPhone', i, '');
21
+ // Additional fields
22
+ const add = this.getNodeParameter('additionalFields', i, {}) || {};
23
+ const workPhoneExt = (_a = add.WorkPhoneExtension) !== null && _a !== void 0 ? _a : '';
24
+ const fax = (_b = add.Fax) !== null && _b !== void 0 ? _b : '';
25
+ const email = (_c = add.Email) !== null && _c !== void 0 ? _c : '';
26
+ const isVip = (_d = add.IsVIP) !== null && _d !== void 0 ? _d : false;
27
+ const backgroundInfo = (_e = add.BackgroundInfo) !== null && _e !== void 0 ? _e : '';
28
+ const customerCode = (_f = add.CustomerCode) !== null && _f !== void 0 ? _f : '';
29
+ const economicIssue = (_g = add.EconomicIssue) !== null && _g !== void 0 ? _g : '';
30
+ const registrationNumber = (_h = add.RegistrationNumber) !== null && _h !== void 0 ? _h : '';
31
+ const nationalId = (_j = add.NationalID) !== null && _j !== void 0 ? _j : '';
32
+ const zipCode = (_k = add.ZipCode) !== null && _k !== void 0 ? _k : '';
33
+ const visibilityType = (_l = add.VisibilityType) !== null && _l !== void 0 ? _l : 'Owner';
34
+ // Fields (JSON)
35
+ let fields;
36
+ if (typeof add.Fields === 'string' && add.Fields.trim()) {
37
+ try {
38
+ fields = JSON.parse(add.Fields);
39
+ }
40
+ catch {
41
+ throw new Error('Invalid JSON in "Custom Fields (JSON)".');
42
+ }
43
+ }
44
+ else if (typeof add.Fields === 'object' && add.Fields) {
45
+ fields = add.Fields;
46
+ }
47
+ // Helper: fixedCollection → { KeyValues: [{Key,Value}] }
48
+ const toKeyValues = (obj) => {
49
+ var _a;
50
+ if (!obj || typeof obj !== 'object')
51
+ return undefined;
52
+ const list = (_a = obj.KeyValues) !== null && _a !== void 0 ? _a : [];
53
+ if (!Array.isArray(list) || !list.length)
54
+ return undefined;
55
+ 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 : '' }); }) };
56
+ };
57
+ const websites = toKeyValues(add.Websites);
58
+ const otherPhones = toKeyValues(add.OtherPhones);
59
+ const otherEmails = toKeyValues(add.OtherEmails);
60
+ const addresses = toKeyValues(add.Addresses);
61
+ // BankAccounts: { Values: [{Value1..Value4}] }
62
+ let bankAccounts;
63
+ if (add.BankAccounts && typeof add.BankAccounts === 'object') {
64
+ const vals = add.BankAccounts.Values;
65
+ if (Array.isArray(vals) && vals.length) {
66
+ bankAccounts = { Values: vals.map(v => {
67
+ var _a, _b, _c, _d;
68
+ return ({
69
+ 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 : '',
70
+ });
71
+ }) };
72
+ }
73
+ }
74
+ // SegmentIds: string[]
75
+ let segmentIds;
76
+ const seg = add.SegmentIds;
77
+ if (Array.isArray(seg))
78
+ segmentIds = seg.filter(Boolean);
79
+ else if (typeof seg === 'string' && seg)
80
+ segmentIds = [seg];
81
+ // Contact body (Type = Company)
82
+ const contact = {
83
+ Type: 'Company',
84
+ FirstName: name, // UI "Name" → API FirstName
85
+ OwnerId: ownerId,
86
+ MobilePhone: mobile,
87
+ WorkPhone: workPhone,
88
+ WorkPhoneExtension: workPhoneExt,
89
+ Fax: fax,
90
+ Email: email,
91
+ IsVIP: isVip,
92
+ BackgroundInfo: backgroundInfo,
93
+ CustomerCode: customerCode,
94
+ EconomicIssue: economicIssue,
95
+ RegistrationNumber: registrationNumber,
96
+ NationalID: nationalId,
97
+ ZipCode: zipCode,
98
+ VisibilityType: visibilityType,
99
+ };
100
+ if (fields)
101
+ contact['Fields'] = fields;
102
+ if (websites)
103
+ contact['Websites'] = websites;
104
+ if (otherPhones)
105
+ contact['OtherPhones'] = otherPhones;
106
+ if (otherEmails)
107
+ contact['OtherEmails'] = otherEmails;
108
+ if (addresses)
109
+ contact['Addresses'] = addresses;
110
+ if (bankAccounts)
111
+ contact['BankAccounts'] = bankAccounts;
112
+ const body = { Contact: contact };
113
+ if (segmentIds && segmentIds.length)
114
+ body['SegmentIds'] = segmentIds;
115
+ const resp = await (0, http_1.didarRequest)(this, i, {
116
+ method: 'POST',
117
+ path: '/api/contact/save',
118
+ body,
119
+ });
120
+ returnData.push({ json: resp });
121
+ }
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const companyCreateProperties: INodeProperties[];
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.companyCreateProperties = void 0;
4
+ const showForCompanyCreate = { show: { resource: ['company'], operation: ['create'] } };
5
+ exports.companyCreateProperties = [
6
+ // --- مین فیلدها (بالا به پایین) ---
7
+ {
8
+ displayName: 'Name',
9
+ name: 'FirstName', // به API به عنوان FirstName ارسال می‌شود
10
+ type: 'string',
11
+ default: '',
12
+ required: true,
13
+ displayOptions: showForCompanyCreate,
14
+ description: 'Company name (required).',
15
+ },
16
+ {
17
+ displayName: 'Mobile Phone',
18
+ name: 'MobilePhone',
19
+ type: 'string',
20
+ default: '',
21
+ displayOptions: showForCompanyCreate,
22
+ description: 'Primary mobile phone number.',
23
+ },
24
+ {
25
+ displayName: 'Work Phone',
26
+ name: 'WorkPhone',
27
+ type: 'string',
28
+ default: '',
29
+ displayOptions: showForCompanyCreate,
30
+ description: 'Work phone number.',
31
+ },
32
+ // --- Owner (Select/Manual) مانند Person/Deal ---
33
+ {
34
+ displayName: 'Owner Input Mode',
35
+ name: 'OwnerMode',
36
+ type: 'options',
37
+ options: [
38
+ { name: 'Select from list', value: 'select' },
39
+ { name: 'Enter ID manually', value: 'manual' },
40
+ ],
41
+ default: 'select',
42
+ displayOptions: showForCompanyCreate,
43
+ description: 'Choose how to set the owner of this company.',
44
+ },
45
+ {
46
+ displayName: 'Owner',
47
+ name: 'OwnerIdSelect',
48
+ type: 'options',
49
+ typeOptions: { loadOptionsMethod: 'getUsers' },
50
+ default: '',
51
+ displayOptions: { show: { ...showForCompanyCreate.show, OwnerMode: ['select'] } },
52
+ description: 'Select the owner user (required if select mode).',
53
+ },
54
+ {
55
+ displayName: 'Owner ID',
56
+ name: 'OwnerIdManual',
57
+ type: 'string',
58
+ default: '',
59
+ displayOptions: { show: { ...showForCompanyCreate.show, OwnerMode: ['manual'] } },
60
+ description: 'Enter owner user ID manually (required if manual mode).',
61
+ },
62
+ // --- Additional Fields ---
63
+ {
64
+ displayName: 'Additional Fields',
65
+ name: 'additionalFields',
66
+ type: 'collection',
67
+ placeholder: 'Add field',
68
+ default: {},
69
+ displayOptions: showForCompanyCreate,
70
+ options: [
71
+ { displayName: 'Work Phone Extension', name: 'WorkPhoneExtension', type: 'string', default: '', description: 'Extension for the work phone.' },
72
+ { displayName: 'Fax', name: 'Fax', type: 'string', default: '', description: 'Fax number.' },
73
+ { displayName: 'Email', name: 'Email', type: 'string', default: '', description: 'Primary email address.' },
74
+ { displayName: 'Is VIP', name: 'IsVIP', type: 'boolean', default: false, description: 'Mark this company as VIP.' },
75
+ { displayName: 'Background Info', name: 'BackgroundInfo', type: 'string', default: '', description: 'Notes or background information.' },
76
+ { displayName: 'Customer Code', name: 'CustomerCode', type: 'string', default: '', description: 'Internal or CRM customer code.' },
77
+ // فیلدهای مخصوص شرکت
78
+ { displayName: 'Economic Issue', name: 'EconomicIssue', type: 'string', default: '', description: 'Economic issue code (company-specific).' },
79
+ { displayName: 'Registration Number', name: 'RegistrationNumber', type: 'string', default: '', description: 'Company registration number.' },
80
+ { displayName: 'National ID', name: 'NationalID', type: 'string', default: '', description: 'Company national ID.' },
81
+ { displayName: 'Zip Code', name: 'ZipCode', type: 'string', default: '', description: 'Postal/ZIP code.' },
82
+ // VisibilityType مانند قبل
83
+ {
84
+ displayName: 'Visibility Type',
85
+ name: 'VisibilityType',
86
+ type: 'options',
87
+ options: [
88
+ { name: 'Owner', value: 'Owner' },
89
+ { name: 'Owner Group', value: 'OwnerGroup' },
90
+ { name: 'Owner SubGroup', value: 'OwnerSubGroup' },
91
+ { name: 'All', value: 'All' },
92
+ ],
93
+ default: 'Owner',
94
+ description: 'Visibility setting for this company.',
95
+ },
96
+ // Fields (JSON)
97
+ {
98
+ displayName: 'Custom Fields (JSON)',
99
+ name: 'Fields',
100
+ type: 'json',
101
+ default: '',
102
+ placeholder: '{ "Field_996_0_7": "value" }',
103
+ description: 'JSON object of custom fields.',
104
+ },
105
+ // Websites / OtherPhones / OtherEmails / Addresses → Key/Value
106
+ {
107
+ displayName: 'Websites',
108
+ name: 'Websites',
109
+ type: 'fixedCollection',
110
+ typeOptions: { multipleValues: true },
111
+ default: {},
112
+ options: [
113
+ {
114
+ name: 'KeyValues',
115
+ displayName: 'Website',
116
+ values: [
117
+ { displayName: 'Key', name: 'Key', type: 'string', default: '' },
118
+ { displayName: 'Value', name: 'Value', type: 'string', default: '' },
119
+ ],
120
+ },
121
+ ],
122
+ description: 'List of websites as key/value pairs.',
123
+ },
124
+ {
125
+ displayName: 'Other Phones',
126
+ name: 'OtherPhones',
127
+ type: 'fixedCollection',
128
+ typeOptions: { multipleValues: true },
129
+ default: {},
130
+ options: [
131
+ {
132
+ name: 'KeyValues',
133
+ displayName: 'Phone',
134
+ values: [
135
+ { displayName: 'Key', name: 'Key', type: 'string', default: '' },
136
+ { displayName: 'Value', name: 'Value', type: 'string', default: '' },
137
+ ],
138
+ },
139
+ ],
140
+ description: 'Additional phone numbers as key/value pairs.',
141
+ },
142
+ {
143
+ displayName: 'Other Emails',
144
+ name: 'OtherEmails',
145
+ type: 'fixedCollection',
146
+ typeOptions: { multipleValues: true },
147
+ default: {},
148
+ options: [
149
+ {
150
+ name: 'KeyValues',
151
+ displayName: 'Email',
152
+ values: [
153
+ { displayName: 'Key', name: 'Key', type: 'string', default: '' },
154
+ { displayName: 'Value', name: 'Value', type: 'string', default: '' },
155
+ ],
156
+ },
157
+ ],
158
+ description: 'Additional emails as key/value pairs.',
159
+ },
160
+ {
161
+ displayName: 'Addresses',
162
+ name: 'Addresses',
163
+ type: 'fixedCollection',
164
+ typeOptions: { multipleValues: true },
165
+ default: {},
166
+ options: [
167
+ {
168
+ name: 'KeyValues',
169
+ displayName: 'Address',
170
+ values: [
171
+ { displayName: 'Key', name: 'Key', type: 'string', default: '' },
172
+ { displayName: 'Value', name: 'Value', type: 'string', default: '' },
173
+ ],
174
+ },
175
+ ],
176
+ description: 'Addresses as key/value pairs (e.g., HQ/Branch/etc.).',
177
+ },
178
+ // BankAccounts: Values[1..4]
179
+ {
180
+ displayName: 'Bank Accounts',
181
+ name: 'BankAccounts',
182
+ type: 'fixedCollection',
183
+ typeOptions: { multipleValues: true },
184
+ default: {},
185
+ options: [
186
+ {
187
+ name: 'Values',
188
+ displayName: 'Bank Account',
189
+ values: [
190
+ { displayName: 'Value1', name: 'Value1', type: 'string', default: '' },
191
+ { displayName: 'Value2', name: 'Value2', type: 'string', default: '' },
192
+ { displayName: 'Value3', name: 'Value3', type: 'string', default: '' },
193
+ { displayName: 'Value4', name: 'Value4', type: 'string', default: '' },
194
+ ],
195
+ },
196
+ ],
197
+ description: 'Bank account details (four flexible fields per entry).',
198
+ },
199
+ // SegmentIds: string[]
200
+ {
201
+ displayName: 'Segment IDs',
202
+ name: 'SegmentIds',
203
+ type: 'string',
204
+ typeOptions: { multipleValues: true },
205
+ default: [],
206
+ description: 'List of segment IDs (GUIDs).',
207
+ },
208
+ ],
209
+ },
210
+ ];
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function companyGet(this: IExecuteFunctions, i: number, returnData: INodeExecutionData[]): Promise<void>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.companyGet = companyGet;
4
+ const http_1 = require("../../lib/http");
5
+ async function companyGet(i, returnData) {
6
+ const companyId = this.getNodeParameter('companyId', i, '');
7
+ if (!companyId)
8
+ throw new Error('Company Id is required.');
9
+ const resp = await (0, http_1.didarRequest)(this, i, {
10
+ method: 'POST',
11
+ path: '/api/contact/GetContactDetail',
12
+ body: { Id: companyId },
13
+ });
14
+ returnData.push({ json: resp });
15
+ }
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const companyGetProperties: INodeProperties[];
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.companyGetProperties = void 0;
4
+ exports.companyGetProperties = [
5
+ {
6
+ displayName: 'Company Id',
7
+ name: 'companyId',
8
+ type: 'string',
9
+ default: '',
10
+ required: true,
11
+ displayOptions: { show: { resource: ['company'], operation: ['get'] } },
12
+ description: 'Company Id to fetch (required).',
13
+ },
14
+ ];
@@ -0,0 +1,6 @@
1
+ export { companyCreate } from './create.operation';
2
+ export { companyCreateProperties } from './create.properties';
3
+ export { companyUpdate } from './update.operation';
4
+ export { companyUpdateProperties } from './update.properties';
5
+ export { companyGet } from './get.operation';
6
+ export { companyGetProperties } from './get.properties';
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.companyGetProperties = exports.companyGet = exports.companyUpdateProperties = exports.companyUpdate = exports.companyCreateProperties = exports.companyCreate = void 0;
4
+ var create_operation_1 = require("./create.operation");
5
+ Object.defineProperty(exports, "companyCreate", { enumerable: true, get: function () { return create_operation_1.companyCreate; } });
6
+ var create_properties_1 = require("./create.properties");
7
+ Object.defineProperty(exports, "companyCreateProperties", { enumerable: true, get: function () { return create_properties_1.companyCreateProperties; } });
8
+ var update_operation_1 = require("./update.operation");
9
+ Object.defineProperty(exports, "companyUpdate", { enumerable: true, get: function () { return update_operation_1.companyUpdate; } });
10
+ var update_properties_1 = require("./update.properties");
11
+ Object.defineProperty(exports, "companyUpdateProperties", { enumerable: true, get: function () { return update_properties_1.companyUpdateProperties; } });
12
+ var get_operation_1 = require("./get.operation"); // NEW
13
+ Object.defineProperty(exports, "companyGet", { enumerable: true, get: function () { return get_operation_1.companyGet; } });
14
+ var get_properties_1 = require("./get.properties"); // NEW
15
+ Object.defineProperty(exports, "companyGetProperties", { enumerable: true, get: function () { return get_properties_1.companyGetProperties; } });
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function companyUpdate(this: IExecuteFunctions, i: number, returnData: INodeExecutionData[]): Promise<void>;