n8n-nodes-tukimate 1.5.0 → 1.5.2

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.
@@ -64,57 +64,76 @@ async function tukiMateRequest(method, endpoint, body, query) {
64
64
  }
65
65
  // Load options helpers
66
66
  async function getTeamOptions() {
67
- const credentials = await this.getCredentials('tukiMateApi');
68
- const apiKey = credentials.apiKey;
69
- const response = await this.helpers.request({
70
- method: 'GET',
71
- url: `${BASE_URL}/teams`,
72
- headers: {
73
- 'Authorization': `Bearer ${apiKey}`,
74
- },
75
- json: true,
76
- });
77
- const teams = Array.isArray(response) ? response : [];
78
- return teams.map((team) => ({
79
- name: team.name,
80
- value: team.id,
81
- }));
67
+ try {
68
+ const credentials = await this.getCredentials('tukiMateApi');
69
+ const apiKey = credentials.apiKey;
70
+ const response = await this.helpers.request({
71
+ method: 'GET',
72
+ url: `${BASE_URL}/teams`,
73
+ headers: {
74
+ 'Authorization': `Bearer ${apiKey}`,
75
+ },
76
+ json: true,
77
+ });
78
+ // Handle both array response and nested data (API may use 'teams' key)
79
+ const teams = Array.isArray(response) ? response : (response?.teams || response?.data || []);
80
+ return teams.map((team) => ({
81
+ name: team.name,
82
+ value: team.id,
83
+ }));
84
+ }
85
+ catch (error) {
86
+ console.error('Error loading team options:', error);
87
+ return [];
88
+ }
82
89
  }
83
90
  async function getProjectOptions() {
84
- const credentials = await this.getCredentials('tukiMateApi');
85
- const apiKey = credentials.apiKey;
86
- const response = await this.helpers.request({
87
- method: 'GET',
88
- url: `${BASE_URL}/projects`,
89
- headers: {
90
- 'Authorization': `Bearer ${apiKey}`,
91
- },
92
- json: true,
93
- });
94
- // Handle both array response and nested data
95
- const projects = Array.isArray(response) ? response : (response?.data || []);
96
- return projects.map((project) => ({
97
- name: project.name,
98
- value: project.id,
99
- }));
91
+ try {
92
+ const credentials = await this.getCredentials('tukiMateApi');
93
+ const apiKey = credentials.apiKey;
94
+ const response = await this.helpers.request({
95
+ method: 'GET',
96
+ url: `${BASE_URL}/projects`,
97
+ headers: {
98
+ 'Authorization': `Bearer ${apiKey}`,
99
+ },
100
+ json: true,
101
+ });
102
+ // Handle both array response and nested data (API uses 'projects' key)
103
+ const projects = Array.isArray(response) ? response : (response?.projects || response?.data || []);
104
+ return projects.map((project) => ({
105
+ name: project.name,
106
+ value: project.id,
107
+ }));
108
+ }
109
+ catch (error) {
110
+ console.error('Error loading project options:', error);
111
+ return [];
112
+ }
100
113
  }
101
114
  async function getClientOptions() {
102
- const credentials = await this.getCredentials('tukiMateApi');
103
- const apiKey = credentials.apiKey;
104
- const response = await this.helpers.request({
105
- method: 'GET',
106
- url: `${BASE_URL}/clients`,
107
- headers: {
108
- 'Authorization': `Bearer ${apiKey}`,
109
- },
110
- json: true,
111
- });
112
- // Handle both array response and nested data
113
- const clients = Array.isArray(response) ? response : (response?.data || []);
114
- return clients.map((client) => ({
115
- name: client.name,
116
- value: client.id,
117
- }));
115
+ try {
116
+ const credentials = await this.getCredentials('tukiMateApi');
117
+ const apiKey = credentials.apiKey;
118
+ const response = await this.helpers.request({
119
+ method: 'GET',
120
+ url: `${BASE_URL}/clients`,
121
+ headers: {
122
+ 'Authorization': `Bearer ${apiKey}`,
123
+ },
124
+ json: true,
125
+ });
126
+ // Handle both array response and nested data (API uses 'clients' key)
127
+ const clients = Array.isArray(response) ? response : (response?.clients || response?.data || []);
128
+ return clients.map((client) => ({
129
+ name: client.name,
130
+ value: client.id,
131
+ }));
132
+ }
133
+ catch (error) {
134
+ console.error('Error loading client options:', error);
135
+ return [];
136
+ }
118
137
  }
