@cloudflare/workers-types 3.17.0 → 3.19.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 (3) hide show
  1. package/README.md +17 -2
  2. package/index.d.ts +962 -371
  3. package/package.json +2 -1
package/index.d.ts CHANGED
@@ -16,78 +16,6 @@ declare class AbortSignal extends EventTarget {
16
16
  throwIfAborted(): void;
17
17
  }
18
18
 
19
- interface BasicImageTransformations {
20
- /**
21
- * Maximum width in image pixels. The value must be an integer.
22
- */
23
- width?: number;
24
- /**
25
- * Maximum height in image pixels. The value must be an integer.
26
- */
27
- height?: number;
28
- /**
29
- * Resizing mode as a string. It affects interpretation of width and height
30
- * options:
31
- * - scale-down: Similar to contain, but the image is never enlarged. If
32
- * the image is larger than given width or height, it will be resized.
33
- * Otherwise its original size will be kept.
34
- * - contain: Resizes to maximum size that fits within the given width and
35
- * height. If only a single dimension is given (e.g. only width), the
36
- * image will be shrunk or enlarged to exactly match that dimension.
37
- * Aspect ratio is always preserved.
38
- * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
39
- * and height. If the image has an aspect ratio different from the ratio
40
- * of width and height, it will be cropped to fit.
41
- * - crop: The image will be shrunk and cropped to fit within the area
42
- * specified by width and height. The image will not be enlarged. For images
43
- * smaller than the given dimensions it's the same as scale-down. For
44
- * images larger than the given dimensions, it's the same as cover.
45
- * See also trim.
46
- * - pad: Resizes to the maximum size that fits within the given width and
47
- * height, and then fills the remaining area with a background color
48
- * (white by default). Use of this mode is not recommended, as the same
49
- * effect can be more efficiently achieved with the contain mode and the
50
- * CSS object-fit: contain property.
51
- */
52
- fit?: "scale-down" | "contain" | "cover" | "crop" | "pad";
53
- /**
54
- * When cropping with fit: "cover", this defines the side or point that should
55
- * be left uncropped. The value is either a string
56
- * "left", "right", "top", "bottom", "auto", or "center" (the default),
57
- * or an object {x, y} containing focal point coordinates in the original
58
- * image expressed as fractions ranging from 0.0 (top or left) to 1.0
59
- * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
60
- * crop bottom or left and right sides as necessary, but won’t crop anything
61
- * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
62
- * preserve as much as possible around a point at 20% of the height of the
63
- * source image.
64
- */
65
- gravity?:
66
- | "left"
67
- | "right"
68
- | "top"
69
- | "bottom"
70
- | "center"
71
- | "auto"
72
- | BasicImageTransformationsGravityCoordinates;
73
- /**
74
- * Background color to add underneath the image. Applies only to images with
75
- * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
76
- * hsl(…), etc.)
77
- */
78
- background?: string;
79
- /**
80
- * Number of degrees (90, 180, 270) to rotate the image by. width and height
81
- * options refer to axes after rotation.
82
- */
83
- rotate?: 0 | 90 | 180 | 270 | 360;
84
- }
85
-
86
- interface BasicImageTransformationsGravityCoordinates {
87
- x: number;
88
- y: number;
89
- }
90
-
91
19
  declare class Blob {
92
20
  constructor(bits?: BlobBits, options?: BlobOptions);
93
21
  readonly size: number;
@@ -455,6 +383,7 @@ interface DurableObjectStorage {
455
383
  options?: DurableObjectSetAlarmOptions
456
384
  ): Promise<void>;
457
385
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
386
+ sync(): Promise<void>;
458
387
  }
459
388
 
