@dallask/a11y-mcp-srv 1.0.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.
Files changed (81) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +9 -0
  3. package/README.md +1328 -0
  4. package/bin/server.js +8 -0
  5. package/dist/core/accessibility-runner.d.ts +123 -0
  6. package/dist/core/accessibility-runner.d.ts.map +1 -0
  7. package/dist/core/accessibility-runner.js +465 -0
  8. package/dist/core/accessibility-runner.js.map +1 -0
  9. package/dist/core/basic-auth.d.ts +35 -0
  10. package/dist/core/basic-auth.d.ts.map +1 -0
  11. package/dist/core/basic-auth.js +52 -0
  12. package/dist/core/basic-auth.js.map +1 -0
  13. package/dist/core/config.d.ts +44 -0
  14. package/dist/core/config.d.ts.map +1 -0
  15. package/dist/core/config.js +163 -0
  16. package/dist/core/config.js.map +1 -0
  17. package/dist/core/error-handler.d.ts +66 -0
  18. package/dist/core/error-handler.d.ts.map +1 -0
  19. package/dist/core/error-handler.js +305 -0
  20. package/dist/core/error-handler.js.map +1 -0
  21. package/dist/core/normalize-audit-result.d.ts +18 -0
  22. package/dist/core/normalize-audit-result.d.ts.map +1 -0
  23. package/dist/core/normalize-audit-result.js +118 -0
  24. package/dist/core/normalize-audit-result.js.map +1 -0
  25. package/dist/core/playwright-bootstrap.d.ts +21 -0
  26. package/dist/core/playwright-bootstrap.d.ts.map +1 -0
  27. package/dist/core/playwright-bootstrap.js +144 -0
  28. package/dist/core/playwright-bootstrap.js.map +1 -0
  29. package/dist/core/progress-streamer.d.ts +44 -0
  30. package/dist/core/progress-streamer.d.ts.map +1 -0
  31. package/dist/core/progress-streamer.js +160 -0
  32. package/dist/core/progress-streamer.js.map +1 -0
  33. package/dist/core/result-processor.d.ts +86 -0
  34. package/dist/core/result-processor.d.ts.map +1 -0
  35. package/dist/core/result-processor.js +475 -0
  36. package/dist/core/result-processor.js.map +1 -0
  37. package/dist/core/session-manager.d.ts +73 -0
  38. package/dist/core/session-manager.d.ts.map +1 -0
  39. package/dist/core/session-manager.js +243 -0
  40. package/dist/core/session-manager.js.map +1 -0
  41. package/dist/server.d.ts +10 -0
  42. package/dist/server.d.ts.map +1 -0
  43. package/dist/server.js +1439 -0
  44. package/dist/server.js.map +1 -0
  45. package/dist/tools/aggregate.d.ts +26 -0
  46. package/dist/tools/aggregate.d.ts.map +1 -0
  47. package/dist/tools/aggregate.js +340 -0
  48. package/dist/tools/aggregate.js.map +1 -0
  49. package/dist/tools/analysis.d.ts +68 -0
  50. package/dist/tools/analysis.d.ts.map +1 -0
  51. package/dist/tools/analysis.js +1199 -0
  52. package/dist/tools/analysis.js.map +1 -0
  53. package/dist/tools/audit.d.ts +38 -0
  54. package/dist/tools/audit.d.ts.map +1 -0
  55. package/dist/tools/audit.js +472 -0
  56. package/dist/tools/audit.js.map +1 -0
  57. package/dist/tools/comparison.d.ts +27 -0
  58. package/dist/tools/comparison.d.ts.map +1 -0
  59. package/dist/tools/comparison.js +499 -0
  60. package/dist/tools/comparison.js.map +1 -0
  61. package/dist/tools/export.d.ts +43 -0
  62. package/dist/tools/export.d.ts.map +1 -0
  63. package/dist/tools/export.js +746 -0
  64. package/dist/tools/export.js.map +1 -0
  65. package/dist/tools/filter.d.ts +26 -0
  66. package/dist/tools/filter.d.ts.map +1 -0
  67. package/dist/tools/filter.js +244 -0
  68. package/dist/tools/filter.js.map +1 -0
  69. package/dist/tools/session.d.ts +26 -0
  70. package/dist/tools/session.d.ts.map +1 -0
  71. package/dist/tools/session.js +228 -0
  72. package/dist/tools/session.js.map +1 -0
  73. package/dist/tools/visualize.d.ts +26 -0
  74. package/dist/tools/visualize.d.ts.map +1 -0
  75. package/dist/tools/visualize.js +942 -0
  76. package/dist/tools/visualize.js.map +1 -0
  77. package/dist/types/index.d.ts +792 -0
  78. package/dist/types/index.d.ts.map +1 -0
  79. package/dist/types/index.js +24 -0
  80. package/dist/types/index.js.map +1 -0
  81. package/package.json +69 -0