119
138
  async function getSourceOptions() {
120
139
  const credentials = await this.getCredentials('tukiMateApi');
@@ -154,18 +173,25 @@ async function getConversationTypeOptions() {
154
173
  const SIMPLIFIED_FIELDS = {
155
174
  conversation: ['id', 'title', 'description', 'date_time', 'duration_minutes', 'status', 'team_id', 'project_id', 'client_id', 'source_key', 'conversation_type_key', 'ai_context', 'sentiment'],
156
175
  contact: ['id', 'first_name', 'last_name', 'email', 'phone', 'company_name', 'job_title'],
157
- team: ['id', 'name', 'description', 'color'],
176
+ team: ['id', 'name', 'description'],
158
177
  project: ['id', 'name', 'description', 'status', 'client_id', 'ai_context'],
159
178
  client: ['id', 'name', 'code', 'type', 'status', 'industry', 'website'],
160
179
  source: ['id', 'key', 'label', 'active'],
161
- tag: ['id', 'tag', 'color'],
162
- tagDefinition: ['id', 'name', 'color', 'category'],
180
+ tag: ['id', 'tag'],
181
+ tagDefinition: ['id', 'name', 'category'],
182
+ category: ['id', 'key', 'label', 'active'],
183
+ opportunity: ['id', 'title', 'type', 'status', 'confidence', 'estimated_value', 'currency', 'description', 'expected_close_date', 'conversation_id'],
184
+ analysis: ['id', 'conversation_id', 'status', 'type', 'result'],
163
185
  };
164
186
  // Response wrapper keys for list endpoints
165
187
  const RESPONSE_WRAPPERS = {
188
+ conversation: 'conversations',
166
189
  contact: 'contacts',
167
190
  project: 'projects',
168
191
  client: 'clients',
192
+ category: 'categories',
193
+ opportunity: 'opportunities',
194
+ analysis: 'analyses',
169
195
  };
170
196
  // Fields to always exclude
171
197
  const EXCLUDED_FIELDS = ['tenant_id', 'created_at', 'updated_at', 'deleted_at'];
@@ -232,8 +258,7 @@ class TukiMate {
232
258
  { name: 'Client', value: RESOURCES.CLIENT },
233
259
  { name: 'Source', value: RESOURCES.SOURCE },
234
260
  { name: 'Conversation Type', value: RESOURCES.CONVERSATION_TYPE },
235
- { name: 'Tag', value: RESOURCES.TAG },
236
- { name: 'Tag Definition', value: RESOURCES.TAG_DEFINITION },
261
+ { name: 'Tag', value: RESOURCES.TAG_DEFINITION },
237
262
  { name: 'Category', value: RESOURCES.CATEGORY },
238
263
  { name: 'Analysis', value: RESOURCES.ANALYSIS },
239
264
  { name: 'Usage', value: RESOURCES.USAGE },
@@ -276,19 +301,6 @@ class TukiMate {
276
301
  default: '',
277
302
  description: 'Search term to filter conversations',
278
303
  },
279
- {
280
- displayName: 'External Meeting ID',
281
- name: 'externalMeetingId',
282
- type: 'string',
283
- displayOptions: {
284
- show: {
285
- resource: [RESOURCES.CONVERSATION],
286
- operation: [OPERATIONS.LIST],
287
- },
288
- },
289
- default: '',
290
- description: 'Filter by external meeting source ID (e.g., Zoom meeting ID, Google Meet ID)',
291
- },
292
304
  {
293
305
  displayName: 'Team',
294
306
  name: 'teamId',
@@ -350,158 +362,114 @@ class TukiMate {
350
362
  default: 10,
351
363
  description: 'Max number of results',
352
364
  },
365
+ // Conversation List - Additional Options (hidden by default)
353
366
  {
354
- displayName: 'Offset',
355
- name: 'offset',
356
- type: 'number',
367
+ displayName: 'Additional Options',
368
+ name: 'additionalOptions',
369
+ type: 'collection',
370
+ placeholder: 'Add Option',
357
371
  displayOptions: {
358
372
  show: {
359
373
  resource: [RESOURCES.CONVERSATION],
360
374
  operation: [OPERATIONS.LIST],
361
375
  },
362
376
  },
363
- default: 0,
364
- description: 'Number of results to skip',
365
- },
366
- // Conversation List - New Filters
367
- {
368
- displayName: 'Date From',
369
- name: 'dateFrom',
370
- type: 'dateTime',
371
- displayOptions: {
372
- show: {
373
- resource: [RESOURCES.CONVERSATION],
374
- operation: [OPERATIONS.LIST],
377
+ default: {},
378
+ options: [
379
+ {
380
+ displayName: 'External Meeting ID',
381
+ name: 'externalMeetingId',
382
+ type: 'string',
383
+ default: '',
384
+ description: 'Filter by external meeting source ID (e.g., Zoom meeting ID)',
375
385
  },
376
- },
377
- default: '',
378
- description: 'Filter conversations from this date',
379
- },
380
- {
381
- displayName: 'Date To',
382
- name: 'dateTo',
383
- type: 'dateTime',
384
- displayOptions: {
385
- show: {
386
- resource: [RESOURCES.CONVERSATION],
387
- operation: [OPERATIONS.LIST],
386
+ {
387
+ displayName: 'Offset',
388
+ name: 'offset',
389
+ type: 'number',
390
+ default: 0,
391
+ description: 'Number of results to skip',
388
392
  },
389
- },
390
- default: '',
391
- description: 'Filter conversations to this date',
392
- },
393
- {
394
- displayName: 'Participant',
395
- name: 'participant',
396
- type: 'string',
397
- displayOptions: {
398
- show: {
399
- resource: [RESOURCES.CONVERSATION],
400
- operation: [OPERATIONS.LIST],
393
+ {
394
+ displayName: 'Date From',
395
+ name: 'dateFrom',
396
+ type: 'dateTime',
397
+ default: '',
398
+ description: 'Filter conversations from this date',
401
399
  },
402
- },
403
- default: '',
404
- description: 'Filter by participant name',
405
- },
406
- {
407
- displayName: 'Contact ID',
408
- name: 'contactIdFilter',
409
- type: 'string',
410
- displayOptions: {
411
- show: {
412
- resource: [RESOURCES.CONVERSATION],
413
- operation: [OPERATIONS.LIST],
400
+ {
401
+ displayName: 'Date To',
402
+ name: 'dateTo',
403
+ type: 'dateTime',
404
+ default: '',
405
+ description: 'Filter conversations to this date',
414
406
  },
415
- },
416
- default: '',
417
- description: 'Filter by contact ID',
418
- },
419
- {
420
- displayName: 'Category',
421
- name: 'category',
422
- type: 'string',
423
- displayOptions: {
424
- show: {
425
- resource: [RESOURCES.CONVERSATION],
426
- operation: [OPERATIONS.LIST],
407
+ {
408
+ displayName: 'Participant',
409
+ name: 'participant',
410
+ type: 'string',
411
+ default: '',
412
+ description: 'Filter by participant name',
427
413
  },
428
- },
429
- default: '',
430
- description: 'Filter by category ID',
431
- },
432
- {
433
- displayName: 'Type',
434
- name: 'conversationTypeFilter',
435
- type: 'string',
436
- displayOptions: {
437
- show: {
438
- resource: [RESOURCES.CONVERSATION],
439
- operation: [OPERATIONS.LIST],
414
+ {
415
+ displayName: 'Contact ID',
416
+ name: 'contactIdFilter',
417
+ type: 'string',
418
+ default: '',
419
+ description: 'Filter by contact ID',
440
420
  },
441
- },
442
- default: '',
443
- description: 'Filter by conversation type key',
444
- },
445
- {
446
- displayName: 'Has Analyses',
447
- name: 'hasAnalyses',
448
- type: 'boolean',
449
- displayOptions: {
450
- show: {
451
- resource: [RESOURCES.CONVERSATION],
452
- operation: [OPERATIONS.LIST],
421
+ {
422
+ displayName: 'Category',
423
+ name: 'category',
424
+ type: 'string',
425
+ default: '',
426
+ description: 'Filter by category ID',
453
427
  },
454
- },
455
- default: false,
456
- description: 'Filter by whether conversation has analyses',
457
- },
458
- {
459
- displayName: 'Source Key',
460
- name: 'sourceKeyFilter',
461
- type: 'string',
462
- displayOptions: {
463
- show: {
464
- resource: [RESOURCES.CONVERSATION],
465
- operation: [OPERATIONS.LIST],
428
+ {
429
+ displayName: 'Type',
430
+ name: 'conversationTypeFilter',
431
+ type: 'string',
432
+ default: '',
433
+ description: 'Filter by conversation type key',
466
434
  },
467
- },
468
- default: '',
469
- description: 'Filter by source key',
470
- },
471
- {
472
- displayName: 'Order By',
473
- name: 'orderBy',
474
- type: 'options',
475
- displayOptions: {
476
- show: {
477
- resource: [RESOURCES.CONVERSATION],
478
- operation: [OPERATIONS.LIST],
435
+ {
436
+ displayName: 'Has Analyses',
437
+ name: 'hasAnalyses',
438
+ type: 'boolean',
439
+ default: false,
440
+ description: 'Filter by whether conversation has analyses',
479
441
  },
480
- },
481
- options: [
482
- { name: 'Date Time', value: 'date_time' },
483
- { name: 'Title', value: 'title' },
484
- { name: 'Created At', value: 'created_at' },
485
- ],
486
- default: 'date_time',
487
- description: 'Field to order results by',
488
- },
489
- {
490
- displayName: 'Order',
491
- name: 'order',
492
- type: 'options',
493
- displayOptions: {
494
- show: {
495
- resource: [RESOURCES.CONVERSATION],
496
- operation: [OPERATIONS.LIST],
442
+ {
443
+ displayName: 'Source Key',
444
+ name: 'sourceKeyFilter',
445
+ type: 'string',
446
+ default: '',
447
+ description: 'Filter by source key',
448
+ },
449
+ {
450
+ displayName: 'Order By',
451
+ name: 'orderBy',
452
+ type: 'options',
453
+ options: [
454
+ { name: 'Date Time', value: 'date_time' },
455
+ { name: 'Title', value: 'title' },
456
+ { name: 'Created At', value: 'created_at' },
457
+ ],
458
+ default: 'date_time',
459
+ description: 'Field to order results by',
460
+ },
461
+ {
462
+ displayName: 'Order',
463
+ name: 'order',
464
+ type: 'options',
465
+ options: [
466
+ { name: 'Descending', value: 'desc' },
467
+ { name: 'Ascending', value: 'asc' },
468
+ ],
469
+ default: 'desc',
470
+ description: 'Sort order',
497
471
  },
498
- },
499
- options: [
500
- { name: 'Descending', value: 'desc' },
501
- { name: 'Ascending', value: 'asc' },
502
472
  ],
503
- default: 'desc',
504
- description: 'Sort order',
505
473
  },
506
474
  // Conversation: Get by ID
507
475
  {
@@ -806,83 +774,63 @@ class TukiMate {
806
774
  default: '',
807
775
  description: 'Email address',
808
776
  },
777
+ // Contact CREATE/UPDATE - Additional Options
809
778
  {
810
- displayName: 'Phone',
811
- name: 'phone',
812
- type: 'string',
779
+ displayName: 'Additional Options',
780
+ name: 'contactAdditionalOptions',
781
+ type: 'collection',
782
+ placeholder: 'Add Option',
813
783
  displayOptions: {
814
784
  show: {
815
785
  resource: [RESOURCES.CONTACT],
816
786
  operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
817
787
  },
818
788
  },
819
- default: '',
820
- description: 'Phone number',
821
- },
822
- {
823
- displayName: 'Company',
824
- name: 'company',
825
- type: 'string',
826
- displayOptions: {
827
- show: {
828
- resource: [RESOURCES.CONTACT],
829
- operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
789
+ default: {},
790
+ options: [
791
+ {
792
+ displayName: 'Phone',
793
+ name: 'phone',
794
+ type: 'string',
795
+ default: '',
796
+ description: 'Phone number',
830
797
  },
831
- },
832
- default: '',
833
- description: 'Company name',
834
- },
835
- {
836
- displayName: 'Job Title',
837
- name: 'jobTitle',
838
- type: 'string',
839
- displayOptions: {
840
- show: {
841
- resource: [RESOURCES.CONTACT],
842
- operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
798
+ {
799
+ displayName: 'Company',
800
+ name: 'company',
801
+ type: 'string',
802
+ default: '',
803
+ description: 'Company name',
843
804
  },
844
- },
845
- default: '',
846
- description: 'Job title',
847
- },
848
- {
849
- displayName: 'Identifier',
850
- name: 'identifier',
851
- type: 'string',
852
- displayOptions: {
853
- show: {
854
- resource: [RESOURCES.CONTACT],
855
- operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
805
+ {
806
+ displayName: 'Job Title',
807
+ name: 'jobTitle',
808
+ type: 'string',
809
+ default: '',
810
+ description: 'Job title',
856
811
  },
857
- },
858
- default: '',
859
- description: 'Unique identifier for the contact',
860
- },
861
- {
862
- displayName: 'Department',
863
- name: 'department',
864
- type: 'string',
865
- displayOptions: {
866
- show: {
867
- resource: [RESOURCES.CONTACT],
868
- operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
812
+ {
813
+ displayName: 'Identifier',
814
+ name: 'identifier',
815
+ type: 'string',
816
+ default: '',
817
+ description: 'Unique identifier for the contact',
869
818
  },
870
- },
871
- default: '',
872
- description: 'Department name',
873
- },
874
- {
875
- displayName: 'Tags',
876
- name: 'contactTags',
877
- type: 'string',
878
- displayOptions: {
879
- show: {
880
- resource: [RESOURCES.CONTACT],
881
- operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
819
+ {
820
+ displayName: 'Department',
821
+ name: 'department',
822
+ type: 'string',
823
+ default: '',
824
+ description: 'Department name',
882
825
  },
883
- },
884
- default: '',
885
- description: 'Comma-separated tags',
826
+ {
827
+ displayName: 'Tags',
828
+ name: 'contactTags',
829
+ type: 'string',
830
+ default: '',
831
+ description: 'Comma-separated tags',
832
+ },
833
+ ],
886
834
  },
887
835
  // Contact List Filters
888
836
  {
@@ -898,45 +846,6 @@ class TukiMate {
898
846
  default: '',
899
847
  description: 'Search in name and email',
900
848
  },
901
- {
902
- displayName: 'Company',
903
- name: 'companyFilter',
904
- type: 'string',
905
- displayOptions: {
906
- show: {
907
- resource: [RESOURCES.CONTACT],
908
- operation: [OPERATIONS.LIST],
909
- },
910
- },
911
- default: '',
912
- description: 'Filter by company name',
913
- },
914
- {
915
- displayName: 'Is Active',
916
- name: 'isActive',
917
- type: 'boolean',
918
- displayOptions: {
919
- show: {
920
- resource: [RESOURCES.CONTACT],
921
- operation: [OPERATIONS.LIST],
922
- },
923
- },
924
- default: true,
925
- description: 'Filter by active status',
926
- },
927
- {
928
- displayName: 'Tags',
929
- name: 'tagsFilter',
930
- type: 'string',
931
- displayOptions: {
932
- show: {
933
- resource: [RESOURCES.CONTACT],
934
- operation: [OPERATIONS.LIST],
935
- },
936
- },
937
- default: '',
938
- description: 'Filter by comma-separated tags',
939
- },
940
849
  {
941
850
  displayName: 'Limit',
942
851
  name: 'contactLimit',
@@ -950,18 +859,49 @@ class TukiMate {
950
859
  default: 100,
951
860
  description: 'Max number of results',
952
861
  },
862
+ // Contact LIST - Additional Options
953
863
  {
954
- displayName: 'Offset',
955
- name: 'contactOffset',
956
- type: 'number',
864
+ displayName: 'Additional Options',
865
+ name: 'contactListAdditionalOptions',
866
+ type: 'collection',
867
+ placeholder: 'Add Option',
957
868
  displayOptions: {
958
869
  show: {
959
870
  resource: [RESOURCES.CONTACT],
960
871
  operation: [OPERATIONS.LIST],
961
872
  },
962
873
  },
963
- default: 0,
964
- description: 'Number of results to skip',
874
+ default: {},
875
+ options: [
876
+ {
877
+ displayName: 'Company',
878
+ name: 'companyFilter',
879
+ type: 'string',
880
+ default: '',
881
+ description: 'Filter by company name',
882
+ },
883
+ {
884
+ displayName: 'Is Active',
885
+ name: 'isActive',
886
+ type: 'boolean',
887
+ default: true,
888
+ description: 'Filter by active status',
889
+ },
890
+ {
891
+ displayName: 'Tags',
892
+ name: 'tagsFilter',
893
+ type: 'string',
894
+ default: '',
895
+ description: 'Filter by comma-separated tags',
896
+ },
897
+ {
898
+ displayName: 'Offset',
899
+ name: 'contactOffset',
900
+ type: 'number',
901
+ default: 0,
902
+ description: 'Number of results to skip',
903
+ },
904
+ ],
965
905
  },
966
906
  // ==================== TEAM ====================
967
907
  {
@@ -1010,31 +950,35 @@ class TukiMate {
1010
950
  default: '',
1011
951
  description: 'Name of the team',
1012
952
  },
953
+ // Team CREATE/UPDATE - Additional Options
1013
954
  {
1014
- displayName: 'Description',
1015
- name: 'description',
1016
- type: 'string',
955
+ displayName: 'Additional Options',
956
+ name: 'teamAdditionalOptions',
957
+ type: 'collection',
958
+ placeholder: 'Add Option',
1017
959
  displayOptions: {
1018
960
  show: {
1019
961
  resource: [RESOURCES.TEAM],
1020
962
  operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
1021
963
  },
1022
964
  },
1023
- default: '',
1024
- description: 'Description of the team',
1025
- },
1026
- {
1027
- displayName: 'Color',
1028
- name: 'color',
1029
- type: 'string',
1030
- displayOptions: {
1031
- show: {
1032
- resource: [RESOURCES.TEAM],
1033
- operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
965
+ default: {},
966
+ options: [
967
+ {
968
+ displayName: 'Description',
969
+ name: 'description',
970
+ type: 'string',
971
+ default: '',
972
+ description: 'Description of the team',
1034
973
  },
1035
- },
1036
- default: '#3b82f6',
1037
- description: 'Color hex code (e.g., #3b82f6)',
974
+ {
975
+ displayName: 'Color',
976
+ name: 'color',
977
+ type: 'string',
978
+ default: '#3b82f6',
979
+ description: 'Color hex code (e.g., #3b82f6)',
980
+ },
981
+ ],
1038
982
  },
1039
983
  // ==================== PROJECT ====================
1040
984
  {
@@ -2011,55 +1955,46 @@ class TukiMate {
2011
1955
  if (resource === RESOURCES.CONVERSATION) {
2012
1956
  if (operation === OPERATIONS.LIST) {
2013
1957
  const search = this.getNodeParameter('search', i, '');
2014
- const externalMeetingId = this.getNodeParameter('externalMeetingId', i, '');
2015
1958
  const teamId = this.getNodeParameter('teamId', i, '');
2016
1959
  const projectId = this.getNodeParameter('projectId', i, '');
2017
1960
  const clientId = this.getNodeParameter('clientId', i, '');
2018
1961
  const limit = this.getNodeParameter('limit', i, 10);
2019
- const offset = this.getNodeParameter('offset', i, 0);
2020
- // NEW FILTERS
2021
- const dateFrom = this.getNodeParameter('dateFrom', i, '');
2022
- const dateTo = this.getNodeParameter('dateTo', i, '');
2023
- const participant = this.getNodeParameter('participant', i, '');
2024
- const contactIdFilter = this.getNodeParameter('contactIdFilter', i, '');
2025
- const category = this.getNodeParameter('category', i, '');
2026
- const conversationTypeFilter = this.getNodeParameter('conversationTypeFilter', i, '');
2027
- const hasAnalyses = this.getNodeParameter('hasAnalyses', i, false);
2028
- const sourceKeyFilter = this.getNodeParameter('sourceKeyFilter', i, '');
2029
- const orderBy = this.getNodeParameter('orderBy', i, 'date_time');
2030
- const order = this.getNodeParameter('order', i, 'desc');
2031
- const query = { limit, offset };
1962
+ // Additional options
1963
+ const additionalOptions = this.getNodeParameter('additionalOptions', i, {});
1964
+ const query = { limit };
2032
1965
  if (search)
2033
1966
  query.q = search;
2034
- if (externalMeetingId)
2035
- query.sourceMeetingId = externalMeetingId;
2036
1967
  if (teamId)
2037
1968
  query.team = teamId;
2038
1969
  if (projectId)
2039
1970
  query.project = projectId;
2040
1971
  if (clientId)
2041
1972
  query.client = clientId;
2042
- // NEW FILTERS
2043
- if (dateFrom)
2044
- query.dateFrom = dateFrom;
2045
- if (dateTo)
2046
- query.dateTo = dateTo;
2047
- if (participant)
2048
- query.participant = participant;
2049
- if (contactIdFilter)
2050
- query.contactId = contactIdFilter;
2051
- if (category)
2052
- query.category = category;
2053
- if (conversationTypeFilter)
2054
- query.type = conversationTypeFilter;
2055
- if (hasAnalyses)
2056
- query.hasAnalyses = hasAnalyses;
2057
- if (sourceKeyFilter)
2058
- query.sourceKey = sourceKeyFilter;
2059
- if (orderBy)
2060
- query.orderBy = orderBy;
2061
- if (order)
2062
- query.order = order;
1973
+ // Additional options
1974
+ if (additionalOptions.externalMeetingId)
1975
+ query.source_meeting_id = additionalOptions.externalMeetingId;
1976
+ if (additionalOptions.offset !== undefined)
1977
+ query.offset = additionalOptions.offset;
1978
+ if (additionalOptions.dateFrom)
1979
+ query.dateFrom = additionalOptions.dateFrom;
1980
+ if (additionalOptions.dateTo)
1981
+ query.dateTo = additionalOptions.dateTo;
1982
+ if (additionalOptions.participant)
1983
+ query.participant = additionalOptions.participant;
1984
+ if (additionalOptions.contactIdFilter)
1985
+ query.contactId = additionalOptions.contactIdFilter;
1986
+ if (additionalOptions.category)
1987
+ query.category = additionalOptions.category;
1988
+ if (additionalOptions.conversationTypeFilter)
1989
+ query.conversation_type_key = additionalOptions.conversationTypeFilter;
1990
+ if (additionalOptions.hasAnalyses)
1991
+ query.hasAnalyses = additionalOptions.hasAnalyses;
1992
+ if (additionalOptions.sourceKeyFilter)
1993
+ query.source_key = additionalOptions.sourceKeyFilter;
1994
+ if (additionalOptions.orderBy)
1995
+ query.orderBy = additionalOptions.orderBy;
1996
+ if (additionalOptions.order)
1997
+ query.order = additionalOptions.order;
2063
1998
  responseData = await tukiMateRequest.call(this, 'GET', '/conversations', undefined, query);
2064
1999
  }
2065
2000
  else if (operation === OPERATIONS.GET) {
@@ -2084,14 +2019,14 @@ class TukiMate {
2084
2019
  const overview = this.getNodeParameter('overview', i, '');
2085
2020
  const body = {
2086
2021
  title,
2087
- dateTime,
2088
- durationMinutes,
2022
+ date_time: dateTime,
2023
+ duration_minutes: durationMinutes,
2089
2024
  transcript,
2090
- sourceKey: sourceKey || 'api',
2091
- conversationTypeKey,
2025
+ source_key: sourceKey || 'api',
2026
+ conversation_type_key: conversationTypeKey,
2092
2027
  };
2093
2028
  if (sourceConversationId)
2094
- body.sourceConversationId = sourceConversationId;
2029
+ body.source_meeting_id = sourceConversationId;
2095
2030
  if (teamId)
2096
2031
  body.team_id = teamId;
2097
2032
  if (projectId)
@@ -2131,15 +2066,15 @@ class TukiMate {
2131
2066
  if (title)
2132
2067
  body.title = title;
2133
2068
  if (durationMinutes !== undefined)
2134
- body.durationMinutes = durationMinutes;
2069
+ body.duration_minutes = durationMinutes;
2135
2070
  if (transcript)
2136
2071
  body.transcript = transcript;
2137
2072
  if (sourceConversationId)
2138
- body.sourceConversationId = sourceConversationId;
2073
+ body.source_meeting_id = sourceConversationId;
2139
2074
  if (sourceKey)
2140
- body.sourceKey = sourceKey;
2075
+ body.source_key = sourceKey;
2141
2076
  if (conversationTypeKey)
2142
- body.conversationTypeKey = conversationTypeKey;
2077
+ body.conversation_type_key = conversationTypeKey;
2143
2078
  if (teamId)
2144
2079
  body.team_id = teamId;
2145
2080
  if (projectId)
@@ -2177,20 +2112,20 @@ class TukiMate {
2177
2112
  else if (resource === RESOURCES.CONTACT) {
2178
2113
  if (operation === OPERATIONS.LIST) {
2179
2114
  const contactSearch = this.getNodeParameter('contactSearch', i, '');
2180
- const companyFilter = this.getNodeParameter('companyFilter', i, '');
2181
- const isActive = this.getNodeParameter('isActive', i, true);
2182
- const tagsFilter = this.getNodeParameter('tagsFilter', i, '');
2183
2115
  const contactLimit = this.getNodeParameter('contactLimit', i, 100);
2184
- const contactOffset = this.getNodeParameter('contactOffset', i, 0);
2185
- const query = { limit: contactLimit, offset: contactOffset };
2116
+ // Additional options
2117
+ const additionalOptions = this.getNodeParameter('contactListAdditionalOptions', i, {});
2118
+ const query = { limit: contactLimit };
2186
2119
  if (contactSearch)
2187
2120
  query.search = contactSearch;
2188
- if (companyFilter)
2189
- query.company = companyFilter;
2190
- if (isActive !== undefined)
2191
- query.is_active = isActive;
2192
- if (tagsFilter)
2193
- query.tags = tagsFilter;
2121
+ if (additionalOptions.companyFilter)
2122
+ query.company = additionalOptions.companyFilter;
2123
+ if (additionalOptions.isActive !== undefined)
2124
+ query.is_active = additionalOptions.isActive;
2125
+ if (additionalOptions.tagsFilter)
2126
+ query.tags = additionalOptions.tagsFilter;
2127
+ if (additionalOptions.contactOffset !== undefined)
2128
+ query.offset = additionalOptions.contactOffset;
2194
2129
  responseData = await tukiMateRequest.call(this, 'GET', '/contacts', undefined, query);
2195
2130
  }
2196
2131
  else if (operation === OPERATIONS.GET) {
@@ -2201,27 +2136,23 @@ class TukiMate {
2201
2136
  const firstName = this.getNodeParameter('firstName', i);
2202
2137
  const lastName = this.getNodeParameter('lastName', i);
2203
2138
  const email = this.getNodeParameter('email', i, '');
2204
- const phone = this.getNodeParameter('phone', i, '');
2205
- const company = this.getNodeParameter('company', i, '');
2206
- const jobTitle = this.getNodeParameter('jobTitle', i, '');
2207
- const identifier = this.getNodeParameter('identifier', i, '');
2208
- const department = this.getNodeParameter('department', i, '');
2209
- const contactTags = this.getNodeParameter('contactTags', i, '');
2210
- const body = { firstName, lastName };
2139
+ // Additional options
2140
+ const additionalOptions = this.getNodeParameter('contactAdditionalOptions', i, {});
2141
+ const body = { first_name: firstName, last_name: lastName };
2211
2142
  if (email)
2212
2143
  body.email = email;
2213
- if (phone)
2214
- body.phone = phone;
2215
- if (company)
2216
- body.companyName = company;
2217
- if (jobTitle)
2218
- body.job_title = jobTitle;
2219
- if (identifier)
2220
- body.identifier = identifier;
2221
- if (department)
2222
- body.department = department;
2223
- if (contactTags)
2224
- body.tags = contactTags.split(',').map(t => t.trim());
2144
+ if (additionalOptions.phone)
2145
+ body.phone = additionalOptions.phone;
2146
+ if (additionalOptions.company)
2147
+ body.company_name = additionalOptions.company;
2148
+ if (additionalOptions.jobTitle)
2149
+ body.job_title = additionalOptions.jobTitle;
2150
+ if (additionalOptions.identifier)
2151
+ body.identifier = additionalOptions.identifier;
2152
+ if (additionalOptions.department)
2153
+ body.department = additionalOptions.department;
2154
+ if (additionalOptions.contactTags)
2155
+ body.tags = additionalOptions.contactTags.split(',').map((t) => t.trim());
2225
2156
  responseData = await tukiMateRequest.call(this, 'POST', '/contacts', body);
2226
2157
  }
2227
2158
  else if (operation === OPERATIONS.UPDATE) {
@@ -2229,31 +2160,27 @@ class TukiMate {
2229
2160
  const firstName = this.getNodeParameter('firstName', i, '');
2230
2161
  const lastName = this.getNodeParameter('lastName', i, '');
2231
2162
  const email = this.getNodeParameter('email', i, '');
2232
- const phone = this.getNodeParameter('phone', i, '');
2233
- const company = this.getNodeParameter('company', i, '');
2234
- const jobTitle = this.getNodeParameter('jobTitle', i, '');
2235
- const identifier = this.getNodeParameter('identifier', i, '');
2236
- const department = this.getNodeParameter('department', i, '');
2237
- const contactTags = this.getNodeParameter('contactTags', i, '');
2163
+ // Additional options
2164
+ const additionalOptions = this.getNodeParameter('contactAdditionalOptions', i, {});
2238
2165
  const body = {};
2239
2166
  if (firstName)
2240
- body.firstName = firstName;
2167
+ body.first_name = firstName;
2241
2168
  if (lastName)
2242
- body.lastName = lastName;
2169
+ body.last_name = lastName;
2243
2170
  if (email)
2244
2171
  body.email = email;
2245
- if (phone)
2246
- body.phone = phone;
2247
- if (company)
2248
- body.companyName = company;
2249
- if (jobTitle)
2250
- body.job_title = jobTitle;
2251
- if (identifier)
2252
- body.identifier = identifier;
2253
- if (department)
2254
- body.department = department;
2255
- if (contactTags)
2256
- body.tags = contactTags.split(',').map(t => t.trim());
2172
+ if (additionalOptions.phone)
2173
+ body.phone = additionalOptions.phone;
2174
+ if (additionalOptions.company)
2175
+ body.company_name = additionalOptions.company;
2176
+ if (additionalOptions.jobTitle)
2177
+ body.job_title = additionalOptions.jobTitle;
2178
+ if (additionalOptions.identifier)
2179
+ body.identifier = additionalOptions.identifier;
2180
+ if (additionalOptions.department)
2181
+ body.department = additionalOptions.department;
2182
+ if (additionalOptions.contactTags)
2183
+ body.tags = additionalOptions.contactTags.split(',').map((t) => t.trim());
2257
2184
  responseData = await tukiMateRequest.call(this, 'PATCH', `/contacts/${contactId}`, body);
2258
2185
  }
2259
2186
  else if (operation === OPERATIONS.DELETE) {
@@ -2272,27 +2199,27 @@ class TukiMate {
2272
2199
  }
2273
2200
  else if (operation === OPERATIONS.CREATE) {
2274
2201
  const name = this.getNodeParameter('name', i);
2275
- const description = this.getNodeParameter('description', i, '');
2276
- const color = this.getNodeParameter('color', i, '#3b82f6');
2202
+ // Additional options
2203
+ const additionalOptions = this.getNodeParameter('teamAdditionalOptions', i, {});
2277
2204
  const body = { name };
2278
- if (description)
2279
- body.description = description;
2280
- if (color)
2281
- body.color = color;
2205
+ if (additionalOptions.description)
2206
+ body.description = additionalOptions.description;
2207
+ if (additionalOptions.color)
2208
+ body.color = additionalOptions.color;
2282
2209
  responseData = await tukiMateRequest.call(this, 'POST', '/teams', body);
2283
2210
  }
2284
2211
  else if (operation === OPERATIONS.UPDATE) {
2285
2212
  const teamId = this.getNodeParameter('teamId', i);
2286
2213
  const name = this.getNodeParameter('name', i, '');
2287
- const description = this.getNodeParameter('description', i, '');
2288
- const color = this.getNodeParameter('color', i, '');
2214
+ // Additional options
2215
+ const additionalOptions = this.getNodeParameter('teamAdditionalOptions', i, {});
2289
2216
  const body = {};
2290
2217
  if (name)
2291
2218
  body.name = name;
2292
- if (description)
2293
- body.description = description;
2294
- if (color)
2295
- body.color = color;
2219
+ if (additionalOptions.description)
2220
+ body.description = additionalOptions.description;
2221
+ if (additionalOptions.color)
2222
+ body.color = additionalOptions.color;
2296
2223
  responseData = await tukiMateRequest.call(this, 'PATCH', `/teams/${teamId}`, body);
2297
2224
  }
2298
2225
  else if (operation === OPERATIONS.DELETE) {
@@ -1,4 +1,4 @@
1
- <svg width="60" height="60" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ <svg width="100" height="100" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M0 6.24C0 2.79374 2.78578 0 6.22222 0H17.7094C21.1458 0 23.9316 2.79374 23.9316 6.24V17.76C23.9316 21.2063 21.1458 24 17.7094 24H6.22222C2.78578 24 0 21.2063 0 17.76V6.24Z" fill="#FFB500"/>
3
3
  <path d="M17.7092 22.8V24H6.22245V22.8H17.7092ZM22.735 17.7598V6.24023C22.735 3.45672 20.4847 1.2 17.7092 1.2H6.22245C3.44687 1.2 1.19658 3.45672 1.19658 6.24023V17.7598C1.19658 20.5433 3.44687 22.8 6.22245 22.8V24L5.90227 23.9918C2.61453 23.8248 0 21.0984 0 17.7598V6.24023C0 2.90159 2.61453 0.175207 5.90227 0.00820313L6.22245 0H17.7092C21.1456 0 23.9316 2.79398 23.9316 6.24023V17.7598L23.9234 18.0809C23.7569 21.378 21.0383 24 17.7092 24V22.8C20.4847 22.8 22.735 20.5433 22.735 17.7598Z" fill="#1C1C1C"/>
4
4
  <path fill-rule="evenodd" clip-rule="evenodd" d="M12.9231 4.16267C12.9008 7.6141 10.1053 10.4188 6.66683 10.44H6.66238C6.61789 10.44 6.58118 10.4087 6.58118 10.3641V7.29353C6.58118 7.24885 6.61232 7.22204 6.65682 7.22204C8.33546 7.20082 9.69483 5.83589 9.71151 4.15597C9.71151 4.11911 9.74266 4.08002 9.78716 4.08002H12.8418C12.8841 4.08002 12.9231 4.11799 12.9231 4.16156V4.16267Z" fill="#1C1C1C"/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-tukimate",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "n8n community node for TukiMate API",
5
5
  "keywords": [
6
6
  "n8n",