@redsift/products 12.0.0-muiv7 → 12.1.0-muiv6
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/_internal/ChartSankey.js +290 -0
- package/_internal/ChartSankey.js.map +1 -0
- package/_internal/RadarButton.js +1 -1
- package/_internal/RadarItem.js +1 -1
- package/_internal/RadarSimpleDialog.js +1 -1
- package/_internal/RadarSimpleMenuButton.js +1 -1
- package/_internal/_rollupPluginBabelHelpers.js +1 -1
- package/_internal/signal-cards.js +2 -0
- package/_internal/signal-cards.js.map +1 -0
- package/index.d.ts +1603 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/index2.js +25208 -0
- package/index2.js.map +1 -0
- package/package.json +18 -8
package/index.d.ts
CHANGED
|
@@ -196,4 +196,1606 @@ declare const RadarSimpleMenuButton: Comp<Omit<MenuButtonProps, 'children'> & {
|
|
|
196
196
|
icon?: Omit<IconProps, 'ref'>;
|
|
197
197
|
} & Pick<MenuButtonContentMenuProps, 'children'>, HTMLDivElement>;
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Translation-related type definitions
|
|
201
|
+
* Separated to avoid circular dependencies between hooks and utils
|
|
202
|
+
*/
|
|
203
|
+
/**
|
|
204
|
+
* Parameters that can be passed to translation functions for interpolation
|
|
205
|
+
* Uses a flexible type to accommodate various i18n parameter patterns
|
|
206
|
+
*/
|
|
207
|
+
type TranslationParams = Record<string, any>;
|
|
208
|
+
/** Translation function signature */
|
|
209
|
+
type TranslationFn = (key: string, params?: TranslationParams) => string;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Investigate API Type Definitions
|
|
213
|
+
*
|
|
214
|
+
* This file contains comprehensive type definitions for ALL Investigate API responses.
|
|
215
|
+
* These types are the source of truth for jmap, extsecrep, and investigate data structures.
|
|
216
|
+
*
|
|
217
|
+
* Based on: src/tools/types.ts (legacy location - types being migrated here)
|
|
218
|
+
*
|
|
219
|
+
* Data Sources & Use Cases:
|
|
220
|
+
* -------------------------
|
|
221
|
+
* These types define the shape of data consumed by signal cards, regardless of the
|
|
222
|
+
* actual API endpoint or data fetching mechanism (which happens at the application layer).
|
|
223
|
+
*
|
|
224
|
+
* 1. Email Analysis (Public & Private Investigate)
|
|
225
|
+
* Type: PublicInvestigateResponseProps
|
|
226
|
+
* Data includes: jmap.extsecrep with email authentication results
|
|
227
|
+
* Cards: DMARC, SPF, DKIM, BIMI, TLS, FCrDNS, MTA-STS, Google/Yahoo, etc.
|
|
228
|
+
* Private adds: DNSSEC, URLs, Threat Intelligence, IP Reputation, AMP
|
|
229
|
+
*
|
|
230
|
+
* 2. BIMI Checker (Domain Validation)
|
|
231
|
+
* Type: BimiCheckerResponseProps
|
|
232
|
+
* Data includes: Simple domain-level DMARC/SPF/BIMI checks
|
|
233
|
+
* Cards: DMARC Domain (BIMI Checker), SPF Domain (BIMI Checker), BIMI
|
|
234
|
+
*
|
|
235
|
+
* 3. Domain Analyzer (Advanced Domain Analysis)
|
|
236
|
+
* Type: DomainAnalyzerResponseProps
|
|
237
|
+
* Data includes: Advanced SPF/DKIM domain analysis with DNS details
|
|
238
|
+
* Cards: SPF Domain Analyzer, DKIM Domain Analyzer, Subdomain, Threat Intelligence
|
|
239
|
+
*
|
|
240
|
+
* Note: Actual API endpoints and data fetching logic are defined at the application layer,
|
|
241
|
+
* not in this Design System. These types only define the expected data structure.
|
|
242
|
+
*/
|
|
243
|
+
/**
|
|
244
|
+
* Generic DNS lookup error structure
|
|
245
|
+
* Used for DNS-related errors in FCrDNS, EHLO, and other DNS lookup operations
|
|
246
|
+
*/
|
|
247
|
+
interface DnsLookupError {
|
|
248
|
+
code?: string;
|
|
249
|
+
errno?: number;
|
|
250
|
+
syscall?: string;
|
|
251
|
+
hostname?: string;
|
|
252
|
+
message?: string;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Generic API error that can be a string message, Error object, or structured error
|
|
256
|
+
*/
|
|
257
|
+
type ApiError = string | Error | DnsLookupError | {
|
|
258
|
+
message?: string;
|
|
259
|
+
code?: string;
|
|
260
|
+
} | null;
|
|
261
|
+
interface DmarcProps {
|
|
262
|
+
fromDomain?: string;
|
|
263
|
+
policyDomain?: string;
|
|
264
|
+
spfDomain?: string;
|
|
265
|
+
dkimDomain?: string;
|
|
266
|
+
spfIdentity?: string;
|
|
267
|
+
fromDns?: boolean;
|
|
268
|
+
raw?: string;
|
|
269
|
+
result?: 'none' | 'neutral' | 'pass' | 'fail' | 'temperror' | 'permerror' | 'policy' | 'warning';
|
|
270
|
+
policy?: {
|
|
271
|
+
v?: string;
|
|
272
|
+
p?: 'none' | 'quarantine' | 'reject';
|
|
273
|
+
sp?: 'none' | 'quarantine' | 'reject';
|
|
274
|
+
pct?: number;
|
|
275
|
+
rua?: {
|
|
276
|
+
uri?: string;
|
|
277
|
+
}[];
|
|
278
|
+
ruf?: {
|
|
279
|
+
uri?: string;
|
|
280
|
+
}[];
|
|
281
|
+
adkim?: 'r' | 'relaxed' | 's' | 'strict';
|
|
282
|
+
aspf?: 'r' | 'relaxed' | 's' | 'strict';
|
|
283
|
+
[key: string]: unknown;
|
|
284
|
+
};
|
|
285
|
+
alignDkim?: boolean;
|
|
286
|
+
alignSpf?: boolean;
|
|
287
|
+
dmarcErrors?: ('no-rua' | 'invalid-record' | 'failed')[];
|
|
288
|
+
report?: {
|
|
289
|
+
message?: string;
|
|
290
|
+
detail?: string;
|
|
291
|
+
text?: string;
|
|
292
|
+
[key: string]: unknown;
|
|
293
|
+
}[];
|
|
294
|
+
error?: {
|
|
295
|
+
err?: string;
|
|
296
|
+
pos?: number;
|
|
297
|
+
};
|
|
298
|
+
[key: string]: unknown;
|
|
299
|
+
}
|
|
300
|
+
type DecisionGraphProps = {
|
|
301
|
+
id?: number;
|
|
302
|
+
effectiveValue?: string;
|
|
303
|
+
raw?: string;
|
|
304
|
+
rfc4408DnsCount?: number;
|
|
305
|
+
children?: DecisionGraphProps[];
|
|
306
|
+
voidLookupCount?: number;
|
|
307
|
+
TTL?: number;
|
|
308
|
+
errors?: SPFEvaluationError[];
|
|
309
|
+
};
|
|
310
|
+
interface SpfProps {
|
|
311
|
+
voidCount?: number;
|
|
312
|
+
status?: string;
|
|
313
|
+
report?: {
|
|
314
|
+
status?: string;
|
|
315
|
+
message?: string;
|
|
316
|
+
[key: string]: unknown;
|
|
317
|
+
}[];
|
|
318
|
+
helo?: {
|
|
319
|
+
receivedSpf?: {
|
|
320
|
+
result?: 'none' | 'neutral' | 'pass' | 'fail' | 'softfail' | 'temperror' | 'permerror';
|
|
321
|
+
clientIp?: string;
|
|
322
|
+
identity?: string;
|
|
323
|
+
helo?: string;
|
|
324
|
+
receiver?: string;
|
|
325
|
+
[key: string]: unknown;
|
|
326
|
+
};
|
|
327
|
+
decisionGraph?: DecisionGraphProps | null;
|
|
328
|
+
matchedNodes?: number[];
|
|
329
|
+
};
|
|
330
|
+
mailfrom?: {
|
|
331
|
+
receivedSpf?: {
|
|
332
|
+
result?: 'none' | 'neutral' | 'pass' | 'fail' | 'softfail' | 'temperror' | 'permerror';
|
|
333
|
+
clientIp?: string;
|
|
334
|
+
identity?: string;
|
|
335
|
+
envelopeFrom?: string;
|
|
336
|
+
receiver?: string;
|
|
337
|
+
[key: string]: unknown;
|
|
338
|
+
};
|
|
339
|
+
decisionGraph?: DecisionGraphProps | null;
|
|
340
|
+
matchedNodes?: number[];
|
|
341
|
+
};
|
|
342
|
+
[key: string]: unknown;
|
|
343
|
+
}
|
|
344
|
+
type SPFEvaluationErrorKind = 'syntax' | 'dns' | 'validation' | 'unknown';
|
|
345
|
+
type SPFEvaluationError = {
|
|
346
|
+
raw?: Error;
|
|
347
|
+
error?: string;
|
|
348
|
+
kind?: SPFEvaluationErrorKind;
|
|
349
|
+
detail?: string;
|
|
350
|
+
};
|
|
351
|
+
interface DkimProps {
|
|
352
|
+
order?: number;
|
|
353
|
+
code?: 'none' | 'neutral' | 'pass' | 'fail' | 'outdated_algorithm' | 'temperror' | 'permerror' | 'policy';
|
|
354
|
+
signature?: {
|
|
355
|
+
header?: string;
|
|
356
|
+
raw?: string;
|
|
357
|
+
algorithmId?: string;
|
|
358
|
+
hash?: string;
|
|
359
|
+
bodyHash?: string;
|
|
360
|
+
relaxedHeader?: boolean;
|
|
361
|
+
relaxedBody?: boolean;
|
|
362
|
+
signerDomain?: string;
|
|
363
|
+
selector?: string;
|
|
364
|
+
headers?: string[];
|
|
365
|
+
userId?: string;
|
|
366
|
+
arcInstance?: number;
|
|
367
|
+
length?: number;
|
|
368
|
+
ts?: string;
|
|
369
|
+
exp?: string;
|
|
370
|
+
arcCv?: string;
|
|
371
|
+
spf?: string;
|
|
372
|
+
dmarc?: string;
|
|
373
|
+
dkim?: string;
|
|
374
|
+
[key: string]: unknown;
|
|
375
|
+
} | null;
|
|
376
|
+
key?: {
|
|
377
|
+
raw?: string;
|
|
378
|
+
version?: string;
|
|
379
|
+
key_type?: string;
|
|
380
|
+
key?: string;
|
|
381
|
+
keyLength?: number;
|
|
382
|
+
testing?: boolean;
|
|
383
|
+
strict?: boolean;
|
|
384
|
+
ttl?: number;
|
|
385
|
+
[key: string]: unknown;
|
|
386
|
+
} | null;
|
|
387
|
+
error?: {
|
|
388
|
+
[key: string]: unknown;
|
|
389
|
+
} | null;
|
|
390
|
+
timestamp?: string;
|
|
391
|
+
[key: string]: unknown;
|
|
392
|
+
}
|
|
393
|
+
interface TlsProps {
|
|
394
|
+
version?: 512 | 768 | 769 | 770 | 771 | 772 | number;
|
|
395
|
+
cipherSuite?: 5 | 10 | 47 | 53 | 60 | 156 | 157 | 4865 | 4866 | 4867 | 4868 | 4869 | 49159 | 49161 | 49162 | 49169 | 49170 | 49171 | 49172 | 49187 | 49191 | 49195 | 49196 | 49199 | 49200 | 52392 | 52393 | number;
|
|
396
|
+
}
|
|
397
|
+
interface TlsRecordProps {
|
|
398
|
+
tlsReportRecordCompliant?: boolean;
|
|
399
|
+
domainPublished?: string;
|
|
400
|
+
recordTxt?: string;
|
|
401
|
+
txtExtractedFrom?: string;
|
|
402
|
+
status?: 'warning' | 'pass' | 'fail';
|
|
403
|
+
txt?: string;
|
|
404
|
+
text?: string;
|
|
405
|
+
domain?: string;
|
|
406
|
+
fromDomain?: string;
|
|
407
|
+
}
|
|
408
|
+
interface FcrdnsProps {
|
|
409
|
+
match?: boolean;
|
|
410
|
+
clientIp?: string;
|
|
411
|
+
helo?: string;
|
|
412
|
+
error?: string;
|
|
413
|
+
aRecords?: {
|
|
414
|
+
errors?: ApiError | null;
|
|
415
|
+
items?: {
|
|
416
|
+
[key: string]: {
|
|
417
|
+
address?: string;
|
|
418
|
+
family?: number;
|
|
419
|
+
}[];
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
ptrRecords?: {
|
|
423
|
+
error?: ApiError;
|
|
424
|
+
items?: string[];
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
interface EhloCheckProps {
|
|
428
|
+
match?: boolean;
|
|
429
|
+
senderIpMatchesEhloARecord?: boolean;
|
|
430
|
+
senderIpPtrRecordMatchesEhloDomain?: {
|
|
431
|
+
domain?: string;
|
|
432
|
+
domains?: string[];
|
|
433
|
+
err?: ApiError;
|
|
434
|
+
};
|
|
435
|
+
aRecords?: {
|
|
436
|
+
error?: ApiError;
|
|
437
|
+
items?: {
|
|
438
|
+
address: string;
|
|
439
|
+
family: number;
|
|
440
|
+
}[];
|
|
441
|
+
};
|
|
442
|
+
ptrRecords?: {
|
|
443
|
+
errors?: ApiError | null;
|
|
444
|
+
items?: {
|
|
445
|
+
[key: string]: string[];
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
interface EhloProps {
|
|
450
|
+
isAddrDomain?: boolean;
|
|
451
|
+
clientIp?: string;
|
|
452
|
+
}
|
|
453
|
+
declare enum BimiRecordStatus {
|
|
454
|
+
DeclinationToPublish = "declination-to-publish",
|
|
455
|
+
NoRecordTxt = "noRecordTxt",
|
|
456
|
+
InvalidRecordTxt = "invalidRecordTxt",
|
|
457
|
+
CertNotFound = "certNotFound",
|
|
458
|
+
Valid = "valid",
|
|
459
|
+
PresentWithErrors = "presentWithErrors",
|
|
460
|
+
CertInvalid = "certInvalid",
|
|
461
|
+
CertForbidden = "certForbidden",
|
|
462
|
+
NotVMC = "notVMC"
|
|
463
|
+
}
|
|
464
|
+
type BimiSvgError = 'invalid-svg' | 'invalid-svg-version' | 'invalid-svg-profile' | 'invalid-svg-root-element' | 'invalid-svg-attribute-xy' | 'invalid-svg-reference' | 'invalid-svg-missing-title' | 'invalid-svg-size' | 'invalid-svg-content-type' | 'invalid-svg-id-name' | 'invalid-svg-attribute' | 'invalid-svg-element-style' | 'invalid-svg-element-script' | 'invalid-svg-element-link' | 'invalid-svg-element-image' | 'invalid-svg-element-foreign-object' | 'invalid-xml-12' | 'logo-and-evidence-mismatch' | 'logo-extract-error' | 'unknown-svg-error';
|
|
465
|
+
type BimiRecordValidationError = 'bimi-error-missing-v' | 'bimi-error-missing-a' | 'bimi-error-missing-l' | 'bimi-error-invalid-a' | 'bimi-error-invalid-l' | 'bimi-error-unsupported-values' | 'bimi-error-incorrect-v' | 'bimi-error-cert-not-valid' | 'bimi-error-invalid-record' | 'bimi-error-unknown';
|
|
466
|
+
type BimiPemError = 'cert-not-found' | 'cert-not-url' | 'cert-not-file' | 'cert-not-https' | 'cert-not-pem' | 'cert-forbidden' | 'cert-bad-date' | 'cert-not-valid' | 'cert-bad-signature' | 'cert-unknown-error';
|
|
467
|
+
interface BimiProps {
|
|
468
|
+
dmarcCompliant?: boolean;
|
|
469
|
+
domainPublished?: string;
|
|
470
|
+
recordTxt?: string;
|
|
471
|
+
txtExtractedFrom?: string;
|
|
472
|
+
bimiRecordStatus?: BimiRecordStatus;
|
|
473
|
+
recordValidationErrors?: BimiRecordValidationError[];
|
|
474
|
+
imageSource?: 'image-source-vmc' | 'image-source-logo' | 'image-source-notthere';
|
|
475
|
+
imageUrl?: string;
|
|
476
|
+
svgErrors?: BimiSvgError[];
|
|
477
|
+
pemUrl?: string;
|
|
478
|
+
vmc?: {
|
|
479
|
+
assertionMarkType?: 'CMC' | 'VMC';
|
|
480
|
+
assertionMark?: 'Prior Use Mark' | 'Registered Mark' | 'Modified Registered Mark' | 'Government Mark';
|
|
481
|
+
logoSrc?: string;
|
|
482
|
+
expiryDate?: string;
|
|
483
|
+
validDomains?: string[];
|
|
484
|
+
issuer?: string[];
|
|
485
|
+
trademarkAuthority?: string[];
|
|
486
|
+
compliant?: boolean;
|
|
487
|
+
logoErrors?: BimiSvgError[];
|
|
488
|
+
pemErrors?: BimiPemError[];
|
|
489
|
+
errors?: {
|
|
490
|
+
message: string;
|
|
491
|
+
code: string;
|
|
492
|
+
}[];
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
interface MtaStsRecordProps {
|
|
496
|
+
mtaStsRecordCompliant?: boolean;
|
|
497
|
+
domainPublished?: string;
|
|
498
|
+
recordTxt?: string;
|
|
499
|
+
txtExtractedFrom?: string;
|
|
500
|
+
txt?: string;
|
|
501
|
+
status?: 'warning' | 'pass' | 'fail';
|
|
502
|
+
text?: string;
|
|
503
|
+
domain?: string;
|
|
504
|
+
fromDomain?: string;
|
|
505
|
+
}
|
|
506
|
+
interface MtaStsPolicyProps {
|
|
507
|
+
policy?: {
|
|
508
|
+
version?: string;
|
|
509
|
+
mode?: string;
|
|
510
|
+
mx?: string[];
|
|
511
|
+
maxAge?: string;
|
|
512
|
+
mxRecords?: string[];
|
|
513
|
+
};
|
|
514
|
+
fromDomain?: string;
|
|
515
|
+
txtExtractedFrom?: string;
|
|
516
|
+
status?: 'warning' | 'pass' | 'fail';
|
|
517
|
+
ok?: boolean;
|
|
518
|
+
text?: string;
|
|
519
|
+
result?: {
|
|
520
|
+
version?: string;
|
|
521
|
+
mode?: string;
|
|
522
|
+
mx?: string[];
|
|
523
|
+
max_age?: number;
|
|
524
|
+
maxAge?: number;
|
|
525
|
+
mxRecords?: string[];
|
|
526
|
+
} | null;
|
|
527
|
+
message?: string;
|
|
528
|
+
domain?: string;
|
|
529
|
+
}
|
|
530
|
+
interface MtaStsCertificateProps {
|
|
531
|
+
status: 'warning' | 'pass' | 'fail';
|
|
532
|
+
isRenewalAtRisk?: boolean;
|
|
533
|
+
certificateExpiry?: string | null;
|
|
534
|
+
content?: string | null;
|
|
535
|
+
name?: string | null;
|
|
536
|
+
}
|
|
537
|
+
interface MtaProps {
|
|
538
|
+
result?: 'fail' | 'success' | 'warning';
|
|
539
|
+
tlsRecord?: TlsRecordProps;
|
|
540
|
+
mtaStsRecord?: MtaStsRecordProps;
|
|
541
|
+
mtaStsPolicy?: MtaStsPolicyProps;
|
|
542
|
+
mtaStsCertificate?: MtaStsCertificateProps;
|
|
543
|
+
}
|
|
544
|
+
interface DnsSecurityProps {
|
|
545
|
+
result?: 'pass' | 'fail';
|
|
546
|
+
}
|
|
547
|
+
interface LookalikeDomainsProps {
|
|
548
|
+
number?: number;
|
|
549
|
+
}
|
|
550
|
+
interface EmailProviderProps {
|
|
551
|
+
provider?: 'Microsoft Office 365' | 'Google Workspace' | string;
|
|
552
|
+
useOnInbox?: boolean;
|
|
553
|
+
}
|
|
554
|
+
interface UnsubscribeProps {
|
|
555
|
+
result?: 'pass' | 'fail';
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* ExtSecRep (External Security Report) - Contains all email authentication results
|
|
559
|
+
*/
|
|
560
|
+
interface ExtsecrepProps {
|
|
561
|
+
ehlo?: EhloProps;
|
|
562
|
+
tls?: TlsProps;
|
|
563
|
+
spf?: SpfProps;
|
|
564
|
+
dkim?: DkimProps | DkimProps[];
|
|
565
|
+
dmarc?: DmarcProps;
|
|
566
|
+
bimi?: BimiProps;
|
|
567
|
+
mta?: MtaProps;
|
|
568
|
+
dnsSecurity?: DnsSecurityProps;
|
|
569
|
+
lookalikeDomains?: LookalikeDomainsProps;
|
|
570
|
+
emailProvider?: EmailProviderProps;
|
|
571
|
+
unsubscribe?: UnsubscribeProps;
|
|
572
|
+
tl?: {
|
|
573
|
+
ip?: string[];
|
|
574
|
+
domain?: string[];
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Investigate Data - Contains FCrDNS and EHLO check results
|
|
579
|
+
*/
|
|
580
|
+
interface InvestigateProps {
|
|
581
|
+
fcrdns?: FcrdnsProps;
|
|
582
|
+
ehloCheck?: EhloCheckProps;
|
|
583
|
+
urls?: string[];
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* JMAP - JSON Meta Application Protocol
|
|
587
|
+
* Main container for email metadata and security results
|
|
588
|
+
*/
|
|
589
|
+
interface JmapProps {
|
|
590
|
+
subject?: string;
|
|
591
|
+
date?: string;
|
|
592
|
+
user?: string;
|
|
593
|
+
from?: {
|
|
594
|
+
name?: string;
|
|
595
|
+
email?: string;
|
|
596
|
+
};
|
|
597
|
+
email?: string;
|
|
598
|
+
extsecrep?: ExtsecrepProps;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Domain Analyzer SPF Props
|
|
602
|
+
* Advanced SPF analysis for Domain Analyzer tool
|
|
603
|
+
* Includes DNS lookup counting, void lookup detection, and Dynamic SPF analysis
|
|
604
|
+
*/
|
|
605
|
+
interface DomainAnalyzerSpfProps {
|
|
606
|
+
domain?: string;
|
|
607
|
+
domainPublished?: string;
|
|
608
|
+
txtExtractedFrom?: string;
|
|
609
|
+
raw?: string | string[];
|
|
610
|
+
status?: 'pass' | 'fail' | 'warning';
|
|
611
|
+
count?: number;
|
|
612
|
+
voidCount?: number;
|
|
613
|
+
subdoCount?: number;
|
|
614
|
+
records?: Array<{
|
|
615
|
+
domain?: string;
|
|
616
|
+
include?: string;
|
|
617
|
+
record?: string;
|
|
618
|
+
raw?: string;
|
|
619
|
+
}>;
|
|
620
|
+
report?: Array<{
|
|
621
|
+
message?: string;
|
|
622
|
+
spfError?: string;
|
|
623
|
+
status?: string;
|
|
624
|
+
[key: string]: unknown;
|
|
625
|
+
}>;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Domain Analyzer DKIM Props
|
|
629
|
+
* Advanced DKIM analysis for Domain Analyzer tool
|
|
630
|
+
* Includes selector records, CNAME chains, key validation, and issues detection
|
|
631
|
+
*/
|
|
632
|
+
interface DomainAnalyzerDkimProps {
|
|
633
|
+
status?: 'pass' | 'fail' | 'warning';
|
|
634
|
+
records?: Array<{
|
|
635
|
+
id?: string;
|
|
636
|
+
selector?: string;
|
|
637
|
+
entry?: string;
|
|
638
|
+
cname?: string;
|
|
639
|
+
raw?: string[];
|
|
640
|
+
records?: {
|
|
641
|
+
v?: string;
|
|
642
|
+
k?: string;
|
|
643
|
+
p?: string;
|
|
644
|
+
[key: string]: unknown;
|
|
645
|
+
};
|
|
646
|
+
keyStatus?: {
|
|
647
|
+
isValid?: boolean;
|
|
648
|
+
keySize?: number;
|
|
649
|
+
};
|
|
650
|
+
issues?: Array<{
|
|
651
|
+
status?: string;
|
|
652
|
+
message?: string;
|
|
653
|
+
nested?: string;
|
|
654
|
+
[key: string]: unknown;
|
|
655
|
+
}>;
|
|
656
|
+
}>;
|
|
657
|
+
report?: Array<{
|
|
658
|
+
status?: string;
|
|
659
|
+
message?: string;
|
|
660
|
+
[key: string]: unknown;
|
|
661
|
+
}>;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Card Status System - Consolidated status mapping and utilities
|
|
666
|
+
*
|
|
667
|
+
* This module provides a single source of truth for card status handling:
|
|
668
|
+
* - Status values and types
|
|
669
|
+
* - Normalization from various input formats
|
|
670
|
+
* - Visual mappings (colors, icons)
|
|
671
|
+
* - UI component mappings (DetailedCard colors)
|
|
672
|
+
*
|
|
673
|
+
* @example
|
|
674
|
+
* ```ts
|
|
675
|
+
* import { CardStatus, normalizeStatus, getStatusColor, getStatusIcon } from '../constants/card-status';
|
|
676
|
+
*
|
|
677
|
+
* const status = normalizeStatus('pass'); // 'good'
|
|
678
|
+
* const color = getStatusColor('good'); // '#1ba86c'
|
|
679
|
+
* const icon = getStatusIcon('warning'); // mdiAlert
|
|
680
|
+
* ```
|
|
681
|
+
*/
|
|
682
|
+
/**
|
|
683
|
+
* Canonical card status values (lowercase).
|
|
684
|
+
* These are the only valid status values used throughout the system.
|
|
685
|
+
*/
|
|
686
|
+
declare const CARD_STATUS: {
|
|
687
|
+
readonly GOOD: "good";
|
|
688
|
+
readonly WARNING: "warning";
|
|
689
|
+
readonly DANGER: "danger";
|
|
690
|
+
readonly INFO: "info";
|
|
691
|
+
readonly UNKNOWN: "unknown";
|
|
692
|
+
};
|
|
693
|
+
type CardStatus = (typeof CARD_STATUS)[keyof typeof CARD_STATUS];
|
|
694
|
+
/**
|
|
695
|
+
* Normalizes any status value to a canonical CardStatus.
|
|
696
|
+
* Handles various formats from API responses, legacy code, and user input.
|
|
697
|
+
*
|
|
698
|
+
* @param value - The value to normalize (string, null, undefined, or any)
|
|
699
|
+
* @returns A canonical CardStatus value
|
|
700
|
+
*
|
|
701
|
+
* @example
|
|
702
|
+
* normalizeStatus('pass') // 'good'
|
|
703
|
+
* normalizeStatus('FAIL') // 'danger'
|
|
704
|
+
* normalizeStatus(null) // 'unknown'
|
|
705
|
+
*/
|
|
706
|
+
declare function normalizeStatus(value: unknown): CardStatus;
|
|
707
|
+
/**
|
|
708
|
+
* Status color palette.
|
|
709
|
+
* These colors match the design system specifications.
|
|
710
|
+
*/
|
|
711
|
+
declare const STATUS_COLORS: Record<CardStatus, string>;
|
|
712
|
+
/**
|
|
713
|
+
* MDI icon paths for each status.
|
|
714
|
+
*/
|
|
715
|
+
declare const STATUS_ICONS: Record<CardStatus, string>;
|
|
716
|
+
/**
|
|
717
|
+
* Combined status icon styles (color + icon).
|
|
718
|
+
* Used by SignalCardList sidebar and other status indicators.
|
|
719
|
+
*/
|
|
720
|
+
declare const STATUS_ICON_STYLES: Record<CardStatus, {
|
|
721
|
+
color: string;
|
|
722
|
+
icon: string;
|
|
723
|
+
}>;
|
|
724
|
+
/**
|
|
725
|
+
* Gets the color for a given status.
|
|
726
|
+
* @param status - A CardStatus value or string to normalize
|
|
727
|
+
* @returns The hex color string
|
|
728
|
+
*/
|
|
729
|
+
declare function getStatusColor(status: CardStatus | string): string;
|
|
730
|
+
/**
|
|
731
|
+
* Gets the MDI icon path for a given status.
|
|
732
|
+
* @param status - A CardStatus value or string to normalize
|
|
733
|
+
* @returns The MDI icon path string
|
|
734
|
+
*/
|
|
735
|
+
declare function getStatusIcon(status: CardStatus | string): string;
|
|
736
|
+
/**
|
|
737
|
+
* Gets both color and icon for a given status.
|
|
738
|
+
* @param status - A CardStatus value or string to normalize
|
|
739
|
+
* @returns Object with color and icon properties
|
|
740
|
+
*/
|
|
741
|
+
declare function getStatusIconStyle(status: CardStatus | string): {
|
|
742
|
+
color: string;
|
|
743
|
+
icon: string;
|
|
744
|
+
};
|
|
745
|
+
/**
|
|
746
|
+
* Maps CardStatus to DetailedCard color prop values.
|
|
747
|
+
* Used by SignalCardNormal for the card banner color.
|
|
748
|
+
*/
|
|
749
|
+
type DetailedCardColor = 'success' | 'error' | 'warning' | 'info' | undefined;
|
|
750
|
+
/**
|
|
751
|
+
* Maps a card status to DetailedCard color prop.
|
|
752
|
+
* @param status - A CardStatus value or string to normalize
|
|
753
|
+
* @returns DetailedCard color value or undefined
|
|
754
|
+
*/
|
|
755
|
+
declare function mapStatusToDetailedCardColor(status?: CardStatus | string | null): DetailedCardColor;
|
|
756
|
+
/**
|
|
757
|
+
* Type guard to check if a value is a valid CardStatus.
|
|
758
|
+
*/
|
|
759
|
+
declare function isCardStatus(value: unknown): value is CardStatus;
|
|
760
|
+
/**
|
|
761
|
+
* Type guard to check if a status indicates success.
|
|
762
|
+
*/
|
|
763
|
+
declare function isSuccessStatus(status: CardStatus | string): boolean;
|
|
764
|
+
/**
|
|
765
|
+
* Type guard to check if a status indicates failure.
|
|
766
|
+
*/
|
|
767
|
+
declare function isFailureStatus(status: CardStatus | string): boolean;
|
|
768
|
+
/**
|
|
769
|
+
* Type guard to check if a status indicates a warning.
|
|
770
|
+
*/
|
|
771
|
+
declare function isWarningStatus(status: CardStatus | string): boolean;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Theme for icons and visual elements within items.
|
|
775
|
+
* - 'email': Email envelope icon
|
|
776
|
+
* - 'dns': Globe/earth icon
|
|
777
|
+
* - 'info': Information icon
|
|
778
|
+
*/
|
|
779
|
+
type ItemTheme = 'email' | 'dns' | 'info' | string;
|
|
780
|
+
/**
|
|
781
|
+
* Item type determining icon and styling.
|
|
782
|
+
* - 'good': Green checkmark
|
|
783
|
+
* - 'info': Information icon (themed by ItemTheme)
|
|
784
|
+
* - 'warning': Orange alert icon
|
|
785
|
+
* - 'danger': Red X icon
|
|
786
|
+
* - '': No icon
|
|
787
|
+
*/
|
|
788
|
+
type ItemType = 'good' | 'info' | 'warning' | 'danger' | '' | string;
|
|
789
|
+
/**
|
|
790
|
+
* Individual item within a category (extracted data or checklist item).
|
|
791
|
+
*/
|
|
792
|
+
interface CategoryItem {
|
|
793
|
+
/** Item type for icon/color. */
|
|
794
|
+
type?: ItemType;
|
|
795
|
+
/** Visual theme for icons. */
|
|
796
|
+
theme?: ItemTheme;
|
|
797
|
+
/** Label text or React element. */
|
|
798
|
+
label?: React.ReactNode;
|
|
799
|
+
/** Main content text or React element. */
|
|
800
|
+
text?: React.ReactNode;
|
|
801
|
+
/** If true, renders in inline grid; if false, renders as full-width block. */
|
|
802
|
+
inline?: boolean;
|
|
803
|
+
/** Wrap text content in monospace code block. */
|
|
804
|
+
useCodeBlock?: boolean;
|
|
805
|
+
/** Additional subtext items displayed below main text. */
|
|
806
|
+
subtexts?: Array<{
|
|
807
|
+
label?: React.ReactNode;
|
|
808
|
+
text?: React.ReactNode;
|
|
809
|
+
}>;
|
|
810
|
+
/** Extraction box configuration for displaying code/DNS records. */
|
|
811
|
+
extractionBox?: {
|
|
812
|
+
/** Caption type for extraction box (e.g., 'dns-txt', 'dns-cname'). */
|
|
813
|
+
caption?: string;
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Category containing a group of related items with optional title and caption.
|
|
818
|
+
*/
|
|
819
|
+
interface ItemCategory {
|
|
820
|
+
/** Category title (e.g., "Extracted from your DNS configuration"). */
|
|
821
|
+
title?: string;
|
|
822
|
+
/** Optional caption text below title. */
|
|
823
|
+
caption?: string;
|
|
824
|
+
/** Array of items within this category. */
|
|
825
|
+
items?: CategoryItem[];
|
|
826
|
+
/** Category type for special layout handling (e.g., 'dmarc-domain', 'dmarc-policy'). */
|
|
827
|
+
categoryType?: string;
|
|
828
|
+
/** Extraction box configuration for the entire category. */
|
|
829
|
+
extractionBox?: {
|
|
830
|
+
/** Caption type for extraction box (e.g., 'dns', 'email', 'dns-details'). */
|
|
831
|
+
caption?: string;
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Common props shared by all signal card components. These cover layout options
|
|
837
|
+
* that ultimately map to `SignalCardNormal`.
|
|
838
|
+
*/
|
|
839
|
+
interface SignalCardSharedProps extends Omit<ComponentProps<'div'>, 'children' | 'ref'> {
|
|
840
|
+
/** Callback fired whenever the card reports a height change. */
|
|
841
|
+
onHeightChange?: () => void;
|
|
842
|
+
/** Custom footer renderer appended below the standard card content. */
|
|
843
|
+
renderFooter?: () => ReactNode;
|
|
844
|
+
/** Toggle Investigate-specific color palette overrides. */
|
|
845
|
+
useInvestigateColors?: boolean;
|
|
846
|
+
/** Select the banner variant to display above the card body. */
|
|
847
|
+
bannerVariant?: 'standard' | 'condensed' | 'none';
|
|
848
|
+
/** Enable collapsible sections inside the card header and body. */
|
|
849
|
+
isCollapsible?: boolean;
|
|
850
|
+
/** Controlled collapsed state for all sections. */
|
|
851
|
+
areAllCollapsed?: boolean;
|
|
852
|
+
/** Callback fired when the collapse-all toggle changes. */
|
|
853
|
+
onCollapseAll?: (areAllCollapsed: boolean) => void;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Component props.
|
|
858
|
+
*/
|
|
859
|
+
interface SignalCardGoogleYahooComplianceProps extends SignalCardSharedProps {
|
|
860
|
+
/**
|
|
861
|
+
* Domain name (currently not used but maintained for API compatibility)
|
|
862
|
+
*/
|
|
863
|
+
domain?: string | null;
|
|
864
|
+
/**
|
|
865
|
+
* JMAP extsecrep data containing authentication results
|
|
866
|
+
*/
|
|
867
|
+
jmap?: JmapProps | null;
|
|
868
|
+
/**
|
|
869
|
+
* Investigate data with FCrDNS and EHLO check results
|
|
870
|
+
*/
|
|
871
|
+
investigate?: InvestigateProps | null;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Component props.
|
|
876
|
+
*/
|
|
877
|
+
interface SignalCardUrlsProps extends SignalCardSharedProps {
|
|
878
|
+
/**
|
|
879
|
+
* Investigate data containing extracted URLs
|
|
880
|
+
*/
|
|
881
|
+
investigate?: InvestigateProps | null;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* External security report data structure
|
|
886
|
+
*/
|
|
887
|
+
interface ExtsecrepData {
|
|
888
|
+
/** SPF check data */
|
|
889
|
+
spf?: SpfProps | null;
|
|
890
|
+
/** DMARC policy data */
|
|
891
|
+
dmarc?: DmarcProps | null;
|
|
892
|
+
/** DKIM signature data - can be array or object */
|
|
893
|
+
dkim?: DkimProps | DkimProps[] | null;
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* Component props.
|
|
897
|
+
*/
|
|
898
|
+
interface SignalCardAmpProps extends SignalCardSharedProps {
|
|
899
|
+
/** JMAP data containing authentication information */
|
|
900
|
+
jmap: {
|
|
901
|
+
/** External security report with SPF, DMARC, DKIM data */
|
|
902
|
+
extsecrep: ExtsecrepData;
|
|
903
|
+
/** From email address information */
|
|
904
|
+
from?: {
|
|
905
|
+
email?: string | null;
|
|
906
|
+
} | null;
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Component props.
|
|
912
|
+
*/
|
|
913
|
+
interface SignalCardDnssecProps extends SignalCardSharedProps {
|
|
914
|
+
/** JMAP data containing DNS security information */
|
|
915
|
+
jmap?: {
|
|
916
|
+
extsecrep?: {
|
|
917
|
+
dnsSecurity?: DnsSecurityProps | null;
|
|
918
|
+
} | null;
|
|
919
|
+
} | null;
|
|
920
|
+
/** Custom short description (overrides default based on result) */
|
|
921
|
+
shortDescription?: ReactNode;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
type ExtsecrepThreatLevel = ExtsecrepProps;
|
|
925
|
+
type FromInfo = {
|
|
926
|
+
name?: string | null;
|
|
927
|
+
email?: string | null;
|
|
928
|
+
} | null;
|
|
929
|
+
/**
|
|
930
|
+
* Component props.
|
|
931
|
+
*/
|
|
932
|
+
interface SignalCardThreatInvProps extends SignalCardSharedProps {
|
|
933
|
+
/** JMAP email data containing threat intelligence information */
|
|
934
|
+
jmap: {
|
|
935
|
+
extsecrep: ExtsecrepThreatLevel;
|
|
936
|
+
from?: FromInfo;
|
|
937
|
+
};
|
|
938
|
+
/** Whether this is being used in domain analyzer mode */
|
|
939
|
+
isDomainAnalyzer?: boolean;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
type SubdoReportEntry = {
|
|
943
|
+
message?: string;
|
|
944
|
+
spfError?: string;
|
|
945
|
+
raw?: string;
|
|
946
|
+
value?: unknown;
|
|
947
|
+
details?: unknown;
|
|
948
|
+
[key: string]: unknown;
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* Component props.
|
|
952
|
+
*/
|
|
953
|
+
interface SignalCardSubdoProps extends SignalCardSharedProps {
|
|
954
|
+
/**
|
|
955
|
+
* JMAP data containing SPF subdomain takeover report
|
|
956
|
+
*/
|
|
957
|
+
jmap?: {
|
|
958
|
+
extsecrep?: {
|
|
959
|
+
spf?: {
|
|
960
|
+
domain?: string | null;
|
|
961
|
+
report?: SubdoReportEntry[] | null;
|
|
962
|
+
} | null;
|
|
963
|
+
} | null;
|
|
964
|
+
} | null;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Caption types for ExtractionBox component
|
|
969
|
+
* Maps to predefined caption text shown at bottom-right of grey boxes
|
|
970
|
+
*/
|
|
971
|
+
type ExtractionCaptionType = 'email' | 'dns' | 'dns-details' | 'policy' | 'email-details';
|
|
972
|
+
|
|
973
|
+
type ChecklistItem = {
|
|
974
|
+
type: 'good' | 'info' | 'warning' | 'danger' | 'unknown' | string;
|
|
975
|
+
theme?: 'email' | 'dns' | string;
|
|
976
|
+
text: React__default.ReactNode;
|
|
977
|
+
subtexts?: {
|
|
978
|
+
text: React__default.ReactNode;
|
|
979
|
+
}[];
|
|
980
|
+
link?: Record<string, unknown>;
|
|
981
|
+
hasWarning?: boolean;
|
|
982
|
+
/**
|
|
983
|
+
* Wraps item in grey extraction box with optional caption
|
|
984
|
+
* Used for DNS records, email data, policy files, etc.
|
|
985
|
+
*/
|
|
986
|
+
extractionBox?: {
|
|
987
|
+
caption?: ExtractionCaptionType;
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* Component props.
|
|
993
|
+
*/
|
|
994
|
+
interface SignalCardMtaStsProps extends SignalCardSharedProps {
|
|
995
|
+
/** JMAP email data containing MTA-STS information */
|
|
996
|
+
jmap?: {
|
|
997
|
+
extsecrep?: {
|
|
998
|
+
mta?: MtaProps | null;
|
|
999
|
+
} | null;
|
|
1000
|
+
} | null;
|
|
1001
|
+
/** Domain to analyze */
|
|
1002
|
+
domain?: string;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Component props.
|
|
1007
|
+
*/
|
|
1008
|
+
interface SignalCardBimiProps extends SignalCardSharedProps {
|
|
1009
|
+
/**
|
|
1010
|
+
* JMAP data containing BIMI and DMARC information from the email security report.
|
|
1011
|
+
*/
|
|
1012
|
+
jmap: {
|
|
1013
|
+
extsecrep: {
|
|
1014
|
+
bimi?: any;
|
|
1015
|
+
dmarc?: any;
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
/**
|
|
1019
|
+
* Optional callback invoked when the component mounts.
|
|
1020
|
+
*/
|
|
1021
|
+
onComponentMount?: () => void;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
type DmarcData$1 = {
|
|
1025
|
+
domain?: string | null;
|
|
1026
|
+
} | null;
|
|
1027
|
+
/**
|
|
1028
|
+
* Props for the SignalCardDkimDomainAnalyzer component.
|
|
1029
|
+
*
|
|
1030
|
+
* Advanced DKIM Domain Analyzer with selector dropdown, key validation, and DNS record display.
|
|
1031
|
+
*/
|
|
1032
|
+
interface SignalCardDkimDomainAnalyzerProps extends SignalCardSharedProps {
|
|
1033
|
+
/**
|
|
1034
|
+
* JMAP data containing DKIM analysis results
|
|
1035
|
+
*/
|
|
1036
|
+
jmap: {
|
|
1037
|
+
extsecrep: {
|
|
1038
|
+
dmarc?: DmarcData$1;
|
|
1039
|
+
dkim?: DomainAnalyzerDkimProps;
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* Component props.
|
|
1046
|
+
*/
|
|
1047
|
+
interface SignalCardSpfDomainAnalyzerProps extends SignalCardSharedProps {
|
|
1048
|
+
/**
|
|
1049
|
+
* JMAP data containing SPF analysis results
|
|
1050
|
+
*/
|
|
1051
|
+
jmap: {
|
|
1052
|
+
extsecrep: {
|
|
1053
|
+
spf: DomainAnalyzerSpfProps;
|
|
1054
|
+
originator?: {
|
|
1055
|
+
domain?: string | null;
|
|
1056
|
+
orgDomain?: string | null;
|
|
1057
|
+
} | null;
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
interface SpfDetails {
|
|
1063
|
+
raw?: string | string[] | null;
|
|
1064
|
+
status?: string | null;
|
|
1065
|
+
txtExtractedFrom?: string | null;
|
|
1066
|
+
[key: string]: unknown;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Props for the SignalCardSpfDomain component.
|
|
1070
|
+
*
|
|
1071
|
+
* Simplified SPF Domain Card for BIMI Checker - shows only pass/fail status and raw SPF record.
|
|
1072
|
+
*/
|
|
1073
|
+
interface SignalCardSpfDomainProps extends SignalCardSharedProps {
|
|
1074
|
+
/**
|
|
1075
|
+
* JMAP data containing SPF authentication results
|
|
1076
|
+
*/
|
|
1077
|
+
jmap?: {
|
|
1078
|
+
extsecrep?: {
|
|
1079
|
+
spf?: SpfDetails | null;
|
|
1080
|
+
} | null;
|
|
1081
|
+
} | null;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
type DmarcResult$1 = {
|
|
1085
|
+
status?: CardStatus | string | null;
|
|
1086
|
+
errors?: string[] | null;
|
|
1087
|
+
};
|
|
1088
|
+
type DmarcData = {
|
|
1089
|
+
raw?: string | null;
|
|
1090
|
+
result?: DmarcResult$1 | null;
|
|
1091
|
+
txtExtractedFrom?: string | null;
|
|
1092
|
+
policyDomain?: string | null;
|
|
1093
|
+
fromDomain?: string | null;
|
|
1094
|
+
domainPublished?: string | null;
|
|
1095
|
+
};
|
|
1096
|
+
type Originator = {
|
|
1097
|
+
domain?: string | null;
|
|
1098
|
+
orgDomain?: string | null;
|
|
1099
|
+
} | null;
|
|
1100
|
+
interface SignalCardDmarcDomainProps extends SignalCardSharedProps {
|
|
1101
|
+
jmap: {
|
|
1102
|
+
extsecrep: {
|
|
1103
|
+
dmarc: DmarcData;
|
|
1104
|
+
originator?: Originator;
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
type TlsCardType = 'good' | 'warning' | 'danger';
|
|
1110
|
+
type InfoSeverity$1 = TlsCardType | 'info';
|
|
1111
|
+
type Subtext$3 = {
|
|
1112
|
+
text: ReactNode;
|
|
1113
|
+
};
|
|
1114
|
+
type InfoItem$3 = {
|
|
1115
|
+
id?: string;
|
|
1116
|
+
type: InfoSeverity$1;
|
|
1117
|
+
label?: ReactNode;
|
|
1118
|
+
text: ReactNode;
|
|
1119
|
+
subtexts?: Subtext$3[];
|
|
1120
|
+
};
|
|
1121
|
+
type InfoItemCategory = {
|
|
1122
|
+
title?: ReactNode;
|
|
1123
|
+
caption?: ReactNode;
|
|
1124
|
+
items: InfoItem$3[];
|
|
1125
|
+
};
|
|
1126
|
+
type ExtractedItem$3 = {
|
|
1127
|
+
type?: string;
|
|
1128
|
+
label: ReactNode;
|
|
1129
|
+
text: ReactNode;
|
|
1130
|
+
inline?: boolean;
|
|
1131
|
+
useCodeBlock?: boolean;
|
|
1132
|
+
};
|
|
1133
|
+
type ExtractedItemCategory$2 = {
|
|
1134
|
+
title?: ReactNode;
|
|
1135
|
+
caption?: ReactNode;
|
|
1136
|
+
categoryType?: 'dmarc-domain' | 'dmarc-policy' | 'dkim-details';
|
|
1137
|
+
extractionBox?: {
|
|
1138
|
+
caption: 'dns' | 'email' | 'policy';
|
|
1139
|
+
};
|
|
1140
|
+
items: ExtractedItem$3[];
|
|
1141
|
+
};
|
|
1142
|
+
type ExtractedData = {
|
|
1143
|
+
cardType: TlsCardType;
|
|
1144
|
+
extractedItemsCategories: ExtractedItemCategory$2[];
|
|
1145
|
+
infoItemsCategories: InfoItemCategory[];
|
|
1146
|
+
error: null | string;
|
|
1147
|
+
};
|
|
1148
|
+
/**
|
|
1149
|
+
* Component props.
|
|
1150
|
+
*/
|
|
1151
|
+
interface SignalCardTlsProps extends SignalCardSharedProps {
|
|
1152
|
+
/** JMAP email data containing TLS information */
|
|
1153
|
+
jmap: {
|
|
1154
|
+
extsecrep: {
|
|
1155
|
+
tls?: TlsProps;
|
|
1156
|
+
};
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* Info item subtext with visualization
|
|
1162
|
+
*/
|
|
1163
|
+
interface Subtext$2 {
|
|
1164
|
+
text: ReactNode;
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* Individual information item in card
|
|
1168
|
+
*/
|
|
1169
|
+
interface InfoItem$2 {
|
|
1170
|
+
type: 'good' | 'warning' | 'info' | 'danger';
|
|
1171
|
+
text: ReactNode;
|
|
1172
|
+
subtexts?: Subtext$2[];
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* Extracted item for display
|
|
1176
|
+
*/
|
|
1177
|
+
interface ExtractedItem$2 {
|
|
1178
|
+
type?: '' | 'warning' | 'info';
|
|
1179
|
+
label: ReactNode;
|
|
1180
|
+
text: ReactNode;
|
|
1181
|
+
inline?: boolean;
|
|
1182
|
+
extractionBox?: {
|
|
1183
|
+
caption: 'dns' | 'email';
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* Category of extracted items
|
|
1188
|
+
*/
|
|
1189
|
+
interface ExtractedItemCategory$1 {
|
|
1190
|
+
title: string;
|
|
1191
|
+
extractionBox?: {
|
|
1192
|
+
caption: 'dns' | 'email';
|
|
1193
|
+
};
|
|
1194
|
+
items: ExtractedItem$2[];
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Result from extractData function
|
|
1198
|
+
*/
|
|
1199
|
+
interface ExtractDataResult$3 {
|
|
1200
|
+
cardType: 'good' | 'warning' | 'unknown';
|
|
1201
|
+
extractedItemsCategories?: ExtractedItemCategory$1[];
|
|
1202
|
+
infoItemsCategories?: Array<{
|
|
1203
|
+
title?: string;
|
|
1204
|
+
items: InfoItem$2[];
|
|
1205
|
+
}>;
|
|
1206
|
+
error?: null;
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Component props.
|
|
1210
|
+
*/
|
|
1211
|
+
interface SignalCardFcrdnsProps extends SignalCardSharedProps {
|
|
1212
|
+
/** JMAP data containing EHLO information */
|
|
1213
|
+
jmap: {
|
|
1214
|
+
extsecrep: {
|
|
1215
|
+
ehlo?: EhloProps;
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
/** Investigation data with FCrDNS and EHLO check results */
|
|
1219
|
+
investigate?: {
|
|
1220
|
+
fcrdns?: FcrdnsProps | null;
|
|
1221
|
+
ehloCheck?: EhloCheckProps | null;
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* Main extractor function for FCRDNS card data.
|
|
1227
|
+
* Orchestrates handlers for sender IP and EHLO validation.
|
|
1228
|
+
*/
|
|
1229
|
+
declare const extractData$3: (fcrdns: FcrdnsProps | null | undefined, ehloCheck: EhloCheckProps | null | undefined, ehlo: EhloProps | undefined, t: TranslationFn) => ExtractDataResult$3;
|
|
1230
|
+
|
|
1231
|
+
type InfoItemType = CardStatus | 'info' | 'error';
|
|
1232
|
+
type Subtext$1 = {
|
|
1233
|
+
text: ReactNode;
|
|
1234
|
+
};
|
|
1235
|
+
type InfoItem$1 = {
|
|
1236
|
+
type: InfoItemType;
|
|
1237
|
+
text: ReactNode;
|
|
1238
|
+
subtexts?: Subtext$1[] | null;
|
|
1239
|
+
};
|
|
1240
|
+
type ExtractedItem$1 = {
|
|
1241
|
+
type?: InfoItemType;
|
|
1242
|
+
label?: ReactNode;
|
|
1243
|
+
text?: ReactNode;
|
|
1244
|
+
inline?: boolean;
|
|
1245
|
+
useCodeBlock?: boolean;
|
|
1246
|
+
theme?: string;
|
|
1247
|
+
};
|
|
1248
|
+
type ExtractedItemCategory = {
|
|
1249
|
+
title: string;
|
|
1250
|
+
extractionBox?: {
|
|
1251
|
+
caption: 'dns' | 'email' | 'email-details';
|
|
1252
|
+
};
|
|
1253
|
+
items: ExtractedItem$1[];
|
|
1254
|
+
categoryType?: string;
|
|
1255
|
+
};
|
|
1256
|
+
type DkimResult = DkimProps;
|
|
1257
|
+
type DmarcResult = DmarcProps | null;
|
|
1258
|
+
type ExtractDataResult$2 = {
|
|
1259
|
+
cardType: CardStatus;
|
|
1260
|
+
extractedItemsCategories: ExtractedItemCategory[];
|
|
1261
|
+
infoItems: InfoItem$1[];
|
|
1262
|
+
infoItemsCategoriesDkim?: ExtractedItemCategory[];
|
|
1263
|
+
};
|
|
1264
|
+
/**
|
|
1265
|
+
* Component props.
|
|
1266
|
+
*/
|
|
1267
|
+
interface SignalCardDkimProps extends SignalCardSharedProps {
|
|
1268
|
+
/** JMAP email data containing DKIM, DMARC information */
|
|
1269
|
+
jmap: {
|
|
1270
|
+
extsecrep: {
|
|
1271
|
+
dkim?: DkimResult | DkimResult[] | null;
|
|
1272
|
+
dmarc?: DmarcResult;
|
|
1273
|
+
};
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Main DKIM data extraction function using handler pattern
|
|
1279
|
+
*/
|
|
1280
|
+
declare const extractData$2: (dkim: DkimProps | null | undefined, t: TranslationFn) => ExtractDataResult$2;
|
|
1281
|
+
|
|
1282
|
+
type SpfIdentity$1 = 'helo' | 'mailfrom';
|
|
1283
|
+
type SpfData$1 = SpfProps;
|
|
1284
|
+
type InfoSeverity = CardStatus | 'info';
|
|
1285
|
+
type Subtext = {
|
|
1286
|
+
text: ReactNode;
|
|
1287
|
+
};
|
|
1288
|
+
type InfoItem = {
|
|
1289
|
+
type?: InfoSeverity;
|
|
1290
|
+
text: ReactNode;
|
|
1291
|
+
subtexts?: Subtext[] | null;
|
|
1292
|
+
};
|
|
1293
|
+
type ExtractedItem = {
|
|
1294
|
+
type?: InfoSeverity;
|
|
1295
|
+
label?: ReactNode;
|
|
1296
|
+
text?: ReactNode;
|
|
1297
|
+
inline?: boolean;
|
|
1298
|
+
useCodeBlock?: boolean;
|
|
1299
|
+
extractionBox?: {
|
|
1300
|
+
caption: 'dns' | 'email' | 'policy';
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
type ExtractedItemsCategory = {
|
|
1304
|
+
title: string;
|
|
1305
|
+
extractionBox?: {
|
|
1306
|
+
caption: 'dns' | 'email' | 'policy';
|
|
1307
|
+
};
|
|
1308
|
+
items: ExtractedItem[];
|
|
1309
|
+
};
|
|
1310
|
+
type InfoItemsCategory = {
|
|
1311
|
+
title: string;
|
|
1312
|
+
items: InfoItem[];
|
|
1313
|
+
};
|
|
1314
|
+
type ExtractDataResult$1 = {
|
|
1315
|
+
cardType: CardStatus;
|
|
1316
|
+
extractedItemsCategories: ExtractedItemsCategory[];
|
|
1317
|
+
infoItems: InfoItemsCategory[];
|
|
1318
|
+
error: null;
|
|
1319
|
+
};
|
|
1320
|
+
/**
|
|
1321
|
+
* Component props.
|
|
1322
|
+
*/
|
|
1323
|
+
interface SignalCardSpfProps extends SignalCardSharedProps {
|
|
1324
|
+
/** JMAP email data containing SPF information */
|
|
1325
|
+
jmap: {
|
|
1326
|
+
extsecrep: {
|
|
1327
|
+
spf?: SpfData$1;
|
|
1328
|
+
};
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* Main SPF data extraction function (orchestrated version)
|
|
1334
|
+
*/
|
|
1335
|
+
declare const extractData$1: (spf: SpfProps | undefined, identity: SpfIdentity$1, t: TranslationFn) => ExtractDataResult$1;
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* Extended JMAP props for DMARC card including required extsecrep data
|
|
1339
|
+
*/
|
|
1340
|
+
interface SignalCardDmarcJmapProps extends JmapProps {
|
|
1341
|
+
extsecrep: {
|
|
1342
|
+
dmarc?: DmarcProps;
|
|
1343
|
+
dkim?: DkimProps | DkimProps[];
|
|
1344
|
+
spf?: SpfProps;
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Component props.
|
|
1349
|
+
*/
|
|
1350
|
+
interface SignalCardDmarcProps extends SignalCardSharedProps {
|
|
1351
|
+
/**
|
|
1352
|
+
* JMAP email data containing DMARC, DKIM, SPF information
|
|
1353
|
+
*/
|
|
1354
|
+
jmap: SignalCardDmarcJmapProps;
|
|
1355
|
+
/**
|
|
1356
|
+
* Whether this is being used in domain analyzer mode
|
|
1357
|
+
*/
|
|
1358
|
+
isDomainAnalyzer?: boolean;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* Result from the DMARC extractor
|
|
1363
|
+
*/
|
|
1364
|
+
type ExtractDataResult = {
|
|
1365
|
+
cardType: CardStatus;
|
|
1366
|
+
extractedItemsCategories: ItemCategory[];
|
|
1367
|
+
infoItemsCategories: ItemCategory[];
|
|
1368
|
+
error?: unknown;
|
|
1369
|
+
};
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Glossary terms for Investigate reports
|
|
1373
|
+
*
|
|
1374
|
+
* This module provides localized glossary term components that link to
|
|
1375
|
+
* the Red Sift community glossary documentation.
|
|
1376
|
+
*/
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Creates a link to the glossary documentation for a specific term
|
|
1380
|
+
*/
|
|
1381
|
+
declare const createGlossaryLink: ({ glossaryPage, label, }: {
|
|
1382
|
+
glossaryPage?: string | undefined;
|
|
1383
|
+
label: string;
|
|
1384
|
+
}) => string;
|
|
1385
|
+
/**
|
|
1386
|
+
* Mapping of glossary label IDs to their internal names
|
|
1387
|
+
*/
|
|
1388
|
+
declare const glossaryLabelIds: {
|
|
1389
|
+
readonly ATAG: "aTag";
|
|
1390
|
+
readonly A_RECORD: "aRecord";
|
|
1391
|
+
readonly BIMI_RECORD: "bimiRecord";
|
|
1392
|
+
readonly CANONICALIZATION: "canonicalization";
|
|
1393
|
+
readonly CNAME_RECORD: "cnameRecord";
|
|
1394
|
+
readonly DKIM: "dkim";
|
|
1395
|
+
readonly DKIM_ALGORITHM: "dkimAlgorithm";
|
|
1396
|
+
readonly DKIM_ALIGNMENT: "dkimAlignment";
|
|
1397
|
+
readonly DKIM_SELECTOR: "dkimSelector";
|
|
1398
|
+
readonly DKIM_SIGNATURE: "dkimSignature";
|
|
1399
|
+
readonly DKIM_SIGNATURE_HEADER: "dkimSignatureHeader";
|
|
1400
|
+
readonly DKIM_SIGNING_DOMAIN: "dkimSigningDomain";
|
|
1401
|
+
readonly DMARC: "dmarc";
|
|
1402
|
+
readonly DMARC_COMPLIANT: "dmarcCompliant";
|
|
1403
|
+
readonly DMARC_POLICY: "dmarcPolicy";
|
|
1404
|
+
readonly EHLO: "ehlo";
|
|
1405
|
+
readonly FROM: "from";
|
|
1406
|
+
readonly ITAG: "iTag";
|
|
1407
|
+
readonly KEY_LENGTH: "keyLength";
|
|
1408
|
+
readonly MTA_FILE_MAX_AGE: "maxAge";
|
|
1409
|
+
readonly MTA_FILE_MODE: "mode";
|
|
1410
|
+
readonly MTA_FILE_MX: "mx";
|
|
1411
|
+
readonly MTA_FILE_VERSION: "version";
|
|
1412
|
+
readonly MTA_STS_POLICY_FILE: "mtaStsPolicyFile";
|
|
1413
|
+
readonly MTA_STS_CERTIFICATE: "mtaStsCertificate";
|
|
1414
|
+
readonly MTA_STS_CERTIFICATE_EXPIRY: "mtaStsCertificateExpiry";
|
|
1415
|
+
readonly MTA_STS_CERTIFICATE_CNAME_NAME: "mtaStsCertificateCnameName";
|
|
1416
|
+
readonly MTA_STS_CERTIFICATE_CNAME_VALUE: "mtaStsCertificateCnameValue";
|
|
1417
|
+
readonly MTA_STS_CERTIFICATE_CNAME_TYPE: "mtaStsCertificateCnameType";
|
|
1418
|
+
readonly MTA_STS_RECORD: "mtaStsRecord";
|
|
1419
|
+
readonly PCT: "pct";
|
|
1420
|
+
readonly PTR_RECORD: "ptrRecord";
|
|
1421
|
+
readonly RETURN_PATH: "returnPath";
|
|
1422
|
+
readonly RUA: "rua";
|
|
1423
|
+
readonly RUF: "ruf";
|
|
1424
|
+
readonly SENDER_IP: "senderIp";
|
|
1425
|
+
readonly SIGNED_HEADERS: "signedHeaders";
|
|
1426
|
+
readonly SIGNER_DOMAIN: "signerDomain";
|
|
1427
|
+
readonly SP: "sp";
|
|
1428
|
+
readonly SPF: "spf";
|
|
1429
|
+
readonly SPF_ALIGNMENT: "spfAlignment";
|
|
1430
|
+
readonly SPF_DOMAIN: "spfDomain";
|
|
1431
|
+
readonly SPF_DOMAINS: "spfDomains";
|
|
1432
|
+
readonly SPF_RECORD: "spfRecord";
|
|
1433
|
+
readonly TLS: "tls";
|
|
1434
|
+
readonly SSL: "ssl";
|
|
1435
|
+
readonly CIPHER_SUITE: "cipherSuite";
|
|
1436
|
+
readonly SUBDOMAIN_POLICY: "subdomainPolicy";
|
|
1437
|
+
readonly SVG: "svg";
|
|
1438
|
+
readonly TLS_RPT_RECORD: "tlsRptRecord";
|
|
1439
|
+
readonly TTL: "ttl";
|
|
1440
|
+
readonly TXT_RECORD: "txtRecord";
|
|
1441
|
+
readonly TXT_RECORDS: "txtRecord";
|
|
1442
|
+
readonly VMC: "vmc";
|
|
1443
|
+
readonly CMC: "cmc";
|
|
1444
|
+
};
|
|
1445
|
+
interface GlossaryTermProps {
|
|
1446
|
+
label: string;
|
|
1447
|
+
glossaryLabel?: string;
|
|
1448
|
+
context?: string;
|
|
1449
|
+
value?: string | number;
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* GlossaryTerm component with React Aria i18n hooks
|
|
1453
|
+
*/
|
|
1454
|
+
declare const GlossaryTerm: React__default.FC<GlossaryTermProps>;
|
|
1455
|
+
|
|
1456
|
+
interface GlossaryComponentProps {
|
|
1457
|
+
label?: string;
|
|
1458
|
+
context?: string;
|
|
1459
|
+
value?: string | number;
|
|
1460
|
+
glossaryLabel?: string;
|
|
1461
|
+
}
|
|
1462
|
+
declare const SenderIp: React__default.FC<GlossaryComponentProps>;
|
|
1463
|
+
declare const Ehlo: React__default.FC<GlossaryComponentProps>;
|
|
1464
|
+
declare const PtrRecord: React__default.FC<GlossaryComponentProps>;
|
|
1465
|
+
declare const ARecord: React__default.FC<GlossaryComponentProps>;
|
|
1466
|
+
declare const SpfRecord: React__default.FC<GlossaryComponentProps>;
|
|
1467
|
+
declare const TxtRecord: React__default.FC<GlossaryComponentProps>;
|
|
1468
|
+
declare const TxtRecords: React__default.FC<GlossaryComponentProps>;
|
|
1469
|
+
declare const CnameRecord: React__default.FC<GlossaryComponentProps>;
|
|
1470
|
+
declare const Dkim: React__default.FC<GlossaryComponentProps>;
|
|
1471
|
+
declare const SignerDomain: React__default.FC<GlossaryComponentProps>;
|
|
1472
|
+
declare const DkimSelector: React__default.FC<GlossaryComponentProps>;
|
|
1473
|
+
declare const Canonicalization: React__default.FC<GlossaryComponentProps>;
|
|
1474
|
+
declare const SignedHeaders: React__default.FC<GlossaryComponentProps>;
|
|
1475
|
+
declare const DkimSignature: React__default.FC<GlossaryComponentProps>;
|
|
1476
|
+
declare const KeyLength: React__default.FC<GlossaryComponentProps>;
|
|
1477
|
+
declare const Ttl: React__default.FC<GlossaryComponentProps>;
|
|
1478
|
+
declare const DkimAlgorithm: React__default.FC<GlossaryComponentProps>;
|
|
1479
|
+
declare const From: React__default.FC<GlossaryComponentProps>;
|
|
1480
|
+
declare const ReturnPath: React__default.FC<GlossaryComponentProps>;
|
|
1481
|
+
declare const DmarcPolicy: React__default.FC<GlossaryComponentProps>;
|
|
1482
|
+
declare const Pct: React__default.FC<GlossaryComponentProps>;
|
|
1483
|
+
declare const Sp: React__default.FC<GlossaryComponentProps>;
|
|
1484
|
+
declare const Rua: React__default.FC<GlossaryComponentProps>;
|
|
1485
|
+
declare const Ruf: React__default.FC<GlossaryComponentProps>;
|
|
1486
|
+
declare const DkimSigningDomain: React__default.FC<GlossaryComponentProps>;
|
|
1487
|
+
declare const SpfDomain: React__default.FC<GlossaryComponentProps>;
|
|
1488
|
+
declare const SubdomainPolicy: React__default.FC<GlossaryComponentProps>;
|
|
1489
|
+
declare const DkimAlignment: React__default.FC<GlossaryComponentProps>;
|
|
1490
|
+
declare const SpfAlignment: React__default.FC<GlossaryComponentProps>;
|
|
1491
|
+
declare const Spf: React__default.FC<GlossaryComponentProps>;
|
|
1492
|
+
declare const Tls: React__default.FC<GlossaryComponentProps>;
|
|
1493
|
+
declare const Ssl: React__default.FC<GlossaryComponentProps>;
|
|
1494
|
+
declare const CipherSuite: React__default.FC<GlossaryComponentProps>;
|
|
1495
|
+
declare const BimiRecord: React__default.FC<GlossaryComponentProps>;
|
|
1496
|
+
declare const DmarcCompliant: React__default.FC<GlossaryComponentProps>;
|
|
1497
|
+
declare const SVG: React__default.FC<GlossaryComponentProps>;
|
|
1498
|
+
declare const VMC: React__default.FC<GlossaryComponentProps>;
|
|
1499
|
+
declare const CMC: React__default.FC<GlossaryComponentProps>;
|
|
1500
|
+
declare const ITAG: React__default.FC<GlossaryComponentProps>;
|
|
1501
|
+
declare const ATAG: React__default.FC<GlossaryComponentProps>;
|
|
1502
|
+
declare const Dmarc: React__default.FC<GlossaryComponentProps>;
|
|
1503
|
+
declare const TlsRptRecord: React__default.FC<GlossaryComponentProps>;
|
|
1504
|
+
declare const MtaStsRecord: React__default.FC<GlossaryComponentProps>;
|
|
1505
|
+
declare const MtaStsPolicyFile: React__default.FC<GlossaryComponentProps>;
|
|
1506
|
+
declare const Version: React__default.FC<GlossaryComponentProps>;
|
|
1507
|
+
declare const Mode: React__default.FC<GlossaryComponentProps>;
|
|
1508
|
+
declare const Mx: React__default.FC<GlossaryComponentProps>;
|
|
1509
|
+
declare const MaxAge: React__default.FC<GlossaryComponentProps>;
|
|
1510
|
+
declare const MtaStsCertificate: React__default.FC<GlossaryComponentProps>;
|
|
1511
|
+
declare const MtaStsCertificateExpiry: React__default.FC<GlossaryComponentProps>;
|
|
1512
|
+
declare const MtaStsCertificateCnameName: React__default.FC<GlossaryComponentProps>;
|
|
1513
|
+
declare const MtaStsCertificateCnameValue: React__default.FC<GlossaryComponentProps>;
|
|
1514
|
+
declare const MtaStsCertificateCnameType: React__default.FC<GlossaryComponentProps>;
|
|
1515
|
+
/**
|
|
1516
|
+
* Type for glossary icon identifiers (kebab-case).
|
|
1517
|
+
* Used as keys in extractors to reference icons without coupling to React components.
|
|
1518
|
+
*/
|
|
1519
|
+
type GlossaryIconType = 'sender-ip' | 'ehlo' | 'ptr-record' | 'a-record' | 'spf' | 'spf-record' | 'spf-domain' | 'spf-alignment' | 'dkim' | 'dkim-signing-domain' | 'dkim-selector' | 'dkim-signature' | 'dkim-algorithm' | 'canonicalization' | 'signed-headers' | 'signer-domain' | 'key-length' | 'ttl' | 'dkim-alignment' | 'from' | 'return-path' | 'dmarc-policy' | 'pct' | 'rua' | 'ruf' | 'subdomain-policy' | 'dmarc' | 'tls' | 'ssl' | 'cipher-suite' | 'txt-record' | 'cname-record' | 'bimi-record' | 'dmarc-compliant' | 'svg' | 'vmc' | 'cmc' | 'itag' | 'atag' | 'tls-rpt-record' | 'mta-sts-record' | 'mta-sts-policy-file' | 'mta-file-version' | 'mta-file-mode' | 'mta-file-mx' | 'mta-file-max-age' | 'mta-sts-certificate' | 'mta-sts-certificate-expiry' | null;
|
|
1520
|
+
/**
|
|
1521
|
+
* Map from icon type identifiers (kebab-case) to glossary icon components.
|
|
1522
|
+
* This is the single source of truth for icon mapping.
|
|
1523
|
+
* Covers all signal card types (DMARC, DKIM, SPF, FCRDNS, TLS, BIMI, MTA-STS).
|
|
1524
|
+
*/
|
|
1525
|
+
declare const GLOSSARY_ICON_MAP: Record<NonNullable<GlossaryIconType>, React__default.FC<GlossaryComponentProps>>;
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* Extended DMARC props with additional fields from API
|
|
1529
|
+
*/
|
|
1530
|
+
type ExtendedDmarcProps = DmarcProps & {
|
|
1531
|
+
report?: {
|
|
1532
|
+
message?: string;
|
|
1533
|
+
detail?: string;
|
|
1534
|
+
text?: string;
|
|
1535
|
+
}[];
|
|
1536
|
+
dkimAlignment?: string;
|
|
1537
|
+
spfAlignment?: string;
|
|
1538
|
+
effectivePolicy?: string;
|
|
1539
|
+
isWeaker?: boolean;
|
|
1540
|
+
};
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* Main orchestrator function that coordinates all handlers
|
|
1544
|
+
*/
|
|
1545
|
+
declare const extractDataOrchestrated: (dmarc: ExtendedDmarcProps | null | undefined, dkim: DkimProps | DkimProps[] | null | undefined, spf: SpfProps | undefined, jmap: JmapProps, t: TranslationFn, isDomainAnalyzer?: boolean | undefined) => ExtractDataResult;
|
|
1546
|
+
|
|
1547
|
+
type SignalData = {
|
|
1548
|
+
signalType: string;
|
|
1549
|
+
jmap?: {
|
|
1550
|
+
extsecrep?: Record<string, any>;
|
|
1551
|
+
[key: string]: unknown;
|
|
1552
|
+
};
|
|
1553
|
+
shortDescription?: unknown;
|
|
1554
|
+
[key: string]: unknown;
|
|
1555
|
+
};
|
|
1556
|
+
type ErrorLike = {
|
|
1557
|
+
name?: string;
|
|
1558
|
+
message?: string;
|
|
1559
|
+
stack?: string;
|
|
1560
|
+
};
|
|
1561
|
+
type CardEnabledOverrides = Record<string, boolean | undefined>;
|
|
1562
|
+
interface SignalCardListProps extends Omit<ComponentProps<'div'>, 'children'> {
|
|
1563
|
+
/** Array of signal data objects containing DMARC, DKIM, SPF information */
|
|
1564
|
+
signals?: SignalData[];
|
|
1565
|
+
/** Error object to display if signal loading fails */
|
|
1566
|
+
error?: ErrorLike | null;
|
|
1567
|
+
/** Map of signal types to enabled/disabled state */
|
|
1568
|
+
isCardEnabledMap?: CardEnabledOverrides;
|
|
1569
|
+
/** Signal types to display in the priority section (shown first). Defaults to DMARC, DKIM, SPF */
|
|
1570
|
+
prioritySignalTypes?: string[];
|
|
1571
|
+
/** Initial selected signal type for external selection control */
|
|
1572
|
+
initialSelectedSignalType?: string | null;
|
|
1573
|
+
/** Callback when a signal card is selected */
|
|
1574
|
+
onSelectSignalType?: (signalType: string) => void;
|
|
1575
|
+
/** Custom footer renderer for adding content at the bottom of each card */
|
|
1576
|
+
renderCardFooter?: (signal: SignalData) => React.ReactNode;
|
|
1577
|
+
/**
|
|
1578
|
+
* Heading text for the priority signals section.
|
|
1579
|
+
* Defaults to "Required for the selected compliance profile"
|
|
1580
|
+
*/
|
|
1581
|
+
prioritySectionHeading?: string;
|
|
1582
|
+
/**
|
|
1583
|
+
* Heading text for the remaining signals section.
|
|
1584
|
+
* Defaults to "Not required for the selected compliance profile"
|
|
1585
|
+
*/
|
|
1586
|
+
remainingSectionHeading?: string;
|
|
1587
|
+
/** Use Investigate handbook colors instead of Design System CSS variables */
|
|
1588
|
+
useInvestigateColors?: boolean;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
type ExtSecrep = Omit<ExtsecrepProps, 'spf' | 'dkim'> & {
|
|
1592
|
+
spf?: SpfProps | DomainAnalyzerSpfProps | null;
|
|
1593
|
+
dkim?: DkimProps | DkimProps[] | DomainAnalyzerDkimProps | null;
|
|
1594
|
+
[key: string]: any;
|
|
1595
|
+
};
|
|
1596
|
+
type InvestigateData = Omit<InvestigateProps, 'urls'> & {
|
|
1597
|
+
urls?: any;
|
|
1598
|
+
[key: string]: any;
|
|
1599
|
+
};
|
|
1600
|
+
type GetSignalStatusArgs = {
|
|
1601
|
+
signalType: string;
|
|
1602
|
+
signal?: SignalData;
|
|
1603
|
+
extsecrep?: ExtSecrep;
|
|
1604
|
+
investigate?: InvestigateData;
|
|
1605
|
+
domain?: string | null;
|
|
1606
|
+
isDomainAnalyzer?: boolean;
|
|
1607
|
+
};
|
|
1608
|
+
/**
|
|
1609
|
+
* Get the status of a signal card using lightweight quick status functions.
|
|
1610
|
+
*
|
|
1611
|
+
* This function determines the card status (good/warning/danger/info/unknown)
|
|
1612
|
+
* without running full extractors, improving performance for sidebar rendering.
|
|
1613
|
+
*/
|
|
1614
|
+
declare const getSignalStatus: ({ signalType, signal, extsecrep, investigate, isDomainAnalyzer, }: GetSignalStatusArgs) => CardStatus;
|
|
1615
|
+
|
|
1616
|
+
declare const SIGNAL_TYPES: {
|
|
1617
|
+
readonly DMARC: "DMARC";
|
|
1618
|
+
readonly SUBDO: "SUBDO";
|
|
1619
|
+
readonly SPF: "SPF";
|
|
1620
|
+
readonly DKIM: "DKIM";
|
|
1621
|
+
readonly TLS: "TLS";
|
|
1622
|
+
readonly FCRDNS: "FCRDNS";
|
|
1623
|
+
readonly URLS: "URLS";
|
|
1624
|
+
readonly THREATINV: "THREATINV";
|
|
1625
|
+
readonly BIMI: "BIMI";
|
|
1626
|
+
readonly MTA_STS: "MTA_STS";
|
|
1627
|
+
readonly DNSSEC: "DNSSEC";
|
|
1628
|
+
readonly AMP: "AMP";
|
|
1629
|
+
readonly GOOGLE_YAHOO_COMPLIANCE: "GOOGLE_YAHOO_COMPLIANCE";
|
|
1630
|
+
};
|
|
1631
|
+
type SignalType = (typeof SIGNAL_TYPES)[keyof typeof SIGNAL_TYPES];
|
|
1632
|
+
/**
|
|
1633
|
+
* Signal types available in the BIMI Checker tool.
|
|
1634
|
+
* These are simplified domain validation cards for BIMI compliance checking.
|
|
1635
|
+
*/
|
|
1636
|
+
declare const BIMI_CHECKER_SIGNAL_TYPES: {
|
|
1637
|
+
readonly DMARC: "DMARC_DOMAIN";
|
|
1638
|
+
readonly SPF: "SPF_DOMAIN";
|
|
1639
|
+
readonly BIMI: "BIMI";
|
|
1640
|
+
};
|
|
1641
|
+
type BimiCheckerSignalType = (typeof BIMI_CHECKER_SIGNAL_TYPES)[keyof typeof BIMI_CHECKER_SIGNAL_TYPES];
|
|
1642
|
+
/**
|
|
1643
|
+
* Signal types available in the Domain Analyzer tool.
|
|
1644
|
+
* These include advanced domain analysis features like DNS lookup counting,
|
|
1645
|
+
* CNAME resolution chains, Dynamic SPF detection, etc.
|
|
1646
|
+
*/
|
|
1647
|
+
declare const DOMAIN_ANALYZER_SIGNAL_TYPES: {
|
|
1648
|
+
readonly DMARC: "DMARC";
|
|
1649
|
+
readonly BIMI: "BIMI";
|
|
1650
|
+
readonly MTA_STS: "MTA_STS";
|
|
1651
|
+
readonly SUBDO: "SUBDO_DOMAIN_ANALYZER";
|
|
1652
|
+
readonly SPF: "SPF_DOMAIN_ANALYZER";
|
|
1653
|
+
readonly DKIM: "DKIM_DOMAIN_ANALYZER";
|
|
1654
|
+
readonly THREATINV: "THREATINV_DOMAIN_ANALYZER";
|
|
1655
|
+
};
|
|
1656
|
+
type DomainAnalyzerSignalType = (typeof DOMAIN_ANALYZER_SIGNAL_TYPES)[keyof typeof DOMAIN_ANALYZER_SIGNAL_TYPES];
|
|
1657
|
+
/**
|
|
1658
|
+
* Signal types available in the Public Investigate tool (website).
|
|
1659
|
+
* This is a subset of SIGNAL_TYPES - only core authentication and security cards.
|
|
1660
|
+
*
|
|
1661
|
+
* Excluded from public (internal/sensitive data):
|
|
1662
|
+
* - DNSSEC: Internal DNS security validation
|
|
1663
|
+
* - URLS: Extracted URLs from email body
|
|
1664
|
+
* - THREATINV: Threat intelligence data
|
|
1665
|
+
* - AMP: Accelerated Mobile Pages validation
|
|
1666
|
+
*/
|
|
1667
|
+
declare const PUBLIC_INVESTIGATE_SIGNAL_TYPES: {
|
|
1668
|
+
readonly DMARC: "DMARC";
|
|
1669
|
+
readonly SPF: "SPF";
|
|
1670
|
+
readonly DKIM: "DKIM";
|
|
1671
|
+
readonly TLS: "TLS";
|
|
1672
|
+
readonly FCRDNS: "FCRDNS";
|
|
1673
|
+
readonly BIMI: "BIMI";
|
|
1674
|
+
readonly MTA_STS: "MTA_STS";
|
|
1675
|
+
readonly GOOGLE_YAHOO_COMPLIANCE: "GOOGLE_YAHOO_COMPLIANCE";
|
|
1676
|
+
readonly SUBDO: "SUBDO";
|
|
1677
|
+
};
|
|
1678
|
+
type PublicInvestigateSignalType = (typeof PUBLIC_INVESTIGATE_SIGNAL_TYPES)[keyof typeof PUBLIC_INVESTIGATE_SIGNAL_TYPES];
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* Signal Cards Theme Configuration
|
|
1682
|
+
*
|
|
1683
|
+
* This context provides theme configuration to signal card components,
|
|
1684
|
+
* eliminating the need to pass `useInvestigateColors` through every component layer.
|
|
1685
|
+
*/
|
|
1686
|
+
interface SignalCardTheme {
|
|
1687
|
+
/**
|
|
1688
|
+
* Whether to use Investigate-specific colors and fonts.
|
|
1689
|
+
* When true, applies custom fonts and color palette for the Investigate tool.
|
|
1690
|
+
*/
|
|
1691
|
+
useInvestigateColors: boolean;
|
|
1692
|
+
}
|
|
1693
|
+
interface SignalCardThemeProviderProps {
|
|
1694
|
+
children: ReactNode;
|
|
1695
|
+
/**
|
|
1696
|
+
* Theme configuration to apply to all signal card descendants
|
|
1697
|
+
*/
|
|
1698
|
+
theme?: Partial<SignalCardTheme>;
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* Provider component for Signal Card theming.
|
|
1702
|
+
*
|
|
1703
|
+
* Wrap signal card components with this provider to set theme options
|
|
1704
|
+
* without passing props through every component level.
|
|
1705
|
+
*
|
|
1706
|
+
* This provider injects CSS custom properties (--sc-*) that components use for styling.
|
|
1707
|
+
*
|
|
1708
|
+
* @example
|
|
1709
|
+
* ```tsx
|
|
1710
|
+
* <SignalCardThemeProvider theme={{ useInvestigateColors: true }}>
|
|
1711
|
+
* <SignalCardList signals={signals} />
|
|
1712
|
+
* </SignalCardThemeProvider>
|
|
1713
|
+
* ```
|
|
1714
|
+
*/
|
|
1715
|
+
declare const SignalCardThemeProvider: React__default.FC<SignalCardThemeProviderProps>;
|
|
1716
|
+
/**
|
|
1717
|
+
* Hook to access the current signal card theme.
|
|
1718
|
+
*
|
|
1719
|
+
* Components can use this hook to access theme configuration
|
|
1720
|
+
* without requiring explicit props.
|
|
1721
|
+
*
|
|
1722
|
+
* @example
|
|
1723
|
+
* ```tsx
|
|
1724
|
+
* const { useInvestigateColors } = useSignalCardTheme();
|
|
1725
|
+
* ```
|
|
1726
|
+
*/
|
|
1727
|
+
declare const useSignalCardTheme: () => SignalCardTheme;
|
|
1728
|
+
/**
|
|
1729
|
+
* Hook that combines prop value with context value.
|
|
1730
|
+
* Prop value takes precedence over context when explicitly provided.
|
|
1731
|
+
*
|
|
1732
|
+
* Components can receive useInvestigateColors via props or context.
|
|
1733
|
+
*
|
|
1734
|
+
* @param propValue - Explicitly passed prop value (takes precedence)
|
|
1735
|
+
* @returns Resolved theme configuration
|
|
1736
|
+
*/
|
|
1737
|
+
declare const useResolvedTheme: (propValue?: boolean) => SignalCardTheme;
|
|
1738
|
+
|
|
1739
|
+
interface ReceivedSpfResult {
|
|
1740
|
+
result?: string;
|
|
1741
|
+
[key: string]: unknown;
|
|
1742
|
+
}
|
|
1743
|
+
interface SpfIdentity {
|
|
1744
|
+
receivedSpf?: ReceivedSpfResult | null;
|
|
1745
|
+
[key: string]: unknown;
|
|
1746
|
+
}
|
|
1747
|
+
interface SpfData {
|
|
1748
|
+
helo?: SpfIdentity | null;
|
|
1749
|
+
mailfrom?: SpfIdentity | null;
|
|
1750
|
+
[key: string]: unknown;
|
|
1751
|
+
}
|
|
1752
|
+
declare function getHeloOrMailFrom(spf?: SpfData | null): SpfIdentity | null;
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* Main extractor function for TLS card data.
|
|
1756
|
+
* Orchestrates handlers for version and cipher validation.
|
|
1757
|
+
*/
|
|
1758
|
+
declare const extractData: (tls: TlsProps | undefined, t: TranslationFn) => ExtractedData;
|
|
1759
|
+
|
|
1760
|
+
/**
|
|
1761
|
+
* Signal Cards Components (@redsift/products)
|
|
1762
|
+
*
|
|
1763
|
+
* Email security signal visualization components for the Investigate tool.
|
|
1764
|
+
* Part of the Red Sift Design System Products package.
|
|
1765
|
+
*
|
|
1766
|
+
* @packageDocumentation
|
|
1767
|
+
* @module SignalCards
|
|
1768
|
+
*
|
|
1769
|
+
* @example
|
|
1770
|
+
* ```tsx
|
|
1771
|
+
* import { SignalCardList, SignalCardThemeProvider } from '@redsift/products';
|
|
1772
|
+
*
|
|
1773
|
+
* // Basic usage with SignalCardList
|
|
1774
|
+
* <SignalCardThemeProvider>
|
|
1775
|
+
* <SignalCardList signals={signals} />
|
|
1776
|
+
* </SignalCardThemeProvider>
|
|
1777
|
+
*
|
|
1778
|
+
* // Individual card usage
|
|
1779
|
+
* <SignalCardDmarc jmap={emailData.jmap} />
|
|
1780
|
+
* ```
|
|
1781
|
+
*/
|
|
1782
|
+
declare const SignalCardList: _redsift_design_system.Comp<SignalCardListProps, HTMLDivElement>;
|
|
1783
|
+
declare const SignalCardDmarc: _redsift_design_system.Comp<SignalCardDmarcProps, HTMLDivElement>;
|
|
1784
|
+
declare const SignalCardSpf: _redsift_design_system.Comp<SignalCardSpfProps, HTMLDivElement>;
|
|
1785
|
+
declare const SignalCardDkim: _redsift_design_system.Comp<SignalCardDkimProps, HTMLDivElement>;
|
|
1786
|
+
declare const SignalCardFcrdns: _redsift_design_system.Comp<SignalCardFcrdnsProps, HTMLDivElement>;
|
|
1787
|
+
declare const SignalCardTls: _redsift_design_system.Comp<SignalCardTlsProps, HTMLDivElement>;
|
|
1788
|
+
declare const SignalCardDmarcDomain: _redsift_design_system.Comp<SignalCardDmarcDomainProps, HTMLDivElement>;
|
|
1789
|
+
declare const SignalCardSpfDomain: _redsift_design_system.Comp<SignalCardSpfDomainProps, HTMLDivElement>;
|
|
1790
|
+
declare const SignalCardSpfDomainAnalyzer: _redsift_design_system.Comp<SignalCardSpfDomainAnalyzerProps, HTMLDivElement>;
|
|
1791
|
+
declare const SignalCardDkimDomainAnalyzer: _redsift_design_system.Comp<SignalCardDkimDomainAnalyzerProps, HTMLDivElement>;
|
|
1792
|
+
declare const SignalCardBimi: _redsift_design_system.Comp<SignalCardBimiProps, HTMLDivElement>;
|
|
1793
|
+
declare const SignalCardMtaSts: _redsift_design_system.Comp<SignalCardMtaStsProps, HTMLDivElement>;
|
|
1794
|
+
declare const SignalCardSubdo: _redsift_design_system.Comp<SignalCardSubdoProps, HTMLDivElement>;
|
|
1795
|
+
declare const SignalCardThreatInv: _redsift_design_system.Comp<SignalCardThreatInvProps, HTMLDivElement>;
|
|
1796
|
+
declare const SignalCardDnssec: _redsift_design_system.Comp<SignalCardDnssecProps, HTMLDivElement>;
|
|
1797
|
+
declare const SignalCardAmp: _redsift_design_system.Comp<SignalCardAmpProps, HTMLDivElement>;
|
|
1798
|
+
declare const SignalCardUrls: _redsift_design_system.Comp<SignalCardUrlsProps, HTMLDivElement>;
|
|
1799
|
+
declare const SignalCardGoogleYahooCompliance: _redsift_design_system.Comp<SignalCardGoogleYahooComplianceProps, HTMLDivElement>;
|
|
1800
|
+
|
|
1801
|
+
export { ARecord, ATAG, BIMI_CHECKER_SIGNAL_TYPES, BaseRadarMenuButton, BaseRadarMenuButtonContent, BimiCheckerSignalType, BimiRecord, CARD_STATUS, CMC, Canonicalization, ChecklistItem, CipherSuite, CnameRecord, DOMAIN_ANALYZER_SIGNAL_TYPES, Dkim, DkimAlgorithm, DkimAlignment, DkimSelector, DkimSignature, DkimSigningDomain, Dmarc, DmarcCompliant, DmarcPolicy, DomainAnalyzerSignalType, Ehlo, From, GLOSSARY_ICON_MAP, GlossaryIconType, GlossaryTerm, ITAG, KeyLength, MaxAge, Mode, MtaStsCertificate, MtaStsCertificateCnameName, MtaStsCertificateCnameType, MtaStsCertificateCnameValue, MtaStsCertificateExpiry, MtaStsPolicyFile, MtaStsRecord, Mx, PUBLIC_INVESTIGATE_SIGNAL_TYPES, Pct, PtrRecord, PublicInvestigateSignalType, Radar, RadarButton, RadarItem, RadarMenuButton, RadarMenuButtonContent, RadarMenuButtonContentFooter, RadarMenuButtonContentHeader, RadarMenuButtonContentMenu, RadarMenuButtonTrigger, RadarSimple, RadarSimpleMenuButton, ReturnPath, Rua, Ruf, SIGNAL_TYPES, STATUS_COLORS, STATUS_ICONS, STATUS_ICON_STYLES, SVG, SenderIp, SignalCardAmp, SignalCardAmpProps, SignalCardBimi, SignalCardBimiProps, SignalCardDkim, SignalCardDkimDomainAnalyzer, SignalCardDkimDomainAnalyzerProps, SignalCardDkimProps, SignalCardDmarc, SignalCardDmarcDomain, SignalCardDmarcDomainProps, SignalCardDmarcProps, SignalCardDnssec, SignalCardDnssecProps, SignalCardFcrdns, SignalCardFcrdnsProps, SignalCardGoogleYahooCompliance, SignalCardGoogleYahooComplianceProps, SignalCardList, SignalCardListProps, SignalCardMtaSts, SignalCardMtaStsProps, SignalCardSpf, SignalCardSpfDomain, SignalCardSpfDomainAnalyzer, SignalCardSpfDomainAnalyzerProps, SignalCardSpfDomainProps, SignalCardSpfProps, SignalCardSubdo, SignalCardSubdoProps, SignalCardTheme, SignalCardThemeProvider, SignalCardThemeProviderProps, SignalCardThreatInv, SignalCardThreatInvProps, SignalCardTls, SignalCardTlsProps, SignalCardUrls, SignalCardUrlsProps, SignalData, SignalType, SignedHeaders, SignerDomain, Sp, Spf, SpfAlignment, SpfDomain, SpfRecord, Ssl, SubdomainPolicy, Tls, TlsRptRecord, Ttl, TxtRecord, TxtRecords, VMC, Version, createGlossaryLink, extractData$2 as extractDKIMdata, extractDataOrchestrated as extractDMARCdata, extractData$3 as extractFCrDNSdata, extractData$1 as extractSPFdata, extractData as extractTLSdata, getHeloOrMailFrom, getSignalStatus, getStatusColor, getStatusIcon, getStatusIconStyle, glossaryLabelIds, isCardStatus, isFailureStatus, isSuccessStatus, isWarningStatus, mapStatusToDetailedCardColor, normalizeStatus, useResolvedTheme, useSignalCardTheme };
|