460
389
  /**
@@ -758,106 +687,6 @@ declare class IdentityTransformStream extends TransformStream {
758
687
  constructor();
759
688
  }
760
689
 
761
- /**
762
- * In addition to the properties on the standard Request object,
763
- * the cf object contains extra information about the request provided
764
- * by Cloudflare's edge.
765
- *
766
- * Note: Currently, settings in the cf object cannot be accessed in the
767
- * playground.
768
- */
769
- interface IncomingRequestCfProperties {
770
- /**
771
- * (e.g. 395747)
772
- */
773
- asn: number;
774
- /**
775
- * The organisation which owns the ASN of the incoming request.
776
- * (e.g. Google Cloud)
777
- */
778
- asOrganization: string;
779
- botManagement?: IncomingRequestCfPropertiesBotManagement;
780
- city?: string;
781
- clientAcceptEncoding?: string;
782
- clientTcpRtt?: number;
783
- clientTrustScore?: number;
784
- /**
785
- * The three-letter airport code of the data center that the request
786
- * hit. (e.g. "DFW")
787
- */
788
- colo: string;
789
- continent?: string;
790
- /**
791
- * The two-letter country code in the request. This is the same value
792
- * as that provided in the CF-IPCountry header. (e.g. "US")
793
- */
794
- country: string;
795
- httpProtocol: string;
796
- isEUCountry?: string;
797
- latitude?: string;
798
- longitude?: string;
799
- /**
800
- * DMA metro code from which the request was issued, e.g. "635"
801
- */
802
- metroCode?: string;
803
- postalCode?: string;
804
- /**
805
- * e.g. "Texas"
806
- */
807
- region?: string;
808
- /**
809
- * e.g. "TX"
810
- */
811
- regionCode?: string;
812
- /**
813
- * e.g. "weight=256;exclusive=1"
814
- */
815
- requestPriority: string;
816
- /**
817
- * e.g. "America/Chicago"
818
- */
819
- timezone?: string;
820
- tlsVersion: string;
821
- tlsCipher: string;
822
- tlsClientAuth: IncomingRequestCfPropertiesTLSClientAuth;
823
- }
824
-
825
- interface IncomingRequestCfPropertiesBotManagement {
826
- corporateProxy: boolean;
827
- ja3Hash?: string;
828
- score: number;
829
- staticResource: boolean;
830
- verifiedBot: boolean;
831
- }
832
-
833
- interface IncomingRequestCfPropertiesTLSClientAuth {
834
- certIssuerDNLegacy: string;
835
- certIssuerDN: string;
836
- certIssuerDNRFC2253: string;
837
- certIssuerSKI: string;
838
- certIssuerSerial: string;
839
- certPresented: "0" | "1";
840
- certSubjectDNLegacy: string;
841
- certSubjectDN: string;
842
- certSubjectDNRFC2253: string;
843
- /**
844
- * In format "Dec 22 19:39:00 2018 GMT"
845
- */
846
- certNotBefore: string;
847
- /**
848
- * In format "Dec 22 19:39:00 2018 GMT"
849
- */
850
- certNotAfter: string;
851
- certSerial: string;
852
- certFingerprintSHA1: string;
853
- /**
854
- * "SUCCESS", "FAILED:reason", "NONE"
855
- */
856
- certVerified: string;
857
- certRevoked: string;
858
- certSKI: string;
859
- }
860
-
861
690
  interface JsonWebKey {
862
691
  kty: string;
863
692
  use?: string;
@@ -1307,6 +1136,13 @@ declare class Request extends Body {
1307
1136
  readonly redirect: string;
1308
1137
  readonly fetcher: Fetcher | null;
1309
1138
  readonly signal: AbortSignal;
1139
+ /**
1140
+ * In addition to the properties on the standard `Request` object,
1141
+ * the `cf` object contains extra information about the request provided
1142
+ * by Cloudflare's edge.
1143
+ *
1144
+ * Returns undefined when accessed in the playground.
1145
+ */
1310
1146
  readonly cf?: IncomingRequestCfProperties;
1311
1147
  }
1312
1148
 
@@ -1332,206 +1168,24 @@ interface RequestInit {
1332
1168
  }
1333
1169
 
1334
1170
  /**
1335
- * In addition to the properties you can set in the RequestInit dict
1336
- * that you pass as an argument to the Request constructor, you can
1337
- * set certain properties of a `cf` object to control how Cloudflare
1338
- * features are applied to that new Request.
1339
- *
1340
- * Note: Currently, these properties cannot be tested in the
1341
- * playground.
1171
+ * Back compat for code migrating from older definitions.
1172
+ * @deprecated Use RequestInit instead.
1342
1173
  */
1343
- interface RequestInitCfProperties {
1344
- cacheEverything?: boolean;
1345
- /**
1346
- * A request's cache key is what determines if two requests are
1347
- * "the same" for caching purposes. If a request has the same cache key
1348
- * as some previous request, then we can serve the same cached response for
1349
- * both. (e.g. 'some-key')
1350
- *
1351
- * Only available for Enterprise customers.
1352
- */
1353
- cacheKey?: string;
1354
- /**
1355
- * This allows you to append additional Cache-Tag response headers
1356
- * to the origin response without modifications to the origin server.
1357
- * This will allow for greater control over the Purge by Cache Tag feature
1358
- * utilizing changes only in the Workers process.
1359
- *
1360
- * Only available for Enterprise customers.
1361
- */
1362
- cacheTags?: string[];
1363
- /**
1364
- * Force response to be cached for a given number of seconds. (e.g. 300)
1365
- */
1366
- cacheTtl?: number;
1367
- /**
1368
- * Force response to be cached for a given number of seconds based on the Origin status code.
1369
- * (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
1370
- */
1371
- cacheTtlByStatus?: Record<string, number>;
1372
- scrapeShield?: boolean;
1373
- apps?: boolean;
1374
- image?: RequestInitCfPropertiesImage;
1375
- minify?: RequestInitCfPropertiesImageMinify;
1376
- mirage?: boolean;
1377
- polish?: "lossy" | "lossless" | "off";
1378
- /**
1379
- * Redirects the request to an alternate origin server. You can use this,
1380
- * for example, to implement load balancing across several origins.
1381
- * (e.g.us-east.example.com)
1382
- *
1383
- * Note - For security reasons, the hostname set in resolveOverride must
1384
- * be proxied on the same Cloudflare zone of the incoming request.
1385
- * Otherwise, the setting is ignored. CNAME hosts are allowed, so to
1386
- * resolve to a host under a different domain or a DNS only domain first
1387
- * declare a CNAME record within your own zone’s DNS mapping to the
1388
- * external hostname, set proxy on Cloudflare, then set resolveOverride
1389
- * to point to that CNAME record.
1390
- */
1391
- resolveOverride?: string;
1392
- }
1393
-
1394
- interface RequestInitCfPropertiesImage extends BasicImageTransformations {
1395
- /**
1396
- * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
1397
- * easier to specify higher-DPI sizes in <img srcset>.
1398
- */
1399
- dpr?: number;
1400
- /**
1401
- * An object with four properties {left, top, right, bottom} that specify
1402
- * a number of pixels to cut off on each side. Allows removal of borders
1403
- * or cutting out a specific fragment of an image. Trimming is performed
1404
- * before resizing or rotation. Takes dpr into account.
1405
- */
1406
- trim?: { left?: number; top?: number; right?: number; bottom?: number };
1407
- /**
1408
- * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
1409
- * make images look worse, but load faster. The default is 85. It applies only
1410
- * to JPEG and WebP images. It doesn’t have any effect on PNG.
1411
- */
1412
- quality?: number;
1413
- /**
1414
- * Output format to generate. It can be:
1415
- * - avif: generate images in AVIF format.
1416
- * - webp: generate images in Google WebP format. Set quality to 100 to get
1417
- * the WebP-lossless format.
1418
- * - json: instead of generating an image, outputs information about the
1419
- * image, in JSON format. The JSON object will contain image size
1420
- * (before and after resizing), source image’s MIME type, file size, etc.
1421
- * - jpeg: generate images in JPEG format.
1422
- * - png: generate images in PNG format.
1423
- */
1424
- format?: "avif" | "webp" | "json" | "jpeg" | "png";
1425
- /**
1426
- * Whether to preserve animation frames from input files. Default is true.
1427
- * Setting it to false reduces animations to still images. This setting is
1428
- * recommended when enlarging images or processing arbitrary user content,
1429
- * because large GIF animations can weigh tens or even hundreds of megabytes.
1430
- * It is also useful to set anim:false when using format:"json" to get the
1431
- * response quicker without the number of frames.
1432
- */
1433
- anim?: boolean;
1434
- /**
1435
- * What EXIF data should be preserved in the output image. Note that EXIF
1436
- * rotation and embedded color profiles are always applied ("baked in" into
1437
- * the image), and aren't affected by this option. Note that if the Polish
1438
- * feature is enabled, all metadata may have been removed already and this
1439
- * option may have no effect.
1440
- * - keep: Preserve most of EXIF metadata, including GPS location if there's
1441
- * any.
1442
- * - copyright: Only keep the copyright tag, and discard everything else.
1443
- * This is the default behavior for JPEG files.
1444
- * - none: Discard all invisible EXIF metadata. Currently WebP and PNG
1445
- * output formats always discard metadata.
1446
- */
1447
- metadata?: "keep" | "copyright" | "none";
1448
- /**
1449
- * Strength of sharpening filter to apply to the image. Floating-point
1450
- * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
1451
- * recommended value for downscaled images.
1452
- */
1453
- sharpen?: number;
1454
- /**
1455
- * Radius of a blur filter (approximate gaussian). Maximum supported radius
1456
- * is 250.
1457
- */
1458
- blur?: number;
1459
- /**
1460
- * Overlays are drawn in the order they appear in the array (last array
1461
- * entry is the topmost layer).
1462
- */
1463
- draw?: RequestInitCfPropertiesImageDraw[];
1464
- /**
1465
- * Fetching image from authenticated origin. Setting this property will
1466
- * pass authentication headers (Authorization, Cookie, etc.) through to
1467
- * the origin.
1468
- */
1469
- "origin-auth"?: "share-publicly";
1470
- }
1471
-
1472
- interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
1473
- /**
1474
- * Absolute URL of the image file to use for the drawing. It can be any of
1475
- * the supported file formats. For drawing of watermarks or non-rectangular
1476
- * overlays we recommend using PNG or WebP images.
1477
- */
1478
- url: string;
1479
- /**
1480
- * Floating-point number between 0 (transparent) and 1 (opaque).
1481
- * For example, opacity: 0.5 makes overlay semitransparent.
1482
- */
1483
- opacity?: number;
1484
- /**
1485
- * - If set to true, the overlay image will be tiled to cover the entire
1486
- * area. This is useful for stock-photo-like watermarks.
1487
- * - If set to "x", the overlay image will be tiled horizontally only
1488
- * (form a line).
1489
- * - If set to "y", the overlay image will be tiled vertically only
1490
- * (form a line).
1491
- */
1492
- repeat?: true | "x" | "y";
1493
- /**
1494
- * Position of the overlay image relative to a given edge. Each property is
1495
- * an offset in pixels. 0 aligns exactly to the edge. For example, left: 10
1496
- * positions left side of the overlay 10 pixels from the left edge of the
1497
- * image it's drawn over. bottom: 0 aligns bottom of the overlay with bottom
1498
- * of the background image.
1499
- *
1500
- * Setting both left & right, or both top & bottom is an error.
1501
- *
1502
- * If no position is specified, the image will be centered.
1503
- */
1504
- top?: number;
1505
- left?: number;
1506
- bottom?: number;
1507
- right?: number;
1508
- }
1509
-
1510
- interface RequestInitCfPropertiesImageMinify {
1511
- javascript?: boolean;
1512
- css?: boolean;
1513
- html?: boolean;
1514
- }
1515
-
1516
- /**
1517
- * Back compat for code migrating from older definitions.
1518
- * @deprecated Use RequestInit instead.
1519
- */
1520
- declare type RequestInitializerDict = RequestInit;
1521
-
1522
- declare class Response extends Body {
1523
- constructor(bodyInit?: BodyInit | null, maybeInit?: ResponseInit | Response);
1524
- static redirect(url: string, status?: number): Response;
1525
- static json(any: any, maybeInit?: ResponseInit | Response): Response;
1526
- clone(): Response;
1527
- readonly status: number;
1528
- readonly statusText: string;
1529
- readonly headers: Headers;
1530
- readonly ok: boolean;
1531
- readonly redirected: boolean;
1532
- readonly url: string;
1533
- readonly webSocket: WebSocket | null;
1534
- readonly cf?: Object;
1174
+ declare type RequestInitializerDict = RequestInit;
1175
+
1176
+ declare class Response extends Body {
1177
+ constructor(bodyInit?: BodyInit | null, maybeInit?: ResponseInit | Response);
1178
+ static redirect(url: string, status?: number): Response;
1179
+ static json(any: any, maybeInit?: ResponseInit | Response): Response;
1180
+ clone(): Response;
1181
+ readonly status: number;
1182
+ readonly statusText: string;
1183
+ readonly headers: Headers;
1184
+ readonly ok: boolean;
1185
+ readonly redirected: boolean;
1186
+ readonly url: string;
1187
+ readonly webSocket: WebSocket | null;
1188
+ readonly cf?: Object;
1535
1189
  }
1536
1190
 
1537
1191
  interface ResponseInit {
@@ -2152,6 +1806,943 @@ declare function structuredClone(
2152
1806
  options?: ServiceWorkerGlobalScopeStructuredCloneOptions
2153
1807
  ): any;
2154
1808
 
1809
+ /*** Injected cf.d.ts ***/
1810
+ interface BasicImageTransformations {
1811
+ /**
1812
+ * Maximum width in image pixels. The value must be an integer.
1813
+ */
1814
+ width?: number;
1815
+ /**
1816
+ * Maximum height in image pixels. The value must be an integer.
1817
+ */
1818
+ height?: number;
1819
+ /**
1820
+ * Resizing mode as a string. It affects interpretation of width and height
1821
+ * options:
1822
+ * - scale-down: Similar to contain, but the image is never enlarged. If
1823
+ * the image is larger than given width or height, it will be resized.
1824
+ * Otherwise its original size will be kept.
1825
+ * - contain: Resizes to maximum size that fits within the given width and
1826
+ * height. If only a single dimension is given (e.g. only width), the
1827
+ * image will be shrunk or enlarged to exactly match that dimension.
1828
+ * Aspect ratio is always preserved.
1829
+ * - cover: Resizes (shrinks or enlarges) to fill the entire area of width
1830
+ * and height. If the image has an aspect ratio different from the ratio
1831
+ * of width and height, it will be cropped to fit.
1832
+ * - crop: The image will be shrunk and cropped to fit within the area
1833
+ * specified by width and height. The image will not be enlarged. For images
1834
+ * smaller than the given dimensions it's the same as scale-down. For
1835
+ * images larger than the given dimensions, it's the same as cover.
1836
+ * See also trim.
1837
+ * - pad: Resizes to the maximum size that fits within the given width and
1838
+ * height, and then fills the remaining area with a background color
1839
+ * (white by default). Use of this mode is not recommended, as the same
1840
+ * effect can be more efficiently achieved with the contain mode and the
1841
+ * CSS object-fit: contain property.
1842
+ */
1843
+ fit?: "scale-down" | "contain" | "cover" | "crop" | "pad";
1844
+ /**
1845
+ * When cropping with fit: "cover", this defines the side or point that should
1846
+ * be left uncropped. The value is either a string
1847
+ * "left", "right", "top", "bottom", "auto", or "center" (the default),
1848
+ * or an object {x, y} containing focal point coordinates in the original
1849
+ * image expressed as fractions ranging from 0.0 (top or left) to 1.0
1850
+ * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will
1851
+ * crop bottom or left and right sides as necessary, but won’t crop anything
1852
+ * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to
1853
+ * preserve as much as possible around a point at 20% of the height of the
1854
+ * source image.
1855
+ */
1856
+ gravity?:
1857
+ | "left"
1858
+ | "right"
1859
+ | "top"
1860
+ | "bottom"
1861
+ | "center"
1862
+ | "auto"
1863
+ | BasicImageTransformationsGravityCoordinates;
1864
+ /**
1865
+ * Background color to add underneath the image. Applies only to images with
1866
+ * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
1867
+ * hsl(…), etc.)
1868
+ */
1869
+ background?: string;
1870
+ /**
1871
+ * Number of degrees (90, 180, 270) to rotate the image by. width and height
1872
+ * options refer to axes after rotation.
1873
+ */
1874
+ rotate?: 0 | 90 | 180 | 270 | 360;
1875
+ }
1876
+
1877
+ interface BasicImageTransformationsGravityCoordinates {
1878
+ x: number;
1879
+ y: number;
1880
+ }
1881
+
1882
+ /**
1883
+ * In addition to the properties you can set in the RequestInit dict
1884
+ * that you pass as an argument to the Request constructor, you can
1885
+ * set certain properties of a `cf` object to control how Cloudflare
1886
+ * features are applied to that new Request.
1887
+ *
1888
+ * Note: Currently, these properties cannot be tested in the
1889
+ * playground.
1890
+ */
1891
+ interface RequestInitCfProperties {
1892
+ cacheEverything?: boolean;
1893
+ /**
1894
+ * A request's cache key is what determines if two requests are
1895
+ * "the same" for caching purposes. If a request has the same cache key
1896
+ * as some previous request, then we can serve the same cached response for
1897
+ * both. (e.g. 'some-key')
1898
+ *
1899
+ * Only available for Enterprise customers.
1900
+ */
1901
+ cacheKey?: string;
1902
+ /**
1903
+ * This allows you to append additional Cache-Tag response headers
1904
+ * to the origin response without modifications to the origin server.
1905
+ * This will allow for greater control over the Purge by Cache Tag feature
1906
+ * utilizing changes only in the Workers process.
1907
+ *
1908
+ * Only available for Enterprise customers.
1909
+ */
1910
+ cacheTags?: string[];
1911
+ /**
1912
+ * Force response to be cached for a given number of seconds. (e.g. 300)
1913
+ */
1914
+ cacheTtl?: number;
1915
+ /**
1916
+ * Force response to be cached for a given number of seconds based on the Origin status code.
1917
+ * (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
1918
+ */
1919
+ cacheTtlByStatus?: Record<string, number>;
1920
+ scrapeShield?: boolean;
1921
+ apps?: boolean;
1922
+ image?: RequestInitCfPropertiesImage;
1923
+ minify?: RequestInitCfPropertiesImageMinify;
1924
+ mirage?: boolean;
1925
+ polish?: "lossy" | "lossless" | "off";
1926
+ /**
1927
+ * Redirects the request to an alternate origin server. You can use this,
1928
+ * for example, to implement load balancing across several origins.
1929
+ * (e.g.us-east.example.com)
1930
+ *
1931
+ * Note - For security reasons, the hostname set in resolveOverride must
1932
+ * be proxied on the same Cloudflare zone of the incoming request.
1933
+ * Otherwise, the setting is ignored. CNAME hosts are allowed, so to
1934
+ * resolve to a host under a different domain or a DNS only domain first
1935
+ * declare a CNAME record within your own zone’s DNS mapping to the
1936
+ * external hostname, set proxy on Cloudflare, then set resolveOverride
1937
+ * to point to that CNAME record.
1938
+ */
1939
+ resolveOverride?: string;
1940
+ }
1941
+
1942
+ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
1943
+ /**
1944
+ * Absolute URL of the image file to use for the drawing. It can be any of
1945
+ * the supported file formats. For drawing of watermarks or non-rectangular
1946
+ * overlays we recommend using PNG or WebP images.
1947
+ */
1948
+ url: string;
1949
+ /**
1950
+ * Floating-point number between 0 (transparent) and 1 (opaque).
1951
+ * For example, opacity: 0.5 makes overlay semitransparent.
1952
+ */
1953
+ opacity?: number;
1954
+ /**
1955
+ * - If set to true, the overlay image will be tiled to cover the entire
1956
+ * area. This is useful for stock-photo-like watermarks.
1957
+ * - If set to "x", the overlay image will be tiled horizontally only
1958
+ * (form a line).
1959
+ * - If set to "y", the overlay image will be tiled vertically only
1960
+ * (form a line).
1961
+ */
1962
+ repeat?: true | "x" | "y";
1963
+ /**
1964
+ * Position of the overlay image relative to a given edge. Each property is
1965
+ * an offset in pixels. 0 aligns exactly to the edge. For example, left: 10
1966
+ * positions left side of the overlay 10 pixels from the left edge of the
1967
+ * image it's drawn over. bottom: 0 aligns bottom of the overlay with bottom
1968
+ * of the background image.
1969
+ *
1970
+ * Setting both left & right, or both top & bottom is an error.
1971
+ *
1972
+ * If no position is specified, the image will be centered.
1973
+ */
1974
+ top?: number;
1975
+ left?: number;
1976
+ bottom?: number;
1977
+ right?: number;
1978
+ }
1979
+
1980
+ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
1981
+ /**
1982
+ * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
1983
+ * easier to specify higher-DPI sizes in <img srcset>.
1984
+ */
1985
+ dpr?: number;
1986
+ /**
1987
+ * An object with four properties {left, top, right, bottom} that specify
1988
+ * a number of pixels to cut off on each side. Allows removal of borders
1989
+ * or cutting out a specific fragment of an image. Trimming is performed
1990
+ * before resizing or rotation. Takes dpr into account.
1991
+ */
1992
+ trim?: {
1993
+ left?: number;
1994
+ top?: number;
1995
+ right?: number;
1996
+ bottom?: number;
1997
+ };
1998
+ /**
1999
+ * Quality setting from 1-100 (useful values are in 60-90 range). Lower values
2000
+ * make images look worse, but load faster. The default is 85. It applies only
2001
+ * to JPEG and WebP images. It doesn’t have any effect on PNG.
2002
+ */
2003
+ quality?: number;
2004
+ /**
2005
+ * Output format to generate. It can be:
2006
+ * - avif: generate images in AVIF format.
2007
+ * - webp: generate images in Google WebP format. Set quality to 100 to get
2008
+ * the WebP-lossless format.
2009
+ * - json: instead of generating an image, outputs information about the
2010
+ * image, in JSON format. The JSON object will contain image size
2011
+ * (before and after resizing), source image’s MIME type, file size, etc.
2012
+ * - jpeg: generate images in JPEG format.
2013
+ * - png: generate images in PNG format.
2014
+ */
2015
+ format?: "avif" | "webp" | "json" | "jpeg" | "png";
2016
+ /**
2017
+ * Whether to preserve animation frames from input files. Default is true.
2018
+ * Setting it to false reduces animations to still images. This setting is
2019
+ * recommended when enlarging images or processing arbitrary user content,
2020
+ * because large GIF animations can weigh tens or even hundreds of megabytes.
2021
+ * It is also useful to set anim:false when using format:"json" to get the
2022
+ * response quicker without the number of frames.
2023
+ */
2024
+ anim?: boolean;
2025
+ /**
2026
+ * What EXIF data should be preserved in the output image. Note that EXIF
2027
+ * rotation and embedded color profiles are always applied ("baked in" into
2028
+ * the image), and aren't affected by this option. Note that if the Polish
2029
+ * feature is enabled, all metadata may have been removed already and this
2030
+ * option may have no effect.
2031
+ * - keep: Preserve most of EXIF metadata, including GPS location if there's
2032
+ * any.
2033
+ * - copyright: Only keep the copyright tag, and discard everything else.
2034
+ * This is the default behavior for JPEG files.
2035
+ * - none: Discard all invisible EXIF metadata. Currently WebP and PNG
2036
+ * output formats always discard metadata.
2037
+ */
2038
+ metadata?: "keep" | "copyright" | "none";
2039
+ /**
2040
+ * Strength of sharpening filter to apply to the image. Floating-point
2041
+ * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a
2042
+ * recommended value for downscaled images.
2043
+ */
2044
+ sharpen?: number;
2045
+ /**
2046
+ * Radius of a blur filter (approximate gaussian). Maximum supported radius
2047
+ * is 250.
2048
+ */
2049
+ blur?: number;
2050
+ /**
2051
+ * Overlays are drawn in the order they appear in the array (last array
2052
+ * entry is the topmost layer).
2053
+ */
2054
+ draw?: RequestInitCfPropertiesImageDraw[];
2055
+ /**
2056
+ * Fetching image from authenticated origin. Setting this property will
2057
+ * pass authentication headers (Authorization, Cookie, etc.) through to
2058
+ * the origin.
2059
+ */
2060
+ "origin-auth"?: "share-publicly";
2061
+ }
2062
+
2063
+ interface RequestInitCfPropertiesImageMinify {
2064
+ javascript?: boolean;
2065
+ css?: boolean;
2066
+ html?: boolean;
2067
+ }
2068
+
2069
+ /**
2070
+ * Request metadata provided by Cloudflare's edge.
2071
+ */
2072
+ type IncomingRequestCfProperties<HostMetadata = unknown> =
2073
+ IncomingRequestCfPropertiesBase &
2074
+ IncomingRequestCfPropertiesBotManagementEnterprise &
2075
+ IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
2076
+ IncomingRequestCfPropertiesGeographicInformation &
2077
+ IncomingRequestCfPropertiesCloudflareAccessOrApiShield;
2078
+
2079
+ interface IncomingRequestCfPropertiesBase {
2080
+ /**
2081
+ * [ASN](https://www.iana.org/assignments/as-numbers/as-numbers.xhtml) of the incoming request.
2082
+ *
2083
+ * @example 395747
2084
+ */
2085
+ asn: number;
2086
+ /**
2087
+ * The organization which owns the ASN of the incoming request.
2088
+ *
2089
+ * @example "Google Cloud"
2090
+ */
2091
+ asOrganization: string;
2092
+ /**
2093
+ * The original value of the `Accept-Encoding` header if Cloudflare modified it.
2094
+ *
2095
+ * @example "gzip, deflate, br"
2096
+ */
2097
+ clientAcceptEncoding?: string;
2098
+ /**
2099
+ * The number of milliseconds it took for the request to reach your worker.
2100
+ *
2101
+ * @example 22
2102
+ */
2103
+ clientTcpRtt?: number;
2104
+ /**
2105
+ * The three-letter [IATA](https://en.wikipedia.org/wiki/IATA_airport_code)
2106
+ * airport code of the data center that the request hit.
2107
+ *
2108
+ * @example "DFW"
2109
+ */
2110
+ colo: string;
2111
+ /**
2112
+ * Represents the upstream's response to a
2113
+ * [TCP `keepalive` message](https://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html)
2114
+ * from cloudflare.
2115
+ *
2116
+ * For workers with no upstream, this will always be `1`.
2117
+ *
2118
+ * @example 3
2119
+ */
2120
+ edgeRequestKeepAliveStatus: IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus;
2121
+ /**
2122
+ * The HTTP Protocol the request used.
2123
+ *
2124
+ * @example "HTTP/2"
2125
+ */
2126
+ httpProtocol: string;
2127
+ /**
2128
+ * The browser-requested prioritization information in the request object.
2129
+ *
2130
+ * If no information was set, defaults to the empty string `""`
2131
+ *
2132
+ * @example "weight=192;exclusive=0;group=3;group-weight=127"
2133
+ * @default ""
2134
+ */
2135
+ requestPriority: string;
2136
+ /**
2137
+ * The TLS version of the connection to Cloudflare.
2138
+ * In requests served over plaintext (without TLS), this property is the empty string `""`.
2139
+ *
2140
+ * @example "TLSv1.3"
2141
+ */
2142
+ tlsVersion: string;
2143
+ /**
2144
+ * The cipher for the connection to Cloudflare.
2145
+ * In requests served over plaintext (without TLS), this property is the empty string `""`.
2146
+ *
2147
+ * @example "AEAD-AES128-GCM-SHA256"
2148
+ */
2149
+ tlsCipher: string;
2150
+ /**
2151
+ * Metadata containing the [`HELLO`](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2) and [`FINISHED`](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.9) messages from this request's TLS handshake.
2152
+ *
2153
+ * If the incoming request was served over plaintext (without TLS) this field is undefined.
2154
+ */
2155
+ tlsExportedAuthenticator?: IncomingRequestCfPropertiesExportedAuthenticatorMetadata;
2156
+ }
2157
+
2158
+ interface IncomingRequestCfPropertiesBotManagementBase {
2159
+ /**
2160
+ * Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot,
2161
+ * represented as an integer percentage between `1` (almost certainly human)
2162
+ * and `99` (almost certainly a bot).
2163
+ *
2164
+ * @example 54
2165
+ */
2166
+ score: number;
2167
+ /**
2168
+ * A boolean value that is true if the request comes from a good bot, like Google or Bing.
2169
+ * 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).
2170
+ */
2171
+ verifiedBot: boolean;
2172
+ /**
2173
+ * A boolean value that is true if the request originates from a
2174
+ * Cloudflare-verified proxy service.
2175
+ */
2176
+ corporateProxy: boolean;
2177
+ /**
2178
+ * 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.
2179
+ */
2180
+ staticResource: boolean;
2181
+ }
2182
+
2183
+ interface IncomingRequestCfPropertiesBotManagement {
2184
+ /**
2185
+ * Results of Cloudflare's Bot Management analysis
2186
+ */
2187
+ botManagement: IncomingRequestCfPropertiesBotManagementBase;
2188
+ /**
2189
+ * Duplicate of `botManagement.score`.
2190
+ *
2191
+ * @deprecated
2192
+ */
2193
+ clientTrustScore: number;
2194
+ }
2195
+
2196
+ interface IncomingRequestCfPropertiesBotManagementEnterprise
2197
+ extends IncomingRequestCfPropertiesBotManagement {
2198
+ /**
2199
+ * Results of Cloudflare's Bot Management analysis
2200
+ */
2201
+ botManagement: IncomingRequestCfPropertiesBotManagementBase & {
2202
+ /**
2203
+ * A [JA3 Fingerprint](https://developers.cloudflare.com/bots/concepts/ja3-fingerprint/) to help profile specific SSL/TLS clients
2204
+ * across different destination IPs, Ports, and X509 certificates.
2205
+ */
2206
+ ja3Hash: string;
2207
+ };
2208
+ }
2209
+
2210
+ interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> {
2211
+ /**
2212
+ * Custom metadata set per-host in [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/).
2213
+ *
2214
+ * This field is only present if you have Cloudflare for SaaS enabled on your account
2215
+ * and you have followed the [required steps to enable it]((https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata/)).
2216
+ */
2217
+ hostMetadata: HostMetadata;
2218
+ }
2219
+
2220
+ interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
2221
+ /**
2222
+ * Information about the client certificate presented to Cloudflare.
2223
+ *
2224
+ * This is populated when the incoming request is served over TLS using
2225
+ * either Cloudflare Access or API Shield (mTLS)
2226
+ * and the presented SSL certificate has a valid
2227
+ * [Certificate Serial Number](https://ldapwiki.com/wiki/Certificate%20Serial%20Number)
2228
+ * (i.e., not `null` or `""`).
2229
+ *
2230
+ * Otherwise, a set of placeholder values are used.
2231
+ *
2232
+ * The property `certPresented` will be set to `"1"` when
2233
+ * the object is populated (i.e. the above conditions were met).
2234
+ */
2235
+ tlsClientAuth:
2236
+ | IncomingRequestCfPropertiesTLSClientAuth
2237
+ | IncomingRequestCfPropertiesTLSClientAuthPlaceholder;
2238
+ }
2239
+
2240
+ /**
2241
+ * Metadata about the request's TLS handshake
2242
+ */
2243
+ interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
2244
+ /**
2245
+ * The client's [`HELLO` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2), encoded in hexadecimal
2246
+ *
2247
+ * @example "44372ba35fa1270921d318f34c12f155dc87b682cf36a790cfaa3ba8737a1b5d"
2248
+ */
2249
+ clientHandshake: string;
2250
+ /**
2251
+ * The server's [`HELLO` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2), encoded in hexadecimal
2252
+ *
2253
+ * @example "44372ba35fa1270921d318f34c12f155dc87b682cf36a790cfaa3ba8737a1b5d"
2254
+ */
2255
+ serverHandshake: string;
2256
+ /**
2257
+ * The client's [`FINISHED` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.9), encoded in hexadecimal
2258
+ *
2259
+ * @example "084ee802fe1348f688220e2a6040a05b2199a761f33cf753abb1b006792d3f8b"
2260
+ */
2261
+ clientFinished: string;
2262
+ /**
2263
+ * The server's [`FINISHED` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.9), encoded in hexadecimal
2264
+ *
2265
+ * @example "084ee802fe1348f688220e2a6040a05b2199a761f33cf753abb1b006792d3f8b"
2266
+ */
2267
+ serverFinished: string;
2268
+ }
2269
+
2270
+ /**
2271
+ * Geographic data about the request's origin.
2272
+ */
2273
+ type IncomingRequestCfPropertiesGeographicInformation = Partial<{
2274
+ /**
2275
+ * The [ISO 3166-1 Alpha 2](https://www.iso.org/iso-3166-country-codes.html) country code the request originated from.
2276
+ *
2277
+ * If your worker is [configured to accept TOR connections](https://support.cloudflare.com/hc/en-us/articles/203306930-Understanding-Cloudflare-Tor-support-and-Onion-Routing), this may also be `"T1"`, indicating a request that originated over TOR.
2278
+ *
2279
+ * If Cloudflare is unable to determine where the request originated this property is omitted.
2280
+ *
2281
+ * @example "GB"
2282
+ *
2283
+ */
2284
+ country: Iso3166Alpha2Code | "T1";
2285
+ /**
2286
+ * If present, this property indicates that the request originated in the EU
2287
+ *
2288
+ * @example "1"
2289
+ */
2290
+ isEUCountry?: "1";
2291
+ /**
2292
+ * A two-letter code indicating the continent the request originated from.
2293
+ *
2294
+ * @example "AN"
2295
+ */
2296
+ continent: ContinentCode;
2297
+ /**
2298
+ * The city the request originated from
2299
+ *
2300
+ * @example "Austin"
2301
+ */
2302
+ city?: string;
2303
+ /**
2304
+ * Postal code of the incoming request
2305
+ *
2306
+ * @example "78701"
2307
+ */
2308
+ postalCode?: string;
2309
+ /**
2310
+ * Latitude of the incoming request
2311
+ *
2312
+ * @example "30.27130"
2313
+ */
2314
+ latitude?: string;
2315
+ /**
2316
+ * Longitude of the incoming request
2317
+ *
2318
+ * @example "-97.74260"
2319
+ */
2320
+ longitude?: string;
2321
+ /**
2322
+ * Timezone of the incoming request
2323
+ *
2324
+ * @example "America/Chicago"
2325
+ */
2326
+ timezone?: string;
2327
+ /**
2328
+ * If known, the ISO 3166-2 name for the first level region associated with
2329
+ * the IP address of the incoming request
2330
+ *
2331
+ * @example "Texas"
2332
+ */
2333
+ region?: string;
2334
+ /**
2335
+ * If known, the ISO 3166-2 code for the first-level region associated with
2336
+ * the IP address of the incoming request
2337
+ *
2338
+ * @example "TX"
2339
+ */
2340
+ regionCode?: string;
2341
+ /**
2342
+ * Metro code (DMA) of the incoming request
2343
+ *
2344
+ * @example "635"
2345
+ */
2346
+ metroCode?: string;
2347
+ }>;
2348
+
2349
+ /** Data about the incoming request's TLS certificate */
2350
+ interface IncomingRequestCfPropertiesTLSClientAuth {
2351
+ /** Always `"1"`, indicating that the certificate was presented */
2352
+ certPresented: "1";
2353
+ /**
2354
+ * Result of certificate verification.
2355
+ *
2356
+ * @example "FAILED:self signed certificate"
2357
+ */
2358
+ certVerified: Exclude<CertVerificationStatus, "NONE">;
2359
+ /** The presented certificate's revokation status.
2360
+ *
2361
+ * - A value of `"1"` indicates the certificate has been revoked
2362
+ * - A value of `"0"` indicates the certificate has not been revoked
2363
+ */
2364
+ certRevoked: "1" | "0";
2365
+ /**
2366
+ * The certificate issuer's [distinguished name](https://knowledge.digicert.com/generalinformation/INFO1745.html)
2367
+ *
2368
+ * @example "CN=cloudflareaccess.com, C=US, ST=Texas, L=Austin, O=Cloudflare"
2369
+ */
2370
+ certIssuerDN: string;
2371
+ /**
2372
+ * The certificate subject's [distinguished name](https://knowledge.digicert.com/generalinformation/INFO1745.html)
2373
+ *
2374
+ * @example "CN=*.cloudflareaccess.com, C=US, ST=Texas, L=Austin, O=Cloudflare"
2375
+ */
2376
+ certSubjectDN: string;
2377
+ /**
2378
+ * The certificate issuer's [distinguished name](https://knowledge.digicert.com/generalinformation/INFO1745.html) ([RFC 2253](https://www.rfc-editor.org/rfc/rfc2253.html) formatted)
2379
+ *
2380
+ * @example "CN=cloudflareaccess.com, C=US, ST=Texas, L=Austin, O=Cloudflare"
2381
+ */
2382
+ certIssuerDNRFC2253: string;
2383
+ /**
2384
+ * The certificate subject's [distinguished name](https://knowledge.digicert.com/generalinformation/INFO1745.html) ([RFC 2253](https://www.rfc-editor.org/rfc/rfc2253.html) formatted)
2385
+ *
2386
+ * @example "CN=*.cloudflareaccess.com, C=US, ST=Texas, L=Austin, O=Cloudflare"
2387
+ */
2388
+ certSubjectDNRFC2253: string;
2389
+ /** The certificate issuer's distinguished name (legacy policies) */
2390
+ certIssuerDNLegacy: string;
2391
+ /** The certificate subject's distinguished name (legacy policies) */
2392
+ certSubjectDNLegacy: string;
2393
+ /**
2394
+ * The certificate's serial number
2395
+ *
2396
+ * @example "00936EACBE07F201DF"
2397
+ */
2398
+ certSerial: string;
2399
+ /**
2400
+ * The certificate issuer's serial number
2401
+ *
2402
+ * @example "2489002934BDFEA34"
2403
+ */
2404
+ certIssuerSerial: string;
2405
+ /**
2406
+ * The certificate's Subject Key Identifier
2407
+ *
2408
+ * @example "BB:AF:7E:02:3D:FA:A6:F1:3C:84:8E:AD:EE:38:98:EC:D9:32:32:D4"
2409
+ */
2410
+ certSKI: string;
2411
+ /**
2412
+ * The certificate issuer's Subject Key Identifier
2413
+ *
2414
+ * @example "BB:AF:7E:02:3D:FA:A6:F1:3C:84:8E:AD:EE:38:98:EC:D9:32:32:D4"
2415
+ */
2416
+ certIssuerSKI: string;
2417
+ /**
2418
+ * The certificate's SHA-1 fingerprint
2419
+ *
2420
+ * @example "6b9109f323999e52259cda7373ff0b4d26bd232e"
2421
+ */
2422
+ certFingerprintSHA1: string;
2423
+ /**
2424
+ * The certificate's SHA-256 fingerprint
2425
+ *
2426
+ * @example "acf77cf37b4156a2708e34c4eb755f9b5dbbe5ebb55adfec8f11493438d19e6ad3f157f81fa3b98278453d5652b0c1fd1d71e5695ae4d709803a4d3f39de9dea"
2427
+ */
2428
+ certFingerprintSHA256: string;
2429
+ /**
2430
+ * The effective starting date of the certificate
2431
+ *
2432
+ * @example "Dec 22 19:39:00 2018 GMT"
2433
+ */
2434
+ certNotBefore: string;
2435
+ /**
2436
+ * The effective expiration date of the certificate
2437
+ *
2438
+ * @example "Dec 22 19:39:00 2018 GMT"
2439
+ */
2440
+ certNotAfter: string;
2441
+ }
2442
+
2443
+ /** Placeholder values for TLS Client Authorization */
2444
+ interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
2445
+ certPresented: "0";
2446
+ certVerified: "NONE";
2447
+ certRevoked: "0";
2448
+ certIssuerDN: "";
2449
+ certSubjectDN: "";
2450
+ certIssuerDNRFC2253: "";
2451
+ certSubjectDNRFC2253: "";
2452
+ certIssuerDNLegacy: "";
2453
+ certSubjectDNLegacy: "";
2454
+ certSerial: "";
2455
+ certIssuerSerial: "";
2456
+ certSKI: "";
2457
+ certIssuerSKI: "";
2458
+ certFingerprintSHA1: "";
2459
+ certFingerprintSHA256: "";
2460
+ certNotBefore: "";
2461
+ certNotAfter: "";
2462
+ }
2463
+
2464
+ /** Possible outcomes of TLS verification */
2465
+ declare type CertVerificationStatus =
2466
+ /** Authentication succeeded */
2467
+ | "SUCCESS"
2468
+ /** No certificate was presented */
2469
+ | "NONE"
2470
+ /** Failed because the certificate was self-signed */
2471
+ | "FAILED:self signed certificate"
2472
+ /** Failed because the certificate failed a trust chain check */
2473
+ | "FAILED:unable to verify the first certificate"
2474
+ /** Failed because the certificate not yet valid */
2475
+ | "FAILED:certificate is not yet valid"
2476
+ /** Failed because the certificate is expired */
2477
+ | "FAILED:certificate has expired"
2478
+ /** Failed for another unspecified reason */
2479
+ | "FAILED";
2480
+
2481
+ /**
2482
+ * An upstream endpoint's response to a TCP `keepalive` message from Cloudflare.
2483
+ */
2484
+ declare type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
2485
+ | 0 /** Unknown */
2486
+ | 1 /** no keepalives (not found) */
2487
+ | 2 /** no connection re-use, opening keepalive connection failed */
2488
+ | 3 /** no connection re-use, keepalive accepted and saved */
2489
+ | 4 /** connection re-use, refused by the origin server (`TCP FIN`) */
2490
+ | 5; /** connection re-use, accepted by the origin server */
2491
+
2492
+ /** ISO 3166-1 Alpha-2 codes */
2493
+ declare type Iso3166Alpha2Code =
2494
+ | "AD"
2495
+ | "AE"
2496
+ | "AF"
2497
+ | "AG"
2498
+ | "AI"
2499
+ | "AL"
2500
+ | "AM"
2501
+ | "AO"
2502
+ | "AQ"
2503
+ | "AR"
2504
+ | "AS"
2505
+ | "AT"
2506
+ | "AU"
2507
+ | "AW"
2508
+ | "AX"
2509
+ | "AZ"
2510
+ | "BA"
2511
+ | "BB"
2512
+ | "BD"
2513
+ | "BE"
2514
+ | "BF"
2515
+ | "BG"
2516
+ | "BH"
2517
+ | "BI"
2518
+ | "BJ"
2519
+ | "BL"
2520
+ | "BM"
2521
+ | "BN"
2522
+ | "BO"
2523
+ | "BQ"
2524
+ | "BR"
2525
+ | "BS"
2526
+ | "BT"
2527
+ | "BV"
2528
+ | "BW"
2529
+ | "BY"
2530
+ | "BZ"
2531
+ | "CA"
2532
+ | "CC"
2533
+ | "CD"
2534
+ | "CF"
2535
+ | "CG"
2536
+ | "CH"
2537
+ | "CI"
2538
+ | "CK"
2539
+ | "CL"
2540
+ | "CM"
2541
+ | "CN"
2542
+ | "CO"
2543
+ | "CR"
2544
+ | "CU"
2545
+ | "CV"
2546
+ | "CW"
2547
+ | "CX"
2548
+ | "CY"
2549
+ | "CZ"
2550
+ | "DE"
2551
+ | "DJ"
2552
+ | "DK"
2553
+ | "DM"
2554
+ | "DO"
2555
+ | "DZ"
2556
+ | "EC"
2557
+ | "EE"
2558
+ | "EG"
2559
+ | "EH"
2560
+ | "ER"
2561
+ | "ES"
2562
+ | "ET"
2563
+ | "FI"
2564
+ | "FJ"
2565
+ | "FK"
2566
+ | "FM"
2567
+ | "FO"
2568
+ | "FR"
2569
+ | "GA"
2570
+ | "GB"
2571
+ | "GD"
2572
+ | "GE"
2573
+ | "GF"
2574
+ | "GG"
2575
+ | "GH"
2576
+ | "GI"
2577
+ | "GL"
2578
+ | "GM"
2579
+ | "GN"
2580
+ | "GP"
2581
+ | "GQ"
2582
+ | "GR"
2583
+ | "GS"
2584
+ | "GT"
2585
+ | "GU"
2586
+ | "GW"
2587
+ | "GY"
2588
+ | "HK"
2589
+ | "HM"
2590
+ | "HN"
2591
+ | "HR"
2592
+ | "HT"
2593
+ | "HU"
2594
+ | "ID"
2595
+ | "IE"
2596
+ | "IL"
2597
+ | "IM"
2598
+ | "IN"
2599
+ | "IO"
2600
+ | "IQ"
2601
+ | "IR"
2602
+ | "IS"
2603
+ | "IT"
2604
+ | "JE"
2605
+ | "JM"
2606
+ | "JO"
2607
+ | "JP"
2608
+ | "KE"
2609
+ | "KG"
2610
+ | "KH"
2611
+ | "KI"
2612
+ | "KM"
2613
+ | "KN"
2614
+ | "KP"
2615
+ | "KR"
2616
+ | "KW"
2617
+ | "KY"
2618
+ | "KZ"
2619
+ | "LA"
2620
+ | "LB"
2621
+ | "LC"
2622
+ | "LI"
2623
+ | "LK"
2624
+ | "LR"
2625
+ | "LS"
2626
+ | "LT"
2627
+ | "LU"
2628
+ | "LV"
2629
+ | "LY"
2630
+ | "MA"
2631
+ | "MC"
2632
+ | "MD"
2633
+ | "ME"
2634
+ | "MF"
2635
+ | "MG"
2636
+ | "MH"
2637
+ | "MK"
2638
+ | "ML"
2639
+ | "MM"
2640
+ | "MN"
2641
+ | "MO"
2642
+ | "MP"
2643
+ | "MQ"
2644
+ | "MR"
2645
+ | "MS"
2646
+ | "MT"
2647
+ | "MU"
2648
+ | "MV"
2649
+ | "MW"
2650
+ | "MX"
2651
+ | "MY"
2652
+ | "MZ"
2653
+ | "NA"
2654
+ | "NC"
2655
+ | "NE"
2656
+ | "NF"
2657
+ | "NG"
2658
+ | "NI"
2659
+ | "NL"
2660
+ | "NO"
2661
+ | "NP"
2662
+ | "NR"
2663
+ | "NU"
2664
+ | "NZ"
2665
+ | "OM"
2666
+ | "PA"
2667
+ | "PE"
2668
+ | "PF"
2669
+ | "PG"
2670
+ | "PH"
2671
+ | "PK"
2672
+ | "PL"
2673
+ | "PM"
2674
+ | "PN"
2675
+ | "PR"
2676
+ | "PS"
2677
+ | "PT"
2678
+ | "PW"
2679
+ | "PY"
2680
+ | "QA"
2681
+ | "RE"
2682
+ | "RO"
2683
+ | "RS"
2684
+ | "RU"
2685
+ | "RW"
2686
+ | "SA"
2687
+ | "SB"
2688
+ | "SC"
2689
+ | "SD"
2690
+ | "SE"
2691
+ | "SG"
2692
+ | "SH"
2693
+ | "SI"
2694
+ | "SJ"
2695
+ | "SK"
2696
+ | "SL"
2697
+ | "SM"
2698
+ | "SN"
2699
+ | "SO"
2700
+ | "SR"
2701
+ | "SS"
2702
+ | "ST"
2703
+ | "SV"
2704
+ | "SX"
2705
+ | "SY"
2706
+ | "SZ"
2707
+ | "TC"
2708
+ | "TD"
2709
+ | "TF"
2710
+ | "TG"
2711
+ | "TH"
2712
+ | "TJ"
2713
+ | "TK"
2714
+ | "TL"
2715
+ | "TM"
2716
+ | "TN"
2717
+ | "TO"
2718
+ | "TR"
2719
+ | "TT"
2720
+ | "TV"
2721
+ | "TW"
2722
+ | "TZ"
2723
+ | "UA"
2724
+ | "UG"
2725
+ | "UM"
2726
+ | "US"
2727
+ | "UY"
2728
+ | "UZ"
2729
+ | "VA"
2730
+ | "VC"
2731
+ | "VE"
2732
+ | "VG"
2733
+ | "VI"
2734
+ | "VN"
2735
+ | "VU"
2736
+ | "WF"
2737
+ | "WS"
2738
+ | "YE"
2739
+ | "YT"
2740
+ | "ZA"
2741
+ | "ZM"
2742
+ | "ZW";
2743
+
2744
+ /** The 2-letter continent codes Cloudflare uses */
2745
+ declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
2155
2746
  /*** Injected pages.d.ts ***/
2156
2747
  type Params<P extends string = any> = Record<P, string | string[]>;
2157
2748