@flowuent-org/diagramming-core 1.4.3 → 1.4.5
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.
- package/apps/diagramming/src/AutomationDiagramData.ts +208 -14
- package/apps/diagramming/src/main.tsx +1 -3
- package/apps/workflow/locales/en/translation.json +5 -1
- package/package.json +1 -1
- package/packages/diagrams/locales/en/translation.json +5 -1
- package/packages/diagrams/src/lib/components/automation/AutomationApiNode.tsx +6 -29
- package/packages/diagrams/src/lib/components/automation/AutomationFormattingNode.tsx +11 -74
- package/packages/diagrams/src/lib/components/automation/AutomationGoogleServiceNode.tsx +680 -0
- package/packages/diagrams/src/lib/components/automation/AutomationNodeConfigDisplay.tsx +132 -0
- package/packages/diagrams/src/lib/components/automation/googleServiceNodeConfig.ts +158 -0
- package/packages/diagrams/src/lib/components/automation/index.ts +14 -0
- package/packages/diagrams/src/lib/services/GoogleAuthService.ts +149 -0
- package/packages/diagrams/src/lib/templates/DiagramContent.tsx +0 -3
- package/packages/diagrams/src/lib/types/automation-node-data-types.ts +19 -0
- package/packages/diagrams/src/lib/types/node-types.ts +8 -0
|
@@ -113,15 +113,13 @@ export const automationDefaultNodes = [
|
|
|
113
113
|
// Configuration cards for dynamic display
|
|
114
114
|
configurationCards: [
|
|
115
115
|
{
|
|
116
|
-
|
|
116
|
+
type: 'model',
|
|
117
117
|
label: 'GPT-5 Thinking mini · v1',
|
|
118
|
-
iconColor: '#ffffff',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
icon: '🗄️',
|
|
122
|
-
label: 'KB: CNN_Homepage_Titles (18 items)',
|
|
123
|
-
iconColor: '#10b981',
|
|
124
118
|
},
|
|
119
|
+
// {
|
|
120
|
+
// type: 'knowledgeBase',
|
|
121
|
+
// label: 'KB: CNN_Homepage_Titles (18 items)',
|
|
122
|
+
// },
|
|
125
123
|
],
|
|
126
124
|
// AI Suggestions count and data
|
|
127
125
|
aiSuggestionsCount: 2,
|
|
@@ -244,20 +242,18 @@ export const automationDefaultNodes = [
|
|
|
244
242
|
ignored: 0,
|
|
245
243
|
},
|
|
246
244
|
// AI Reasoning data
|
|
247
|
-
aiReasoning: {
|
|
248
|
-
|
|
249
|
-
},
|
|
245
|
+
// aiReasoning: {
|
|
246
|
+
// text: 'Analyzed the selected headline for key components and promises',
|
|
247
|
+
// },
|
|
250
248
|
// Configuration cards for dynamic display
|
|
251
249
|
configurationCards: [
|
|
252
250
|
{
|
|
253
|
-
|
|
251
|
+
type: 'model',
|
|
254
252
|
label: 'GPT-5 Thinking mini · v1',
|
|
255
|
-
iconColor: '#ffffff',
|
|
256
253
|
},
|
|
257
254
|
{
|
|
258
|
-
|
|
255
|
+
type: 'knowledgeBase',
|
|
259
256
|
label: 'KB: CNN_Articles (18 items)',
|
|
260
|
-
iconColor: '#10b981',
|
|
261
257
|
},
|
|
262
258
|
],
|
|
263
259
|
// AI Suggestions count
|
|
@@ -463,6 +459,125 @@ export const automationDefaultNodes = [
|
|
|
463
459
|
measured: { width: 300, height: 200 },
|
|
464
460
|
},
|
|
465
461
|
// =====================================
|
|
462
|
+
// Gmail Integration Node
|
|
463
|
+
// =====================================
|
|
464
|
+
{
|
|
465
|
+
id: 'gmail-node',
|
|
466
|
+
type: 'AutomationGmailNode',
|
|
467
|
+
position: { x: 1500, y: 700 },
|
|
468
|
+
data: {
|
|
469
|
+
label: 'Send Gmail',
|
|
470
|
+
description: 'Send an email via Gmail',
|
|
471
|
+
headerText: 'Gmail integration',
|
|
472
|
+
serviceType: 'gmail',
|
|
473
|
+
operationType: 'send-email',
|
|
474
|
+
status: 'Need to Config',
|
|
475
|
+
parameters: {
|
|
476
|
+
to: 'team@example.com',
|
|
477
|
+
subject: 'Workflow Update',
|
|
478
|
+
message: 'Your automation workflow completed successfully.',
|
|
479
|
+
},
|
|
480
|
+
formData: {
|
|
481
|
+
nodeId: 'gmail-node',
|
|
482
|
+
title: 'Send Gmail',
|
|
483
|
+
type: 'gmail',
|
|
484
|
+
operationType: 'send-email',
|
|
485
|
+
},
|
|
486
|
+
lastRun: 'Never',
|
|
487
|
+
},
|
|
488
|
+
width: 300,
|
|
489
|
+
height: 200,
|
|
490
|
+
measured: { width: 300, height: 200 },
|
|
491
|
+
},
|
|
492
|
+
// =====================================
|
|
493
|
+
// Google Docs Integration Node
|
|
494
|
+
// =====================================
|
|
495
|
+
{
|
|
496
|
+
id: 'google-docs-node',
|
|
497
|
+
type: 'AutomationGoogleDocsNode',
|
|
498
|
+
position: { x: 1850, y: 700 },
|
|
499
|
+
data: {
|
|
500
|
+
label: 'Create Google Doc',
|
|
501
|
+
description: 'Create or update a Google Document',
|
|
502
|
+
headerText: 'Google Docs integration',
|
|
503
|
+
serviceType: 'docs',
|
|
504
|
+
operationType: 'create-document',
|
|
505
|
+
status: 'Need to Config',
|
|
506
|
+
parameters: {
|
|
507
|
+
documentTitle: 'Workflow Report',
|
|
508
|
+
},
|
|
509
|
+
formData: {
|
|
510
|
+
nodeId: 'google-docs-node',
|
|
511
|
+
title: 'Create Google Doc',
|
|
512
|
+
type: 'google-docs',
|
|
513
|
+
operationType: 'create-document',
|
|
514
|
+
},
|
|
515
|
+
lastRun: 'Never',
|
|
516
|
+
},
|
|
517
|
+
width: 300,
|
|
518
|
+
height: 200,
|
|
519
|
+
measured: { width: 300, height: 200 },
|
|
520
|
+
},
|
|
521
|
+
// =====================================
|
|
522
|
+
// Google Slides Integration Node
|
|
523
|
+
// =====================================
|
|
524
|
+
{
|
|
525
|
+
id: 'google-slides-node',
|
|
526
|
+
type: 'AutomationGoogleSlidesNode',
|
|
527
|
+
position: { x: 2200, y: 700 },
|
|
528
|
+
data: {
|
|
529
|
+
label: 'Create Presentation',
|
|
530
|
+
description: 'Create or update a Google Slides deck',
|
|
531
|
+
headerText: 'Google Slides integration',
|
|
532
|
+
serviceType: 'slides',
|
|
533
|
+
operationType: 'create-presentation',
|
|
534
|
+
status: 'Need to Config',
|
|
535
|
+
parameters: {
|
|
536
|
+
presentationTitle: 'Workflow Summary Deck',
|
|
537
|
+
},
|
|
538
|
+
formData: {
|
|
539
|
+
nodeId: 'google-slides-node',
|
|
540
|
+
title: 'Create Presentation',
|
|
541
|
+
type: 'google-slides',
|
|
542
|
+
operationType: 'create-presentation',
|
|
543
|
+
},
|
|
544
|
+
lastRun: 'Never',
|
|
545
|
+
},
|
|
546
|
+
width: 300,
|
|
547
|
+
height: 200,
|
|
548
|
+
measured: { width: 300, height: 200 },
|
|
549
|
+
},
|
|
550
|
+
// =====================================
|
|
551
|
+
// Google Meet Integration Node
|
|
552
|
+
// =====================================
|
|
553
|
+
{
|
|
554
|
+
id: 'google-meet-node',
|
|
555
|
+
type: 'AutomationGoogleMeetNode',
|
|
556
|
+
position: { x: 2550, y: 700 },
|
|
557
|
+
data: {
|
|
558
|
+
label: 'Schedule Meet',
|
|
559
|
+
description: 'Create or schedule a Google Meet session',
|
|
560
|
+
headerText: 'Google Meet integration',
|
|
561
|
+
serviceType: 'meet',
|
|
562
|
+
operationType: 'schedule-meeting',
|
|
563
|
+
status: 'Need to Config',
|
|
564
|
+
parameters: {
|
|
565
|
+
meetingTitle: 'Workflow Review Meeting',
|
|
566
|
+
meetingLink: '',
|
|
567
|
+
},
|
|
568
|
+
formData: {
|
|
569
|
+
nodeId: 'google-meet-node',
|
|
570
|
+
title: 'Schedule Meet',
|
|
571
|
+
type: 'google-meet',
|
|
572
|
+
operationType: 'schedule-meeting',
|
|
573
|
+
},
|
|
574
|
+
lastRun: 'Never',
|
|
575
|
+
},
|
|
576
|
+
width: 300,
|
|
577
|
+
height: 200,
|
|
578
|
+
measured: { width: 300, height: 200 },
|
|
579
|
+
},
|
|
580
|
+
// =====================================
|
|
466
581
|
// Interaction Node
|
|
467
582
|
// =====================================
|
|
468
583
|
{
|
|
@@ -852,6 +967,85 @@ export const automationDefaultEdges = [
|
|
|
852
967
|
},
|
|
853
968
|
},
|
|
854
969
|
// =====================================
|
|
970
|
+
// Google Nodes Edges
|
|
971
|
+
// =====================================
|
|
972
|
+
{
|
|
973
|
+
id: 'edge-telegram-to-gmail',
|
|
974
|
+
source: 'telegram-node',
|
|
975
|
+
target: 'gmail-node',
|
|
976
|
+
sourceHandle: 'right',
|
|
977
|
+
targetHandle: 'left',
|
|
978
|
+
data: {
|
|
979
|
+
label: 'Email Report',
|
|
980
|
+
type: 'flow',
|
|
981
|
+
},
|
|
982
|
+
style: {
|
|
983
|
+
stroke: '#EA4335',
|
|
984
|
+
strokeWidth: 2,
|
|
985
|
+
},
|
|
986
|
+
markerEnd: {
|
|
987
|
+
type: MarkerType.ArrowClosed,
|
|
988
|
+
color: '#EA4335',
|
|
989
|
+
},
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
id: 'edge-gmail-to-docs',
|
|
993
|
+
source: 'gmail-node',
|
|
994
|
+
target: 'google-docs-node',
|
|
995
|
+
sourceHandle: 'right',
|
|
996
|
+
targetHandle: 'left',
|
|
997
|
+
data: {
|
|
998
|
+
label: 'Create Doc',
|
|
999
|
+
type: 'flow',
|
|
1000
|
+
},
|
|
1001
|
+
style: {
|
|
1002
|
+
stroke: '#4285F4',
|
|
1003
|
+
strokeWidth: 2,
|
|
1004
|
+
},
|
|
1005
|
+
markerEnd: {
|
|
1006
|
+
type: MarkerType.ArrowClosed,
|
|
1007
|
+
color: '#4285F4',
|
|
1008
|
+
},
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
id: 'edge-docs-to-slides',
|
|
1012
|
+
source: 'google-docs-node',
|
|
1013
|
+
target: 'google-slides-node',
|
|
1014
|
+
sourceHandle: 'right',
|
|
1015
|
+
targetHandle: 'left',
|
|
1016
|
+
data: {
|
|
1017
|
+
label: 'Build Deck',
|
|
1018
|
+
type: 'flow',
|
|
1019
|
+
},
|
|
1020
|
+
style: {
|
|
1021
|
+
stroke: '#FBBC04',
|
|
1022
|
+
strokeWidth: 2,
|
|
1023
|
+
},
|
|
1024
|
+
markerEnd: {
|
|
1025
|
+
type: MarkerType.ArrowClosed,
|
|
1026
|
+
color: '#FBBC04',
|
|
1027
|
+
},
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
id: 'edge-slides-to-meet',
|
|
1031
|
+
source: 'google-slides-node',
|
|
1032
|
+
target: 'google-meet-node',
|
|
1033
|
+
sourceHandle: 'right',
|
|
1034
|
+
targetHandle: 'left',
|
|
1035
|
+
data: {
|
|
1036
|
+
label: 'Schedule Meet',
|
|
1037
|
+
type: 'flow',
|
|
1038
|
+
},
|
|
1039
|
+
style: {
|
|
1040
|
+
stroke: '#00897B',
|
|
1041
|
+
strokeWidth: 2,
|
|
1042
|
+
},
|
|
1043
|
+
markerEnd: {
|
|
1044
|
+
type: MarkerType.ArrowClosed,
|
|
1045
|
+
color: '#00897B',
|
|
1046
|
+
},
|
|
1047
|
+
},
|
|
1048
|
+
// =====================================
|
|
855
1049
|
// Monitoring Node Edge
|
|
856
1050
|
// =====================================
|
|
857
1051
|
{
|
|
@@ -649,9 +649,13 @@
|
|
|
649
649
|
"formattingNode": {
|
|
650
650
|
"headerDescription": "AI-powered content analysis",
|
|
651
651
|
"aiReasoning": "AI Reasoning",
|
|
652
|
-
"aiReasoningDefault": "Analyzed the selected headline for key components and promises",
|
|
653
652
|
"formattedData": "Formatted Data"
|
|
654
653
|
},
|
|
654
|
+
"googleAuth": {
|
|
655
|
+
"connectGoogle": "Connect Google",
|
|
656
|
+
"connecting": "Connecting...",
|
|
657
|
+
"signOut": "Sign out"
|
|
658
|
+
},
|
|
655
659
|
"endNode": {
|
|
656
660
|
"headerDescription": "Workflow completion and results display",
|
|
657
661
|
"finalOutput": "Final Output"
|
package/package.json
CHANGED
|
@@ -649,9 +649,13 @@
|
|
|
649
649
|
"formattingNode": {
|
|
650
650
|
"headerDescription": "AI-powered content analysis",
|
|
651
651
|
"aiReasoning": "AI Reasoning",
|
|
652
|
-
"aiReasoningDefault": "Analyzed the selected headline for key components and promises",
|
|
653
652
|
"formattedData": "Formatted Data"
|
|
654
653
|
},
|
|
654
|
+
"googleAuth": {
|
|
655
|
+
"connectGoogle": "Connect Google",
|
|
656
|
+
"connecting": "Connecting...",
|
|
657
|
+
"signOut": "Sign out"
|
|
658
|
+
},
|
|
655
659
|
"endNode": {
|
|
656
660
|
"headerDescription": "Workflow completion and results display",
|
|
657
661
|
"finalOutput": "Final Output"
|
|
@@ -24,6 +24,8 @@ import { useSearch } from '../../contexts/SearchContext';
|
|
|
24
24
|
import { getStatusColor } from './statusColors';
|
|
25
25
|
import { ApiNodeIcon } from '../../icons';
|
|
26
26
|
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
27
|
+
import { AutomationConfigurationCardsSection } from './AutomationNodeConfigDisplay';
|
|
28
|
+
import { AutomationConfigurationCard } from '../../types/automation-node-data-types';
|
|
27
29
|
|
|
28
30
|
interface AutomationApiNodeProps {
|
|
29
31
|
data: {
|
|
@@ -49,11 +51,7 @@ interface AutomationApiNodeProps {
|
|
|
49
51
|
partial: number;
|
|
50
52
|
ignored: number;
|
|
51
53
|
};
|
|
52
|
-
configurationCards?:
|
|
53
|
-
icon: string;
|
|
54
|
-
label: string;
|
|
55
|
-
iconColor: string;
|
|
56
|
-
}>;
|
|
54
|
+
configurationCards?: AutomationConfigurationCard[];
|
|
57
55
|
aiSuggestionsCount?: number; // Number of AI suggestions available
|
|
58
56
|
aiSuggestions?: AISuggestion[]; // AI suggestions data
|
|
59
57
|
[key: string]: any;
|
|
@@ -476,30 +474,9 @@ export const AutomationApiNode: React.FC<AutomationApiNodeProps> = ({ data, sele
|
|
|
476
474
|
</>
|
|
477
475
|
)}
|
|
478
476
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
backgroundColor: '#1F2937',
|
|
483
|
-
borderRadius: '6px',
|
|
484
|
-
padding: '8px 12px',
|
|
485
|
-
mb: 1,
|
|
486
|
-
display: 'flex',
|
|
487
|
-
alignItems: 'center',
|
|
488
|
-
gap: 1,
|
|
489
|
-
border: '1px solid #374151'
|
|
490
|
-
}}>
|
|
491
|
-
<Box sx={{ color: card.iconColor || '#ffffff', fontSize: '16px' }}>
|
|
492
|
-
{card.icon}
|
|
493
|
-
</Box>
|
|
494
|
-
<Typography variant="body2" sx={{
|
|
495
|
-
color: '#ffffff',
|
|
496
|
-
fontSize: '11px',
|
|
497
|
-
fontWeight: 500
|
|
498
|
-
}}>
|
|
499
|
-
{card.label}
|
|
500
|
-
</Typography>
|
|
501
|
-
</Box>
|
|
502
|
-
))}
|
|
477
|
+
<AutomationConfigurationCardsSection
|
|
478
|
+
configurationCards={data.formData?.configurationCards}
|
|
479
|
+
/>
|
|
503
480
|
|
|
504
481
|
{/* Last Run Info */}
|
|
505
482
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, mt: 1 }}>
|
|
@@ -24,6 +24,11 @@ import { useSearch } from '../../contexts/SearchContext';
|
|
|
24
24
|
import { getStatusColor } from './statusColors';
|
|
25
25
|
import { ArticleAnalyzerIcon, FormattingNodeIcon } from '../../icons';
|
|
26
26
|
import { AutomationNodeHeaderSection } from './AutomationNodeHeader';
|
|
27
|
+
import {
|
|
28
|
+
AutomationAIReasoningSection,
|
|
29
|
+
AutomationConfigurationCardsSection,
|
|
30
|
+
} from './AutomationNodeConfigDisplay';
|
|
31
|
+
import { AutomationConfigurationCard, AutomationAIReasoning } from '../../types/automation-node-data-types';
|
|
27
32
|
|
|
28
33
|
interface AutomationFormattingNodeProps {
|
|
29
34
|
data: {
|
|
@@ -52,14 +57,8 @@ interface AutomationFormattingNodeProps {
|
|
|
52
57
|
partial: number;
|
|
53
58
|
ignored: number;
|
|
54
59
|
};
|
|
55
|
-
aiReasoning?:
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
configurationCards?: Array<{
|
|
59
|
-
icon: string;
|
|
60
|
-
label: string;
|
|
61
|
-
iconColor: string;
|
|
62
|
-
}>;
|
|
60
|
+
aiReasoning?: AutomationAIReasoning;
|
|
61
|
+
configurationCards?: AutomationConfigurationCard[];
|
|
63
62
|
aiSuggestionsCount?: number; // Number of AI suggestions available
|
|
64
63
|
[key: string]: any;
|
|
65
64
|
}; // Include formData for configuration
|
|
@@ -394,48 +393,7 @@ export const AutomationFormattingNode: React.FC<AutomationFormattingNodeProps> =
|
|
|
394
393
|
</Box>
|
|
395
394
|
</Box>
|
|
396
395
|
|
|
397
|
-
{
|
|
398
|
-
<Box sx={{
|
|
399
|
-
backgroundColor: '#1F2937',
|
|
400
|
-
borderRadius: '8px',
|
|
401
|
-
padding: '12px',
|
|
402
|
-
mb: 2,
|
|
403
|
-
border: '1px solid #374151'
|
|
404
|
-
}}>
|
|
405
|
-
{/* AI Reasoning Header */}
|
|
406
|
-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1, mb: 1 }}>
|
|
407
|
-
<Box sx={{ color: '#34D399', fontSize: '16px' }}>
|
|
408
|
-
🧠
|
|
409
|
-
</Box>
|
|
410
|
-
<Typography variant="body2" sx={{
|
|
411
|
-
color: '#34D399',
|
|
412
|
-
fontSize: '12px',
|
|
413
|
-
fontWeight: 600
|
|
414
|
-
}}>
|
|
415
|
-
{t('automation.formattingNode.aiReasoning')}
|
|
416
|
-
</Typography>
|
|
417
|
-
</Box>
|
|
418
|
-
|
|
419
|
-
{/* AI Reasoning Description */}
|
|
420
|
-
<Box sx={{
|
|
421
|
-
backgroundColor: 'transparent',
|
|
422
|
-
borderRadius: '4px',
|
|
423
|
-
padding: '8px',
|
|
424
|
-
border: '1px solid #4B5563',
|
|
425
|
-
minHeight: '40px',
|
|
426
|
-
display: 'flex',
|
|
427
|
-
alignItems: 'center'
|
|
428
|
-
}}>
|
|
429
|
-
<Typography variant="body2" sx={{
|
|
430
|
-
color: '#9CA3AF',
|
|
431
|
-
fontSize: '12px',
|
|
432
|
-
lineHeight: 1.4,
|
|
433
|
-
margin: 0
|
|
434
|
-
}}>
|
|
435
|
-
{data.formData?.aiReasoning?.text || t('automation.formattingNode.aiReasoningDefault')}
|
|
436
|
-
</Typography>
|
|
437
|
-
</Box>
|
|
438
|
-
</Box>
|
|
396
|
+
<AutomationAIReasoningSection aiReasoning={data.formData?.aiReasoning} />
|
|
439
397
|
|
|
440
398
|
{data.status === 'Completed' && (data.formData?.executionResult || data.formData?.schemaMatch) && (
|
|
441
399
|
<>
|
|
@@ -520,30 +478,9 @@ export const AutomationFormattingNode: React.FC<AutomationFormattingNodeProps> =
|
|
|
520
478
|
</>
|
|
521
479
|
)}
|
|
522
480
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
backgroundColor: '#1F2937',
|
|
527
|
-
borderRadius: '6px',
|
|
528
|
-
padding: '8px 12px',
|
|
529
|
-
mb: 1,
|
|
530
|
-
display: 'flex',
|
|
531
|
-
alignItems: 'center',
|
|
532
|
-
gap: 1,
|
|
533
|
-
border: '1px solid #374151'
|
|
534
|
-
}}>
|
|
535
|
-
<Box sx={{ color: card.iconColor || '#ffffff', fontSize: '16px' }}>
|
|
536
|
-
{card.icon}
|
|
537
|
-
</Box>
|
|
538
|
-
<Typography variant="body2" sx={{
|
|
539
|
-
color: '#ffffff',
|
|
540
|
-
fontSize: '11px',
|
|
541
|
-
fontWeight: 500
|
|
542
|
-
}}>
|
|
543
|
-
{card.label}
|
|
544
|
-
</Typography>
|
|
545
|
-
</Box>
|
|
546
|
-
))}
|
|
481
|
+
<AutomationConfigurationCardsSection
|
|
482
|
+
configurationCards={data.formData?.configurationCards}
|
|
483
|
+
/>
|
|
547
484
|
|
|
548
485
|
{/* Last Run Info */}
|
|
549
486
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, mt: 1 }}>
|