Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit caf0a04

Browse files
author
Cass Fridkin
committed
*crosses fingers*
1 parent d54529b commit caf0a04

File tree

1 file changed

+30
-61
lines changed

1 file changed

+30
-61
lines changed

overrides/cf.d.ts

+30-61
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ interface RequestInitCfPropertiesImageMinify {
298298
/**
299299
* Request metadata provided by Cloudflare's edge.
300300
*/
301-
type IncomingRequestCfProperties<HostMetadata = never> =
301+
type IncomingRequestCfProperties<HostMetadata = unknown> =
302302
IncomingRequestCfPropertiesBase &
303303
IncomingRequestCfPropertiesBotManagementEnterprise &
304304
IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
@@ -394,37 +394,39 @@ interface IncomingRequestCfPropertiesBase {
394394
tlsExportedAuthenticator?: IncomingRequestCfPropertiesExportedAuthenticatorMetadata;
395395
}
396396

397-
interface IncomingRequestCfPropertiesBotManagement {
397+
interface IncomingRequestCfPropertiesBotManagementBase {
398398
/**
399-
* Results of Cloudflare's Bot Management analysis
399+
* Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot,
400+
* represented as an integer percentage between `1` (almost certainly human)
401+
* and `99` (almost certainly a bot).
402+
*
403+
* @example 54
400404
*/
401-
botManagement: {
402-
/**
403-
* Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot,
404-
* represented as an integer percentage between `1` (almost certainly human)
405-
* and `99` (almost certainly a bot).
406-
*
407-
* @example 54
408-
*/
409-
score: number;
405+
score: number;
410406

411-
/**
412-
* A boolean value that is true if the request comes from a good bot, like Google or Bing.
413-
* Most customers choose to allow this traffic. For more details, see [Traffic from known bots](https://developers.cloudflare.com/firewall/known-issues-and-faq/#how-does-firewall-rules-handle-traffic-from-known-bots).
414-
*/
415-
verifiedBot: boolean;
407+
/**
408+
* A boolean value that is true if the request comes from a good bot, like Google or Bing.
409+
* Most customers choose to allow this traffic. For more details, see [Traffic from known bots](https://developers.cloudflare.com/firewall/known-issues-and-faq/#how-does-firewall-rules-handle-traffic-from-known-bots).
410+
*/
411+
verifiedBot: boolean;
416412

417-
/**
418-
* A boolean value that is true if the request originates from a
419-
* Cloudflare-verified proxy service.
420-
*/
421-
corporateProxy: boolean;
413+
/**
414+
* A boolean value that is true if the request originates from a
415+
* Cloudflare-verified proxy service.
416+
*/
417+
corporateProxy: boolean;
422418

423-
/**
424-
* A boolean value that's true if the request matches [file extensions](https://developers.cloudflare.com/bots/reference/static-resources/) for many types of static resources.
425-
*/
426-
staticResource: boolean;
427-
};
419+
/**
420+
* A boolean value that's true if the request matches [file extensions](https://developers.cloudflare.com/bots/reference/static-resources/) for many types of static resources.
421+
*/
422+
staticResource: boolean;
423+
}
424+
425+
interface IncomingRequestCfPropertiesBotManagement {
426+
/**
427+
* Results of Cloudflare's Bot Management analysis
428+
*/
429+
botManagement: IncomingRequestCfPropertiesBotManagementBase;
428430

429431
/**
430432
* Duplicate of `botManagement.score`.
@@ -439,46 +441,13 @@ interface IncomingRequestCfPropertiesBotManagementEnterprise
439441
/**
440442
* Results of Cloudflare's Bot Management analysis
441443
*/
442-
botManagement: {
443-
/**
444-
* Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot,
445-
* represented as an integer percentage between `1` (almost certainly human)
446-
* and `99` (almost certainly a bot).
447-
*
448-
* @example 54
449-
*/
450-
score: number;
451-
452-
/**
453-
* A boolean value that is true if the request comes from a good bot, like Google or Bing.
454-
* Most customers choose to allow this traffic. For more details, see [Traffic from known bots](https://developers.cloudflare.com/firewall/known-issues-and-faq/#how-does-firewall-rules-handle-traffic-from-known-bots).
455-
*/
456-
verifiedBot: boolean;
457-
458-
/**
459-
* A boolean value that is true if the request originates from a
460-
* Cloudflare-verified proxy service.
461-
*/
462-
corporateProxy: boolean;
463-
464-
/**
465-
* A boolean value that's true if the request matches [file extensions](https://developers.cloudflare.com/bots/reference/static-resources/) for many types of static resources.
466-
*/
467-
staticResource: boolean;
468-
444+
botManagement: IncomingRequestCfPropertiesBotManagementBase & {
469445
/**
470446
* A [JA3 Fingerprint](https://developers.cloudflare.com/bots/concepts/ja3-fingerprint/) to help profile specific SSL/TLS clients
471447
* across different destination IPs, Ports, and X509 certificates.
472448
*/
473449
ja3Hash: string;
474450
};
475-
476-
/**
477-
* Duplicate of `botManagement.score`.
478-
*
479-
* @deprecated
480-
*/
481-
clientTrustScore: number;
482451
}
483452

484453
interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> {

0 commit comments

Comments
 (0)