n8n-nodes-tukimate 1.6.6 → 1.7.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.
|
@@ -24,6 +24,7 @@ const RESOURCES = {
|
|
|
24
24
|
TAG_DEFINITION: 'tagDefinition',
|
|
25
25
|
CATEGORY: 'category',
|
|
26
26
|
ANALYSIS: 'analysis',
|
|
27
|
+
ANALYSIS_JOB: 'analysisJob',
|
|
27
28
|
OPPORTUNITY: 'opportunity',
|
|
28
29
|
USAGE: 'usage',
|
|
29
30
|
};
|
|
@@ -35,6 +36,8 @@ const OPERATIONS = {
|
|
|
35
36
|
UPDATE: 'update',
|
|
36
37
|
DELETE: 'delete',
|
|
37
38
|
ANALYZE: 'analyze',
|
|
39
|
+
BULK_ANALYZE: 'bulkAnalyze',
|
|
40
|
+
BULK_DELETE: 'bulkDelete',
|
|
38
41
|
};
|
|
39
42
|
// Helper to make API requests
|
|
40
43
|
async function tukiMateRequest(method, endpoint, body, query) {
|
|
@@ -190,6 +193,7 @@ const SIMPLIFIED_FIELDS = {
|
|
|
190
193
|
category: ['id', 'key', 'label', 'active'],
|
|
191
194
|
opportunity: ['id', 'title', 'type', 'status', 'confidence', 'estimated_value', 'currency', 'description', 'expected_close_date', 'conversation_id'],
|
|
192
195
|
analysis: ['id', 'conversation_id', 'status', 'type', 'result'],
|
|
196
|
+
analysisJob: ['id', 'type', 'status', 'conversation_ids', 'created_at', 'completed_at'],
|
|
193
197
|
};
|
|
194
198
|
// Response wrapper keys for list endpoints
|
|
195
199
|
const RESPONSE_WRAPPERS = {
|
|
@@ -200,6 +204,7 @@ const RESPONSE_WRAPPERS = {
|
|
|
200
204
|
category: 'categories',
|
|
201
205
|
opportunity: 'opportunities',
|
|
202
206
|
analysis: 'analyses',
|
|
207
|
+
analysisJob: 'data',
|
|
203
208
|
};
|
|
204
209
|
// Fields to always exclude
|
|
205
210
|
const EXCLUDED_FIELDS = ['tenant_id', 'created_at', 'updated_at', 'deleted_at'];
|
|
@@ -269,6 +274,7 @@ class TukiMate {
|
|
|
269
274
|
{ name: 'Tag', value: RESOURCES.TAG_DEFINITION },
|
|
270
275
|
{ name: 'Category', value: RESOURCES.CATEGORY },
|
|
271
276
|
{ name: 'Analysis', value: RESOURCES.ANALYSIS },
|
|
277
|
+
{ name: 'Analysis Job', value: RESOURCES.ANALYSIS_JOB },
|
|
272
278
|
{ name: 'Usage', value: RESOURCES.USAGE },
|
|
273
279
|
{ name: 'Opportunity', value: RESOURCES.OPPORTUNITY },
|
|
274
280
|
],
|
|
@@ -292,6 +298,8 @@ class TukiMate {
|
|
|
292
298
|
{ name: 'Create', value: OPERATIONS.CREATE, description: 'Create a new conversation', action: 'Create a conversation' },
|
|
293
299
|
{ name: 'Update', value: OPERATIONS.UPDATE, description: 'Update a conversation', action: 'Update a conversation' },
|
|
294
300
|
{ name: 'Analyze', value: OPERATIONS.ANALYZE, description: 'Trigger AI analysis on a conversation', action: 'Analyze a conversation' },
|
|
301
|
+
{ name: 'Bulk Analyze', value: OPERATIONS.BULK_ANALYZE, description: 'Trigger AI analysis on multiple conversations', action: 'Bulk analyze conversations' },
|
|
302
|
+
{ name: 'Bulk Delete', value: OPERATIONS.BULK_DELETE, description: 'Delete multiple conversations', action: 'Bulk delete conversations' },
|
|
295
303
|
],
|
|
296
304
|
default: OPERATIONS.LIST,
|
|
297
305
|
},
|
|
@@ -833,6 +841,11 @@ class TukiMate {
|
|
|
833
841
|
{ displayName: 'Name', name: 'name', type: 'string', default: '' },
|
|
834
842
|
{ displayName: 'Email', name: 'email', type: 'string', default: '' },
|
|
835
843
|
{ displayName: 'Contact ID', name: 'contact_id', type: 'string', default: '' },
|
|
844
|
+
{ displayName: 'Identifier', name: 'identifier', type: 'string', default: '' },
|
|
845
|
+
{ displayName: 'Phone', name: 'phone', type: 'string', default: '' },
|
|
846
|
+
{ displayName: 'Job Title', name: 'job_title', type: 'string', default: '' },
|
|
847
|
+
{ displayName: 'Department', name: 'department', type: 'string', default: '' },
|
|
848
|
+
{ displayName: 'Company Name', name: 'company_name', type: 'string', default: '' },
|
|
836
849
|
],
|
|
837
850
|
},
|
|
838
851
|
],
|
|
@@ -967,6 +980,20 @@ class TukiMate {
|
|
|
967
980
|
default: '',
|
|
968
981
|
description: 'Comma-separated tags',
|
|
969
982
|
},
|
|
983
|
+
{
|
|
984
|
+
displayName: 'Work Phone',
|
|
985
|
+
name: 'workPhone',
|
|
986
|
+
type: 'string',
|
|
987
|
+
default: '',
|
|
988
|
+
description: 'Work phone number',
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
displayName: 'Work Phone Extension',
|
|
992
|
+
name: 'workPhoneExtension',
|
|
993
|
+
type: 'string',
|
|
994
|
+
default: '',
|
|
995
|
+
description: 'Work phone extension',
|
|
996
|
+
},
|
|
970
997
|
],
|
|
971
998
|
},
|
|
972
999
|
// Contact List Filters
|
|
@@ -981,7 +1008,7 @@ class TukiMate {
|
|
|
981
1008
|
},
|
|
982
1009
|
},
|
|
983
1010
|
default: '',
|
|
984
|
-
description: 'Search
|
|
1011
|
+
description: 'Search across name, email, identifier, company name, phone, job title',
|
|
985
1012
|
},
|
|
986
1013
|
{
|
|
987
1014
|
displayName: 'Limit',
|
|
@@ -1185,6 +1212,16 @@ class TukiMate {
|
|
|
1185
1212
|
default: '#3b82f6',
|
|
1186
1213
|
description: 'Color hex code (e.g., #3b82f6)',
|
|
1187
1214
|
},
|
|
1215
|
+
{
|
|
1216
|
+
displayName: 'AI Context',
|
|
1217
|
+
name: 'teamContext',
|
|
1218
|
+
type: 'string',
|
|
1219
|
+
default: '',
|
|
1220
|
+
description: 'Context for AI analysis',
|
|
1221
|
+
typeOptions: {
|
|
1222
|
+
rows: 4,
|
|
1223
|
+
},
|
|
1224
|
+
},
|
|
1188
1225
|
],
|
|
1189
1226
|
},
|
|
1190
1227
|
// ==================== PROJECT ====================
|
|
@@ -1319,6 +1356,35 @@ class TukiMate {
|
|
|
1319
1356
|
default: 'active',
|
|
1320
1357
|
description: 'Status of the project',
|
|
1321
1358
|
},
|
|
1359
|
+
{
|
|
1360
|
+
displayName: 'AI Context',
|
|
1361
|
+
name: 'projectContext',
|
|
1362
|
+
type: 'string',
|
|
1363
|
+
displayOptions: {
|
|
1364
|
+
show: {
|
|
1365
|
+
resource: [RESOURCES.PROJECT],
|
|
1366
|
+
operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
|
|
1367
|
+
},
|
|
1368
|
+
},
|
|
1369
|
+
default: '',
|
|
1370
|
+
description: 'Additional context for AI analysis',
|
|
1371
|
+
typeOptions: {
|
|
1372
|
+
rows: 4,
|
|
1373
|
+
},
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
displayName: 'Color',
|
|
1377
|
+
name: 'projectColor',
|
|
1378
|
+
type: 'string',
|
|
1379
|
+
displayOptions: {
|
|
1380
|
+
show: {
|
|
1381
|
+
resource: [RESOURCES.PROJECT],
|
|
1382
|
+
operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
|
|
1383
|
+
},
|
|
1384
|
+
},
|
|
1385
|
+
default: '#3b82f6',
|
|
1386
|
+
description: 'Color hex code (e.g., #3b82f6)',
|
|
1387
|
+
},
|
|
1322
1388
|
// ==================== CLIENT ====================
|
|
1323
1389
|
{
|
|
1324
1390
|
displayName: 'Operation',
|
|
@@ -1711,6 +1777,53 @@ class TukiMate {
|
|
|
1711
1777
|
default: 'active',
|
|
1712
1778
|
description: 'Status of the client',
|
|
1713
1779
|
},
|
|
1780
|
+
{
|
|
1781
|
+
displayName: 'Tier',
|
|
1782
|
+
name: 'tier',
|
|
1783
|
+
type: 'options',
|
|
1784
|
+
displayOptions: {
|
|
1785
|
+
show: {
|
|
1786
|
+
resource: [RESOURCES.CLIENT],
|
|
1787
|
+
operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
|
|
1788
|
+
},
|
|
1789
|
+
},
|
|
1790
|
+
options: [
|
|
1791
|
+
{ name: 'Standard', value: 'standard' },
|
|
1792
|
+
{ name: 'Premium', value: 'premium' },
|
|
1793
|
+
{ name: 'Enterprise', value: 'enterprise' },
|
|
1794
|
+
],
|
|
1795
|
+
default: 'standard',
|
|
1796
|
+
description: 'Tier of the client',
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
displayName: 'Description',
|
|
1800
|
+
name: 'clientDescription',
|
|
1801
|
+
type: 'string',
|
|
1802
|
+
displayOptions: {
|
|
1803
|
+
show: {
|
|
1804
|
+
resource: [RESOURCES.CLIENT],
|
|
1805
|
+
operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
|
|
1806
|
+
},
|
|
1807
|
+
},
|
|
1808
|
+
default: '',
|
|
1809
|
+
description: 'Description of the client',
|
|
1810
|
+
typeOptions: {
|
|
1811
|
+
rows: 4,
|
|
1812
|
+
},
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
displayName: 'Color',
|
|
1816
|
+
name: 'clientColor',
|
|
1817
|
+
type: 'string',
|
|
1818
|
+
displayOptions: {
|
|
1819
|
+
show: {
|
|
1820
|
+
resource: [RESOURCES.CLIENT],
|
|
1821
|
+
operation: [OPERATIONS.CREATE, OPERATIONS.UPDATE],
|
|
1822
|
+
},
|
|
1823
|
+
},
|
|
1824
|
+
default: '#3b82f6',
|
|
1825
|
+
description: 'Color hex code (e.g., #3b82f6)',
|
|
1826
|
+
},
|
|
1714
1827
|
// ==================== SOURCE ====================
|
|
1715
1828
|
{
|
|
1716
1829
|
displayName: 'Operation',
|
|
@@ -2252,6 +2365,45 @@ class TukiMate {
|
|
|
2252
2365
|
default: '',
|
|
2253
2366
|
description: 'Filter by analysis status',
|
|
2254
2367
|
},
|
|
2368
|
+
{
|
|
2369
|
+
displayName: 'Job ID',
|
|
2370
|
+
name: 'analysisJobId',
|
|
2371
|
+
type: 'string',
|
|
2372
|
+
displayOptions: {
|
|
2373
|
+
show: {
|
|
2374
|
+
resource: [RESOURCES.ANALYSIS],
|
|
2375
|
+
operation: [OPERATIONS.LIST],
|
|
2376
|
+
},
|
|
2377
|
+
},
|
|
2378
|
+
default: '',
|
|
2379
|
+
description: 'Filter by analysis job ID',
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
displayName: 'Team ID',
|
|
2383
|
+
name: 'analysisTeamId',
|
|
2384
|
+
type: 'string',
|
|
2385
|
+
displayOptions: {
|
|
2386
|
+
show: {
|
|
2387
|
+
resource: [RESOURCES.ANALYSIS],
|
|
2388
|
+
operation: [OPERATIONS.LIST],
|
|
2389
|
+
},
|
|
2390
|
+
},
|
|
2391
|
+
default: '',
|
|
2392
|
+
description: 'Filter by team ID',
|
|
2393
|
+
},
|
|
2394
|
+
{
|
|
2395
|
+
displayName: 'Project ID',
|
|
2396
|
+
name: 'analysisProjectId',
|
|
2397
|
+
type: 'string',
|
|
2398
|
+
displayOptions: {
|
|
2399
|
+
show: {
|
|
2400
|
+
resource: [RESOURCES.ANALYSIS],
|
|
2401
|
+
operation: [OPERATIONS.LIST],
|
|
2402
|
+
},
|
|
2403
|
+
},
|
|
2404
|
+
default: '',
|
|
2405
|
+
description: 'Filter by project ID',
|
|
2406
|
+
},
|
|
2255
2407
|
{
|
|
2256
2408
|
displayName: 'Limit',
|
|
2257
2409
|
name: 'analysisLimit',
|
|
@@ -2313,6 +2465,205 @@ class TukiMate {
|
|
|
2313
2465
|
default: 'desc',
|
|
2314
2466
|
description: 'Sort order',
|
|
2315
2467
|
},
|
|
2468
|
+
// Analysis: Create fields
|
|
2469
|
+
{
|
|
2470
|
+
displayName: 'Conversation ID',
|
|
2471
|
+
name: 'analysisCreateConversationId',
|
|
2472
|
+
type: 'string',
|
|
2473
|
+
required: true,
|
|
2474
|
+
displayOptions: {
|
|
2475
|
+
show: {
|
|
2476
|
+
resource: [RESOURCES.ANALYSIS],
|
|
2477
|
+
operation: [OPERATIONS.CREATE],
|
|
2478
|
+
},
|
|
2479
|
+
},
|
|
2480
|
+
default: '',
|
|
2481
|
+
description: 'The ID of the conversation to analyze',
|
|
2482
|
+
},
|
|
2483
|
+
{
|
|
2484
|
+
displayName: 'Summary',
|
|
2485
|
+
name: 'analysisSummary',
|
|
2486
|
+
type: 'string',
|
|
2487
|
+
displayOptions: {
|
|
2488
|
+
show: {
|
|
2489
|
+
resource: [RESOURCES.ANALYSIS],
|
|
2490
|
+
operation: [OPERATIONS.CREATE],
|
|
2491
|
+
},
|
|
2492
|
+
},
|
|
2493
|
+
default: '',
|
|
2494
|
+
description: 'Manual summary of the analysis',
|
|
2495
|
+
typeOptions: {
|
|
2496
|
+
rows: 4,
|
|
2497
|
+
},
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
displayName: 'Sentiment',
|
|
2501
|
+
name: 'analysisSentiment',
|
|
2502
|
+
type: 'options',
|
|
2503
|
+
displayOptions: {
|
|
2504
|
+
show: {
|
|
2505
|
+
resource: [RESOURCES.ANALYSIS],
|
|
2506
|
+
operation: [OPERATIONS.CREATE],
|
|
2507
|
+
},
|
|
2508
|
+
},
|
|
2509
|
+
options: [
|
|
2510
|
+
{ name: 'None', value: '' },
|
|
2511
|
+
{ name: 'Positive', value: 'positive' },
|
|
2512
|
+
{ name: 'Negative', value: 'negative' },
|
|
2513
|
+
{ name: 'Neutral', value: 'neutral' },
|
|
2514
|
+
{ name: 'Mixed', value: 'mixed' },
|
|
2515
|
+
],
|
|
2516
|
+
default: '',
|
|
2517
|
+
description: 'Sentiment of the analysis',
|
|
2518
|
+
},
|
|
2519
|
+
{
|
|
2520
|
+
displayName: 'Topics',
|
|
2521
|
+
name: 'analysisTopics',
|
|
2522
|
+
type: 'string',
|
|
2523
|
+
displayOptions: {
|
|
2524
|
+
show: {
|
|
2525
|
+
resource: [RESOURCES.ANALYSIS],
|
|
2526
|
+
operation: [OPERATIONS.CREATE],
|
|
2527
|
+
},
|
|
2528
|
+
},
|
|
2529
|
+
default: '',
|
|
2530
|
+
description: 'Comma-separated topics',
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
displayName: 'Action Items',
|
|
2534
|
+
name: 'analysisActionItems',
|
|
2535
|
+
type: 'fixedCollection',
|
|
2536
|
+
typeOptions: {
|
|
2537
|
+
multipleValues: true,
|
|
2538
|
+
},
|
|
2539
|
+
displayOptions: {
|
|
2540
|
+
show: {
|
|
2541
|
+
resource: [RESOURCES.ANALYSIS],
|
|
2542
|
+
operation: [OPERATIONS.CREATE],
|
|
2543
|
+
},
|
|
2544
|
+
},
|
|
2545
|
+
default: {},
|
|
2546
|
+
options: [
|
|
2547
|
+
{
|
|
2548
|
+
name: 'actionItem',
|
|
2549
|
+
displayName: 'Action Item',
|
|
2550
|
+
values: [
|
|
2551
|
+
{ displayName: 'Title', name: 'title', type: 'string', default: '' },
|
|
2552
|
+
{ displayName: 'Assignee', name: 'assignee', type: 'string', default: '' },
|
|
2553
|
+
{ displayName: 'Status', name: 'status', type: 'string', default: 'pending' },
|
|
2554
|
+
],
|
|
2555
|
+
},
|
|
2556
|
+
],
|
|
2557
|
+
description: 'Action items from the analysis',
|
|
2558
|
+
},
|
|
2559
|
+
// ==================== ANALYSIS JOB ====================
|
|
2560
|
+
{
|
|
2561
|
+
displayName: 'Operation',
|
|
2562
|
+
name: 'operation',
|
|
2563
|
+
type: 'options',
|
|
2564
|
+
noDataExpression: true,
|
|
2565
|
+
displayOptions: {
|
|
2566
|
+
show: {
|
|
2567
|
+
resource: [RESOURCES.ANALYSIS_JOB],
|
|
2568
|
+
},
|
|
2569
|
+
},
|
|
2570
|
+
options: [
|
|
2571
|
+
{ name: 'List', value: OPERATIONS.LIST, description: 'Get a list of analysis jobs', action: 'List analysis jobs' },
|
|
2572
|
+
{ name: 'Get', value: OPERATIONS.GET, description: 'Get a single analysis job', action: 'Get an analysis job' },
|
|
2573
|
+
],
|
|
2574
|
+
default: OPERATIONS.LIST,
|
|
2575
|
+
},
|
|
2576
|
+
{
|
|
2577
|
+
displayName: 'Job ID',
|
|
2578
|
+
name: 'analysisJobId',
|
|
2579
|
+
type: 'string',
|
|
2580
|
+
required: true,
|
|
2581
|
+
displayOptions: {
|
|
2582
|
+
show: {
|
|
2583
|
+
resource: [RESOURCES.ANALYSIS_JOB],
|
|
2584
|
+
operation: [OPERATIONS.GET],
|
|
2585
|
+
},
|
|
2586
|
+
},
|
|
2587
|
+
default: '',
|
|
2588
|
+
description: 'The ID of the analysis job',
|
|
2589
|
+
},
|
|
2590
|
+
{
|
|
2591
|
+
displayName: 'Status Filter',
|
|
2592
|
+
name: 'analysisJobStatus',
|
|
2593
|
+
type: 'options',
|
|
2594
|
+
displayOptions: {
|
|
2595
|
+
show: {
|
|
2596
|
+
resource: [RESOURCES.ANALYSIS_JOB],
|
|
2597
|
+
operation: [OPERATIONS.LIST],
|
|
2598
|
+
},
|
|
2599
|
+
},
|
|
2600
|
+
options: [
|
|
2601
|
+
{ name: 'All', value: '' },
|
|
2602
|
+
{ name: 'Queued', value: 'QUEUED' },
|
|
2603
|
+
{ name: 'Processing', value: 'PROCESSING' },
|
|
2604
|
+
{ name: 'Completed', value: 'COMPLETED' },
|
|
2605
|
+
{ name: 'Failed', value: 'FAILED' },
|
|
2606
|
+
],
|
|
2607
|
+
default: '',
|
|
2608
|
+
description: 'Filter by job status',
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
displayName: 'Type Filter',
|
|
2612
|
+
name: 'analysisJobType',
|
|
2613
|
+
type: 'options',
|
|
2614
|
+
displayOptions: {
|
|
2615
|
+
show: {
|
|
2616
|
+
resource: [RESOURCES.ANALYSIS_JOB],
|
|
2617
|
+
operation: [OPERATIONS.LIST],
|
|
2618
|
+
},
|
|
2619
|
+
},
|
|
2620
|
+
options: [
|
|
2621
|
+
{ name: 'All', value: '' },
|
|
2622
|
+
{ name: 'Single', value: 'SINGLE' },
|
|
2623
|
+
{ name: 'Bulk', value: 'BULK' },
|
|
2624
|
+
],
|
|
2625
|
+
default: '',
|
|
2626
|
+
description: 'Filter by job type',
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
displayName: 'Search',
|
|
2630
|
+
name: 'analysisJobSearch',
|
|
2631
|
+
type: 'string',
|
|
2632
|
+
displayOptions: {
|
|
2633
|
+
show: {
|
|
2634
|
+
resource: [RESOURCES.ANALYSIS_JOB],
|
|
2635
|
+
operation: [OPERATIONS.LIST],
|
|
2636
|
+
},
|
|
2637
|
+
},
|
|
2638
|
+
default: '',
|
|
2639
|
+
description: 'Search term',
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
displayName: 'Page',
|
|
2643
|
+
name: 'analysisJobPage',
|
|
2644
|
+
type: 'number',
|
|
2645
|
+
displayOptions: {
|
|
2646
|
+
show: {
|
|
2647
|
+
resource: [RESOURCES.ANALYSIS_JOB],
|
|
2648
|
+
operation: [OPERATIONS.LIST],
|
|
2649
|
+
},
|
|
2650
|
+
},
|
|
2651
|
+
default: 1,
|
|
2652
|
+
description: 'Page number',
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
displayName: 'Page Size',
|
|
2656
|
+
name: 'analysisJobPageSize',
|
|
2657
|
+
type: 'number',
|
|
2658
|
+
displayOptions: {
|
|
2659
|
+
show: {
|
|
2660
|
+
resource: [RESOURCES.ANALYSIS_JOB],
|
|
2661
|
+
operation: [OPERATIONS.LIST],
|
|
2662
|
+
},
|
|
2663
|
+
},
|
|
2664
|
+
default: 20,
|
|
2665
|
+
description: 'Results per page (max 100)',
|
|
2666
|
+
},
|
|
2316
2667
|
// ==================== USAGE ====================
|
|
2317
2668
|
{
|
|
2318
2669
|
displayName: 'Operation',
|
|
@@ -2508,6 +2859,65 @@ class TukiMate {
|
|
|
2508
2859
|
default: '',
|
|
2509
2860
|
description: 'Related conversation ID',
|
|
2510
2861
|
},
|
|
2862
|
+
{
|
|
2863
|
+
displayName: 'Type Filter',
|
|
2864
|
+
name: 'opportunityTypeFilter',
|
|
2865
|
+
type: 'options',
|
|
2866
|
+
displayOptions: {
|
|
2867
|
+
show: {
|
|
2868
|
+
resource: [RESOURCES.OPPORTUNITY],
|
|
2869
|
+
operation: [OPERATIONS.LIST],
|
|
2870
|
+
},
|
|
2871
|
+
},
|
|
2872
|
+
options: [
|
|
2873
|
+
{ name: 'All', value: '' },
|
|
2874
|
+
{ name: 'New Sale', value: 'nueva_venta' },
|
|
2875
|
+
{ name: 'Upselling', value: 'upselling' },
|
|
2876
|
+
{ name: 'Renewal/Retention', value: 'renovacion_retencion' },
|
|
2877
|
+
{ name: 'Cross Sell', value: 'cross_sell' },
|
|
2878
|
+
],
|
|
2879
|
+
default: '',
|
|
2880
|
+
description: 'Filter by opportunity type',
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
displayName: 'Owner ID',
|
|
2884
|
+
name: 'opportunityOwnerId',
|
|
2885
|
+
type: 'string',
|
|
2886
|
+
displayOptions: {
|
|
2887
|
+
show: {
|
|
2888
|
+
resource: [RESOURCES.OPPORTUNITY],
|
|
2889
|
+
operation: [OPERATIONS.LIST],
|
|
2890
|
+
},
|
|
2891
|
+
},
|
|
2892
|
+
default: '',
|
|
2893
|
+
description: 'Filter by owner ID',
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
displayName: 'Team ID',
|
|
2897
|
+
name: 'opportunityTeamId',
|
|
2898
|
+
type: 'string',
|
|
2899
|
+
displayOptions: {
|
|
2900
|
+
show: {
|
|
2901
|
+
resource: [RESOURCES.OPPORTUNITY],
|
|
2902
|
+
operation: [OPERATIONS.LIST],
|
|
2903
|
+
},
|
|
2904
|
+
},
|
|
2905
|
+
default: '',
|
|
2906
|
+
description: 'Filter by team ID',
|
|
2907
|
+
},
|
|
2908
|
+
{
|
|
2909
|
+
displayName: 'Include Relations',
|
|
2910
|
+
name: 'opportunityIncludeRelations',
|
|
2911
|
+
type: 'boolean',
|
|
2912
|
+
displayOptions: {
|
|
2913
|
+
show: {
|
|
2914
|
+
resource: [RESOURCES.OPPORTUNITY],
|
|
2915
|
+
operation: [OPERATIONS.LIST],
|
|
2916
|
+
},
|
|
2917
|
+
},
|
|
2918
|
+
default: false,
|
|
2919
|
+
description: 'Include related data in the response',
|
|
2920
|
+
},
|
|
2511
2921
|
{
|
|
2512
2922
|
displayName: 'Limit',
|
|
2513
2923
|
name: 'opportunityLimit',
|
|
@@ -2578,7 +2988,7 @@ class TukiMate {
|
|
|
2578
2988
|
type: 'boolean',
|
|
2579
2989
|
displayOptions: {
|
|
2580
2990
|
show: {
|
|
2581
|
-
resource: [RESOURCES.CONVERSATION, RESOURCES.CONTACT, RESOURCES.TEAM, RESOURCES.PROJECT, RESOURCES.CLIENT, RESOURCES.SOURCE, RESOURCES.TAG, RESOURCES.TAG_DEFINITION],
|
|
2991
|
+
resource: [RESOURCES.CONVERSATION, RESOURCES.CONTACT, RESOURCES.TEAM, RESOURCES.PROJECT, RESOURCES.CLIENT, RESOURCES.SOURCE, RESOURCES.TAG, RESOURCES.TAG_DEFINITION, RESOURCES.CATEGORY, RESOURCES.ANALYSIS, RESOURCES.ANALYSIS_JOB, RESOURCES.OPPORTUNITY],
|
|
2582
2992
|
operation: [OPERATIONS.LIST, OPERATIONS.GET],
|
|
2583
2993
|
},
|
|
2584
2994
|
},
|
|
@@ -2625,7 +3035,7 @@ class TukiMate {
|
|
|
2625
3035
|
if (projectIdValue)
|
|
2626
3036
|
query.project = projectIdValue;
|
|
2627
3037
|
if (additionalOptions.externalMeetingId)
|
|
2628
|
-
query.
|
|
3038
|
+
query.source_meeting_id = additionalOptions.externalMeetingId;
|
|
2629
3039
|
if (additionalOptions.offset !== undefined)
|
|
2630
3040
|
query.offset = additionalOptions.offset;
|
|
2631
3041
|
if (additionalOptions.dateFrom)
|
|
@@ -2770,6 +3180,31 @@ class TukiMate {
|
|
|
2770
3180
|
}
|
|
2771
3181
|
responseData = await tukiMateRequest.call(this, 'POST', `/conversations/${conversationId}/analyze`, body);
|
|
2772
3182
|
}
|
|
3183
|
+
else if (operation === OPERATIONS.BULK_ANALYZE) {
|
|
3184
|
+
const bulkConversationIds = this.getNodeParameter('bulkConversationIds', i);
|
|
3185
|
+
const bulkAnalysisConfigIds = this.getNodeParameter('bulkAnalysisConfigIds', i);
|
|
3186
|
+
const bulkAnalyzeMode = this.getNodeParameter('bulkAnalyzeMode', i, 'individual');
|
|
3187
|
+
const bulkAnalyzeTitle = this.getNodeParameter('bulkAnalyzeTitle', i, '');
|
|
3188
|
+
const bulkAnalyzeDescription = this.getNodeParameter('bulkAnalyzeDescription', i, '');
|
|
3189
|
+
const body = {
|
|
3190
|
+
conversationIds: bulkConversationIds.split(',').map(id => id.trim()),
|
|
3191
|
+
analysisConfigIds: bulkAnalysisConfigIds.split(',').map(id => id.trim()),
|
|
3192
|
+
mode: bulkAnalyzeMode,
|
|
3193
|
+
};
|
|
3194
|
+
if (bulkAnalyzeTitle)
|
|
3195
|
+
body.title = bulkAnalyzeTitle;
|
|
3196
|
+
if (bulkAnalyzeDescription)
|
|
3197
|
+
body.description = bulkAnalyzeDescription;
|
|
3198
|
+
responseData = await tukiMateRequest.call(this, 'POST', '/conversations/bulk-analyze', body);
|
|
3199
|
+
}
|
|
3200
|
+
else if (operation === OPERATIONS.BULK_DELETE) {
|
|
3201
|
+
const bulkConversationIds = this.getNodeParameter('bulkConversationIds', i);
|
|
3202
|
+
const body = {
|
|
3203
|
+
action: 'delete',
|
|
3204
|
+
ids: bulkConversationIds.split(',').map(id => id.trim()),
|
|
3205
|
+
};
|
|
3206
|
+
responseData = await tukiMateRequest.call(this, 'POST', '/conversations/bulk', body);
|
|
3207
|
+
}
|
|
2773
3208
|
}
|
|
2774
3209
|
// ==================== CONTACT ====================
|
|
2775
3210
|
else if (resource === RESOURCES.CONTACT) {
|
|
@@ -2822,6 +3257,10 @@ class TukiMate {
|
|
|
2822
3257
|
body.department = additionalOptions.department;
|
|
2823
3258
|
if (additionalOptions.contactTags)
|
|
2824
3259
|
body.tags = additionalOptions.contactTags.split(',').map((t) => t.trim());
|
|
3260
|
+
if (additionalOptions.workPhone)
|
|
3261
|
+
body.work_phone = additionalOptions.workPhone;
|
|
3262
|
+
if (additionalOptions.workPhoneExtension)
|
|
3263
|
+
body.work_phone_extension = additionalOptions.workPhoneExtension;
|
|
2825
3264
|
responseData = await tukiMateRequest.call(this, 'POST', '/contacts', body);
|
|
2826
3265
|
}
|
|
2827
3266
|
else if (operation === OPERATIONS.UPDATE) {
|
|
@@ -2850,6 +3289,10 @@ class TukiMate {
|
|
|
2850
3289
|
body.department = additionalOptions.department;
|
|
2851
3290
|
if (additionalOptions.contactTags)
|
|
2852
3291
|
body.tags = additionalOptions.contactTags.split(',').map((t) => t.trim());
|
|
3292
|
+
if (additionalOptions.workPhone)
|
|
3293
|
+
body.work_phone = additionalOptions.workPhone;
|
|
3294
|
+
if (additionalOptions.workPhoneExtension)
|
|
3295
|
+
body.work_phone_extension = additionalOptions.workPhoneExtension;
|
|
2853
3296
|
responseData = await tukiMateRequest.call(this, 'PATCH', `/contacts/${contactId}`, body);
|
|
2854
3297
|
}
|
|
2855
3298
|
else if (operation === OPERATIONS.DELETE) {
|
|
@@ -2882,6 +3325,8 @@ class TukiMate {
|
|
|
2882
3325
|
body.description = additionalOptions.description;
|
|
2883
3326
|
if (additionalOptions.color)
|
|
2884
3327
|
body.color = additionalOptions.color;
|
|
3328
|
+
if (additionalOptions.teamContext)
|
|
3329
|
+
body.context = additionalOptions.teamContext;
|
|
2885
3330
|
responseData = await tukiMateRequest.call(this, 'POST', '/teams', body);
|
|
2886
3331
|
}
|
|
2887
3332
|
else if (operation === OPERATIONS.UPDATE) {
|
|
@@ -2896,6 +3341,8 @@ class TukiMate {
|
|
|
2896
3341
|
body.description = additionalOptions.description;
|
|
2897
3342
|
if (additionalOptions.color)
|
|
2898
3343
|
body.color = additionalOptions.color;
|
|
3344
|
+
if (additionalOptions.teamContext)
|
|
3345
|
+
body.context = additionalOptions.teamContext;
|
|
2899
3346
|
responseData = await tukiMateRequest.call(this, 'PATCH', `/teams/${teamId}`, body);
|
|
2900
3347
|
}
|
|
2901
3348
|
else if (operation === OPERATIONS.DELETE) {
|
|
@@ -2926,11 +3373,17 @@ class TukiMate {
|
|
|
2926
3373
|
const name = this.getNodeParameter('name', i);
|
|
2927
3374
|
const description = this.getNodeParameter('description', i, '');
|
|
2928
3375
|
const status = this.getNodeParameter('status', i, 'active');
|
|
3376
|
+
const projectContext = this.getNodeParameter('projectContext', i, '');
|
|
3377
|
+
const projectColor = this.getNodeParameter('projectColor', i, '#3b82f6');
|
|
2929
3378
|
const body = { name };
|
|
2930
3379
|
if (description)
|
|
2931
3380
|
body.description = description;
|
|
2932
3381
|
if (status)
|
|
2933
3382
|
body.status = status;
|
|
3383
|
+
if (projectContext)
|
|
3384
|
+
body.context = projectContext;
|
|
3385
|
+
if (projectColor)
|
|
3386
|
+
body.color = projectColor;
|
|
2934
3387
|
responseData = await tukiMateRequest.call(this, 'POST', '/projects', body);
|
|
2935
3388
|
}
|
|
2936
3389
|
else if (operation === OPERATIONS.UPDATE) {
|
|
@@ -2938,6 +3391,8 @@ class TukiMate {
|
|
|
2938
3391
|
const name = this.getNodeParameter('name', i, '');
|
|
2939
3392
|
const description = this.getNodeParameter('description', i, '');
|
|
2940
3393
|
const status = this.getNodeParameter('status', i, '');
|
|
3394
|
+
const projectContext = this.getNodeParameter('projectContext', i, '');
|
|
3395
|
+
const projectColor = this.getNodeParameter('projectColor', i, '');
|
|
2941
3396
|
const body = {};
|
|
2942
3397
|
if (name)
|
|
2943
3398
|
body.name = name;
|
|
@@ -2945,6 +3400,10 @@ class TukiMate {
|
|
|
2945
3400
|
body.description = description;
|
|
2946
3401
|
if (status)
|
|
2947
3402
|
body.status = status;
|
|
3403
|
+
if (projectContext)
|
|
3404
|
+
body.context = projectContext;
|
|
3405
|
+
if (projectColor)
|
|
3406
|
+
body.color = projectColor;
|
|
2948
3407
|
responseData = await tukiMateRequest.call(this, 'PATCH', `/projects/${projectId}`, body);
|
|
2949
3408
|
}
|
|
2950
3409
|
else if (operation === OPERATIONS.DELETE) {
|
|
@@ -3004,6 +3463,9 @@ class TukiMate {
|
|
|
3004
3463
|
const website = this.getNodeParameter('website', i, '');
|
|
3005
3464
|
const type = this.getNodeParameter('type', i, 'corporate');
|
|
3006
3465
|
const status = this.getNodeParameter('status', i, 'active');
|
|
3466
|
+
const tier = this.getNodeParameter('tier', i, 'standard');
|
|
3467
|
+
const clientDescription = this.getNodeParameter('clientDescription', i, '');
|
|
3468
|
+
const clientColor = this.getNodeParameter('clientColor', i, '#3b82f6');
|
|
3007
3469
|
const body = { name };
|
|
3008
3470
|
if (code)
|
|
3009
3471
|
body.code = code;
|
|
@@ -3015,6 +3477,12 @@ class TukiMate {
|
|
|
3015
3477
|
body.type = type;
|
|
3016
3478
|
if (status)
|
|
3017
3479
|
body.status = status;
|
|
3480
|
+
if (tier)
|
|
3481
|
+
body.tier = tier;
|
|
3482
|
+
if (clientDescription)
|
|
3483
|
+
body.description = clientDescription;
|
|
3484
|
+
if (clientColor)
|
|
3485
|
+
body.color = clientColor;
|
|
3018
3486
|
responseData = await tukiMateRequest.call(this, 'POST', '/clients', body);
|
|
3019
3487
|
}
|
|
3020
3488
|
else if (operation === OPERATIONS.UPDATE) {
|
|
@@ -3025,6 +3493,9 @@ class TukiMate {
|
|
|
3025
3493
|
const website = this.getNodeParameter('website', i, '');
|
|
3026
3494
|
const type = this.getNodeParameter('type', i, '');
|
|
3027
3495
|
const status = this.getNodeParameter('status', i, '');
|
|
3496
|
+
const tier = this.getNodeParameter('tier', i, '');
|
|
3497
|
+
const clientDescription = this.getNodeParameter('clientDescription', i, '');
|
|
3498
|
+
const clientColor = this.getNodeParameter('clientColor', i, '');
|
|
3028
3499
|
const body = {};
|
|
3029
3500
|
if (name)
|
|
3030
3501
|
body.name = name;
|
|
@@ -3038,6 +3509,12 @@ class TukiMate {
|
|
|
3038
3509
|
body.type = type;
|
|
3039
3510
|
if (status)
|
|
3040
3511
|
body.status = status;
|
|
3512
|
+
if (tier)
|
|
3513
|
+
body.tier = tier;
|
|
3514
|
+
if (clientDescription)
|
|
3515
|
+
body.description = clientDescription;
|
|
3516
|
+
if (clientColor)
|
|
3517
|
+
body.color = clientColor;
|
|
3041
3518
|
responseData = await tukiMateRequest.call(this, 'PATCH', `/clients/${clientId}`, body);
|
|
3042
3519
|
}
|
|
3043
3520
|
else if (operation === OPERATIONS.DELETE) {
|
|
@@ -3198,6 +3675,9 @@ class TukiMate {
|
|
|
3198
3675
|
const analysisOffset = this.getNodeParameter('analysisOffset', i, 0);
|
|
3199
3676
|
const analysisOrderBy = this.getNodeParameter('analysisOrderBy', i, 'created_at');
|
|
3200
3677
|
const analysisOrder = this.getNodeParameter('analysisOrder', i, 'desc');
|
|
3678
|
+
const analysisJobId = this.getNodeParameter('analysisJobId', i, '');
|
|
3679
|
+
const analysisTeamId = this.getNodeParameter('analysisTeamId', i, '');
|
|
3680
|
+
const analysisProjectId = this.getNodeParameter('analysisProjectId', i, '');
|
|
3201
3681
|
const query = { limit: analysisLimit, offset: analysisOffset };
|
|
3202
3682
|
if (analysisConversationId)
|
|
3203
3683
|
query.conversationId = analysisConversationId;
|
|
@@ -3207,6 +3687,12 @@ class TukiMate {
|
|
|
3207
3687
|
query.orderBy = analysisOrderBy;
|
|
3208
3688
|
if (analysisOrder)
|
|
3209
3689
|
query.order = analysisOrder;
|
|
3690
|
+
if (analysisJobId)
|
|
3691
|
+
query.jobId = analysisJobId;
|
|
3692
|
+
if (analysisTeamId)
|
|
3693
|
+
query.team = analysisTeamId;
|
|
3694
|
+
if (analysisProjectId)
|
|
3695
|
+
query.project = analysisProjectId;
|
|
3210
3696
|
responseData = await tukiMateRequest.call(this, 'GET', '/analyses', undefined, query);
|
|
3211
3697
|
}
|
|
3212
3698
|
else if (operation === OPERATIONS.GET) {
|
|
@@ -3223,6 +3709,10 @@ class TukiMate {
|
|
|
3223
3709
|
const opportunityOffset = this.getNodeParameter('opportunityOffset', i, 0);
|
|
3224
3710
|
const opportunityOrderBy = this.getNodeParameter('opportunityOrderBy', i, 'created_at');
|
|
3225
3711
|
const opportunityOrder = this.getNodeParameter('opportunityOrder', i, 'desc');
|
|
3712
|
+
const opportunityTypeFilter = this.getNodeParameter('opportunityTypeFilter', i, '');
|
|
3713
|
+
const opportunityOwnerId = this.getNodeParameter('opportunityOwnerId', i, '');
|
|
3714
|
+
const opportunityTeamId = this.getNodeParameter('opportunityTeamId', i, '');
|
|
3715
|
+
const opportunityIncludeRelations = this.getNodeParameter('opportunityIncludeRelations', i, false);
|
|
3226
3716
|
const query = { limit: opportunityLimit, offset: opportunityOffset };
|
|
3227
3717
|
if (opportunityStatus)
|
|
3228
3718
|
query.status = opportunityStatus;
|
|
@@ -3232,6 +3722,14 @@ class TukiMate {
|
|
|
3232
3722
|
query.orderBy = opportunityOrderBy;
|
|
3233
3723
|
if (opportunityOrder)
|
|
3234
3724
|
query.order = opportunityOrder;
|
|
3725
|
+
if (opportunityTypeFilter)
|
|
3726
|
+
query.type = opportunityTypeFilter;
|
|
3727
|
+
if (opportunityOwnerId)
|
|
3728
|
+
query.owner_id = opportunityOwnerId;
|
|
3729
|
+
if (opportunityTeamId)
|
|
3730
|
+
query.team_id = opportunityTeamId;
|
|
3731
|
+
if (opportunityIncludeRelations)
|
|
3732
|
+
query.include_relations = opportunityIncludeRelations;
|
|
3235
3733
|
responseData = await tukiMateRequest.call(this, 'GET', '/opportunities', undefined, query);
|
|
3236
3734
|
}
|
|
3237
3735
|
else if (operation === OPERATIONS.GET) {
|