meyi-insight-ui-dev 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/components/common/PageSkeleton.d.ts +10 -0
  2. package/dist/components/data-table/toolbar.d.ts +3 -1
  3. package/dist/components/ui/badge.d.ts +1 -1
  4. package/dist/components/ui/button.d.ts +2 -2
  5. package/dist/components/ui/multi-select.d.ts +15 -0
  6. package/dist/components/ui/single-select.d.ts +15 -0
  7. package/dist/features/alerts/components/AlertFilters.d.ts +15 -0
  8. package/dist/features/alerts/components/ProcessingLifecycle.d.ts +5 -0
  9. package/dist/features/alerts/components/alerts-columns.d.ts +1 -0
  10. package/dist/features/alerts/components/alerts-table.d.ts +6 -9
  11. package/dist/features/alerts/detail.d.ts +7 -0
  12. package/dist/features/alerts/index.d.ts +2 -1
  13. package/dist/features/connectors/add-wizard/AddConnectorConfigureStep.d.ts +8 -0
  14. package/dist/features/connectors/add-wizard/AddConnectorDeployStep.d.ts +11 -0
  15. package/dist/features/connectors/add-wizard/AddConnectorOverviewStep.d.ts +4 -0
  16. package/dist/features/connectors/add-wizard/AddConnectorSourceStep.d.ts +5 -0
  17. package/dist/features/connectors/add-wizard/AddConnectorWizard.d.ts +5 -0
  18. package/dist/features/connectors/add-wizard/add-connector-options.d.ts +10 -0
  19. package/dist/features/connectors/components/ConnectorFilters.d.ts +5 -2
  20. package/dist/features/connectors/components/{InsightConnectorCard.d.ts → ConnectorGroupedList.d.ts} +7 -4
  21. package/dist/features/connectors/detail/ConnectorAlarmsTab.d.ts +4 -0
  22. package/dist/features/connectors/detail/ConnectorConfigurationTab.d.ts +10 -0
  23. package/dist/features/connectors/detail/ConnectorDetailHeader.d.ts +11 -0
  24. package/dist/features/connectors/detail/ConnectorDetailPage.d.ts +5 -0
  25. package/dist/features/connectors/detail/ConnectorDetailTabs.d.ts +6 -0
  26. package/dist/features/connectors/detail/ConnectorLogsTab.d.ts +6 -0
  27. package/dist/features/connectors/detail/ConnectorOverviewTab.d.ts +4 -0
  28. package/dist/features/connectors/detail/ConnectorSetupTab.d.ts +10 -0
  29. package/dist/features/connectors/detail/ConnectorTestTab.d.ts +6 -0
  30. package/dist/features/connectors/detail/connector-detail-utils.d.ts +18 -0
  31. package/dist/features/incidents/analytics.d.ts +1 -0
  32. package/dist/features/incidents/components/IncidentFilters.d.ts +4 -1
  33. package/dist/features/incidents/components/IncidentForm.d.ts +4 -0
  34. package/dist/features/incidents/components/InsightStatusBadge.d.ts +3 -0
  35. package/dist/features/incidents/components/incidents-columns.d.ts +0 -1
  36. package/dist/features/incidents/components/incidents-table.d.ts +3 -4
  37. package/dist/features/incidents/dashboard.d.ts +5 -0
  38. package/dist/features/pipeline/PipelineRuleEditor.d.ts +9 -0
  39. package/dist/features/pipeline/dedup.d.ts +4 -0
  40. package/dist/features/pipeline/editor-dedup.d.ts +4 -0
  41. package/dist/features/pipeline/editor-grouping.d.ts +4 -0
  42. package/dist/features/pipeline/editor-normalization.d.ts +4 -0
  43. package/dist/features/pipeline/grouping.d.ts +4 -0
  44. package/dist/features/pipeline/normalization.d.ts +1 -0
  45. package/dist/features/projects/components/ProjectFilters.d.ts +9 -0
  46. package/dist/features/projects/components/projects-table.d.ts +4 -3
  47. package/dist/features/settings/components/NotificationProvidersManager.d.ts +1 -0
  48. package/dist/features/settings/index.d.ts +5 -1
  49. package/dist/features/sop/components/SopFilters.d.ts +13 -0
  50. package/dist/features/sop/components/sop-table.d.ts +4 -7
  51. package/dist/features/workflows/components/WorkflowFilters.d.ts +11 -0
  52. package/dist/features/workflows/components/WorkflowFormHelper.d.ts +6 -0
  53. package/dist/features/workflows/components/workflows-columns.d.ts +8 -0
  54. package/dist/features/workflows/components/workflows-table.d.ts +17 -0
  55. package/dist/features/workflows/editor.d.ts +4 -0
  56. package/dist/features/workflows/index.d.ts +4 -1
  57. package/dist/hooks/useInsightPolling.d.ts +1 -0
  58. package/dist/index.d.ts +16 -2
  59. package/dist/index.js +246 -112
  60. package/dist/index.mjs +61506 -62886
  61. package/dist/router.d.ts +1 -1
  62. package/dist/services/insight.d.ts +258 -1
  63. package/dist/services/workflow.d.ts +2 -1
  64. package/dist/style.css +1 -1
  65. package/dist/types.d.ts +99 -22
  66. package/package.json +4 -1
  67. package/dist/features/alerts/components/InsightAlertCard.d.ts +0 -13
  68. package/dist/features/incidents/components/InsightIncidentCard.d.ts +0 -8
  69. package/dist/features/workflows/components/WorkflowDiagramModal.d.ts +0 -6
  70. package/dist/features/workflows/components/WorkflowFormDialog.d.ts +0 -7
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type InsightConnectorType = 'meyi_pulse' | 'grafana' | 'datadog' | 'prometheus' | 'cloudwatch' | 'pagerduty' | 'custom';
1
+ export type InsightConnectorType = 'meyi_pulse' | 'grafana' | 'datadog' | 'prometheus' | 'cloudwatch' | 'cloudtrail' | 'pagerduty' | 'custom';
2
2
  export type InsightConnector = {
3
3
  id: string;
4
4
  name: string;
@@ -13,6 +13,7 @@ export type InsightConnector = {
13
13
  awsRegion?: string | null;
14
14
  awsSelectedAlarmNames?: string[];
15
15
  awsSelectedMetricKeys?: string[];
16
+ awsCreateNewTrail?: boolean;
16
17
  awsDeploymentStatus?: 'not_started' | 'pending' | 'deployed' | 'failed' | 'deleted' | string;
17
18
  awsDeploymentStatusReason?: string | null;
18
19
  awsStackName?: string | null;
@@ -63,6 +64,38 @@ export type InsightConnectorTokenPolicy = {
63
64
  expiresAt: string | null;
64
65
  defaultTtlDays: number;
65
66
  };
67
+ export type InsightConnectorOverview = {
68
+ connector: InsightConnector;
69
+ summary: {
70
+ status: string;
71
+ lastAlarmAt: string | null;
72
+ alarmsToday: number;
73
+ errorsLastHour: number;
74
+ weeklyRate: {
75
+ day: string;
76
+ count: number;
77
+ }[];
78
+ webhookEndpoint: string;
79
+ webhookPath?: string;
80
+ authTokenPreview: string | null;
81
+ };
82
+ };
83
+ export type InsightConnectorLog = {
84
+ id: string;
85
+ timestamp: string;
86
+ httpStatus: number;
87
+ sourceIp: string;
88
+ payloadSize: number;
89
+ result: string;
90
+ };
91
+ export type InsightConnectorTestResult = {
92
+ ok: boolean;
93
+ connectorId: string;
94
+ accepted: boolean;
95
+ createsAlarm?: boolean;
96
+ receivedAt: string;
97
+ envelope: Record<string, any>;
98
+ };
66
99
  export type InsightCloudWatchDiscoverResult = {
67
100
  ok: boolean;
68
101
  connector: {
@@ -171,6 +204,31 @@ export type InsightCloudWatchConsoleDeployResult = {
171
204
  resources: string[];
172
205
  };
173
206
  };
207
+ export type InsightCloudTrailConsoleDeploy = {
208
+ ok: boolean;
209
+ connector: {
210
+ id: string;
211
+ name: string;
212
+ type: InsightConnectorType;
213
+ };
214
+ webhook: {
215
+ path: string;
216
+ url: string;
217
+ };
218
+ deployment: {
219
+ method: string;
220
+ region: string;
221
+ stackName: string;
222
+ createNewTrail: boolean;
223
+ deploymentStatusUrl: string;
224
+ templateUrl: string;
225
+ templateDownloadUrl: string;
226
+ quickCreateUrl: string;
227
+ isPublicTemplateUrl: boolean;
228
+ canPrefillTemplateUrl?: boolean;
229
+ resources: string[];
230
+ };
231
+ };
174
232
  export type InsightCloudWatchLambdaOnboarding = {
175
233
  ok: boolean;
176
234
  connector: {
@@ -349,8 +407,16 @@ export type InsightAlert = {
349
407
  incidentId?: string;
350
408
  incidentAssigneeId?: string | null;
351
409
  downTime: string;
410
+ dupCount?: number;
411
+ lastDupAt?: string | null;
352
412
  createdAt: string;
353
413
  updatedAt: string;
414
+ pipelineStatus?: string | null;
415
+ fingerprint?: string | null;
416
+ dedupKey?: string | null;
417
+ groupId?: string | null;
418
+ additionalConfiguration?: Record<string, any>;
419
+ rawPayload?: unknown;
354
420
  };
355
421
  export type InsightAlertSummary = {
356
422
  total: number;
@@ -385,6 +451,9 @@ export type InsightNotificationProvider = {
385
451
  provider_name: string;
386
452
  display_name: string;
387
453
  icon?: string;
454
+ is_enabled?: boolean;
455
+ config?: Record<string, any>;
456
+ description?: string;
388
457
  };
389
458
  export type InsightIncidentComment = {
390
459
  id: string;
@@ -404,6 +473,7 @@ export type InsightIncident = {
404
473
  projectTag?: string;
405
474
  downTime: string | null;
406
475
  resolvedAt?: string;
476
+ status: "open" | "in_progress" | "resolved" | "closed";
407
477
  analysisStatus: "pending" | "triggered" | "processing" | "completed" | "failed";
408
478
  progressPercent: number;
409
479
  analysisTriggeredAt?: string | null;
@@ -415,9 +485,20 @@ export type InsightIncident = {
415
485
  alertId?: string | null;
416
486
  assigneeIds?: string[];
417
487
  comments?: InsightIncidentComment[];
488
+ events?: InsightIncidentEvent[];
418
489
  createdAt: string;
419
490
  updatedAt: string;
420
491
  };
492
+ export type InsightIncidentEvent = {
493
+ id: string;
494
+ incidentId: string;
495
+ type: "created" | "status_change" | "assigned" | "analysis" | "comment" | string;
496
+ actor?: string | null;
497
+ message?: string | null;
498
+ beforeValue?: string | null;
499
+ afterValue?: string | null;
500
+ createdAt: string;
501
+ };
421
502
  export type InsightAnalysisResult = {
422
503
  event_id: string;
423
504
  instance_id: string;
@@ -489,6 +570,7 @@ export type InsightAnalysisResult = {
489
570
  };
490
571
  is_complete: boolean;
491
572
  is_failed: boolean;
573
+ error?: string;
492
574
  };
493
575
  export type NewInsightAnalysisResult = {
494
576
  summary?: string;
@@ -513,6 +595,7 @@ export type NewInsightAnalysisResult = {
513
595
  dependency_impact?: string[];
514
596
  probable_root_cause?: string;
515
597
  recommended_actions?: string[];
598
+ error?: string;
516
599
  };
517
600
  export type NewRemediationSteps = {
518
601
  immediate_actions?: string[];
@@ -523,7 +606,7 @@ export type NewRemediationSteps = {
523
606
  /** @deprecated Use InsightConnector */
524
607
  export type CloudConnector = InsightConnector;
525
608
  export type InsightSopSeverity = 'critical' | 'high' | 'medium' | 'low';
526
- export type InsightSopStatus = 'draft' | 'pending' | 'approved' | 'generating';
609
+ export type InsightSopStatus = 'draft' | 'pending' | 'approved' | 'generating' | 'failed';
527
610
  export type InsightSop = {
528
611
  id: string;
529
612
  sopId: string;
@@ -539,38 +622,32 @@ export type InsightSop = {
539
622
  source?: string;
540
623
  project?: string;
541
624
  steps?: string;
625
+ error_response?: string | null;
542
626
  createdBy?: string;
543
627
  createdAt: string;
544
628
  updatedAt: string;
545
629
  };
546
- export type InsightWorkflowConditionField = 'source' | 'resource' | 'severity' | 'project' | 'alertName';
547
- export type InsightWorkflowConditionOperator = 'equals' | 'contains' | 'startsWith' | 'endsWith' | 'in';
548
- export type InsightWorkflowConditionRule = {
549
- field: InsightWorkflowConditionField;
550
- operator: InsightWorkflowConditionOperator;
551
- value: string | string[];
552
- };
553
- export type InsightWorkflowConditionGroup = {
554
- groupId: string;
555
- operator: 'AND' | 'OR';
556
- rules: InsightWorkflowConditionRule[];
557
- };
558
- export type InsightWorkflowActionType = 'create_incident' | 'assign_incident' | 'generate_rca' | 'generate_sop' | 'send_notification' | 'skip_alert';
559
- export type InsightWorkflowAction = {
560
- type: InsightWorkflowActionType;
561
- config: Record<string, any>;
562
- };
563
630
  export type InsightWorkflow = {
564
631
  id: string;
565
632
  name: string;
566
- description: string | null;
567
633
  isActive: boolean;
568
634
  priority: number;
569
- conditions: InsightWorkflowConditionGroup[];
570
- actions: InsightWorkflowAction[];
635
+ yamlDefinition: string;
571
636
  createdAt: string;
572
637
  updatedAt: string;
573
638
  };
639
+ export type YamlParseResult = {
640
+ ok: boolean;
641
+ definition?: {
642
+ name: string;
643
+ description?: string;
644
+ priority: number;
645
+ active: boolean;
646
+ conditions: any[];
647
+ actions: any[];
648
+ };
649
+ errors?: string[];
650
+ };
574
651
  export type InsightWorkflowExecution = {
575
652
  id: string;
576
653
  workflowId: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "meyi-insight-ui-dev",
3
3
  "private": false,
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -28,6 +28,7 @@
28
28
  "react-dom": "^19.0.0"
29
29
  },
30
30
  "dependencies": {
31
+ "@monaco-editor/react": "^4.7.0",
31
32
  "@radix-ui/react-alert-dialog": "^1.1.16",
32
33
  "@radix-ui/react-checkbox": "^1.3.4",
33
34
  "@radix-ui/react-dialog": "^1.1.15",
@@ -51,6 +52,7 @@
51
52
  "clsx": "^2.1.0",
52
53
  "cmdk": "^1.1.1",
53
54
  "date-fns": "^4.4.0",
55
+ "js-yaml": "^4.2.0",
54
56
  "lucide-react": "^0.545.0",
55
57
  "next-remove-imports": "^1.0.13",
56
58
  "socket.io-client": "^4.8.1",
@@ -61,6 +63,7 @@
61
63
  },
62
64
  "devDependencies": {
63
65
  "@tailwindcss/vite": "^4.1.0",
66
+ "@types/js-yaml": "^4.0.9",
64
67
  "@types/node": "^20.0.0",
65
68
  "@types/react": "^19.0.0",
66
69
  "@types/react-dom": "^19.0.0",
@@ -1,13 +0,0 @@
1
- import { InsightAlert } from '../../../types.js';
2
- interface InsightAlertCardProps {
3
- alert: InsightAlert;
4
- deletingId: string | null;
5
- onViewIncident: (id: string) => void;
6
- onConvert: (alert: InsightAlert) => void;
7
- onGenerateSop?: (alert: InsightAlert) => void;
8
- generatingSopId?: string | null;
9
- sopId?: string | null;
10
- onDelete: (id: string) => void;
11
- }
12
- export declare function InsightAlertCard({ alert, deletingId, onViewIncident, onConvert, onGenerateSop, generatingSopId, sopId, onDelete, }: InsightAlertCardProps): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,8 +0,0 @@
1
- import { InsightIncident } from '../../../types.js';
2
- interface Props {
3
- incident: InsightIncident;
4
- onViewResult: (id: string) => void;
5
- onAssignClick: (incident: InsightIncident) => void;
6
- }
7
- export declare function InsightIncidentCard({ incident: init, onViewResult, onAssignClick }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,6 +0,0 @@
1
- import { InsightWorkflow } from '../../../types.js';
2
- export declare function WorkflowDiagramModal({ open, onOpenChange, workflow, }: {
3
- open: boolean;
4
- onOpenChange: (open: boolean) => void;
5
- workflow?: InsightWorkflow;
6
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { InsightWorkflow } from '../../../types.js';
2
- export declare function WorkflowFormDialog({ open, onOpenChange, workflow, onSaved, }: {
3
- open: boolean;
4
- onOpenChange: (open: boolean) => void;
5
- workflow?: InsightWorkflow;
6
- onSaved: () => void;
7
- }): import("react/jsx-runtime").JSX.Element;