@@ -0,0 +1,792 @@
1
+ /**
2
+ * TypeScript type definitions
3
+ * Shared types for the Accessibility MCP Server
4
+ */
5
+ /**
6
+ * Accessibility rule data structure from the accessibility engine
7
+ */
8
+ /**
9
+ * Impact/severity level for an issue. Uses each engine's native levels (no mapping).
10
+ *
11
+ * axe-core: critical | serious | moderate | minor
12
+ * ACE (IBM Equal Access): violation | potentialviolation | potentialrecommendation | recommendation | manual | pass
13
+ */
14
+ export type ImpactLevel = string;
15
+ export interface AccessibilityRuleData {
16
+ count: number;
17
+ xpaths: string[];
18
+ selectors?: (string | boolean)[];
19
+ text?: any[];
20
+ hidden?: boolean[];
21
+ description?: string;
22
+ domInfo?: DOMInfo[];
23
+ contrastdata?: any[];
24
+ tags?: string[];
25
+ /** Engine-reported impact (axe: critical/serious/moderate/minor; ACE: violation/potentialviolation/...) */
26
+ impact?: ImpactLevel;
27
+ }
28
+ /**
29
+ * Default impact order for sorting and scoring (higher = worse).
30
+ * axe: critical, serious, moderate, minor. ACE: violation, potentialviolation, potentialrecommendation, recommendation, manual, pass.
31
+ */
32
+ export declare const IMPACT_ORDER: Record<string, number>;
33
+ /**
34
+ * DOM information for an element
35
+ */
36
+ export interface DOMInfo {
37
+ tagName?: string;
38
+ id?: string | null;
39
+ className?: string | null;
40
+ textContent?: string | null;
41
+ innerHTML?: string | null;
42
+ attributes?: Record<string, string>;
43
+ selector?: string;
44
+ error?: string;
45
+ }
46
+ /**
47
+ * Accessibility category structure (error, contrast, etc.)
48
+ */
49
+ export interface AccessibilityCategory {
50
+ count: number;
51
+ items: Record<string, AccessibilityRuleData>;
52
+ }
53
+ /**
54
+ * Accessibility report structure containing categories
55
+ */
56
+ export interface AccessibilityReport {
57
+ error?: AccessibilityCategory;
58
+ contrast?: AccessibilityCategory;
59
+ [key: string]: AccessibilityCategory | undefined;
60
+ }
61
+ /**
62
+ * Test engine metadata
63
+ */
64
+ export interface TestEngine {
65
+ name: string;
66
+ version: string;
67
+ }
68
+ /**
69
+ * Test runner metadata
70
+ */
71
+ export interface TestRunner {
72
+ name: string;
73
+ }
74
+ /**
75
+ * Test environment information
76
+ */
77
+ export interface TestEnvironment {
78
+ userAgent: string;
79
+ windowWidth: number;
80
+ windowHeight: number;
81
+ orientationType?: string;
82
+ orientationAngle?: number;
83
+ }
84
+ /**
85
+ * Complete accessibility results structure
86
+ */
87
+ export interface AccessibilityResults {
88
+ url: string;
89
+ timestamp: string;
90
+ testEngine: TestEngine;
91
+ testRunner: TestRunner;
92
+ testEnvironment: TestEnvironment;
93
+ violations: AccessibilityReport;
94
+ }
95
+ /**
96
+ * Test metadata structure
97
+ */
98
+ export interface TestMetadata {
99
+ testEngine: TestEngine;
100
+ testRunner: TestRunner;
101
+ testEnvironment: TestEnvironment;
102
+ timestamp: string;
103
+ url: string;
104
+ }
105
+ /**
106
+ * WCAG compliance levels
107
+ */
108
+ export type WCAGLevel = 'A' | 'AA' | 'AAA';
109
+ /**
110
+ * WCAG compliance status
111
+ */
112
+ export type ComplianceStatus = 'pass' | 'fail' | 'partial';
113
+ /**
114
+ * Fix suggestion with code examples
115
+ */
116
+ export interface FixSuggestion {
117
+ current: string;
118
+ suggested: string;
119
+ explanation: string;
120
+ }
121
+ /**
122
+ * Prioritized accessibility issue
123
+ */
124
+ export interface PrioritizedIssue {
125
+ ruleId: string;
126
+ impact: ImpactLevel;
127
+ description: string;
128
+ wcagLevel: string;
129
+ tags: string[];
130
+ element: string;
131
+ xpath: string;
132
+ /** CSS class selector for the element (e.g. ".isi-btn.jsIsiMinimize") */
133
+ classSelector?: string;
134
+ fix: FixSuggestion;
135
+ userImpact: string;
136
+ priority: number;
137
+ category?: string;
138
+ helpUrl?: string;
139
+ }
140
+ /**
141
+ * Quick win - easy fix with high impact
142
+ */
143
+ export interface QuickWin {
144
+ ruleId: string;
145
+ description: string;
146
+ impact: ImpactLevel;
147
+ fix: FixSuggestion;
148
+ estimatedTime: string;
149
+ affectedElements: number;
150
+ }
151
+ /**
152
+ * Critical blocker - must fix before launch
153
+ */
154
+ export interface CriticalBlocker {
155
+ ruleId: string;
156
+ description: string;
157
+ impact: ImpactLevel;
158
+ userImpact: string;
159
+ affectedElements: number;
160
+ wcagLevel: string;
161
+ }
162
+ /**
163
+ * WCAG compliance breakdown
164
+ */
165
+ export interface WCAGCompliance {
166
+ A: number;
167
+ AA: number;
168
+ AAA: number;
169
+ }
170
+ /**
171
+ * Summary statistics for audit results
172
+ */
173
+ export interface AuditSummary {
174
+ totalIssues: number;
175
+ score: number;
176
+ wcagCompliance: WCAGCompliance;
177
+ byCategory: Record<string, number>;
178
+ byImpact: Record<string, number>;
179
+ }
180
+ /**
181
+ * Applied filters information
182
+ */
183
+ export interface AppliedFilters {
184
+ tags?: string[];
185
+ originalIssueCount?: number;
186
+ }
187
+ /**
188
+ * Complete audit result structure
189
+ */
190
+ export interface AuditResult {
191
+ summary: AuditSummary;
192
+ prioritizedIssues: PrioritizedIssue[];
193
+ appliedFilters?: AppliedFilters;
194
+ conversationalSummary: string;
195
+ issuesTable: string;
196
+ quickWins: QuickWin[];
197
+ criticalBlockers: CriticalBlocker[];
198
+ metadata?: TestMetadata;
199
+ rawResults?: AccessibilityResults;
200
+ /** HTTP status of the audited page (e.g. 200, 401). Set when Basic Auth or response is checked. */
201
+ responseStatus?: number;
202
+ }
203
+ /**
204
+ * Login selectors for custom login forms
205
+ */
206
+ export interface LoginSelectors {
207
+ usernameSelector?: string;
208
+ passwordSelector?: string;
209
+ submitSelector?: string;
210
+ successIndicator?: string;
211
+ }
212
+ /**
213
+ * Session configuration
214
+ */
215
+ export interface SessionConfig {
216
+ domain: string;
217
+ loginUrl?: string;
218
+ username: string;
219
+ password: string;
220
+ loginSelectors?: LoginSelectors;
221
+ sessionId?: string;
222
+ }
223
+ /**
224
+ * Active session information
225
+ */
226
+ export interface Session {
227
+ sessionId: string;
228
+ domain: string;
229
+ createdAt: string;
230
+ expiresAt: string;
231
+ testUrl?: string;
232
+ isActive: boolean;
233
+ }
234
+ /**
235
+ * Session creation result
236
+ */
237
+ export interface SessionResult {
238
+ sessionId: string;
239
+ expiresAt: string;
240
+ testUrl: string;
241
+ }
242
+ /**
243
+ * Wait strategy for page loading
244
+ */
245
+ export type WaitStrategy = 'networkidle' | 'load' | 'domcontentloaded';
246
+ /**
247
+ * Audit strategy for site-wide audits
248
+ */
249
+ export type AuditStrategy = 'critical' | 'comprehensive' | 'custom';
250
+ /**
251
+ * Accessibility engine: axe-core (Deque) or IBM Equal Access (ACE)
252
+ */
253
+ export type AccessibilityEngine = 'axe' | 'ace';
254
+ /**
255
+ * Single URL audit input
256
+ */
257
+ export interface AuditUrlInput {
258
+ url: string;
259
+ domain?: string;
260
+ tags?: string[];
261
+ waitForLoad?: WaitStrategy;
262
+ timeout?: number;
263
+ engine?: AccessibilityEngine;
264
+ /** HTTP Basic Auth username. Use with basicAuthPassword for sites that require Basic Authentication. */
265
+ basicAuthUsername?: string;
266
+ /** HTTP Basic Auth password. Use with basicAuthUsername for sites that require Basic Authentication. */
267
+ basicAuthPassword?: string;
268
+ }
269
+ /**
270
+ * Multiple URLs audit input
271
+ */
272
+ export interface AuditMultipleUrlsInput {
273
+ urls: string[] | string;
274
+ domain?: string;
275
+ parallel?: number;
276
+ continueOnError?: boolean;
277
+ tags?: string[];
278
+ engine?: AccessibilityEngine;
279
+ /** HTTP Basic Auth username for all URLs. Use with basicAuthPassword when sites require Basic Authentication. */
280
+ basicAuthUsername?: string;
281
+ /** HTTP Basic Auth password. Use with basicAuthUsername. */
282
+ basicAuthPassword?: string;
283
+ }
284
+ /**
285
+ * Site audit input
286
+ */
287
+ export interface AuditSiteInput {
288
+ domain: string;
289
+ tags?: string[];
290
+ strategy?: AuditStrategy;
291
+ maxPages?: number;
292
+ priorityPaths?: string[];
293
+ }
294
+ /**
295
+ * Authenticated audit input
296
+ */
297
+ export interface AuditWithSessionInput {
298
+ sessionId: string;
299
+ url: string;
300
+ domain?: string;
301
+ tags?: string[];
302
+ }
303
+ /**
304
+ * Score calculation input
305
+ */
306
+ export interface ScoreInput {
307
+ results: AuditResult | string;
308
+ weights?: Record<string, number>;
309
+ basicAuthUsername?: string;
310
+ basicAuthPassword?: string;
311
+ }
312
+ /**
313
+ * Score result
314
+ */
315
+ export interface ScoreResult {
316
+ overallScore: number;
317
+ breakdown: Record<string, number>;
318
+ wcagCompliance: WCAGCompliance;
319
+ trend?: TrendData;
320
+ }
321
+ /**
322
+ * Prioritization criteria
323
+ */
324
+ export type PrioritizationCriteria = 'impact' | 'wcag' | 'fixability' | 'user-impact';
325
+ /**
326
+ * Prioritize issues input
327
+ */
328
+ export interface PrioritizeIssuesInput {
329
+ results: AuditResult;
330
+ criteria?: PrioritizationCriteria;
331
+ limit?: number;
332
+ }
333
+ /**
334
+ * Prioritize issues result
335
+ */
336
+ export interface PrioritizeIssuesResult {
337
+ prioritized: PrioritizedIssue[];
338
+ quickWins: QuickWin[];
339
+ criticalBlockers: CriticalBlocker[];
340
+ reasoning: string;
341
+ }
342
+ /**
343
+ * Explain issue input
344
+ */
345
+ export interface ExplainIssueInput {
346
+ ruleId: string;
347
+ context?: string;
348
+ }
349
+ /**
350
+ * Issue explanation result
351
+ */
352
+ export interface IssueExplanation {
353
+ ruleId: string;
354
+ explanation: string;
355
+ userImpact: string;
356
+ howToFix: string;
357
+ wcagReference: string;
358
+ commonMistakes: string[];
359
+ codeExample?: {
360
+ before: string;
361
+ after: string;
362
+ };
363
+ }
364
+ /**
365
+ * Quick fixes input
366
+ */
367
+ export interface QuickFixesInput {
368
+ results: AuditResult | string;
369
+ format?: 'markdown' | 'html' | 'json';
370
+ includeCode?: boolean;
371
+ basicAuthUsername?: string;
372
+ basicAuthPassword?: string;
373
+ }
374
+ /**
375
+ * Quick fix item
376
+ */
377
+ export interface QuickFixItem {
378
+ ruleId: string;
379
+ description: string;
380
+ currentCode?: string;
381
+ fixedCode?: string;
382
+ explanation: string;
383
+ impactEstimate: string;
384
+ affectedElements: number;
385
+ }
386
+ /**
387
+ * Quick fixes result
388
+ */
389
+ export interface QuickFixesResult {
390
+ fixes: QuickFixItem[];
391
+ format: 'markdown' | 'html' | 'json';
392
+ totalFixes: number;
393
+ formatted?: string;
394
+ }
395
+ /**
396
+ * Comparison input
397
+ */
398
+ export interface CompareAccessibilityInput {
399
+ before: AuditResult | string;
400
+ after: AuditResult | string;
401
+ format?: 'summary' | 'detailed' | 'diff';
402
+ basicAuthUsername?: string;
403
+ basicAuthPassword?: string;
404
+ }
405
+ /**
406
+ * Comparison result
407
+ */
408
+ export interface ComparisonResult {
409
+ issuesFixed: PrioritizedIssue[];
410
+ issuesIntroduced: PrioritizedIssue[];
411
+ scoreImprovement: number;
412
+ remainingIssues: PrioritizedIssue[];
413
+ summary: string;
414
+ format: 'summary' | 'detailed' | 'diff';
415
+ }
416
+ /**
417
+ * Tracking timeframe
418
+ */
419
+ export type TrackingTimeframe = '7d' | '30d' | '90d' | 'all';
420
+ /**
421
+ * Tracking metric
422
+ */
423
+ export type TrackingMetric = 'score' | 'issues' | 'wcag-compliance';
424
+ /**
425
+ * Track accessibility input
426
+ */
427
+ export interface TrackAccessibilityInput {
428
+ url: string;
429
+ timeframe?: TrackingTimeframe;
430
+ metric?: TrackingMetric;
431
+ basicAuthUsername?: string;
432
+ basicAuthPassword?: string;
433
+ }
434
+ /**
435
+ * Trend data point
436
+ */
437
+ export interface TrendDataPoint {
438
+ timestamp: string;
439
+ value: number;
440
+ metadata?: Record<string, any>;
441
+ }
442
+ /**
443
+ * Trend data
444
+ */
445
+ export interface TrendData {
446
+ dataPoints: TrendDataPoint[];
447
+ trend: 'improving' | 'declining' | 'stable';
448
+ prediction?: {
449
+ nextValue: number;
450
+ confidence: number;
451
+ };
452
+ recommendations: string[];
453
+ visualization?: string;
454
+ }
455
+ /**
456
+ * Track accessibility result
457
+ */
458
+ export interface TrackAccessibilityResult {
459
+ url: string;
460
+ historicalData: TrendData;
461
+ currentValue: number;
462
+ trend: TrendData['trend'];
463
+ predictions?: TrendData['prediction'];
464
+ recommendations: string[];
465
+ visualization?: string;
466
+ }
467
+ /**
468
+ * Compliance report format
469
+ */
470
+ export type ComplianceReportFormat = 'VPAT' | 'WCAG' | 'ADA' | 'Section508';
471
+ /**
472
+ * Generate compliance report input
473
+ */
474
+ export interface GenerateComplianceReportInput {
475
+ results: AuditResult;
476
+ format?: ComplianceReportFormat;
477
+ level?: WCAGLevel;
478
+ includeRemediation?: boolean;
479
+ }
480
+ /**
481
+ * Compliance report result
482
+ */
483
+ export interface ComplianceReport {
484
+ format: ComplianceReportFormat;
485
+ level: WCAGLevel;
486
+ executiveSummary: string;
487
+ wcagMapping: Record<string, ComplianceStatus>;
488
+ remediationPlan?: QuickFixItem[];
489
+ compliancePercentage: number;
490
+ reportContent: string;
491
+ }
492
+ /**
493
+ * WCAG compliance input
494
+ */
495
+ export interface WCAGComplianceInput {
496
+ results: AuditResult | string;
497
+ level?: WCAGLevel;
498
+ basicAuthUsername?: string;
499
+ basicAuthPassword?: string;
500
+ }
501
+ /**
502
+ * WCAG criterion breakdown
503
+ */
504
+ export interface WCAGCriterion {
505
+ criterion: string;
506
+ title: string;
507
+ level: WCAGLevel;
508
+ status: ComplianceStatus;
509
+ violations: PrioritizedIssue[];
510
+ }
511
+ /**
512
+ * WCAG compliance result
513
+ */
514
+ export interface WCAGComplianceResult {
515
+ level: WCAGLevel;
516
+ status: ComplianceStatus;
517
+ compliancePercentage: number;
518
+ criteria: WCAGCriterion[];
519
+ missingRequirements: string[];
520
+ summary: string;
521
+ }
522
+ /**
523
+ * Progress update for long-running operations
524
+ */
525
+ export interface ProgressUpdate {
526
+ current: number;
527
+ total: number;
528
+ percentage: number;
529
+ status: string;
530
+ estimatedTimeRemaining?: number;
531
+ currentItem?: string;
532
+ }
533
+ /**
534
+ * Batch audit progress
535
+ */
536
+ export interface BatchAuditProgress extends ProgressUpdate {
537
+ completedUrls: string[];
538
+ failedUrls: string[];
539
+ currentUrl?: string;
540
+ }
541
+ /**
542
+ * Error result structure
543
+ */
544
+ export interface AuditError {
545
+ url: string;
546
+ error: string;
547
+ timestamp: string;
548
+ stack?: string;
549
+ }
550
+ /**
551
+ * Supported accessibility tags
552
+ */
553
+ export type AccessibilityTag = 'wcag2a' | 'wcag2aa' | 'wcag2aaa' | 'wcag21a' | 'wcag21aa' | 'wcag21aaa' | 'wcag22a' | 'wcag22aa' | 'wcag22aaa' | 'best-practice';
554
+ /**
555
+ * Tag filter configuration
556
+ */
557
+ export interface TagFilter {
558
+ tags: AccessibilityTag[];
559
+ mode?: 'include' | 'exclude';
560
+ }
561
+ /**
562
+ * Export to CSV input
563
+ */
564
+ export interface ExportToCsvInput {
565
+ results: AuditResult | string;
566
+ includeMetadata?: boolean;
567
+ includeViolations?: boolean;
568
+ format?: 'standard' | 'detailed' | 'minimal';
569
+ /** HTTP Basic Auth username when results is a URL. Use with basicAuthPassword. Can be in URL as https://user:password@host/. */
570
+ basicAuthUsername?: string;
571
+ /** HTTP Basic Auth password when results is a URL. Use with basicAuthUsername. */
572
+ basicAuthPassword?: string;
573
+ }
574
+ /**
575
+ * Export to CSV result
576
+ */
577
+ export interface ExportToCsvResult {
578
+ csv: string;
579
+ format: 'standard' | 'detailed' | 'minimal';
580
+ totalIssues: number;
581
+ includeMetadata: boolean;
582
+ includeViolations: boolean;
583
+ }
584
+ /**
585
+ * Export to Excel input
586
+ */
587
+ export interface ExportToExcelInput {
588
+ results: AuditResult | string;
589
+ includeCharts?: boolean;
590
+ formatting?: boolean;
591
+ basicAuthUsername?: string;
592
+ basicAuthPassword?: string;
593
+ }
594
+ /**
595
+ * Export to Excel result
596
+ */
597
+ export interface ExportToExcelResult {
598
+ excel: string;
599
+ format: 'xlsx';
600
+ totalIssues: number;
601
+ includeCharts: boolean;
602
+ formatting: boolean;
603
+ }
604
+ /**
605
+ * Export to JSON input
606
+ */
607
+ export interface ExportToJsonInput {
608
+ results: AuditResult | string;
609
+ pretty?: boolean;
610
+ includeRaw?: boolean;
611
+ basicAuthUsername?: string;
612
+ basicAuthPassword?: string;
613
+ }
614
+ /**
615
+ * Export to JSON result
616
+ */
617
+ export interface ExportToJsonResult {
618
+ json: string;
619
+ pretty: boolean;
620
+ includeRaw: boolean;
621
+ totalIssues: number;
622
+ }
623
+ /**
624
+ * Export to HTML input
625
+ */
626
+ export interface ExportToHtmlInput {
627
+ results: AuditResult | string;
628
+ template?: 'default' | 'minimal' | 'detailed';
629
+ includeCharts?: boolean;
630
+ basicAuthUsername?: string;
631
+ basicAuthPassword?: string;
632
+ }
633
+ /**
634
+ * Export to HTML result
635
+ */
636
+ export interface ExportToHtmlResult {
637
+ html: string;
638
+ template: 'default' | 'minimal' | 'detailed';
639
+ includeCharts: boolean;
640
+ totalIssues: number;
641
+ }
642
+ /**
643
+ * Filter criteria for filtering issues
644
+ */
645
+ export interface FilterCriteria {
646
+ ruleIds?: string[];
647
+ categories?: string[];
648
+ impactLevels?: ImpactLevel[];
649
+ wcagLevels?: WCAGLevel[];
650
+ minCount?: number;
651
+ elementTypes?: string[];
652
+ }
653
+ /**
654
+ * Filter issues input
655
+ */
656
+ export interface FilterIssuesInput {
657
+ results: AuditResult;
658
+ filters: FilterCriteria;
659
+ mode?: 'include' | 'exclude';
660
+ }
661
+ /**
662
+ * Filter issues result
663
+ */
664
+ export interface FilterIssuesResult {
665
+ filtered: AuditResult;
666
+ originalCount: number;
667
+ filteredCount: number;
668
+ filtersApplied: FilterCriteria;
669
+ mode: 'include' | 'exclude';
670
+ }
671
+ /**
672
+ * Search issues input
673
+ */
674
+ export interface SearchIssuesInput {
675
+ results: AuditResult;
676
+ query: string;
677
+ fields?: ('description' | 'element' | 'xpath' | 'selector' | 'ruleId' | 'userImpact' | 'fix' | 'all')[];
678
+ caseSensitive?: boolean;
679
+ }
680
+ /**
681
+ * Search issues result
682
+ */
683
+ export interface SearchIssuesResult {
684
+ matches: PrioritizedIssue[];
685
+ query: string;
686
+ totalMatches: number;
687
+ fields: ('description' | 'element' | 'xpath' | 'selector' | 'ruleId' | 'userImpact' | 'fix' | 'all')[];
688
+ }
689
+ /**
690
+ * Aggregate audit results input
691
+ */
692
+ export interface AggregateAuditResultsInput {
693
+ results: AuditResult[];
694
+ groupBy?: 'url' | 'category' | 'rule' | 'none';
695
+ includeSummary?: boolean;
696
+ }
697
+ /**
698
+ * Aggregated audit result with grouped issues
699
+ */
700
+ export interface AggregateAuditResultsResult {
701
+ aggregated: AuditResult;
702
+ groupedBy: 'url' | 'category' | 'rule' | 'none';
703
+ totalResults: number;
704
+ groupedIssues?: Record<string, PrioritizedIssue[]>;
705
+ summary: AuditSummary;
706
+ }
707
+ /**
708
+ * Breakdown dimension for statistics
709
+ */
710
+ export type BreakdownDimension = 'category' | 'impact' | 'wcag' | 'rule';
711
+ /**
712
+ * Get statistics input
713
+ */
714
+ export interface GetStatisticsInput {
715
+ results: AuditResult | AuditResult[];
716
+ breakdown?: BreakdownDimension[];
717
+ }
718
+ /**
719
+ * Statistics breakdown by dimension
720
+ */
721
+ export interface StatisticsBreakdown {
722
+ counts: Record<string, number>;
723
+ percentages: Record<string, number>;
724
+ distribution: Record<string, number>;
725
+ }
726
+ /**
727
+ * Statistics result
728
+ */
729
+ export interface GetStatisticsResult {
730
+ totalIssues: number;
731
+ averageScore: number;
732
+ totalResults: number;
733
+ byCategory?: StatisticsBreakdown;
734
+ byImpact?: StatisticsBreakdown;
735
+ byWCAG?: StatisticsBreakdown;
736
+ byRule?: StatisticsBreakdown;
737
+ wcagCompliance: WCAGCompliance;
738
+ breakdownDimensions: BreakdownDimension[];
739
+ }
740
+ /**
741
+ * Dashboard format
742
+ */
743
+ export type DashboardFormat = 'text' | 'markdown' | 'html' | 'json';
744
+ /**
745
+ * Generate dashboard input
746
+ */
747
+ export interface GenerateDashboardInput {
748
+ results: AuditResult | AuditResult[] | string | string[];
749
+ format?: DashboardFormat;
750
+ includeCharts?: boolean;
751
+ /** HTTP Basic Auth username when results is a URL. Use with basicAuthPassword. Can also be embedded in URL as https://user:password@host/. */
752
+ basicAuthUsername?: string;
753
+ /** HTTP Basic Auth password when results is a URL. Use with basicAuthUsername. */
754
+ basicAuthPassword?: string;
755
+ }
756
+ /**
757
+ * Generate dashboard result
758
+ */
759
+ export interface GenerateDashboardResult {
760
+ dashboard: string;
761
+ format: DashboardFormat;
762
+ includeCharts: boolean;
763
+ totalResults: number;
764
+ }
765
+ /**
766
+ * Summary report format
767
+ */
768
+ export type SummaryReportFormat = 'text' | 'markdown' | 'html';
769
+ /**
770
+ * Summary report level
771
+ */
772
+ export type SummaryReportLevel = 'executive' | 'detailed' | 'technical';
773
+ /**
774
+ * Generate summary report input
775
+ */
776
+ export interface GenerateSummaryReportInput {
777
+ results: AuditResult | AuditResult[] | string | string[];
778
+ format?: SummaryReportFormat;
779
+ level?: SummaryReportLevel;
780
+ basicAuthUsername?: string;
781
+ basicAuthPassword?: string;
782
+ }
783
+ /**
784
+ * Generate summary report result
785
+ */
786
+ export interface GenerateSummaryReportResult {
787
+ report: string;
788
+ format: SummaryReportFormat;
789
+ level: SummaryReportLevel;
790
+ totalResults: number;
791
+ }
792
+ //# sourceMappingURL=index.d.ts.map