@flowuent-org/diagramming-core 1.2.6 → 1.2.8

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.
@@ -1,820 +1,825 @@
1
- import { MarkerType } from '@xyflow/react';
2
-
3
- // Default nodes for the automation diagram
4
- export const automationDefaultNodes = [
5
- {
6
- id: 'start-node',
7
- type: 'AutomationStartNode',
8
- position: { x: 100, y: 200 },
9
- data: {
10
- // Display data for the node UI
11
- label: 'Workflow Trigger',
12
- description: 'Workflow entry point. Triggered manually or on schedule.',
13
- status: 'Ready',
14
- lastRun: 'Never',
15
- duration: '0.0s',
16
- // iconName: 'PlayArrow', // Users must define their own icons
17
-
18
- // Form data for configuration (keeping existing structure for compatibility)
19
- formData: {
20
- nodeId: 'start-node',
21
- title: 'Workflow Trigger',
22
- type: 'start',
23
- triggerType: 'manual',
24
- scheduleConfig: {
25
- frequency: 'daily',
26
- time: '09:00',
27
- timezone: 'UTC',
28
- },
29
- eventConfig: {
30
- webhookUrl: '',
31
- eventType: 'webhook',
32
- filters: [],
33
- },
34
- initialVariables: [
35
- {
36
- name: 'runId',
37
- value: '{{timestamp}}',
38
- type: 'string',
39
- },
40
- {
41
- name: 'startTime',
42
- value: '{{now}}',
43
- type: 'string',
44
- },
45
- ],
46
- outputVariable: 'workflowContext',
47
- isPinned: false,
48
- isBlock: false,
49
- blocks: [],
50
- parallelChildrenCount: 0,
51
- conditions: {
52
- combinator: 'and',
53
- rules: [],
54
- },
55
- },
56
- },
57
- width: 336,
58
- height: 150,
59
- measured: { width: 336, height: 150 },
60
- },
61
- {
62
- id: 'api-call-node',
63
- type: 'AutomationApiNode',
64
- position: { x: 500, y: 200 },
65
- data: {
66
- // Display data for the node UI
67
- label: 'Discover Headlines',
68
- description:
69
- "This node extracts all news headlines from CNN's homepage using web scraping techniques.",
70
- status: 'Ready',
71
- lastRun: 'Never',
72
- duration: '0.8s',
73
- iconName: 'Api', // Users must define their own icons
74
-
75
- // Form data for configuration
76
- formData: {
77
- nodeId: 'api-call-node',
78
- title: 'Discover Headlines',
79
- type: 'api',
80
- method: 'GET',
81
- url: 'https://jsonplaceholder.typicode.com/posts',
82
- headers: [
83
- { key: 'Content-Type', value: 'application/json', enabled: true },
84
- { key: 'Accept', value: 'application/json', enabled: true },
85
- { key: 'User-Agent', value: 'AutomationBot/1.0', enabled: true },
86
- ],
87
- queryParams: [
88
- { key: '_limit', value: '15', enabled: true },
89
- { key: 'userId', value: '1', enabled: true },
90
- ],
91
- body: '',
92
- bodyType: 'json',
93
- timeout: 30000,
94
- retryCount: 3,
95
- retryDelay: 1000,
96
- responseVariable: 'postsResponse',
97
- responseDataType: 'Object',
98
- errorHandling: {
99
- onError: 'retry',
100
- maxRetries: 3,
101
- fallbackValue: '{"error": "Failed to fetch posts data"}',
102
- },
103
- // Schema matching data for the three boxes
104
- schemaMatch: {
105
- matched: 5,
106
- partial: 0,
107
- ignored: 1,
108
- },
109
- // Configuration cards for dynamic display
110
- configurationCards: [
111
- {
112
- icon: '⚙️',
113
- label: 'GPT-5 Thinking mini · v1',
114
- iconColor: '#ffffff',
115
- },
116
- {
117
- icon: '🗄️',
118
- label: 'KB: CNN_Homepage_Titles (18 items)',
119
- iconColor: '#10b981',
120
- },
121
- ],
122
- // AI Suggestions count and data
123
- aiSuggestionsCount: 2,
124
- aiSuggestions: [
125
- {
126
- id: '1',
127
- title: 'Add Citation Extraction',
128
- description: 'Automatically extract and format citations from article content.',
129
- tags: ['classification', 'enhancement'],
130
- },
131
- {
132
- id: '2',
133
- title: 'Generate Bullet Summary',
134
- description: 'Create a concise bullet-point summary of the article\'s main points.',
135
- tags: ['classification', 'enhancement'],
136
- },
137
- ],
138
- isPinned: false,
139
- isBlock: false,
140
- blocks: [],
141
- parallelChildrenCount: 0,
142
- conditions: {
143
- combinator: 'and',
144
- rules: [],
145
- },
146
- },
147
- },
148
- width: 336,
149
- height: 150,
150
- measured: { width: 336, height: 150 },
151
- },
152
- {
153
- id: 'navigation-node',
154
- type: 'AutomationNavigationNode',
155
- position: { x: 600, y: 200 },
156
- data: {
157
- // Display data for the node UI
158
- label: 'Navigate to Website',
159
- description: 'Navigate to the target website and wait for page load',
160
- status: 'Ready',
161
- navigationType: 'navigate',
162
- url: 'https://example.com',
163
- lastRun: 'Never',
164
- backgroundColor: '#181C25',
165
- textColor: '#ffffff',
166
- borderColor: '#1e293b',
167
- iconName: 'Navigation',
168
- // Form data for configuration
169
- formData: {
170
- nodeId: 'navigation-node',
171
- title: 'Navigate to Website',
172
- type: 'navigation',
173
- navigationType: 'navigate',
174
- url: 'https://example.com',
175
- timeout: 30000,
176
- retryCount: 3,
177
- outputVariable: 'navigationResult',
178
- errorHandling: {
179
- onError: 'retry',
180
- maxRetries: 3,
181
- fallbackAction: 'skip',
182
- },
183
- isPinned: false,
184
- isBlock: false,
185
- blocks: [],
186
- parallelChildrenCount: 0,
187
- conditions: {
188
- combinator: 'and',
189
- rules: [],
190
- },
191
- },
192
- },
193
- width: 336,
194
- height: 150,
195
- measured: { width: 336, height: 150 },
196
- },
197
- {
198
- id: 'ai-suggestion-node',
199
- type: 'AutomationAISuggestionNode',
200
- position: { x: 900, y: 200 },
201
- data: {
202
- label: 'Citation Extractor',
203
- description: 'Extract and format citation from article text.',
204
- iconName: 'Lightbulb',
205
- formData: {
206
- badgeText: 'Suggested Node',
207
- mapping: { from: 'references', to: 'source_text' },
208
- pointers: [
209
- 'Ensures proper attribution',
210
- 'Creates standardized reference format',
211
- 'Enables source verification',
212
- ],
213
- },
214
- },
215
- width: 336,
216
- height: 150,
217
- measured: { width: 336, height: 150 },
218
- },
219
- {
220
- id: 'data-formatting-node',
221
- type: 'AutomationFormattingNode',
222
- position: { x: 700, y: 200 },
223
- data: {
224
- // Display data for the node UI
225
- label: 'Article Analyzer',
226
- description:
227
- 'Extract and analyze article content, generate summaries and topic classifications.',
228
- status: 'Ready',
229
- lastRun: '2 minutes ago',
230
- duration: '1.2s',
231
- // iconName: 'Article', // Users must define their own icons
232
-
233
- // Form data for configuration (keeping existing structure for compatibility)
234
- formData: {
235
- nodeId: 'data-formatting-node',
236
- title: 'Article Analyzer',
237
- type: 'formatting',
238
- inputVariable: 'postsResponse',
239
- formattingType: 'ai-powered',
240
- aiFormatting: {
241
- apiUrl:
242
- 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent',
243
- apiKey: 'PUT_GEMINI_API_KEY_HERE',
244
- model: 'GPT-5 Thinking mini',
245
- instruction:
246
- 'Extract and analyze article content, generate summaries and topic classifications. Return structured JSON with title, url, author, published_date, summary, topics, and confidence.',
247
- temperature: 0.1,
248
- maxTokens: 2048,
249
- topP: 0.95,
250
- systemPrompt:
251
- 'You are an article analysis assistant. Extract key information and provide structured analysis. Always return valid JSON format.',
252
- },
253
- outputVariable: 'analyzedArticle',
254
- outputDataType: 'Object',
255
- // Schema matching data for the three boxes
256
- schemaMatch: {
257
- matched: 4,
258
- partial: 1,
259
- ignored: 0,
260
- },
261
- // AI Reasoning data
262
- aiReasoning: {
263
- text: 'Analyzed the selected headline for key components and promises',
264
- },
265
- // Configuration cards for dynamic display
266
- configurationCards: [
267
- {
268
- icon: '🧠',
269
- label: 'GPT-5 Thinking mini · v1',
270
- iconColor: '#ffffff',
271
- },
272
- {
273
- icon: '📚',
274
- label: 'KB: CNN_Articles (18 items)',
275
- iconColor: '#10b981',
276
- },
277
- ],
278
- // AI Suggestions count
279
- aiSuggestionsCount: 2,
280
- isPinned: false,
281
- isBlock: false,
282
- blocks: [],
283
- parallelChildrenCount: 0,
284
- conditions: {
285
- combinator: 'and',
286
- rules: [],
287
- },
288
- },
289
- },
290
- width: 336,
291
- height: 150,
292
- measured: { width: 336, height: 150 },
293
- },
294
- {
295
- id: 'google-sheets-node',
296
- type: 'AutomationSheetsNode',
297
- position: { x: 1100, y: 200 },
298
- data: {
299
- // Display data for the node UI
300
- label: 'Data Sync Node',
301
- description:
302
- 'Export formatted data to Google Sheets for analysis and reporting.',
303
- status: 'Ready',
304
- lastRun: '2m ago',
305
- duration: '2.1s',
306
- iconName: 'TableChart', // Users must define their own icons
307
-
308
- // Form data for configuration (keeping existing structure for compatibility)
309
- formData: {
310
- nodeId: 'google-sheets-node',
311
- title: 'Google Sheets Export',
312
- type: 'sheets',
313
- inputVariable: 'analyzedArticle',
314
- sheetsConfig: {
315
- spreadsheetId: '',
316
- sheetName: 'News Analysis2',
317
- range: 'A1:F16',
318
- credentials: {
319
- type: 'oauth',
320
- clientId: 'PUT_GOOGLE_OAUTH_CLIENT_ID_HERE',
321
- scopes: ['https://www.googleapis.com/auth/spreadsheets'],
322
- },
323
- },
324
- dataMapping: {
325
- headers: [
326
- { column: 'A', sourceField: 'title', dataType: 'string' },
327
- { column: 'B', sourceField: 'author', dataType: 'string' },
328
- { column: 'C', sourceField: 'published_date', dataType: 'date' },
329
- { column: 'D', sourceField: 'summary', dataType: 'string' },
330
- { column: 'E', sourceField: 'topics', dataType: 'string' },
331
- { column: 'F', sourceField: 'confidence', dataType: 'number' },
332
- ],
333
- appendMode: true,
334
- clearSheet: false,
335
- },
336
- exportOptions: {
337
- exportFormat: 'sheets',
338
- emailRecipients: ['recipient@example.com'],
339
- fileName: 'news_analysis_report',
340
- includeHeaders: true,
341
- sendEmailNotification: false,
342
- emailSendEnabled: true,
343
- emailSender: 'sender@example.com',
344
- emailSubject: 'News Analysis Results',
345
- emailMessage: 'Please find the latest news analysis output.',
346
- includeSpreadsheetLink: false,
347
- attachExcel: false,
348
- // Slack output disabled
349
- slack: {
350
- enabled: true,
351
- webhookUrl: 'https://hooks.slack.com/services/PUT/WEBHOOK/URL',
352
- channel: 'your-slack-channel',
353
- messageTemplate:
354
- 'New analysis ready: {{fileName}}. Rows added: {{rowsAdded}}.',
355
- includeDataMode: 'json',
356
- includeSpreadsheetLink: false,
357
- },
358
- // WhatsApp output disabled
359
- whatsapp: {
360
- enabled: true,
361
- phoneNumber: '+94716999591',
362
- messageTemplate:
363
- 'Automation Result: {{fileName}} completed successfully. Rows processed: {{rowsAdded}}.',
364
- includeDataMode: 'summary',
365
- // Twilio configuration (optional)
366
- twilio: {
367
- enabled: true,
368
- accountSid: 'PUT_TWILIO_ACCOUNT_SID_HERE',
369
- authToken: 'PUT_TWILIO_AUTH_TOKEN_HERE',
370
- fromNumber: 'whatsapp:+14155238886', // Twilio sandbox number
371
- isSandbox: true,
372
- templateSid: 'PUT_TWILIO_TEMPLATE_SID_HERE', // Optional for template messages
373
- templateVariables: {
374
- fileName: '{{fileName}}',
375
- rowsAdded: '{{rowsAdded}}',
376
- },
377
- },
378
- },
379
- },
380
- outputVariable: 'sheetsResponse',
381
- errorHandling: {
382
- onError: 'retry',
383
- maxRetries: 3,
384
- fallbackAction: 'log',
385
- },
386
- // AI Suggestions count
387
- aiSuggestionsCount: 2,
388
- isPinned: false,
389
- isBlock: false,
390
- blocks: [],
391
- parallelChildrenCount: 0,
392
- conditions: {
393
- combinator: 'and',
394
- rules: [],
395
- },
396
- },
397
- },
398
- width: 380,
399
- height: 280,
400
- measured: { width: 380, height: 280 },
401
- },
402
- {
403
- id: 'note-node-1',
404
- type: 'AutomationNoteNode',
405
- position: { x: 700, y: 50 },
406
- data: {
407
- label: 'Article Analyzer',
408
- description:
409
- 'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
410
- iconName: 'Description',
411
- noteType: 'purpose',
412
- formData: {
413
- nodeId: 'note-node-1',
414
- title: 'Article Analyzer',
415
- type: 'note',
416
- noteType: 'purpose',
417
- description:
418
- 'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
419
- isPinned: false,
420
- isBlock: false,
421
- blocks: [],
422
- parallelChildrenCount: 0,
423
- conditions: {
424
- combinator: 'and',
425
- rules: [],
426
- },
427
- },
428
- },
429
- width: 336,
430
- height: 150,
431
- measured: { width: 336, height: 150 },
432
- },
433
- {
434
- id: 'note-node-2',
435
- type: 'AutomationNoteNode',
436
- position: { x: 500, y: 50 },
437
- data: {
438
- label: 'Discover Headlines',
439
- description:
440
- 'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
441
- iconName: 'Description',
442
- noteType: 'info',
443
- formData: {
444
- nodeId: 'note-node-2',
445
- title: 'Discover Headlines',
446
- type: 'note',
447
- noteType: 'info',
448
- description:
449
- 'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
450
- isPinned: false,
451
- isBlock: false,
452
- blocks: [],
453
- parallelChildrenCount: 0,
454
- conditions: {
455
- combinator: 'and',
456
- rules: [],
457
- },
458
- },
459
- },
460
- width: 336,
461
- height: 150,
462
- measured: { width: 336, height: 150 },
463
- },
464
- {
465
- id: 'end-node',
466
- type: 'AutomationEndNode',
467
- position: { x: 1500, y: 200 },
468
- data: {
469
- // Display data for the node UI
470
- label: 'Results Display',
471
- description: 'Display analyzed article results to the user.',
472
- status: 'Ready',
473
- lastRun: '1 minute ago',
474
- duration: '0.3s',
475
- // iconName: 'Stop', // Users must define their own icons
476
-
477
- // Form data for configuration (keeping existing structure for compatibility)
478
- formData: {
479
- nodeId: 'end-node',
480
- title: 'Results Display',
481
- type: 'end',
482
- outputType: 'display',
483
- displayConfig: {
484
- format: 'table',
485
- showInConsole: true,
486
- showInUI: true,
487
- maxRows: 100,
488
- },
489
- storeConfig: {
490
- destination: 'database',
491
- connectionString: '',
492
- tableName: 'automation_results',
493
- fileName: 'automation_output.json',
494
- format: 'json',
495
- },
496
- sendConfig: {
497
- method: 'email',
498
- recipients: ['admin@example.com'],
499
- subject: 'Automation Results',
500
- template: 'The automation workflow has completed successfully.',
501
- webhookUrl: '',
502
- },
503
- webhookConfig: {
504
- url: '',
505
- method: 'POST',
506
- headers: [
507
- { key: 'Content-Type', value: 'application/json' },
508
- { key: 'Authorization', value: 'Bearer {{webhookToken}}' },
509
- ],
510
- payloadTemplate: '{{analyzedArticle}}',
511
- },
512
- // AI Suggestions count
513
- aiSuggestionsCount: 2,
514
- isPinned: false,
515
- isBlock: false,
516
- blocks: [],
517
- parallelChildrenCount: 0,
518
- conditions: {
519
- combinator: 'and',
520
- rules: [],
521
- },
522
- },
523
- },
524
- width: 336,
525
- height: 150,
526
- measured: { width: 336, height: 150 },
527
- },
528
- // =====================================
529
- // Generate Presentation Content Node
530
- // =====================================
531
- {
532
- id: 'generate-presentation-node',
533
- type: 'AutomationGeneratePresentationNode',
534
- position: { x: 1500, y: 200 },
535
- data: {
536
- label: 'Generate Presentation',
537
- description: 'AI-powered slide content generation',
538
- status: 'Ready',
539
- inputVariable: 'reportData',
540
- outputVariable: 'presentationSlides',
541
- lastRun: 'Never',
542
- duration: '0.0s',
543
- style: 'professional',
544
- slideCount: 8,
545
- aiModel: 'GPT-4 Turbo',
546
- includeTitle: true,
547
- includeSummary: true,
548
- includeSpeakerNotes: true,
549
- },
550
- width: 300,
551
- height: 200,
552
- measured: { width: 300, height: 200 },
553
- },
554
- // =====================================
555
- // Google Services Nodes
556
- // =====================================
557
- {
558
- id: 'google-docs-node',
559
- type: 'AutomationGoogleDocsNode',
560
- position: { x: 100, y: 450 },
561
- data: {
562
- label: 'Create Report',
563
- description: 'Create a Google Docs document',
564
- serviceType: 'docs',
565
- status: 'idle',
566
- isFirstGoogleNode: true, // All Google nodes show Connect button
567
- parameters: {
568
- documentTitle: 'Automation Report',
569
- operation: 'create',
570
- content: 'Report content will be generated here...',
571
- },
572
- googleAuth: {
573
- clientId: '',
574
- scopes: [
575
- 'https://www.googleapis.com/auth/documents',
576
- 'https://www.googleapis.com/auth/drive',
577
- ],
578
- isAuthenticated: false,
579
- isLoading: false,
580
- },
581
- formData: {
582
- nodeId: 'google-docs-node',
583
- title: 'Create Report',
584
- type: 'navigation',
585
- serviceType: 'docs',
586
- },
587
- },
588
- width: 300,
589
- height: 200,
590
- measured: { width: 300, height: 200 },
591
- },
592
- {
593
- id: 'gmail-node',
594
- type: 'AutomationGmailNode',
595
- position: { x: 450, y: 450 },
596
- data: {
597
- label: 'Send Email',
598
- description: 'Send email via Gmail',
599
- serviceType: 'gmail',
600
- status: 'idle',
601
- isFirstGoogleNode: true, // All Google nodes show Connect button
602
- parameters: {
603
- to: ['recipient@example.com'],
604
- subject: 'Automation Report',
605
- body: 'Please find the attached report...',
606
- },
607
- googleAuth: {
608
- clientId: '',
609
- scopes: [
610
- 'https://www.googleapis.com/auth/gmail.send',
611
- 'https://www.googleapis.com/auth/gmail.compose',
612
- ],
613
- isAuthenticated: false,
614
- isLoading: false,
615
- },
616
- formData: {
617
- nodeId: 'gmail-node',
618
- title: 'Send Email',
619
- type: 'navigation',
620
- serviceType: 'gmail',
621
- },
622
- },
623
- width: 300,
624
- height: 200,
625
- measured: { width: 300, height: 200 },
626
- },
627
- {
628
- id: 'google-meet-node',
629
- type: 'AutomationGoogleMeetNode',
630
- position: { x: 800, y: 450 },
631
- data: {
632
- label: 'Create Meeting',
633
- description: 'Create a Google Meet link',
634
- serviceType: 'meet',
635
- status: 'idle',
636
- isFirstGoogleNode: true, // All Google nodes show Connect button
637
- parameters: {
638
- meetingTitle: 'Project Discussion',
639
- attendees: ['team@example.com'],
640
- },
641
- googleAuth: {
642
- clientId: '',
643
- scopes: ['https://www.googleapis.com/auth/meetings.space.created'],
644
- isAuthenticated: false,
645
- isLoading: false,
646
- },
647
- formData: {
648
- nodeId: 'google-meet-node',
649
- title: 'Create Meeting',
650
- type: 'navigation',
651
- serviceType: 'meet',
652
- },
653
- },
654
- width: 300,
655
- height: 200,
656
- measured: { width: 300, height: 200 },
657
- },
658
- ];
659
-
660
- // Default edges for the automation diagram
661
- export const automationDefaultEdges = [
662
- {
663
- id: 'edge-start-to-api',
664
- source: 'start-node',
665
- target: 'api-call-node',
666
- sourceHandle: 'right',
667
- targetHandle: 'left',
668
- data: {
669
- label: '',
670
- type: 'flow',
671
- },
672
- style: {
673
- stroke: '#ffffff',
674
- strokeWidth: 2,
675
- },
676
- markerEnd: {
677
- type: MarkerType.ArrowClosed,
678
- color: '#ffffff',
679
- },
680
- },
681
- {
682
- id: 'edge-api-to-navigation',
683
- source: 'api-call-node',
684
- target: 'navigation-node',
685
- sourceHandle: 'right',
686
- targetHandle: 'left',
687
- data: {
688
- label: '',
689
- type: 'flow',
690
- },
691
- style: {
692
- stroke: '#ffffff',
693
- strokeWidth: 2,
694
- },
695
- markerEnd: {
696
- type: MarkerType.ArrowClosed,
697
- color: '#ffffff',
698
- },
699
- },
700
- {
701
- id: 'edge-navigation-to-formatting',
702
- source: 'navigation-node',
703
- target: 'data-formatting-node',
704
- sourceHandle: 'right',
705
- targetHandle: 'left',
706
- data: {
707
- label: '',
708
- type: 'flow',
709
- },
710
- style: {
711
- stroke: '#ffffff',
712
- strokeWidth: 2,
713
- },
714
- markerEnd: {
715
- type: MarkerType.ArrowClosed,
716
- color: '#ffffff',
717
- },
718
- },
719
- {
720
- id: 'edge-formatting-to-sheets',
721
- source: 'data-formatting-node',
722
- target: 'google-sheets-node',
723
- sourceHandle: 'right',
724
- targetHandle: 'left',
725
- data: {
726
- label: '',
727
- type: 'flow',
728
- },
729
- style: {
730
- stroke: '#ffffff',
731
- strokeWidth: 2,
732
- },
733
- markerEnd: {
734
- type: MarkerType.ArrowClosed,
735
- color: '#ffffff',
736
- },
737
- },
738
- {
739
- id: 'edge-sheets-to-end',
740
- source: 'google-sheets-node',
741
- target: 'end-node',
742
- sourceHandle: 'right',
743
- targetHandle: 'left',
744
- data: {
745
- label: '',
746
- type: 'flow',
747
- },
748
- style: {
749
- stroke: '#ffffff',
750
- strokeWidth: 2,
751
- },
752
- markerEnd: {
753
- type: MarkerType.ArrowClosed,
754
- color: '#ffffff',
755
- },
756
- },
757
- // =====================================
758
- // Generate Presentation Edge
759
- // =====================================
760
- {
761
- id: 'edge-end-to-presentation',
762
- source: 'end-node',
763
- target: 'generate-presentation-node',
764
- sourceHandle: 'right',
765
- targetHandle: 'left',
766
- data: {
767
- label: 'Generate Slides',
768
- type: 'flow',
769
- },
770
- style: {
771
- stroke: '#8B5CF6',
772
- strokeWidth: 2,
773
- },
774
- markerEnd: {
775
- type: MarkerType.ArrowClosed,
776
- color: '#8B5CF6',
777
- },
778
- },
779
- // =====================================
780
- // Google Services Node Edges
781
- // =====================================
782
- {
783
- id: 'edge-docs-to-gmail',
784
- source: 'google-docs-node',
785
- target: 'gmail-node',
786
- sourceHandle: 'right',
787
- targetHandle: 'left',
788
- data: {
789
- label: 'Send Report',
790
- type: 'flow',
791
- },
792
- style: {
793
- stroke: '#4285F4',
794
- strokeWidth: 2,
795
- },
796
- markerEnd: {
797
- type: MarkerType.ArrowClosed,
798
- color: '#4285F4',
799
- },
800
- },
801
- {
802
- id: 'edge-gmail-to-meet',
803
- source: 'gmail-node',
804
- target: 'google-meet-node',
805
- sourceHandle: 'right',
806
- targetHandle: 'left',
807
- data: {
808
- label: 'Schedule Meeting',
809
- type: 'flow',
810
- },
811
- style: {
812
- stroke: '#EA4335',
813
- strokeWidth: 2,
814
- },
815
- markerEnd: {
816
- type: MarkerType.ArrowClosed,
817
- color: '#EA4335',
818
- },
819
- },
820
- ];
1
+ import { MarkerType } from '@xyflow/react';
2
+
3
+ // Default nodes for the automation diagram
4
+ export const automationDefaultNodes = [
5
+ {
6
+ id: 'start-node',
7
+ type: 'AutomationStartNode',
8
+ position: { x: 100, y: 200 },
9
+ data: {
10
+ // Display data for the node UI
11
+ label: 'Workflow Trigger',
12
+ description: 'Workflow entry point. Triggered manually or on schedule.',
13
+ status: 'Ready',
14
+ lastRun: 'Never',
15
+ duration: '0.0s',
16
+ // iconName: 'PlayArrow', // Users must define their own icons
17
+
18
+ // Form data for configuration (keeping existing structure for compatibility)
19
+ formData: {
20
+ nodeId: 'start-node',
21
+ title: 'Workflow Trigger',
22
+ type: 'start',
23
+ triggerType: 'manual',
24
+ scheduleConfig: {
25
+ frequency: 'daily',
26
+ time: '09:00',
27
+ timezone: 'UTC',
28
+ },
29
+ eventConfig: {
30
+ webhookUrl: '',
31
+ eventType: 'webhook',
32
+ filters: [],
33
+ },
34
+ initialVariables: [
35
+ {
36
+ name: 'runId',
37
+ value: '{{timestamp}}',
38
+ type: 'string',
39
+ },
40
+ {
41
+ name: 'startTime',
42
+ value: '{{now}}',
43
+ type: 'string',
44
+ },
45
+ ],
46
+ outputVariable: 'workflowContext',
47
+ isPinned: false,
48
+ isBlock: false,
49
+ blocks: [],
50
+ parallelChildrenCount: 0,
51
+ conditions: {
52
+ combinator: 'and',
53
+ rules: [],
54
+ },
55
+ },
56
+ },
57
+ width: 336,
58
+ height: 150,
59
+ measured: { width: 336, height: 150 },
60
+ },
61
+ {
62
+ id: 'api-call-node',
63
+ type: 'AutomationApiNode',
64
+ position: { x: 500, y: 200 },
65
+ data: {
66
+ // Display data for the node UI
67
+ label: 'Discover Headlines',
68
+ description:
69
+ "This node extracts all news headlines from CNN's homepage using web scraping techniques.",
70
+ status: 'Ready',
71
+ lastRun: 'Never',
72
+ duration: '0.8s',
73
+ iconName: 'Api', // Users must define their own icons
74
+
75
+ // Form data for configuration
76
+ formData: {
77
+ nodeId: 'api-call-node',
78
+ title: 'Discover Headlines',
79
+ type: 'api',
80
+ method: 'GET',
81
+ url: 'https://jsonplaceholder.typicode.com/posts',
82
+ headers: [
83
+ { key: 'Content-Type', value: 'application/json', enabled: true },
84
+ { key: 'Accept', value: 'application/json', enabled: true },
85
+ { key: 'User-Agent', value: 'AutomationBot/1.0', enabled: true },
86
+ ],
87
+ queryParams: [
88
+ { key: '_limit', value: '15', enabled: true },
89
+ { key: 'userId', value: '1', enabled: true },
90
+ ],
91
+ body: '',
92
+ bodyType: 'json',
93
+ timeout: 30000,
94
+ retryCount: 3,
95
+ retryDelay: 1000,
96
+ responseVariable: 'postsResponse',
97
+ responseDataType: 'Object',
98
+ errorHandling: {
99
+ onError: 'retry',
100
+ maxRetries: 3,
101
+ fallbackValue: '{"error": "Failed to fetch posts data"}',
102
+ },
103
+ // Schema matching data for the three boxes
104
+ schemaMatch: {
105
+ matched: 5,
106
+ partial: 0,
107
+ ignored: 1,
108
+ },
109
+ // Configuration cards for dynamic display
110
+ configurationCards: [
111
+ {
112
+ icon: '⚙️',
113
+ label: 'GPT-5 Thinking mini · v1',
114
+ iconColor: '#ffffff',
115
+ },
116
+ {
117
+ icon: '🗄️',
118
+ label: 'KB: CNN_Homepage_Titles (18 items)',
119
+ iconColor: '#10b981',
120
+ },
121
+ ],
122
+ // AI Suggestions count and data
123
+ aiSuggestionsCount: 2,
124
+ aiSuggestions: [
125
+ {
126
+ id: '1',
127
+ title: 'Add Citation Extraction',
128
+ description: 'Automatically extract and format citations from article content.',
129
+ tags: ['classification', 'enhancement'],
130
+ },
131
+ {
132
+ id: '2',
133
+ title: 'Generate Bullet Summary',
134
+ description: 'Create a concise bullet-point summary of the article\'s main points.',
135
+ tags: ['classification', 'enhancement'],
136
+ },
137
+ ],
138
+ isPinned: false,
139
+ isBlock: false,
140
+ blocks: [],
141
+ parallelChildrenCount: 0,
142
+ conditions: {
143
+ combinator: 'and',
144
+ rules: [],
145
+ },
146
+ },
147
+ },
148
+ width: 336,
149
+ height: 150,
150
+ measured: { width: 336, height: 150 },
151
+ },
152
+ {
153
+ id: 'navigation-node',
154
+ type: 'AutomationNavigationNode',
155
+ position: { x: 600, y: 200 },
156
+ data: {
157
+ // Display data for the node UI
158
+ label: 'Navigate to Website',
159
+ description: 'Navigate to the target website and wait for page load',
160
+ status: 'Ready',
161
+ navigationType: 'navigate',
162
+ url: 'https://example.com',
163
+ lastRun: 'Never',
164
+ backgroundColor: '#181C25',
165
+ textColor: '#ffffff',
166
+ borderColor: '#1e293b',
167
+ iconName: 'Navigation',
168
+ // Form data for configuration
169
+ formData: {
170
+ nodeId: 'navigation-node',
171
+ title: 'Navigate to Website',
172
+ type: 'navigation',
173
+ navigationType: 'navigate',
174
+ url: 'https://example.com',
175
+ timeout: 30000,
176
+ retryCount: 3,
177
+ outputVariable: 'navigationResult',
178
+ errorHandling: {
179
+ onError: 'retry',
180
+ maxRetries: 3,
181
+ fallbackAction: 'skip',
182
+ },
183
+ isPinned: false,
184
+ isBlock: false,
185
+ blocks: [],
186
+ parallelChildrenCount: 0,
187
+ conditions: {
188
+ combinator: 'and',
189
+ rules: [],
190
+ },
191
+ },
192
+ },
193
+ width: 336,
194
+ height: 150,
195
+ measured: { width: 336, height: 150 },
196
+ },
197
+ {
198
+ id: 'ai-suggestion-node',
199
+ type: 'AutomationAISuggestionNode',
200
+ position: { x: 900, y: 200 },
201
+ data: {
202
+ label: 'Citation Extractor',
203
+ description: 'Extract and format citation from article text.',
204
+ iconName: 'Lightbulb',
205
+ formData: {
206
+ badgeText: 'Suggested Node',
207
+ mapping: { from: 'references', to: 'source_text' },
208
+ pointers: [
209
+ 'Ensures proper attribution',
210
+ 'Creates standardized reference format',
211
+ 'Enables source verification',
212
+ ],
213
+ },
214
+ },
215
+ width: 336,
216
+ height: 150,
217
+ measured: { width: 336, height: 150 },
218
+ },
219
+ {
220
+ id: 'data-formatting-node',
221
+ type: 'AutomationFormattingNode',
222
+ position: { x: 700, y: 200 },
223
+ data: {
224
+ // Display data for the node UI
225
+ label: 'Article Analyzer',
226
+ description:
227
+ 'Extract and analyze article content, generate summaries and topic classifications.',
228
+ status: 'Ready',
229
+ lastRun: '2 minutes ago',
230
+ duration: '1.2s',
231
+ // iconName: 'Article', // Users must define their own icons
232
+
233
+ // Form data for configuration (keeping existing structure for compatibility)
234
+ formData: {
235
+ nodeId: 'data-formatting-node',
236
+ title: 'Article Analyzer',
237
+ type: 'formatting',
238
+ inputVariable: 'postsResponse',
239
+ formattingType: 'ai-powered',
240
+ aiFormatting: {
241
+ apiUrl:
242
+ 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent',
243
+ apiKey: 'PUT_GEMINI_API_KEY_HERE',
244
+ model: 'GPT-5 Thinking mini',
245
+ instruction:
246
+ 'Extract and analyze article content, generate summaries and topic classifications. Return structured JSON with title, url, author, published_date, summary, topics, and confidence.',
247
+ temperature: 0.1,
248
+ maxTokens: 2048,
249
+ topP: 0.95,
250
+ systemPrompt:
251
+ 'You are an article analysis assistant. Extract key information and provide structured analysis. Always return valid JSON format.',
252
+ },
253
+ outputVariable: 'analyzedArticle',
254
+ outputDataType: 'Object',
255
+ // Schema matching data for the three boxes
256
+ schemaMatch: {
257
+ matched: 4,
258
+ partial: 1,
259
+ ignored: 0,
260
+ },
261
+ // AI Reasoning data
262
+ aiReasoning: {
263
+ text: 'Analyzed the selected headline for key components and promises',
264
+ },
265
+ // Configuration cards for dynamic display
266
+ configurationCards: [
267
+ {
268
+ icon: '🧠',
269
+ label: 'GPT-5 Thinking mini · v1',
270
+ iconColor: '#ffffff',
271
+ },
272
+ {
273
+ icon: '📚',
274
+ label: 'KB: CNN_Articles (18 items)',
275
+ iconColor: '#10b981',
276
+ },
277
+ ],
278
+ // AI Suggestions count
279
+ aiSuggestionsCount: 2,
280
+ isPinned: false,
281
+ isBlock: false,
282
+ blocks: [],
283
+ parallelChildrenCount: 0,
284
+ conditions: {
285
+ combinator: 'and',
286
+ rules: [],
287
+ },
288
+ },
289
+ },
290
+ width: 336,
291
+ height: 150,
292
+ measured: { width: 336, height: 150 },
293
+ },
294
+ {
295
+ id: 'google-sheets-node',
296
+ type: 'AutomationSheetsNode',
297
+ position: { x: 1100, y: 200 },
298
+ data: {
299
+ // Display data for the node UI
300
+ label: 'Data Sync Node',
301
+ description:
302
+ 'Export formatted data to Google Sheets for analysis and reporting.',
303
+ status: 'Ready',
304
+ lastRun: '2m ago',
305
+ duration: '2.1s',
306
+ iconName: 'TableChart', // Users must define their own icons
307
+
308
+ // Form data for configuration (keeping existing structure for compatibility)
309
+ formData: {
310
+ nodeId: 'google-sheets-node',
311
+ title: 'Google Sheets Export',
312
+ type: 'sheets',
313
+ inputVariable: 'analyzedArticle',
314
+ sheetsConfig: {
315
+ spreadsheetId: '',
316
+ sheetName: 'News Analysis2',
317
+ range: 'A1:F16',
318
+ credentials: {
319
+ type: 'oauth',
320
+ clientId: 'PUT_GOOGLE_OAUTH_CLIENT_ID_HERE',
321
+ scopes: ['https://www.googleapis.com/auth/spreadsheets'],
322
+ },
323
+ },
324
+ dataMapping: {
325
+ headers: [
326
+ { column: 'A', sourceField: 'title', dataType: 'string' },
327
+ { column: 'B', sourceField: 'author', dataType: 'string' },
328
+ { column: 'C', sourceField: 'published_date', dataType: 'date' },
329
+ { column: 'D', sourceField: 'summary', dataType: 'string' },
330
+ { column: 'E', sourceField: 'topics', dataType: 'string' },
331
+ { column: 'F', sourceField: 'confidence', dataType: 'number' },
332
+ ],
333
+ appendMode: true,
334
+ clearSheet: false,
335
+ },
336
+ exportOptions: {
337
+ exportFormat: 'sheets',
338
+ emailRecipients: ['recipient@example.com'],
339
+ fileName: 'news_analysis_report',
340
+ includeHeaders: true,
341
+ sendEmailNotification: false,
342
+ emailSendEnabled: true,
343
+ emailSender: 'sender@example.com',
344
+ emailSubject: 'News Analysis Results',
345
+ emailMessage: 'Please find the latest news analysis output.',
346
+ includeSpreadsheetLink: false,
347
+ attachExcel: false,
348
+ // Slack output disabled
349
+ slack: {
350
+ enabled: true,
351
+ webhookUrl: 'https://hooks.slack.com/services/PUT/WEBHOOK/URL',
352
+ channel: 'your-slack-channel',
353
+ messageTemplate:
354
+ 'New analysis ready: {{fileName}}. Rows added: {{rowsAdded}}.',
355
+ includeDataMode: 'json',
356
+ includeSpreadsheetLink: false,
357
+ },
358
+ // WhatsApp output disabled
359
+ whatsapp: {
360
+ enabled: true,
361
+ phoneNumber: '+94716999591',
362
+ messageTemplate:
363
+ 'Automation Result: {{fileName}} completed successfully. Rows processed: {{rowsAdded}}.',
364
+ includeDataMode: 'summary',
365
+ // Twilio configuration (optional)
366
+ twilio: {
367
+ enabled: true,
368
+ accountSid: 'PUT_TWILIO_ACCOUNT_SID_HERE',
369
+ authToken: 'PUT_TWILIO_AUTH_TOKEN_HERE',
370
+ fromNumber: 'whatsapp:+14155238886', // Twilio sandbox number
371
+ isSandbox: true,
372
+ templateSid: 'PUT_TWILIO_TEMPLATE_SID_HERE', // Optional for template messages
373
+ templateVariables: {
374
+ fileName: '{{fileName}}',
375
+ rowsAdded: '{{rowsAdded}}',
376
+ },
377
+ },
378
+ },
379
+ },
380
+ outputVariable: 'sheetsResponse',
381
+ errorHandling: {
382
+ onError: 'retry',
383
+ maxRetries: 3,
384
+ fallbackAction: 'log',
385
+ },
386
+ // AI Suggestions count
387
+ aiSuggestionsCount: 2,
388
+ isPinned: false,
389
+ isBlock: false,
390
+ blocks: [],
391
+ parallelChildrenCount: 0,
392
+ conditions: {
393
+ combinator: 'and',
394
+ rules: [],
395
+ },
396
+ },
397
+ },
398
+ width: 380,
399
+ height: 280,
400
+ measured: { width: 380, height: 280 },
401
+ },
402
+ {
403
+ id: 'note-node-1',
404
+ type: 'AutomationNoteNode',
405
+ position: { x: 700, y: 50 },
406
+ data: {
407
+ label: 'Article Analyzer',
408
+ description:
409
+ 'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
410
+ iconName: 'Description',
411
+ noteType: 'purpose',
412
+ formData: {
413
+ nodeId: 'note-node-1',
414
+ title: 'Article Analyzer',
415
+ type: 'note',
416
+ noteType: 'purpose',
417
+ description:
418
+ 'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
419
+ isPinned: false,
420
+ isBlock: false,
421
+ blocks: [],
422
+ parallelChildrenCount: 0,
423
+ conditions: {
424
+ combinator: 'and',
425
+ rules: [],
426
+ },
427
+ },
428
+ },
429
+ width: 336,
430
+ height: 150,
431
+ measured: { width: 336, height: 150 },
432
+ },
433
+ {
434
+ id: 'note-node-2',
435
+ type: 'AutomationNoteNode',
436
+ position: { x: 500, y: 50 },
437
+ data: {
438
+ label: 'Discover Headlines',
439
+ description:
440
+ 'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
441
+ iconName: 'Description',
442
+ noteType: 'info',
443
+ formData: {
444
+ nodeId: 'note-node-2',
445
+ title: 'Discover Headlines',
446
+ type: 'note',
447
+ noteType: 'info',
448
+ description:
449
+ 'This node performs a final review of all processed data, ensuring quality and consistency across outputs.',
450
+ isPinned: false,
451
+ isBlock: false,
452
+ blocks: [],
453
+ parallelChildrenCount: 0,
454
+ conditions: {
455
+ combinator: 'and',
456
+ rules: [],
457
+ },
458
+ },
459
+ },
460
+ width: 336,
461
+ height: 150,
462
+ measured: { width: 336, height: 150 },
463
+ },
464
+ {
465
+ id: 'end-node',
466
+ type: 'AutomationEndNode',
467
+ position: { x: 1500, y: 200 },
468
+ data: {
469
+ // Display data for the node UI
470
+ label: 'Results Display',
471
+ description: 'Display analyzed article results to the user.',
472
+ status: 'Ready',
473
+ lastRun: '1 minute ago',
474
+ duration: '0.3s',
475
+ // iconName: 'Stop', // Users must define their own icons
476
+
477
+ // Form data for configuration (keeping existing structure for compatibility)
478
+ formData: {
479
+ nodeId: 'end-node',
480
+ title: 'Results Display',
481
+ type: 'end',
482
+ outputType: 'display',
483
+ displayConfig: {
484
+ format: 'table',
485
+ showInConsole: true,
486
+ showInUI: true,
487
+ maxRows: 100,
488
+ },
489
+ storeConfig: {
490
+ destination: 'database',
491
+ connectionString: '',
492
+ tableName: 'automation_results',
493
+ fileName: 'automation_output.json',
494
+ format: 'json',
495
+ },
496
+ sendConfig: {
497
+ method: 'email',
498
+ recipients: ['admin@example.com'],
499
+ subject: 'Automation Results',
500
+ template: 'The automation workflow has completed successfully.',
501
+ webhookUrl: '',
502
+ },
503
+ webhookConfig: {
504
+ url: '',
505
+ method: 'POST',
506
+ headers: [
507
+ { key: 'Content-Type', value: 'application/json' },
508
+ { key: 'Authorization', value: 'Bearer {{webhookToken}}' },
509
+ ],
510
+ payloadTemplate: '{{analyzedArticle}}',
511
+ },
512
+ // AI Suggestions count
513
+ aiSuggestionsCount: 2,
514
+ isPinned: false,
515
+ isBlock: false,
516
+ blocks: [],
517
+ parallelChildrenCount: 0,
518
+ conditions: {
519
+ combinator: 'and',
520
+ rules: [],
521
+ },
522
+ },
523
+ },
524
+ width: 336,
525
+ height: 150,
526
+ measured: { width: 336, height: 150 },
527
+ },
528
+ // =====================================
529
+ // Google Services Nodes
530
+ // =====================================
531
+ {
532
+ id: 'google-docs-node',
533
+ type: 'AutomationGoogleDocsNode',
534
+ position: { x: 100, y: 450 },
535
+ data: {
536
+ label: 'Create Report',
537
+ description: 'Create a Google Docs document',
538
+ serviceType: 'docs',
539
+ status: 'idle',
540
+ isFirstGoogleNode: true,
541
+ parameters: {
542
+ documentTitle: 'Automation Report',
543
+ operation: 'create',
544
+ content: 'Report content will be generated here...',
545
+ },
546
+ googleAuth: {
547
+ clientId: '',
548
+ scopes: [
549
+ 'https://www.googleapis.com/auth/documents',
550
+ 'https://www.googleapis.com/auth/drive',
551
+ ],
552
+ isAuthenticated: false,
553
+ isLoading: false,
554
+ },
555
+ formData: {
556
+ nodeId: 'google-docs-node',
557
+ title: 'Create Report',
558
+ type: 'navigation',
559
+ serviceType: 'docs',
560
+ },
561
+ },
562
+ width: 300,
563
+ height: 200,
564
+ measured: { width: 300, height: 200 },
565
+ },
566
+ {
567
+ id: 'gmail-node',
568
+ type: 'AutomationGmailNode',
569
+ position: { x: 450, y: 450 },
570
+ data: {
571
+ label: 'Send Email',
572
+ description: 'Send email via Gmail',
573
+ serviceType: 'gmail',
574
+ status: 'idle',
575
+ isFirstGoogleNode: true,
576
+ parameters: {
577
+ to: ['recipient@example.com'],
578
+ subject: 'Automation Report',
579
+ body: 'Please find the attached report...',
580
+ },
581
+ googleAuth: {
582
+ clientId: '',
583
+ scopes: [
584
+ 'https://www.googleapis.com/auth/gmail.send',
585
+ 'https://www.googleapis.com/auth/gmail.compose',
586
+ ],
587
+ isAuthenticated: false,
588
+ isLoading: false,
589
+ },
590
+ formData: {
591
+ nodeId: 'gmail-node',
592
+ title: 'Send Email',
593
+ type: 'navigation',
594
+ serviceType: 'gmail',
595
+ },
596
+ },
597
+ width: 300,
598
+ height: 200,
599
+ measured: { width: 300, height: 200 },
600
+ },
601
+ {
602
+ id: 'google-meet-node',
603
+ type: 'AutomationGoogleMeetNode',
604
+ position: { x: 800, y: 450 },
605
+ data: {
606
+ label: 'Create Meeting',
607
+ description: 'Create a Google Meet link',
608
+ serviceType: 'meet',
609
+ status: 'idle',
610
+ isFirstGoogleNode: true,
611
+ parameters: {
612
+ meetingTitle: 'Project Discussion',
613
+ attendees: ['team@example.com'],
614
+ },
615
+ googleAuth: {
616
+ clientId: '',
617
+ scopes: ['https://www.googleapis.com/auth/meetings.space.created'],
618
+ isAuthenticated: false,
619
+ isLoading: false,
620
+ },
621
+ formData: {
622
+ nodeId: 'google-meet-node',
623
+ title: 'Create Meeting',
624
+ type: 'navigation',
625
+ serviceType: 'meet',
626
+ },
627
+ },
628
+ width: 300,
629
+ height: 200,
630
+ measured: { width: 300, height: 200 },
631
+ },
632
+ {
633
+ id: 'google-slides-node',
634
+ type: 'AutomationGoogleSlidesNode',
635
+ position: { x: 1150, y: 450 },
636
+ data: {
637
+ label: 'Create Presentation',
638
+ description: 'Create a Google Slides presentation',
639
+ serviceType: 'slides',
640
+ status: 'idle',
641
+ isFirstGoogleNode: true,
642
+ parameters: {
643
+ presentationTitle: 'Project Presentation',
644
+ slideCount: 5,
645
+ },
646
+ googleAuth: {
647
+ clientId: '',
648
+ scopes: [
649
+ 'https://www.googleapis.com/auth/presentations',
650
+ 'https://www.googleapis.com/auth/drive',
651
+ ],
652
+ isAuthenticated: false,
653
+ isLoading: false,
654
+ },
655
+ formData: {
656
+ nodeId: 'google-slides-node',
657
+ title: 'Create Presentation',
658
+ type: 'navigation',
659
+ serviceType: 'slides',
660
+ },
661
+ },
662
+ width: 300,
663
+ height: 200,
664
+ measured: { width: 300, height: 200 },
665
+ },
666
+ ];
667
+
668
+ // Default edges for the automation diagram
669
+ export const automationDefaultEdges = [
670
+ {
671
+ id: 'edge-start-to-api',
672
+ source: 'start-node',
673
+ target: 'api-call-node',
674
+ sourceHandle: 'right',
675
+ targetHandle: 'left',
676
+ data: {
677
+ label: '',
678
+ type: 'flow',
679
+ },
680
+ style: {
681
+ stroke: '#ffffff',
682
+ strokeWidth: 2,
683
+ },
684
+ markerEnd: {
685
+ type: MarkerType.ArrowClosed,
686
+ color: '#ffffff',
687
+ },
688
+ },
689
+ {
690
+ id: 'edge-api-to-navigation',
691
+ source: 'api-call-node',
692
+ target: 'navigation-node',
693
+ sourceHandle: 'right',
694
+ targetHandle: 'left',
695
+ data: {
696
+ label: '',
697
+ type: 'flow',
698
+ },
699
+ style: {
700
+ stroke: '#ffffff',
701
+ strokeWidth: 2,
702
+ },
703
+ markerEnd: {
704
+ type: MarkerType.ArrowClosed,
705
+ color: '#ffffff',
706
+ },
707
+ },
708
+ {
709
+ id: 'edge-navigation-to-formatting',
710
+ source: 'navigation-node',
711
+ target: 'data-formatting-node',
712
+ sourceHandle: 'right',
713
+ targetHandle: 'left',
714
+ data: {
715
+ label: '',
716
+ type: 'flow',
717
+ },
718
+ style: {
719
+ stroke: '#ffffff',
720
+ strokeWidth: 2,
721
+ },
722
+ markerEnd: {
723
+ type: MarkerType.ArrowClosed,
724
+ color: '#ffffff',
725
+ },
726
+ },
727
+ {
728
+ id: 'edge-formatting-to-sheets',
729
+ source: 'data-formatting-node',
730
+ target: 'google-sheets-node',
731
+ sourceHandle: 'right',
732
+ targetHandle: 'left',
733
+ data: {
734
+ label: '',
735
+ type: 'flow',
736
+ },
737
+ style: {
738
+ stroke: '#ffffff',
739
+ strokeWidth: 2,
740
+ },
741
+ markerEnd: {
742
+ type: MarkerType.ArrowClosed,
743
+ color: '#ffffff',
744
+ },
745
+ },
746
+ {
747
+ id: 'edge-sheets-to-end',
748
+ source: 'google-sheets-node',
749
+ target: 'end-node',
750
+ sourceHandle: 'right',
751
+ targetHandle: 'left',
752
+ data: {
753
+ label: '',
754
+ type: 'flow',
755
+ },
756
+ style: {
757
+ stroke: '#ffffff',
758
+ strokeWidth: 2,
759
+ },
760
+ markerEnd: {
761
+ type: MarkerType.ArrowClosed,
762
+ color: '#ffffff',
763
+ },
764
+ },
765
+ // =====================================
766
+ // Google Services Node Edges
767
+ // =====================================
768
+ {
769
+ id: 'edge-docs-to-gmail',
770
+ source: 'google-docs-node',
771
+ target: 'gmail-node',
772
+ sourceHandle: 'right',
773
+ targetHandle: 'left',
774
+ data: {
775
+ label: 'Send Report',
776
+ type: 'flow',
777
+ },
778
+ style: {
779
+ stroke: '#4285F4',
780
+ strokeWidth: 2,
781
+ },
782
+ markerEnd: {
783
+ type: MarkerType.ArrowClosed,
784
+ color: '#4285F4',
785
+ },
786
+ },
787
+ {
788
+ id: 'edge-gmail-to-meet',
789
+ source: 'gmail-node',
790
+ target: 'google-meet-node',
791
+ sourceHandle: 'right',
792
+ targetHandle: 'left',
793
+ data: {
794
+ label: 'Schedule Meeting',
795
+ type: 'flow',
796
+ },
797
+ style: {
798
+ stroke: '#EA4335',
799
+ strokeWidth: 2,
800
+ },
801
+ markerEnd: {
802
+ type: MarkerType.ArrowClosed,
803
+ color: '#EA4335',
804
+ },
805
+ },
806
+ {
807
+ id: 'edge-meet-to-slides',
808
+ source: 'google-meet-node',
809
+ target: 'google-slides-node',
810
+ sourceHandle: 'right',
811
+ targetHandle: 'left',
812
+ data: {
813
+ label: 'Create Presentation',
814
+ type: 'flow',
815
+ },
816
+ style: {
817
+ stroke: '#FBBC04',
818
+ strokeWidth: 2,
819
+ },
820
+ markerEnd: {
821
+ type: MarkerType.ArrowClosed,
822
+ color: '#FBBC04',
823
+ },
824
+ },
825
+ ];