From 0721bebe14bcf4f70e90d24f147dcd805a3f4d5e Mon Sep 17 00:00:00 2001 From: "autodecl-bot[bot]" <91285878+autodecl-bot[bot]@users.noreply.github.com> Date: Fri, 21 Oct 2022 18:03:51 +0100 Subject: [PATCH] Updated types for 2022-10-21 (#307) Co-authored-by: autodecl-bot[bot] <91285878+autodecl-bot[bot]@users.noreply.github.com> --- .changeset/2022-10-21.md | 5 + index.d.ts | 1341 ++++++++++++----- src/workers.json | 2934 +++++++++++++------------------------- 3 files changed, 2000 insertions(+), 2280 deletions(-) create mode 100644 .changeset/2022-10-21.md diff --git a/.changeset/2022-10-21.md b/.changeset/2022-10-21.md new file mode 100644 index 0000000..8aad333 --- /dev/null +++ b/.changeset/2022-10-21.md @@ -0,0 +1,5 @@ +--- +"@cloudflare/workers-types": minor +--- + +Updated auto-generated types @ 2022-10-21 diff --git a/index.d.ts b/index.d.ts index 695a11c..bb08804 100644 --- a/index.d.ts +++ b/index.d.ts @@ -16,78 +16,6 @@ declare class AbortSignal extends EventTarget { throwIfAborted(): void; } -interface BasicImageTransformations { - /** - * Maximum width in image pixels. The value must be an integer. - */ - width?: number; - /** - * Maximum height in image pixels. The value must be an integer. - */ - height?: number; - /** - * Resizing mode as a string. It affects interpretation of width and height - * options: - * - scale-down: Similar to contain, but the image is never enlarged. If - * the image is larger than given width or height, it will be resized. - * Otherwise its original size will be kept. - * - contain: Resizes to maximum size that fits within the given width and - * height. If only a single dimension is given (e.g. only width), the - * image will be shrunk or enlarged to exactly match that dimension. - * Aspect ratio is always preserved. - * - cover: Resizes (shrinks or enlarges) to fill the entire area of width - * and height. If the image has an aspect ratio different from the ratio - * of width and height, it will be cropped to fit. - * - crop: The image will be shrunk and cropped to fit within the area - * specified by width and height. The image will not be enlarged. For images - * smaller than the given dimensions it's the same as scale-down. For - * images larger than the given dimensions, it's the same as cover. - * See also trim. - * - pad: Resizes to the maximum size that fits within the given width and - * height, and then fills the remaining area with a background color - * (white by default). Use of this mode is not recommended, as the same - * effect can be more efficiently achieved with the contain mode and the - * CSS object-fit: contain property. - */ - fit?: "scale-down" | "contain" | "cover" | "crop" | "pad"; - /** - * When cropping with fit: "cover", this defines the side or point that should - * be left uncropped. The value is either a string - * "left", "right", "top", "bottom", "auto", or "center" (the default), - * or an object {x, y} containing focal point coordinates in the original - * image expressed as fractions ranging from 0.0 (top or left) to 1.0 - * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will - * crop bottom or left and right sides as necessary, but won’t crop anything - * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to - * preserve as much as possible around a point at 20% of the height of the - * source image. - */ - gravity?: - | "left" - | "right" - | "top" - | "bottom" - | "center" - | "auto" - | BasicImageTransformationsGravityCoordinates; - /** - * Background color to add underneath the image. Applies only to images with - * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…), - * hsl(…), etc.) - */ - background?: string; - /** - * Number of degrees (90, 180, 270) to rotate the image by. width and height - * options refer to axes after rotation. - */ - rotate?: 0 | 90 | 180 | 270 | 360; -} - -interface BasicImageTransformationsGravityCoordinates { - x: number; - y: number; -} - declare class Blob { constructor(bits?: BlobBits, options?: BlobOptions); readonly size: number; @@ -455,6 +383,7 @@ interface DurableObjectStorage { options?: DurableObjectSetAlarmOptions ): Promise; deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise; + sync(): Promise; } /** @@ -758,106 +687,6 @@ declare class IdentityTransformStream extends TransformStream { constructor(); } -/** - * In addition to the properties on the standard Request object, - * the cf object contains extra information about the request provided - * by Cloudflare's edge. - * - * Note: Currently, settings in the cf object cannot be accessed in the - * playground. - */ -interface IncomingRequestCfProperties { - /** - * (e.g. 395747) - */ - asn: number; - /** - * The organisation which owns the ASN of the incoming request. - * (e.g. Google Cloud) - */ - asOrganization: string; - botManagement?: IncomingRequestCfPropertiesBotManagement; - city?: string; - clientAcceptEncoding?: string; - clientTcpRtt?: number; - clientTrustScore?: number; - /** - * The three-letter airport code of the data center that the request - * hit. (e.g. "DFW") - */ - colo: string; - continent?: string; - /** - * The two-letter country code in the request. This is the same value - * as that provided in the CF-IPCountry header. (e.g. "US") - */ - country: string; - httpProtocol: string; - isEUCountry?: string; - latitude?: string; - longitude?: string; - /** - * DMA metro code from which the request was issued, e.g. "635" - */ - metroCode?: string; - postalCode?: string; - /** - * e.g. "Texas" - */ - region?: string; - /** - * e.g. "TX" - */ - regionCode?: string; - /** - * e.g. "weight=256;exclusive=1" - */ - requestPriority: string; - /** - * e.g. "America/Chicago" - */ - timezone?: string; - tlsVersion: string; - tlsCipher: string; - tlsClientAuth: IncomingRequestCfPropertiesTLSClientAuth; -} - -interface IncomingRequestCfPropertiesBotManagement { - corporateProxy: boolean; - ja3Hash?: string; - score: number; - staticResource: boolean; - verifiedBot: boolean; -} - -interface IncomingRequestCfPropertiesTLSClientAuth { - certIssuerDNLegacy: string; - certIssuerDN: string; - certIssuerDNRFC2253: string; - certIssuerSKI: string; - certIssuerSerial: string; - certPresented: "0" | "1"; - certSubjectDNLegacy: string; - certSubjectDN: string; - certSubjectDNRFC2253: string; - /** - * In format "Dec 22 19:39:00 2018 GMT" - */ - certNotBefore: string; - /** - * In format "Dec 22 19:39:00 2018 GMT" - */ - certNotAfter: string; - certSerial: string; - certFingerprintSHA1: string; - /** - * "SUCCESS", "FAILED:reason", "NONE" - */ - certVerified: string; - certRevoked: string; - certSKI: string; -} - interface JsonWebKey { kty: string; use?: string; @@ -1307,6 +1136,13 @@ declare class Request extends Body { readonly redirect: string; readonly fetcher: Fetcher | null; readonly signal: AbortSignal; + /** + * In addition to the properties on the standard `Request` object, + * the `cf` object contains extra information about the request provided + * by Cloudflare's edge. + * + * Returns undefined when accessed in the playground. + */ readonly cf?: IncomingRequestCfProperties; } @@ -1332,207 +1168,24 @@ interface RequestInit { } /** - * In addition to the properties you can set in the RequestInit dict - * that you pass as an argument to the Request constructor, you can - * set certain properties of a `cf` object to control how Cloudflare - * features are applied to that new Request. - * - * Note: Currently, these properties cannot be tested in the - * playground. + * Back compat for code migrating from older definitions. + * @deprecated Use RequestInit instead. */ -interface RequestInitCfProperties { - cacheEverything?: boolean; - /** - * A request's cache key is what determines if two requests are - * "the same" for caching purposes. If a request has the same cache key - * as some previous request, then we can serve the same cached response for - * both. (e.g. 'some-key') - * - * Only available for Enterprise customers. - */ - cacheKey?: string; - /** - * This allows you to append additional Cache-Tag response headers - * to the origin response without modifications to the origin server. - * This will allow for greater control over the Purge by Cache Tag feature - * utilizing changes only in the Workers process. - * - * Only available for Enterprise customers. - */ - cacheTags?: string[]; - /** - * Force response to be cached for a given number of seconds. (e.g. 300) - */ - cacheTtl?: number; - /** - * Force response to be cached for a given number of seconds based on the Origin status code. - * (e.g. { '200-299': 86400, '404': 1, '500-599': 0 }) - */ - cacheTtlByStatus?: Record; - scrapeShield?: boolean; - apps?: boolean; - image?: RequestInitCfPropertiesImage; - minify?: RequestInitCfPropertiesImageMinify; - mirage?: boolean; - polish?: "lossy" | "lossless" | "off"; - /** - * Redirects the request to an alternate origin server. You can use this, - * for example, to implement load balancing across several origins. - * (e.g.us-east.example.com) - * - * Note - For security reasons, the hostname set in resolveOverride must - * be proxied on the same Cloudflare zone of the incoming request. - * Otherwise, the setting is ignored. CNAME hosts are allowed, so to - * resolve to a host under a different domain or a DNS only domain first - * declare a CNAME record within your own zone’s DNS mapping to the - * external hostname, set proxy on Cloudflare, then set resolveOverride - * to point to that CNAME record. - */ - resolveOverride?: string; - webp?: boolean; -} - -interface RequestInitCfPropertiesImage extends BasicImageTransformations { - /** - * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it - * easier to specify higher-DPI sizes in . - */ - dpr?: number; - /** - * An object with four properties {left, top, right, bottom} that specify - * a number of pixels to cut off on each side. Allows removal of borders - * or cutting out a specific fragment of an image. Trimming is performed - * before resizing or rotation. Takes dpr into account. - */ - trim?: { left?: number; top?: number; right?: number; bottom?: number }; - /** - * Quality setting from 1-100 (useful values are in 60-90 range). Lower values - * make images look worse, but load faster. The default is 85. It applies only - * to JPEG and WebP images. It doesn’t have any effect on PNG. - */ - quality?: number; - /** - * Output format to generate. It can be: - * - avif: generate images in AVIF format. - * - webp: generate images in Google WebP format. Set quality to 100 to get - * the WebP-lossless format. - * - json: instead of generating an image, outputs information about the - * image, in JSON format. The JSON object will contain image size - * (before and after resizing), source image’s MIME type, file size, etc. - * - jpeg: generate images in JPEG format. - * - png: generate images in PNG format. - */ - format?: "avif" | "webp" | "json" | "jpeg" | "png"; - /** - * Whether to preserve animation frames from input files. Default is true. - * Setting it to false reduces animations to still images. This setting is - * recommended when enlarging images or processing arbitrary user content, - * because large GIF animations can weigh tens or even hundreds of megabytes. - * It is also useful to set anim:false when using format:"json" to get the - * response quicker without the number of frames. - */ - anim?: boolean; - /** - * What EXIF data should be preserved in the output image. Note that EXIF - * rotation and embedded color profiles are always applied ("baked in" into - * the image), and aren't affected by this option. Note that if the Polish - * feature is enabled, all metadata may have been removed already and this - * option may have no effect. - * - keep: Preserve most of EXIF metadata, including GPS location if there's - * any. - * - copyright: Only keep the copyright tag, and discard everything else. - * This is the default behavior for JPEG files. - * - none: Discard all invisible EXIF metadata. Currently WebP and PNG - * output formats always discard metadata. - */ - metadata?: "keep" | "copyright" | "none"; - /** - * Strength of sharpening filter to apply to the image. Floating-point - * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a - * recommended value for downscaled images. - */ - sharpen?: number; - /** - * Radius of a blur filter (approximate gaussian). Maximum supported radius - * is 250. - */ - blur?: number; - /** - * Overlays are drawn in the order they appear in the array (last array - * entry is the topmost layer). - */ - draw?: RequestInitCfPropertiesImageDraw[]; - /** - * Fetching image from authenticated origin. Setting this property will - * pass authentication headers (Authorization, Cookie, etc.) through to - * the origin. - */ - "origin-auth"?: "share-publicly"; -} - -interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations { - /** - * Absolute URL of the image file to use for the drawing. It can be any of - * the supported file formats. For drawing of watermarks or non-rectangular - * overlays we recommend using PNG or WebP images. - */ - url: string; - /** - * Floating-point number between 0 (transparent) and 1 (opaque). - * For example, opacity: 0.5 makes overlay semitransparent. - */ - opacity?: number; - /** - * - If set to true, the overlay image will be tiled to cover the entire - * area. This is useful for stock-photo-like watermarks. - * - If set to "x", the overlay image will be tiled horizontally only - * (form a line). - * - If set to "y", the overlay image will be tiled vertically only - * (form a line). - */ - repeat?: true | "x" | "y"; - /** - * Position of the overlay image relative to a given edge. Each property is - * an offset in pixels. 0 aligns exactly to the edge. For example, left: 10 - * positions left side of the overlay 10 pixels from the left edge of the - * image it's drawn over. bottom: 0 aligns bottom of the overlay with bottom - * of the background image. - * - * Setting both left & right, or both top & bottom is an error. - * - * If no position is specified, the image will be centered. - */ - top?: number; - left?: number; - bottom?: number; - right?: number; -} - -interface RequestInitCfPropertiesImageMinify { - javascript?: boolean; - css?: boolean; - html?: boolean; -} - -/** - * Back compat for code migrating from older definitions. - * @deprecated Use RequestInit instead. - */ -declare type RequestInitializerDict = RequestInit; - -declare class Response extends Body { - constructor(bodyInit?: BodyInit | null, maybeInit?: ResponseInit | Response); - static redirect(url: string, status?: number): Response; - static json(any: any, maybeInit?: ResponseInit | Response): Response; - clone(): Response; - readonly status: number; - readonly statusText: string; - readonly headers: Headers; - readonly ok: boolean; - readonly redirected: boolean; - readonly url: string; - readonly webSocket: WebSocket | null; - readonly cf?: Object; +declare type RequestInitializerDict = RequestInit; + +declare class Response extends Body { + constructor(bodyInit?: BodyInit | null, maybeInit?: ResponseInit | Response); + static redirect(url: string, status?: number): Response; + static json(any: any, maybeInit?: ResponseInit | Response): Response; + clone(): Response; + readonly status: number; + readonly statusText: string; + readonly headers: Headers; + readonly ok: boolean; + readonly redirected: boolean; + readonly url: string; + readonly webSocket: WebSocket | null; + readonly cf?: Object; } interface ResponseInit { @@ -2153,6 +1806,950 @@ declare function structuredClone( options?: ServiceWorkerGlobalScopeStructuredCloneOptions ): any; +/*** Injected cf.d.ts ***/ +interface BasicImageTransformations { + /** + * Maximum width in image pixels. The value must be an integer. + */ + width?: number; + /** + * Maximum height in image pixels. The value must be an integer. + */ + height?: number; + /** + * Resizing mode as a string. It affects interpretation of width and height + * options: + * - scale-down: Similar to contain, but the image is never enlarged. If + * the image is larger than given width or height, it will be resized. + * Otherwise its original size will be kept. + * - contain: Resizes to maximum size that fits within the given width and + * height. If only a single dimension is given (e.g. only width), the + * image will be shrunk or enlarged to exactly match that dimension. + * Aspect ratio is always preserved. + * - cover: Resizes (shrinks or enlarges) to fill the entire area of width + * and height. If the image has an aspect ratio different from the ratio + * of width and height, it will be cropped to fit. + * - crop: The image will be shrunk and cropped to fit within the area + * specified by width and height. The image will not be enlarged. For images + * smaller than the given dimensions it's the same as scale-down. For + * images larger than the given dimensions, it's the same as cover. + * See also trim. + * - pad: Resizes to the maximum size that fits within the given width and + * height, and then fills the remaining area with a background color + * (white by default). Use of this mode is not recommended, as the same + * effect can be more efficiently achieved with the contain mode and the + * CSS object-fit: contain property. + */ + fit?: "scale-down" | "contain" | "cover" | "crop" | "pad"; + /** + * When cropping with fit: "cover", this defines the side or point that should + * be left uncropped. The value is either a string + * "left", "right", "top", "bottom", "auto", or "center" (the default), + * or an object {x, y} containing focal point coordinates in the original + * image expressed as fractions ranging from 0.0 (top or left) to 1.0 + * (bottom or right), 0.5 being the center. {fit: "cover", gravity: "top"} will + * crop bottom or left and right sides as necessary, but won’t crop anything + * from the top. {fit: "cover", gravity: {x:0.5, y:0.2}} will crop each side to + * preserve as much as possible around a point at 20% of the height of the + * source image. + */ + gravity?: + | "left" + | "right" + | "top" + | "bottom" + | "center" + | "auto" + | BasicImageTransformationsGravityCoordinates; + /** + * Background color to add underneath the image. Applies only to images with + * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…), + * hsl(…), etc.) + */ + background?: string; + /** + * Number of degrees (90, 180, 270) to rotate the image by. width and height + * options refer to axes after rotation. + */ + rotate?: 0 | 90 | 180 | 270 | 360; +} + +interface BasicImageTransformationsGravityCoordinates { + x: number; + y: number; +} + +/** + * In addition to the properties you can set in the RequestInit dict + * that you pass as an argument to the Request constructor, you can + * set certain properties of a `cf` object to control how Cloudflare + * features are applied to that new Request. + * + * Note: Currently, these properties cannot be tested in the + * playground. + */ +interface RequestInitCfProperties { + cacheEverything?: boolean; + /** + * A request's cache key is what determines if two requests are + * "the same" for caching purposes. If a request has the same cache key + * as some previous request, then we can serve the same cached response for + * both. (e.g. 'some-key') + * + * Only available for Enterprise customers. + */ + cacheKey?: string; + /** + * This allows you to append additional Cache-Tag response headers + * to the origin response without modifications to the origin server. + * This will allow for greater control over the Purge by Cache Tag feature + * utilizing changes only in the Workers process. + * + * Only available for Enterprise customers. + */ + cacheTags?: string[]; + /** + * Force response to be cached for a given number of seconds. (e.g. 300) + */ + cacheTtl?: number; + /** + * Force response to be cached for a given number of seconds based on the Origin status code. + * (e.g. { '200-299': 86400, '404': 1, '500-599': 0 }) + */ + cacheTtlByStatus?: Record; + scrapeShield?: boolean; + apps?: boolean; + image?: RequestInitCfPropertiesImage; + minify?: RequestInitCfPropertiesImageMinify; + mirage?: boolean; + polish?: "lossy" | "lossless" | "off"; + /** + * Redirects the request to an alternate origin server. You can use this, + * for example, to implement load balancing across several origins. + * (e.g.us-east.example.com) + * + * Note - For security reasons, the hostname set in resolveOverride must + * be proxied on the same Cloudflare zone of the incoming request. + * Otherwise, the setting is ignored. CNAME hosts are allowed, so to + * resolve to a host under a different domain or a DNS only domain first + * declare a CNAME record within your own zone’s DNS mapping to the + * external hostname, set proxy on Cloudflare, then set resolveOverride + * to point to that CNAME record. + */ + resolveOverride?: string; +} + +interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations { + /** + * Absolute URL of the image file to use for the drawing. It can be any of + * the supported file formats. For drawing of watermarks or non-rectangular + * overlays we recommend using PNG or WebP images. + */ + url: string; + /** + * Floating-point number between 0 (transparent) and 1 (opaque). + * For example, opacity: 0.5 makes overlay semitransparent. + */ + opacity?: number; + /** + * - If set to true, the overlay image will be tiled to cover the entire + * area. This is useful for stock-photo-like watermarks. + * - If set to "x", the overlay image will be tiled horizontally only + * (form a line). + * - If set to "y", the overlay image will be tiled vertically only + * (form a line). + */ + repeat?: true | "x" | "y"; + /** + * Position of the overlay image relative to a given edge. Each property is + * an offset in pixels. 0 aligns exactly to the edge. For example, left: 10 + * positions left side of the overlay 10 pixels from the left edge of the + * image it's drawn over. bottom: 0 aligns bottom of the overlay with bottom + * of the background image. + * + * Setting both left & right, or both top & bottom is an error. + * + * If no position is specified, the image will be centered. + */ + top?: number; + left?: number; + bottom?: number; + right?: number; +} + +interface RequestInitCfPropertiesImage extends BasicImageTransformations { + /** + * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it + * easier to specify higher-DPI sizes in . + */ + dpr?: number; + /** + * An object with four properties {left, top, right, bottom} that specify + * a number of pixels to cut off on each side. Allows removal of borders + * or cutting out a specific fragment of an image. Trimming is performed + * before resizing or rotation. Takes dpr into account. + */ + trim?: { + left?: number; + top?: number; + right?: number; + bottom?: number; + }; + /** + * Quality setting from 1-100 (useful values are in 60-90 range). Lower values + * make images look worse, but load faster. The default is 85. It applies only + * to JPEG and WebP images. It doesn’t have any effect on PNG. + */ + quality?: number; + /** + * Output format to generate. It can be: + * - avif: generate images in AVIF format. + * - webp: generate images in Google WebP format. Set quality to 100 to get + * the WebP-lossless format. + * - json: instead of generating an image, outputs information about the + * image, in JSON format. The JSON object will contain image size + * (before and after resizing), source image’s MIME type, file size, etc. + * - jpeg: generate images in JPEG format. + * - png: generate images in PNG format. + */ + format?: "avif" | "webp" | "json" | "jpeg" | "png"; + /** + * Whether to preserve animation frames from input files. Default is true. + * Setting it to false reduces animations to still images. This setting is + * recommended when enlarging images or processing arbitrary user content, + * because large GIF animations can weigh tens or even hundreds of megabytes. + * It is also useful to set anim:false when using format:"json" to get the + * response quicker without the number of frames. + */ + anim?: boolean; + /** + * What EXIF data should be preserved in the output image. Note that EXIF + * rotation and embedded color profiles are always applied ("baked in" into + * the image), and aren't affected by this option. Note that if the Polish + * feature is enabled, all metadata may have been removed already and this + * option may have no effect. + * - keep: Preserve most of EXIF metadata, including GPS location if there's + * any. + * - copyright: Only keep the copyright tag, and discard everything else. + * This is the default behavior for JPEG files. + * - none: Discard all invisible EXIF metadata. Currently WebP and PNG + * output formats always discard metadata. + */ + metadata?: "keep" | "copyright" | "none"; + /** + * Strength of sharpening filter to apply to the image. Floating-point + * number between 0 (no sharpening, default) and 10 (maximum). 1.0 is a + * recommended value for downscaled images. + */ + sharpen?: number; + /** + * Radius of a blur filter (approximate gaussian). Maximum supported radius + * is 250. + */ + blur?: number; + /** + * Overlays are drawn in the order they appear in the array (last array + * entry is the topmost layer). + */ + draw?: RequestInitCfPropertiesImageDraw[]; + /** + * Fetching image from authenticated origin. Setting this property will + * pass authentication headers (Authorization, Cookie, etc.) through to + * the origin. + */ + "origin-auth"?: "share-publicly"; +} + +interface RequestInitCfPropertiesImageMinify { + javascript?: boolean; + css?: boolean; + html?: boolean; +} + +/** + * Request metadata provided by Cloudflare's edge. + */ +type IncomingRequestCfProperties = + IncomingRequestCfPropertiesBase & + IncomingRequestCfPropertiesBotManagementEnterprise & + IncomingRequestCfPropertiesCloudflareForSaaSEnterprise & + IncomingRequestCfPropertiesGeographicInformation & + IncomingRequestCfPropertiesCloudflareAccessOrApiShield; + +interface IncomingRequestCfPropertiesBase { + /** + * [ASN](https://www.iana.org/assignments/as-numbers/as-numbers.xhtml) of the incoming request. + * + * @example 395747 + */ + asn: number; + /** + * The organization which owns the ASN of the incoming request. + * + * @example "Google Cloud" + */ + asOrganization: string; + /** + * The original value of the `Accept-Encoding` header if Cloudflare modified it. + * + * @example "gzip, deflate, br" + */ + clientAcceptEncoding?: string; + /** + * The number of milliseconds it took for the request to reach your worker. + * + * @example 22 + */ + clientTcpRtt?: number; + /** + * The three-letter [IATA](https://en.wikipedia.org/wiki/IATA_airport_code) + * airport code of the data center that the request hit. + * + * @example "DFW" + */ + colo: string; + /** + * Represents the upstream's response to a + * [TCP `keepalive` message](https://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html) + * from cloudflare. + * + * For workers with no upstream, this will always be `1`. + * + * @example 3 + */ + edgeRequestKeepAliveStatus: IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus; + /** + * The HTTP Protocol the request used. + * + * @example "HTTP/2" + */ + httpProtocol: string; + /** + * The browser-requested prioritization information in the request object. + * + * If no information was set, defaults to the empty string `""` + * + * @example "weight=192;exclusive=0;group=3;group-weight=127" + * @default "" + */ + requestPriority: string; + /** + * The TLS version of the connection to Cloudflare. + * In requests served over plaintext (without TLS), this property is the empty string `""`. + * + * @example "TLSv1.3" + */ + tlsVersion: string; + /** + * The cipher for the connection to Cloudflare. + * In requests served over plaintext (without TLS), this property is the empty string `""`. + * + * @example "AEAD-AES128-GCM-SHA256" + */ + tlsCipher: string; + /** + * 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. + * + * If the incoming request was served over plaintext (without TLS) this field is undefined. + */ + tlsExportedAuthenticator?: IncomingRequestCfPropertiesExportedAuthenticatorMetadata; +} + +interface IncomingRequestCfPropertiesBotManagementBase { + /** + * Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot, + * represented as an integer percentage between `1` (almost certainly human) + * and `99` (almost certainly a bot). + * + * @example 54 + */ + score: number; + /** + * A boolean value that is true if the request comes from a good bot, like Google or Bing. + * 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). + */ + verifiedBot: boolean; + /** + * A boolean value that is true if the request originates from a + * Cloudflare-verified proxy service. + */ + corporateProxy: boolean; + /** + * 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. + */ + staticResource: boolean; +} + +interface IncomingRequestCfPropertiesBotManagement { + /** + * Results of Cloudflare's Bot Management analysis + */ + botManagement: IncomingRequestCfPropertiesBotManagementBase; + /** + * Duplicate of `botManagement.score`. + * + * @deprecated + */ + clientTrustScore: number; +} + +interface IncomingRequestCfPropertiesBotManagementEnterprise + extends IncomingRequestCfPropertiesBotManagement { + /** + * Results of Cloudflare's Bot Management analysis + */ + botManagement: IncomingRequestCfPropertiesBotManagementBase & { + /** + * A [JA3 Fingerprint](https://developers.cloudflare.com/bots/concepts/ja3-fingerprint/) to help profile specific SSL/TLS clients + * across different destination IPs, Ports, and X509 certificates. + */ + ja3Hash: string; + }; +} + +interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise { + /** + * Custom metadata set per-host in [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/). + * + * This field is only present if you have Cloudflare for SaaS enabled on your account + * and you have followed the [required steps to enable it]((https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata/)). + */ + hostMetadata: HostMetadata; +} + +interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield { + /** + * Information about the client certificate presented to Cloudflare. + * + * This is populated when the incoming request is served over TLS using + * either Cloudflare Access or API Shield (mTLS) + * and the presented SSL certificate has a valid + * [Certificate Serial Number](https://ldapwiki.com/wiki/Certificate%20Serial%20Number) + * (i.e., not `null` or `""`). + * + * Otherwise, a set of placeholder values are used. + * + * The property `certPresented` will be set to `"1"` when + * the object is populated (i.e. the above conditions were met). + */ + tlsClientAuth: + | IncomingRequestCfPropertiesTLSClientAuth + | IncomingRequestCfPropertiesTLSClientAuthPlaceholder; +} + +/** + * Metadata about the request's TLS handshake + */ +interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata { + /** + * The client's [`HELLO` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2), encoded in hexadecimal + * + * @example "44372ba35fa1270921d318f34c12f155dc87b682cf36a790cfaa3ba8737a1b5d" + */ + clientHandshake: string; + /** + * The server's [`HELLO` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2), encoded in hexadecimal + * + * @example "44372ba35fa1270921d318f34c12f155dc87b682cf36a790cfaa3ba8737a1b5d" + */ + serverHandshake: string; + /** + * The client's [`FINISHED` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.9), encoded in hexadecimal + * + * @example "084ee802fe1348f688220e2a6040a05b2199a761f33cf753abb1b006792d3f8b" + */ + clientFinished: string; + /** + * The server's [`FINISHED` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.9), encoded in hexadecimal + * + * @example "084ee802fe1348f688220e2a6040a05b2199a761f33cf753abb1b006792d3f8b" + */ + serverFinished: string; +} + +/** + * Geographic data about the request's origin. + */ +type IncomingRequestCfPropertiesGeographicInformation = + | { + /* No geographic data was found for the incoming request. */ + } + | { + /** The country code `"T1"` is used for requests originating on TOR */ + country: "T1"; + } + | { + /** + * The [ISO 3166-1 Alpha 2](https://www.iso.org/iso-3166-country-codes.html) country code the request originated from. + * + * 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. + * + * If Cloudflare is unable to determine where the request originated this property is omitted. + * + * @example "GB" + */ + country: Iso3166Alpha2Code; + /** + * If present, this property indicates that the request originated in the EU + * + * @example "1" + */ + isEUCountry?: "1"; + /** + * A two-letter code indicating the continent the request originated from. + * + * @example "AN" + */ + continent: ContinentCode; + /** + * The city the request originated from + * + * @example "Austin" + */ + city?: string; + /** + * Postal code of the incoming request + * + * @example "78701" + */ + postalCode?: string; + /** + * Latitude of the incoming request + * + * @example "30.27130" + */ + latitude?: string; + /** + * Longitude of the incoming request + * + * @example "-97.74260" + */ + longitude?: string; + /** + * Timezone of the incoming request + * + * @example "America/Chicago" + */ + timezone?: string; + /** + * If known, the ISO 3166-2 name for the first level region associated with + * the IP address of the incoming request + * + * @example "Texas" + */ + region?: string; + /** + * If known, the ISO 3166-2 code for the first-level region associated with + * the IP address of the incoming request + * + * @example "TX" + */ + regionCode?: string; + /** + * Metro code (DMA) of the incoming request + * + * @example "635" + */ + metroCode?: string; + }; + +/** Data about the incoming request's TLS certificate */ +interface IncomingRequestCfPropertiesTLSClientAuth { + /** Always `"1"`, indicating that the certificate was presented */ + certPresented: "1"; + /** + * Result of certificate verification. + * + * @example "FAILED:self signed certificate" + */ + certVerified: Exclude; + /** The presented certificate's revokation status. + * + * - A value of `"1"` indicates the certificate has been revoked + * - A value of `"0"` indicates the certificate has not been revoked + */ + certRevoked: "1" | "0"; + /** + * The certificate issuer's [distinguished name](https://knowledge.digicert.com/generalinformation/INFO1745.html) + * + * @example "CN=cloudflareaccess.com, C=US, ST=Texas, L=Austin, O=Cloudflare" + */ + certIssuerDN: string; + /** + * The certificate subject's [distinguished name](https://knowledge.digicert.com/generalinformation/INFO1745.html) + * + * @example "CN=*.cloudflareaccess.com, C=US, ST=Texas, L=Austin, O=Cloudflare" + */ + certSubjectDN: string; + /** + * The certificate issuer's [distinguished name](https://knowledge.digicert.com/generalinformation/INFO1745.html) ([RFC 2253](https://www.rfc-editor.org/rfc/rfc2253.html) formatted) + * + * @example "CN=cloudflareaccess.com, C=US, ST=Texas, L=Austin, O=Cloudflare" + */ + certIssuerDNRFC2253: string; + /** + * The certificate subject's [distinguished name](https://knowledge.digicert.com/generalinformation/INFO1745.html) ([RFC 2253](https://www.rfc-editor.org/rfc/rfc2253.html) formatted) + * + * @example "CN=*.cloudflareaccess.com, C=US, ST=Texas, L=Austin, O=Cloudflare" + */ + certSubjectDNRFC2253: string; + /** The certificate issuer's distinguished name (legacy policies) */ + certIssuerDNLegacy: string; + /** The certificate subject's distinguished name (legacy policies) */ + certSubjectDNLegacy: string; + /** + * The certificate's serial number + * + * @example "00936EACBE07F201DF" + */ + certSerial: string; + /** + * The certificate issuer's serial number + * + * @example "2489002934BDFEA34" + */ + certIssuerSerial: string; + /** + * The certificate's Subject Key Identifier + * + * @example "BB:AF:7E:02:3D:FA:A6:F1:3C:84:8E:AD:EE:38:98:EC:D9:32:32:D4" + */ + certSKI: string; + /** + * The certificate issuer's Subject Key Identifier + * + * @example "BB:AF:7E:02:3D:FA:A6:F1:3C:84:8E:AD:EE:38:98:EC:D9:32:32:D4" + */ + certIssuerSKI: string; + /** + * The certificate's SHA-1 fingerprint + * + * @example "6b9109f323999e52259cda7373ff0b4d26bd232e" + */ + certFingerprintSHA1: string; + /** + * The certificate's SHA-256 fingerprint + * + * @example "acf77cf37b4156a2708e34c4eb755f9b5dbbe5ebb55adfec8f11493438d19e6ad3f157f81fa3b98278453d5652b0c1fd1d71e5695ae4d709803a4d3f39de9dea" + */ + certFingerprintSHA256: string; + /** + * The effective starting date of the certificate + * + * @example "Dec 22 19:39:00 2018 GMT" + */ + certNotBefore: string; + /** + * The effective expiration date of the certificate + * + * @example "Dec 22 19:39:00 2018 GMT" + */ + certNotAfter: string; +} + +/** Placeholder values for TLS Client Authorization */ +interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder { + certPresented: "0"; + certVerified: "NONE"; + certRevoked: "0"; + certIssuerDN: ""; + certSubjectDN: ""; + certIssuerDNRFC2253: ""; + certSubjectDNRFC2253: ""; + certIssuerDNLegacy: ""; + certSubjectDNLegacy: ""; + certSerial: ""; + certIssuerSerial: ""; + certSKI: ""; + certIssuerSKI: ""; + certFingerprintSHA1: ""; + certFingerprintSHA256: ""; + certNotBefore: ""; + certNotAfter: ""; +} + +/** Possible outcomes of TLS verification */ +declare type CertVerificationStatus = + /** Authentication succeeded */ + | "SUCCESS" + /** No certificate was presented */ + | "NONE" + /** Failed because the certificate was self-signed */ + | "FAILED:self signed certificate" + /** Failed because the certificate failed a trust chain check */ + | "FAILED:unable to verify the first certificate" + /** Failed because the certificate not yet valid */ + | "FAILED:certificate is not yet valid" + /** Failed because the certificate is expired */ + | "FAILED:certificate has expired" + /** Failed for another unspecified reason */ + | "FAILED"; + +/** + * An upstream endpoint's response to a TCP `keepalive` message from Cloudflare. + */ +declare type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus = + | 0 /** Unknown */ + | 1 /** no keepalives (not found) */ + | 2 /** no connection re-use, opening keepalive connection failed */ + | 3 /** no connection re-use, keepalive accepted and saved */ + | 4 /** connection re-use, refused by the origin server (`TCP FIN`) */ + | 5; /** connection re-use, accepted by the origin server */ + +/** ISO 3166-1 Alpha-2 codes */ +declare type Iso3166Alpha2Code = + | "AD" + | "AE" + | "AF" + | "AG" + | "AI" + | "AL" + | "AM" + | "AO" + | "AQ" + | "AR" + | "AS" + | "AT" + | "AU" + | "AW" + | "AX" + | "AZ" + | "BA" + | "BB" + | "BD" + | "BE" + | "BF" + | "BG" + | "BH" + | "BI" + | "BJ" + | "BL" + | "BM" + | "BN" + | "BO" + | "BQ" + | "BR" + | "BS" + | "BT" + | "BV" + | "BW" + | "BY" + | "BZ" + | "CA" + | "CC" + | "CD" + | "CF" + | "CG" + | "CH" + | "CI" + | "CK" + | "CL" + | "CM" + | "CN" + | "CO" + | "CR" + | "CU" + | "CV" + | "CW" + | "CX" + | "CY" + | "CZ" + | "DE" + | "DJ" + | "DK" + | "DM" + | "DO" + | "DZ" + | "EC" + | "EE" + | "EG" + | "EH" + | "ER" + | "ES" + | "ET" + | "FI" + | "FJ" + | "FK" + | "FM" + | "FO" + | "FR" + | "GA" + | "GB" + | "GD" + | "GE" + | "GF" + | "GG" + | "GH" + | "GI" + | "GL" + | "GM" + | "GN" + | "GP" + | "GQ" + | "GR" + | "GS" + | "GT" + | "GU" + | "GW" + | "GY" + | "HK" + | "HM" + | "HN" + | "HR" + | "HT" + | "HU" + | "ID" + | "IE" + | "IL" + | "IM" + | "IN" + | "IO" + | "IQ" + | "IR" + | "IS" + | "IT" + | "JE" + | "JM" + | "JO" + | "JP" + | "KE" + | "KG" + | "KH" + | "KI" + | "KM" + | "KN" + | "KP" + | "KR" + | "KW" + | "KY" + | "KZ" + | "LA" + | "LB" + | "LC" + | "LI" + | "LK" + | "LR" + | "LS" + | "LT" + | "LU" + | "LV" + | "LY" + | "MA" + | "MC" + | "MD" + | "ME" + | "MF" + | "MG" + | "MH" + | "MK" + | "ML" + | "MM" + | "MN" + | "MO" + | "MP" + | "MQ" + | "MR" + | "MS" + | "MT" + | "MU" + | "MV" + | "MW" + | "MX" + | "MY" + | "MZ" + | "NA" + | "NC" + | "NE" + | "NF" + | "NG" + | "NI" + | "NL" + | "NO" + | "NP" + | "NR" + | "NU" + | "NZ" + | "OM" + | "PA" + | "PE" + | "PF" + | "PG" + | "PH" + | "PK" + | "PL" + | "PM" + | "PN" + | "PR" + | "PS" + | "PT" + | "PW" + | "PY" + | "QA" + | "RE" + | "RO" + | "RS" + | "RU" + | "RW" + | "SA" + | "SB" + | "SC" + | "SD" + | "SE" + | "SG" + | "SH" + | "SI" + | "SJ" + | "SK" + | "SL" + | "SM" + | "SN" + | "SO" + | "SR" + | "SS" + | "ST" + | "SV" + | "SX" + | "SY" + | "SZ" + | "TC" + | "TD" + | "TF" + | "TG" + | "TH" + | "TJ" + | "TK" + | "TL" + | "TM" + | "TN" + | "TO" + | "TR" + | "TT" + | "TV" + | "TW" + | "TZ" + | "UA" + | "UG" + | "UM" + | "US" + | "UY" + | "UZ" + | "VA" + | "VC" + | "VE" + | "VG" + | "VI" + | "VN" + | "VU" + | "WF" + | "WS" + | "YE" + | "YT" + | "ZA" + | "ZM" + | "ZW"; + +/** The 2-letter continent codes Cloudflare uses */ +declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA"; /*** Injected pages.d.ts ***/ type Params

= Record; diff --git a/src/workers.json b/src/workers.json index 79babe4..75ffc85 100644 --- a/src/workers.json +++ b/src/workers.json @@ -111,147 +111,6 @@ ], "kind": "class" }, - "BasicImageTransformations": { - "name": "BasicImageTransformations", - "members": [ - { - "name": "width", - "type": { - "name": "number", - "optional": true - }, - "comment": { - "text": "Maximum width in image pixels. The value must be an integer." - } - }, - { - "name": "height", - "type": { - "name": "number", - "optional": true - }, - "comment": { - "text": "Maximum height in image pixels. The value must be an integer." - } - }, - { - "name": "fit", - "type": { - "name": "|", - "args": [ - { - "name": "\"scale-down\"" - }, - { - "name": "\"contain\"" - }, - { - "name": "\"cover\"" - }, - { - "name": "\"crop\"" - }, - { - "name": "\"pad\"" - } - ], - "optional": true - }, - "comment": { - "text": "Resizing mode as a string. It affects interpretation of width and height\noptions:\n - scale-down: Similar to contain, but the image is never enlarged. If\n the image is larger than given width or height, it will be resized.\n Otherwise its original size will be kept.\n - contain: Resizes to maximum size that fits within the given width and\n height. If only a single dimension is given (e.g. only width), the\n image will be shrunk or enlarged to exactly match that dimension.\n Aspect ratio is always preserved.\n - cover: Resizes (shrinks or enlarges) to fill the entire area of width\n and height. If the image has an aspect ratio different from the ratio\n of width and height, it will be cropped to fit.\n - crop: The image will be shrunk and cropped to fit within the area\n specified by width and height. The image will not be enlarged. For images\n smaller than the given dimensions it's the same as scale-down. For\n images larger than the given dimensions, it's the same as cover.\n See also trim.\n - pad: Resizes to the maximum size that fits within the given width and\n height, and then fills the remaining area with a background color\n (white by default). Use of this mode is not recommended, as the same\n effect can be more efficiently achieved with the contain mode and the\n CSS object-fit: contain property." - } - }, - { - "name": "gravity", - "type": { - "name": "|", - "args": [ - { - "name": "\"left\"" - }, - { - "name": "\"right\"" - }, - { - "name": "\"top\"" - }, - { - "name": "\"bottom\"" - }, - { - "name": "\"center\"" - }, - { - "name": "\"auto\"" - }, - { - "name": "BasicImageTransformationsGravityCoordinates" - } - ], - "optional": true - }, - "comment": { - "text": "When cropping with fit: \"cover\", this defines the side or point that should\nbe left uncropped. The value is either a string\n\"left\", \"right\", \"top\", \"bottom\", \"auto\", or \"center\" (the default),\nor an object {x, y} containing focal point coordinates in the original\nimage expressed as fractions ranging from 0.0 (top or left) to 1.0\n(bottom or right), 0.5 being the center. {fit: \"cover\", gravity: \"top\"} will\ncrop bottom or left and right sides as necessary, but won\u2019t crop anything\nfrom the top. {fit: \"cover\", gravity: {x:0.5, y:0.2}} will crop each side to\npreserve as much as possible around a point at 20% of the height of the\nsource image." - } - }, - { - "name": "background", - "type": { - "name": "string", - "optional": true - }, - "comment": { - "text": "Background color to add underneath the image. Applies only to images with\ntransparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(\u2026),\nhsl(\u2026), etc.)" - } - }, - { - "name": "rotate", - "type": { - "name": "|", - "args": [ - { - "name": "0" - }, - { - "name": "90" - }, - { - "name": "180" - }, - { - "name": "270" - }, - { - "name": "360" - } - ], - "optional": true - }, - "comment": { - "text": "Number of degrees (90, 180, 270) to rotate the image by. width and height\noptions refer to axes after rotation." - } - } - ], - "kind": "struct" - }, - "BasicImageTransformationsGravityCoordinates": { - "name": "BasicImageTransformationsGravityCoordinates", - "members": [ - { - "name": "x", - "type": { - "name": "number" - } - }, - { - "name": "y", - "type": { - "name": "number" - } - } - ], - "kind": "struct" - }, "Blob": { "name": "Blob", "members": [ @@ -3008,6 +2867,20 @@ ] } } + }, + { + "name": "sync", + "type": { + "params": [], + "returns": { + "name": "Promise", + "args": [ + { + "name": "void" + } + ] + } + } } ], "kind": "class" @@ -5880,538 +5753,194 @@ ], "kind": "class" }, - "IncomingRequestCfProperties": { - "name": "IncomingRequestCfProperties", + "JsonWebKey": { + "name": "JsonWebKey", "members": [ { - "name": "asn", - "type": { - "name": "number" - }, - "comment": { - "text": "(e.g. 395747)" - } - }, - { - "name": "asOrganization", + "name": "kty", "type": { "name": "string" - }, - "comment": { - "text": "The organisation which owns the ASN of the incoming request.\n(e.g. Google Cloud)" } }, { - "name": "botManagement", + "name": "use", "type": { - "name": "IncomingRequestCfPropertiesBotManagement", + "name": "string", "optional": true } }, { - "name": "city", + "name": "key_ops", "type": { - "name": "string", + "name": "[]", + "args": [ + { + "name": "string" + } + ], "optional": true } }, { - "name": "clientAcceptEncoding", + "name": "alg", "type": { "name": "string", "optional": true } }, { - "name": "clientTcpRtt", + "name": "ext", "type": { - "name": "number", + "name": "boolean", "optional": true } }, { - "name": "clientTrustScore", + "name": "crv", "type": { - "name": "number", + "name": "string", "optional": true } }, { - "name": "colo", - "type": { - "name": "string" - }, - "comment": { - "text": "The three-letter airport code of the data center that the request\nhit. (e.g. \"DFW\")" - } - }, - { - "name": "continent", + "name": "x", "type": { "name": "string", "optional": true } }, { - "name": "country", - "type": { - "name": "string" - }, - "comment": { - "text": "The two-letter country code in the request. This is the same value\nas that provided in the CF-IPCountry header. (e.g. \"US\")" - } - }, - { - "name": "httpProtocol", - "type": { - "name": "string" - } - }, - { - "name": "isEUCountry", + "name": "y", "type": { "name": "string", "optional": true } }, { - "name": "latitude", + "name": "d", "type": { "name": "string", "optional": true } }, { - "name": "longitude", + "name": "n", "type": { "name": "string", "optional": true } }, { - "name": "metroCode", + "name": "e", "type": { "name": "string", "optional": true - }, - "comment": { - "text": "DMA metro code from which the request was issued, e.g. \"635\"" } }, { - "name": "postalCode", + "name": "p", "type": { "name": "string", "optional": true } }, { - "name": "region", + "name": "q", "type": { "name": "string", "optional": true - }, - "comment": { - "text": "e.g. \"Texas\"" } }, { - "name": "regionCode", + "name": "dp", "type": { "name": "string", "optional": true - }, - "comment": { - "text": "e.g. \"TX\"" - } - }, - { - "name": "requestPriority", - "type": { - "name": "string" - }, - "comment": { - "text": "e.g. \"weight=256;exclusive=1\"" } }, { - "name": "timezone", + "name": "dq", "type": { "name": "string", "optional": true - }, - "comment": { - "text": "e.g. \"America/Chicago\"" } }, { - "name": "tlsVersion", + "name": "qi", "type": { - "name": "string" + "name": "string", + "optional": true } }, { - "name": "tlsCipher", + "name": "oth", "type": { - "name": "string" + "name": "[]", + "args": [ + { + "name": "RsaOtherPrimesInfo" + } + ], + "optional": true } }, { - "name": "tlsClientAuth", + "name": "k", "type": { - "name": "IncomingRequestCfPropertiesTLSClientAuth" + "name": "string", + "optional": true } } ], - "comment": { - "text": "In addition to the properties on the standard Request object,\nthe cf object contains extra information about the request provided\nby Cloudflare's edge.\n\nNote: Currently, settings in the cf object cannot be accessed in the\nplayground." - }, "kind": "struct" }, - "IncomingRequestCfPropertiesBotManagement": { - "name": "IncomingRequestCfPropertiesBotManagement", + "KVNamespace": { + "name": "KVNamespace", "members": [ { - "name": "corporateProxy", + "name": "get", "type": { - "name": "boolean" - } - }, - { - "name": "ja3Hash", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "score", - "type": { - "name": "number" - } - }, - { - "name": "staticResource", - "type": { - "name": "boolean" - } - }, - { - "name": "verifiedBot", - "type": { - "name": "boolean" - } - } - ], - "kind": "struct" - }, - "IncomingRequestCfPropertiesTLSClientAuth": { - "name": "IncomingRequestCfPropertiesTLSClientAuth", - "members": [ - { - "name": "certIssuerDNLegacy", - "type": { - "name": "string" - } - }, - { - "name": "certIssuerDN", - "type": { - "name": "string" - } - }, - { - "name": "certIssuerDNRFC2253", - "type": { - "name": "string" - } - }, - { - "name": "certIssuerSKI", - "type": { - "name": "string" - } - }, - { - "name": "certIssuerSerial", - "type": { - "name": "string" - } - }, - { - "name": "certPresented", - "type": { - "name": "|", - "args": [ - { - "name": "\"0\"" - }, - { - "name": "\"1\"" - } - ] - } - }, - { - "name": "certSubjectDNLegacy", - "type": { - "name": "string" - } - }, - { - "name": "certSubjectDN", - "type": { - "name": "string" - } - }, - { - "name": "certSubjectDNRFC2253", - "type": { - "name": "string" - } - }, - { - "name": "certNotBefore", - "type": { - "name": "string" - }, - "comment": { - "text": "In format \"Dec 22 19:39:00 2018 GMT\"" - } - }, - { - "name": "certNotAfter", - "type": { - "name": "string" - }, - "comment": { - "text": "In format \"Dec 22 19:39:00 2018 GMT\"" - } - }, - { - "name": "certSerial", - "type": { - "name": "string" - } - }, - { - "name": "certFingerprintSHA1", - "type": { - "name": "string" - } - }, - { - "name": "certVerified", - "type": { - "name": "string" - }, - "comment": { - "text": "\"SUCCESS\", \"FAILED:reason\", \"NONE\"" - } - }, - { - "name": "certRevoked", - "type": { - "name": "string" - } - }, - { - "name": "certSKI", - "type": { - "name": "string" - } - } - ], - "kind": "struct" - }, - "JsonWebKey": { - "name": "JsonWebKey", - "members": [ - { - "name": "kty", - "type": { - "name": "string" - } - }, - { - "name": "use", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "key_ops", - "type": { - "name": "[]", - "args": [ - { - "name": "string" - } - ], - "optional": true - } - }, - { - "name": "alg", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "ext", - "type": { - "name": "boolean", - "optional": true - } - }, - { - "name": "crv", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "x", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "y", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "d", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "n", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "e", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "p", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "q", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "dp", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "dq", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "qi", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "oth", - "type": { - "name": "[]", - "args": [ - { - "name": "RsaOtherPrimesInfo" - } - ], - "optional": true - } - }, - { - "name": "k", - "type": { - "name": "string", - "optional": true - } - } - ], - "kind": "struct" - }, - "KVNamespace": { - "name": "KVNamespace", - "members": [ - { - "name": "get", - "type": { - "params": [ - { - "name": "key", - "type": { - "name": "K" - } - }, - { - "name": "options", - "type": { - "name": "Partial", - "args": [ - { - "name": "KVNamespaceGetOptions", - "args": [ - { - "name": "undefined" - } - ] - } - ], - "optional": true - } - } - ], - "returns": { - "name": "Promise", - "args": [ - { - "name": "|", - "args": [ - { - "name": "string" - }, - { - "name": "null" - } - ] - } - ] - } + "params": [ + { + "name": "key", + "type": { + "name": "K" + } + }, + { + "name": "options", + "type": { + "name": "Partial", + "args": [ + { + "name": "KVNamespaceGetOptions", + "args": [ + { + "name": "undefined" + } + ] + } + ], + "optional": true + } + } + ], + "returns": { + "name": "Promise", + "args": [ + { + "name": "|", + "args": [ + { + "name": "string" + }, + { + "name": "null" + } + ] + } + ] + } } }, { @@ -7960,599 +7489,227 @@ { "name": "sha256", "type": { - "name": "ArrayBuffer", - "optional": true - } - }, - { - "name": "sha384", - "type": { - "name": "ArrayBuffer", - "optional": true - } - }, - { - "name": "sha512", - "type": { - "name": "ArrayBuffer", - "optional": true - } - } - ], - "comment": { - "text": "The checksums associated with the object.", - "renamed": true - }, - "kind": "struct" - }, - "R2Conditional": { - "name": "R2Conditional", - "members": [ - { - "name": "etagMatches", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "etagDoesNotMatch", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "uploadedBefore", - "type": { - "name": "Date", - "optional": true - } - }, - { - "name": "uploadedAfter", - "type": { - "name": "Date", - "optional": true - } - }, - { - "name": "secondsGranularity", - "type": { - "name": "boolean", - "optional": true - } - } - ], - "comment": { - "text": "Perform the operation conditionally based on meeting the defined criteria.", - "renamed": true - }, - "kind": "struct" - }, - "R2GetOptions": { - "name": "R2GetOptions", - "members": [ - { - "name": "onlyIf", - "type": { - "name": "|", - "args": [ - { - "name": "R2Conditional" - }, - { - "name": "Headers" - } - ], - "optional": true - } - }, - { - "name": "range", - "type": { - "name": "|", - "args": [ - { - "name": "R2Range" - }, - { - "name": "Headers" - } - ], - "optional": true - } - } - ], - "comment": { - "text": "Options for retrieving the object metadata nad payload.", - "renamed": true - }, - "kind": "struct" - }, - "R2HTTPMetadata": { - "name": "R2HTTPMetadata", - "members": [ - { - "name": "contentType", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "contentLanguage", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "contentDisposition", - "type": { - "name": "string", - "optional": true - } - }, - { - "name": "contentEncoding", - "type": { - "name": "string", + "name": "ArrayBuffer", "optional": true } }, { - "name": "cacheControl", + "name": "sha384", "type": { - "name": "string", + "name": "ArrayBuffer", "optional": true } }, { - "name": "cacheExpiry", + "name": "sha512", "type": { - "name": "Date", + "name": "ArrayBuffer", "optional": true } } ], "comment": { - "text": "Metadata that's automatically rendered into R2 HTTP API endpoints.\n```\n* contentType -> content-type\n* contentLanguage -> content-language\netc...\n```\nThis data is echoed back on GET responses based on what was originally\nassigned to the object (and can typically also be overriden when issuing\nthe GET request).", + "text": "The checksums associated with the object.", "renamed": true }, "kind": "struct" }, - "R2ListOptions": { - "name": "R2ListOptions", + "R2Conditional": { + "name": "R2Conditional", "members": [ { - "name": "limit", - "type": { - "name": "integer", - "optional": true - } - }, - { - "name": "prefix", + "name": "etagMatches", "type": { "name": "string", "optional": true } }, { - "name": "cursor", + "name": "etagDoesNotMatch", "type": { "name": "string", "optional": true } }, { - "name": "delimiter", + "name": "uploadedBefore", "type": { - "name": "string", + "name": "Date", "optional": true } }, { - "name": "startAfter", + "name": "uploadedAfter", "type": { - "name": "string", + "name": "Date", "optional": true } }, { - "name": "include", + "name": "secondsGranularity", "type": { - "name": "[]", - "args": [ - { - "name": "|", - "args": [ - { - "name": "\"httpMetadata\"" - }, - { - "name": "\"customMetadata\"" - } - ] - } - ], + "name": "boolean", "optional": true - }, - "comment": { - "text": "If you populate this array, then items returned will include this metadata.\nA tradeoff is that fewer results may be returned depending on how big this\ndata is. For now the caps are TBD but expect the total memory usage for a list\noperation may need to be <1MB or even <128kb depending on how many list operations\nyou are sending into one bucket. Make sure to look at `truncated` for the result\nrather than having logic like\n```\nwhile (listed.length < limit) {\n listed = myBucket.list({ limit, include: ['customMetadata'] })\n}\n```" } } ], "comment": { - "text": "", + "text": "Perform the operation conditionally based on meeting the defined criteria.", "renamed": true }, "kind": "struct" }, - "R2Object": { - "name": "R2Object", + "R2GetOptions": { + "name": "R2GetOptions", "members": [ { - "name": "key", - "type": { - "name": "string" - }, - "readonly": true - }, - { - "name": "version", - "type": { - "name": "string" - }, - "readonly": true - }, - { - "name": "size", - "type": { - "name": "double" - }, - "readonly": true - }, - { - "name": "etag", - "type": { - "name": "string" - }, - "readonly": true - }, - { - "name": "httpEtag", - "type": { - "name": "string" - }, - "readonly": true - }, - { - "name": "checksums", - "type": { - "name": "R2Checksums" - }, - "readonly": true - }, - { - "name": "uploaded", - "type": { - "name": "Date" - }, - "readonly": true - }, - { - "name": "httpMetadata", - "type": { - "name": "R2HTTPMetadata", - "optional": true - }, - "readonly": true - }, - { - "name": "customMetadata", + "name": "onlyIf", "type": { - "name": "Record", + "name": "|", "args": [ { - "name": "string" + "name": "R2Conditional" }, { - "name": "string" + "name": "Headers" } ], "optional": true - }, - "readonly": true + } }, { "name": "range", "type": { - "name": "R2Range", - "optional": true - }, - "readonly": true - }, - { - "name": "writeHttpMetadata", - "type": { - "params": [ + "name": "|", + "args": [ { - "name": "headers", - "type": { - "name": "Headers" - } + "name": "R2Range" + }, + { + "name": "Headers" } ], - "returns": { - "name": "void" - } + "optional": true } } ], "comment": { - "text": "The metadata for the object.", + "text": "Options for retrieving the object metadata nad payload.", "renamed": true }, - "kind": "class" + "kind": "struct" }, - "R2ObjectBody": { - "name": "R2ObjectBody", + "R2HTTPMetadata": { + "name": "R2HTTPMetadata", "members": [ { - "name": "body", - "type": { - "name": "ReadableStream" - }, - "readonly": true - }, - { - "name": "bodyUsed", - "type": { - "name": "boolean" - }, - "readonly": true - }, - { - "name": "arrayBuffer", + "name": "contentType", "type": { - "params": [], - "returns": { - "name": "Promise", - "args": [ - { - "name": "ArrayBuffer" - } - ] - } + "name": "string", + "optional": true } }, { - "name": "text", + "name": "contentLanguage", "type": { - "params": [], - "returns": { - "name": "Promise", - "args": [ - { - "name": "string" - } - ] - } + "name": "string", + "optional": true } }, { - "name": "json", - "type": { - "params": [], - "returns": { - "name": "Promise", - "args": [ - { - "name": "T" - } - ] - } - }, - "typeparams": [ - { - "name": "T" - } - ] - }, - { - "name": "blob", - "type": { - "params": [], - "returns": { - "name": "Promise", - "args": [ - { - "name": "Blob" - } - ] - } - } - } - ], - "extends": [ - { - "name": "R2Object" - } - ], - "comment": { - "text": "The metadata for the object and the body of the payload.", - "renamed": true - }, - "kind": "class" - }, - "R2Objects": { - "name": "R2Objects", - "members": [ - { - "name": "objects", + "name": "contentDisposition", "type": { - "name": "[]", - "args": [ - { - "name": "R2Object" - } - ] + "name": "string", + "optional": true } }, { - "name": "truncated", + "name": "contentEncoding", "type": { - "name": "boolean" + "name": "string", + "optional": true } }, { - "name": "cursor", + "name": "cacheControl", "type": { "name": "string", "optional": true } }, { - "name": "delimitedPrefixes", + "name": "cacheExpiry", "type": { - "name": "[]", - "args": [ - { - "name": "string" - } - ] + "name": "Date", + "optional": true } } ], "comment": { - "text": "", + "text": "Metadata that's automatically rendered into R2 HTTP API endpoints.\n```\n* contentType -> content-type\n* contentLanguage -> content-language\netc...\n```\nThis data is echoed back on GET responses based on what was originally\nassigned to the object (and can typically also be overriden when issuing\nthe GET request).", "renamed": true }, "kind": "struct" }, - "R2PutOptions": { - "name": "R2PutOptions", + "R2ListOptions": { + "name": "R2ListOptions", "members": [ { - "name": "onlyIf", - "type": { - "name": "|", - "args": [ - { - "name": "R2Conditional" - }, - { - "name": "Headers" - } - ], - "optional": true - } - }, - { - "name": "httpMetadata", - "type": { - "name": "|", - "args": [ - { - "name": "R2HTTPMetadata" - }, - { - "name": "Headers" - } - ], - "optional": true - } - }, - { - "name": "customMetadata", + "name": "limit", "type": { - "name": "Record", - "args": [ - { - "name": "string" - }, - { - "name": "string" - } - ], + "name": "integer", "optional": true } }, { - "name": "md5", + "name": "prefix", "type": { - "name": "|", - "args": [ - { - "name": "ArrayBuffer" - }, - { - "name": "string" - } - ], + "name": "string", "optional": true } }, { - "name": "sha1", + "name": "cursor", "type": { - "name": "|", - "args": [ - { - "name": "ArrayBuffer" - }, - { - "name": "string" - } - ], + "name": "string", "optional": true } }, { - "name": "sha256", + "name": "delimiter", "type": { - "name": "|", - "args": [ - { - "name": "ArrayBuffer" - }, - { - "name": "string" - } - ], + "name": "string", "optional": true } }, { - "name": "sha384", + "name": "startAfter", "type": { - "name": "|", - "args": [ - { - "name": "ArrayBuffer" - }, - { - "name": "string" - } - ], + "name": "string", "optional": true } }, { - "name": "sha512", + "name": "include", "type": { - "name": "|", + "name": "[]", "args": [ { - "name": "ArrayBuffer" - }, - { - "name": "string" + "name": "|", + "args": [ + { + "name": "\"httpMetadata\"" + }, + { + "name": "\"customMetadata\"" + } + ] } ], "optional": true + }, + "comment": { + "text": "If you populate this array, then items returned will include this metadata.\nA tradeoff is that fewer results may be returned depending on how big this\ndata is. For now the caps are TBD but expect the total memory usage for a list\noperation may need to be <1MB or even <128kb depending on how many list operations\nyou are sending into one bucket. Make sure to look at `truncated` for the result\nrather than having logic like\n```\nwhile (listed.length < limit) {\n listed = myBucket.list({ limit, include: ['customMetadata'] })\n}\n```" } } ], @@ -8562,144 +7719,98 @@ }, "kind": "struct" }, - "R2Range": { - "name": "R2Range", - "type": { - "name": "|", - "args": [ - { - "members": [ - { - "name": "offset", - "type": { - "name": "number" - } - }, - { - "name": "length", - "type": { - "name": "number", - "optional": true - } - } - ] + "R2Object": { + "name": "R2Object", + "members": [ + { + "name": "key", + "type": { + "name": "string" }, - { - "members": [ - { - "name": "offset", - "type": { - "name": "number", - "optional": true - } - }, - { - "name": "length", - "type": { - "name": "number" - } - } - ] + "readonly": true + }, + { + "name": "version", + "type": { + "name": "string" }, - { - "members": [ - { - "name": "suffix", - "type": { - "name": "number" - } - } - ] - } - ] - }, - "kind": "typedef" - }, - "ReadResult": { - "name": "ReadResult", - "members": [ + "readonly": true + }, { - "name": "value", + "name": "size", "type": { - "name": "any", - "optional": true - } + "name": "double" + }, + "readonly": true }, { - "name": "done", + "name": "etag", "type": { - "name": "boolean" - } - } - ], - "kind": "struct" - }, - "ReadableByteStreamController": { - "name": "ReadableByteStreamController", - "members": [ + "name": "string" + }, + "readonly": true + }, { - "name": "byobRequest", + "name": "httpEtag", "type": { - "name": "|", - "args": [ - { - "name": "ReadableStreamBYOBRequest" - }, - { - "name": "null" - } - ] + "name": "string" + }, + "readonly": true + }, + { + "name": "checksums", + "type": { + "name": "R2Checksums" + }, + "readonly": true + }, + { + "name": "uploaded", + "type": { + "name": "Date" + }, + "readonly": true + }, + { + "name": "httpMetadata", + "type": { + "name": "R2HTTPMetadata", + "optional": true }, "readonly": true }, { - "name": "desiredSize", + "name": "customMetadata", "type": { - "name": "|", + "name": "Record", "args": [ { - "name": "integer" + "name": "string" }, { - "name": "null" + "name": "string" } - ] + ], + "optional": true }, "readonly": true }, { - "name": "close", - "type": { - "params": [], - "returns": { - "name": "void" - } - } - }, - { - "name": "enqueue", + "name": "range", "type": { - "params": [ - { - "name": "chunk", - "type": { - "name": "ArrayBuffer|ArrayBufferView" - } - } - ], - "returns": { - "name": "void" - } - } + "name": "R2Range", + "optional": true + }, + "readonly": true }, { - "name": "error", + "name": "writeHttpMetadata", "type": { "params": [ { - "name": "reason", + "name": "headers", "type": { - "name": "any" + "name": "Headers" } } ], @@ -8709,392 +7820,359 @@ } } ], + "comment": { + "text": "The metadata for the object.", + "renamed": true + }, "kind": "class" }, - "ReadableStream": { - "name": "ReadableStream", + "R2ObjectBody": { + "name": "R2ObjectBody", "members": [ { - "name": "constructor", + "name": "body", "type": { - "params": [ - { - "name": "underlyingSource", - "type": { - "name": "UnderlyingSource", - "optional": true - } - }, - { - "name": "queuingStrategy", - "type": { - "name": "StreamQueuingStrategy", - "optional": true - } - } - ] - } + "name": "ReadableStream" + }, + "readonly": true }, { - "name": "locked", + "name": "bodyUsed", "type": { "name": "boolean" }, "readonly": true }, { - "name": "cancel", + "name": "arrayBuffer", "type": { - "params": [ - { - "name": "reason", - "type": { - "name": "any", - "optional": true - } - } - ], + "params": [], "returns": { "name": "Promise", "args": [ { - "name": "void" + "name": "ArrayBuffer" } ] } } }, { - "name": "getReader", - "type": { - "params": [ - { - "name": "options", - "type": { - "name": "ReadableStreamGetReaderOptions" - } - } - ], - "returns": { - "name": "ReadableStreamBYOBReader" - } - } - }, - { - "name": "getReader", + "name": "text", "type": { "params": [], "returns": { - "name": "ReadableStreamDefaultReader" - } - } - }, - { - "name": "pipeThrough", - "type": { - "params": [ - { - "name": "transform", - "type": { - "name": "ReadableStreamTransform" - } - }, - { - "name": "options", - "type": { - "name": "PipeToOptions", - "optional": true + "name": "Promise", + "args": [ + { + "name": "string" } - } - ], - "returns": { - "name": "ReadableStream" + ] } } }, { - "name": "pipeTo", + "name": "json", "type": { - "params": [ - { - "name": "destination", - "type": { - "name": "WritableStream" - } - }, - { - "name": "options", - "type": { - "name": "PipeToOptions", - "optional": true - } - } - ], + "params": [], "returns": { "name": "Promise", "args": [ { - "name": "void" + "name": "T" } ] } - } + }, + "typeparams": [ + { + "name": "T" + } + ] }, { - "name": "tee", + "name": "blob", "type": { "params": [], "returns": { - "name": "()", - "params": [ - { - "name": "", - "type": { - "name": "ReadableStream" - } - }, + "name": "Promise", + "args": [ { - "name": "", - "type": { - "name": "ReadableStream" - } + "name": "Blob" } ] } } + } + ], + "extends": [ + { + "name": "R2Object" + } + ], + "comment": { + "text": "The metadata for the object and the body of the payload.", + "renamed": true + }, + "kind": "class" + }, + "R2Objects": { + "name": "R2Objects", + "members": [ + { + "name": "objects", + "type": { + "name": "[]", + "args": [ + { + "name": "R2Object" + } + ] + } }, { - "name": "values", + "name": "truncated", "type": { - "params": [ + "name": "boolean" + } + }, + { + "name": "cursor", + "type": { + "name": "string", + "optional": true + } + }, + { + "name": "delimitedPrefixes", + "type": { + "name": "[]", + "args": [ { - "name": "options", - "type": { - "name": "ReadableStreamValuesOptions", - "optional": true - } + "name": "string" + } + ] + } + } + ], + "comment": { + "text": "", + "renamed": true + }, + "kind": "struct" + }, + "R2PutOptions": { + "name": "R2PutOptions", + "members": [ + { + "name": "onlyIf", + "type": { + "name": "|", + "args": [ + { + "name": "R2Conditional" + }, + { + "name": "Headers" } ], - "returns": { - "name": "AsyncIterableIterator", - "args": [ - { - "name": "any" - } - ] - } + "optional": true } }, { - "name": "[Symbol.asyncIterator]", + "name": "httpMetadata", "type": { - "params": [ + "name": "|", + "args": [ { - "name": "options", - "type": { - "name": "ReadableStreamValuesOptions", - "optional": true - } + "name": "R2HTTPMetadata" + }, + { + "name": "Headers" } ], - "returns": { - "name": "AsyncIterableIterator", - "args": [ - { - "name": "any" - } - ] - } + "optional": true } - } - ], - "kind": "class" - }, - "ReadableStreamBYOBReader": { - "name": "ReadableStreamBYOBReader", - "members": [ + }, { - "name": "constructor", + "name": "customMetadata", "type": { - "params": [ + "name": "Record", + "args": [ { - "name": "stream", - "type": { - "name": "ReadableStream" - } + "name": "string" + }, + { + "name": "string" } - ] + ], + "optional": true } }, { - "name": "closed", + "name": "md5", "type": { - "name": "Promise", + "name": "|", "args": [ { - "name": "void" + "name": "ArrayBuffer" + }, + { + "name": "string" } - ] - }, - "readonly": true + ], + "optional": true + } }, { - "name": "cancel", + "name": "sha1", "type": { - "params": [ + "name": "|", + "args": [ { - "name": "reason", - "type": { - "name": "any", - "optional": true - } + "name": "ArrayBuffer" + }, + { + "name": "string" } ], - "returns": { - "name": "Promise", - "args": [ - { - "name": "void" - } - ] - } + "optional": true } }, { - "name": "read", + "name": "sha256", "type": { - "params": [ + "name": "|", + "args": [ { - "name": "view", - "type": { - "name": "T" - } + "name": "ArrayBuffer" + }, + { + "name": "string" } ], - "returns": { - "name": "Promise", - "args": [ - { - "name": "ReadableStreamReadResult", - "args": [ - { - "name": "T" - } - ] - } - ] - } - }, - "typeparams": [ - { - "name": "T", - "constraint": { - "name": "ArrayBufferView" - } - } - ] + "optional": true + } }, { - "name": "releaseLock", + "name": "sha384", "type": { - "params": [], - "returns": { - "name": "void" - } + "name": "|", + "args": [ + { + "name": "ArrayBuffer" + }, + { + "name": "string" + } + ], + "optional": true } }, { - "name": "readAtLeast", + "name": "sha512", "type": { - "params": [ + "name": "|", + "args": [ { - "name": "minBytes", - "type": { - "name": "number" - } + "name": "ArrayBuffer" }, { - "name": "view", - "type": { - "name": "Uint8Array" - } + "name": "string" } ], - "returns": { - "name": "Promise", - "args": [ - { - "name": "ReadableStreamReadResult", - "args": [ - { - "name": "Uint8Array" - } - ] - } - ] - } + "optional": true } } ], - "kind": "class" + "comment": { + "text": "", + "renamed": true + }, + "kind": "struct" }, - "ReadableStreamBYOBRequest": { - "name": "ReadableStreamBYOBRequest", - "members": [ - { - "name": "view", - "type": { - "name": "|", - "args": [ + "R2Range": { + "name": "R2Range", + "type": { + "name": "|", + "args": [ + { + "members": [ { - "name": "Uint8Array" + "name": "offset", + "type": { + "name": "number" + } }, { - "name": "null" + "name": "length", + "type": { + "name": "number", + "optional": true + } } ] }, - "readonly": true - }, - { - "name": "respond", - "type": { - "params": [ + { + "members": [ { - "name": "bytesWritten", + "name": "offset", "type": { - "name": "integer" + "name": "number", + "optional": true + } + }, + { + "name": "length", + "type": { + "name": "number" } } - ], - "returns": { - "name": "void" - } + ] + }, + { + "members": [ + { + "name": "suffix", + "type": { + "name": "number" + } + } + ] + } + ] + }, + "kind": "typedef" + }, + "ReadResult": { + "name": "ReadResult", + "members": [ + { + "name": "value", + "type": { + "name": "any", + "optional": true } }, { - "name": "respondWithNewView", + "name": "done", "type": { - "params": [ - { - "name": "view", - "type": { - "name": "ArrayBuffer|ArrayBufferView" - } - } - ], - "returns": { - "name": "void" - } + "name": "boolean" } - }, + } + ], + "kind": "struct" + }, + "ReadableByteStreamController": { + "name": "ReadableByteStreamController", + "members": [ { - "name": "atLeast", + "name": "byobRequest", "type": { "name": "|", "args": [ { - "name": "integer" + "name": "ReadableStreamBYOBRequest" }, { "name": "null" @@ -9102,13 +8180,7 @@ ] }, "readonly": true - } - ], - "kind": "class" - }, - "ReadableStreamDefaultController": { - "name": "ReadableStreamDefaultController", - "members": [ + }, { "name": "desiredSize", "type": { @@ -9140,8 +8212,7 @@ { "name": "chunk", "type": { - "name": "any", - "optional": true + "name": "ArrayBuffer|ArrayBufferView" } } ], @@ -9169,31 +8240,34 @@ ], "kind": "class" }, - "ReadableStreamDefaultReader": { - "name": "ReadableStreamDefaultReader", + "ReadableStream": { + "name": "ReadableStream", "members": [ { "name": "constructor", "type": { "params": [ { - "name": "stream", + "name": "underlyingSource", "type": { - "name": "ReadableStream" + "name": "UnderlyingSource", + "optional": true + } + }, + { + "name": "queuingStrategy", + "type": { + "name": "StreamQueuingStrategy", + "optional": true } } ] } }, { - "name": "closed", + "name": "locked", "type": { - "name": "Promise", - "args": [ - { - "name": "void" - } - ] + "name": "boolean" }, "readonly": true }, @@ -9220,244 +8294,289 @@ } }, { - "name": "read", + "name": "getReader", "type": { - "params": [], - "returns": { - "name": "Promise", - "args": [ - { - "name": "ReadableStreamReadResult", - "args": [ - { - "name": "any" - } - ] + "params": [ + { + "name": "options", + "type": { + "name": "ReadableStreamGetReaderOptions" } - ] + } + ], + "returns": { + "name": "ReadableStreamBYOBReader" } } }, { - "name": "releaseLock", + "name": "getReader", "type": { "params": [], "returns": { - "name": "void" + "name": "ReadableStreamDefaultReader" } } - } - ], - "kind": "class" - }, - "ReadableStreamGetReaderOptions": { - "name": "ReadableStreamGetReaderOptions", - "members": [ + }, { - "name": "mode", + "name": "pipeThrough", "type": { - "name": "string" - } - } - ], - "kind": "struct" - }, - "ReadableStreamPipeToOptions": { - "name": "ReadableStreamPipeToOptions", - "type": { - "name": "PipeToOptions" - }, - "comment": { - "text": "Back-compat alias.", - "deprecated": "Use StreamPipeOptions" - }, - "kind": "typedef" - }, - "ReadableStreamReadResult": { - "name": "ReadableStreamReadResult", - "type": { - "name": "|", - "args": [ - { - "members": [ + "params": [ { - "name": "done", + "name": "transform", "type": { - "name": "true" + "name": "ReadableStreamTransform" } }, { - "name": "value", + "name": "options", "type": { - "name": "undefined" + "name": "PipeToOptions", + "optional": true } } - ] - }, - { - "members": [ + ], + "returns": { + "name": "ReadableStream" + } + } + }, + { + "name": "pipeTo", + "type": { + "params": [ { - "name": "done", + "name": "destination", "type": { - "name": "false" + "name": "WritableStream" } }, { - "name": "value", + "name": "options", "type": { - "name": "T" + "name": "PipeToOptions", + "optional": true } } - ] - } - ] - }, - "typeparams": [ - { - "name": "T", - "default": { - "name": "any" + ], + "returns": { + "name": "Promise", + "args": [ + { + "name": "void" + } + ] + } } - } - ], - "kind": "typedef" - }, - "ReadableStreamReadableStreamBYOBReader": { - "name": "ReadableStreamReadableStreamBYOBReader", - "type": { - "name": "ReadableStreamBYOBReader" - }, - "comment": { - "text": "Back-compat alias.", - "deprecated": "Use ReadableStreamBYOBReader" - }, - "kind": "typedef" - }, - "ReadableStreamReadableStreamDefaultReader": { - "name": "ReadableStreamReadableStreamDefaultReader", - "type": { - "name": "ReadableStreamDefaultReader" - }, - "comment": { - "text": "Back-compat alias.", - "deprecated": "Use ReadableStreamDefaultReader" - }, - "kind": "typedef" - }, - "ReadableStreamTransform": { - "name": "ReadableStreamTransform", - "members": [ + }, { - "name": "writable", + "name": "tee", "type": { - "name": "WritableStream" + "params": [], + "returns": { + "name": "()", + "params": [ + { + "name": "", + "type": { + "name": "ReadableStream" + } + }, + { + "name": "", + "type": { + "name": "ReadableStream" + } + } + ] + } } }, { - "name": "readable", + "name": "values", "type": { - "name": "ReadableStream" + "params": [ + { + "name": "options", + "type": { + "name": "ReadableStreamValuesOptions", + "optional": true + } + } + ], + "returns": { + "name": "AsyncIterableIterator", + "args": [ + { + "name": "any" + } + ] + } } - } - ], - "kind": "struct" - }, - "ReadableStreamValuesOptions": { - "name": "ReadableStreamValuesOptions", - "members": [ + }, { - "name": "preventCancel", + "name": "[Symbol.asyncIterator]", "type": { - "name": "boolean", - "optional": true + "params": [ + { + "name": "options", + "type": { + "name": "ReadableStreamValuesOptions", + "optional": true + } + } + ], + "returns": { + "name": "AsyncIterableIterator", + "args": [ + { + "name": "any" + } + ] + } } } ], - "kind": "struct" + "kind": "class" }, - "Request": { - "name": "Request", + "ReadableStreamBYOBReader": { + "name": "ReadableStreamBYOBReader", "members": [ { "name": "constructor", "type": { "params": [ { - "name": "input", - "type": { - "name": "|", - "args": [ - { - "name": "Request" - }, - { - "name": "string" - } - ] - } - }, - { - "name": "init", + "name": "stream", "type": { - "name": "|", - "args": [ - { - "name": "RequestInit" - }, - { - "name": "Request" - } - ], - "optional": true + "name": "ReadableStream" } } ] } }, { - "name": "clone", - "type": { - "params": [], - "returns": { - "name": "Request" - } - } - }, - { - "name": "method", + "name": "closed", "type": { - "name": "string" + "name": "Promise", + "args": [ + { + "name": "void" + } + ] }, "readonly": true }, { - "name": "url", + "name": "cancel", "type": { - "name": "string" - }, - "readonly": true + "params": [ + { + "name": "reason", + "type": { + "name": "any", + "optional": true + } + } + ], + "returns": { + "name": "Promise", + "args": [ + { + "name": "void" + } + ] + } + } }, { - "name": "headers", + "name": "read", "type": { - "name": "Headers" + "params": [ + { + "name": "view", + "type": { + "name": "T" + } + } + ], + "returns": { + "name": "Promise", + "args": [ + { + "name": "ReadableStreamReadResult", + "args": [ + { + "name": "T" + } + ] + } + ] + } }, - "readonly": true + "typeparams": [ + { + "name": "T", + "constraint": { + "name": "ArrayBufferView" + } + } + ] }, { - "name": "redirect", + "name": "releaseLock", "type": { - "name": "string" - }, - "readonly": true + "params": [], + "returns": { + "name": "void" + } + } }, { - "name": "fetcher", + "name": "readAtLeast", + "type": { + "params": [ + { + "name": "minBytes", + "type": { + "name": "number" + } + }, + { + "name": "view", + "type": { + "name": "Uint8Array" + } + } + ], + "returns": { + "name": "Promise", + "args": [ + { + "name": "ReadableStreamReadResult", + "args": [ + { + "name": "Uint8Array" + } + ] + } + ] + } + } + } + ], + "kind": "class" + }, + "ReadableStreamBYOBRequest": { + "name": "ReadableStreamBYOBRequest", + "members": [ + { + "name": "view", "type": { "name": "|", "args": [ { - "name": "Fetcher" + "name": "Uint8Array" }, { "name": "null" @@ -9467,526 +8586,525 @@ "readonly": true }, { - "name": "signal", - "type": { - "name": "AbortSignal" - }, - "readonly": true - }, - { - "name": "cf", - "type": { - "name": "IncomingRequestCfProperties", - "optional": true - }, - "readonly": true - } - ], - "extends": [ - { - "name": "Body" - } - ], - "kind": "class" - }, - "RequestInit": { - "name": "RequestInit", - "members": [ - { - "name": "method", + "name": "respond", "type": { - "name": "string", - "optional": true + "params": [ + { + "name": "bytesWritten", + "type": { + "name": "integer" + } + } + ], + "returns": { + "name": "void" + } } }, { - "name": "headers", + "name": "respondWithNewView", "type": { - "name": "HeadersInit", - "optional": true + "params": [ + { + "name": "view", + "type": { + "name": "ArrayBuffer|ArrayBufferView" + } + } + ], + "returns": { + "name": "void" + } } }, { - "name": "body", + "name": "atLeast", "type": { "name": "|", "args": [ { - "name": "BodyInit" + "name": "integer" }, { "name": "null" } - ], - "optional": true - } - }, - { - "name": "redirect", - "type": { - "name": "string", - "optional": true - } - }, + ] + }, + "readonly": true + } + ], + "kind": "class" + }, + "ReadableStreamDefaultController": { + "name": "ReadableStreamDefaultController", + "members": [ { - "name": "fetcher", + "name": "desiredSize", "type": { "name": "|", "args": [ { - "name": "Fetcher" + "name": "integer" }, { "name": "null" } - ], - "optional": true + ] + }, + "readonly": true + }, + { + "name": "close", + "type": { + "params": [], + "returns": { + "name": "void" + } } }, { - "name": "cf", + "name": "enqueue", "type": { - "name": "|", - "args": [ - { - "name": "IncomingRequestCfProperties" - }, + "params": [ { - "name": "RequestInitCfProperties" + "name": "chunk", + "type": { + "name": "any", + "optional": true + } } ], - "optional": true - }, - "comment": { - "text": "cf is a union of these two types because there are multiple\nscenarios in which it might be one or the other.\n\nIncomingRequestCfProperties is required to allow\n new Request(someUrl, event.request)\n\nRequestInitCfProperties is required to allow\n new Request(event.request, {cf: { ... } })\n fetch(someUrl, {cf: { ... } })" + "returns": { + "name": "void" + } } }, { - "name": "signal", + "name": "error", "type": { - "name": "|", - "args": [ - { - "name": "AbortSignal" - }, + "params": [ { - "name": "null" + "name": "reason", + "type": { + "name": "any" + } } ], - "optional": true + "returns": { + "name": "void" + } } } ], - "kind": "struct" + "kind": "class" }, - "RequestInitCfProperties": { - "name": "RequestInitCfProperties", + "ReadableStreamDefaultReader": { + "name": "ReadableStreamDefaultReader", "members": [ { - "name": "cacheEverything", - "type": { - "name": "boolean", - "optional": true - } - }, - { - "name": "cacheKey", + "name": "constructor", "type": { - "name": "string", - "optional": true - }, - "comment": { - "text": "A request's cache key is what determines if two requests are\n\"the same\" for caching purposes. If a request has the same cache key\nas some previous request, then we can serve the same cached response for\nboth. (e.g. 'some-key')\n\nOnly available for Enterprise customers." + "params": [ + { + "name": "stream", + "type": { + "name": "ReadableStream" + } + } + ] } }, { - "name": "cacheTags", + "name": "closed", "type": { - "name": "[]", + "name": "Promise", "args": [ { - "name": "string" + "name": "void" } - ], - "optional": true - }, - "comment": { - "text": "This allows you to append additional Cache-Tag response headers\nto the origin response without modifications to the origin server.\nThis will allow for greater control over the Purge by Cache Tag feature\nutilizing changes only in the Workers process.\n\nOnly available for Enterprise customers." - } - }, - { - "name": "cacheTtl", - "type": { - "name": "number", - "optional": true + ] }, - "comment": { - "text": "Force response to be cached for a given number of seconds. (e.g. 300)" - } + "readonly": true }, { - "name": "cacheTtlByStatus", + "name": "cancel", "type": { - "name": "Record", - "args": [ - { - "name": "string" - }, + "params": [ { - "name": "number" + "name": "reason", + "type": { + "name": "any", + "optional": true + } } ], - "optional": true - }, - "comment": { - "text": "Force response to be cached for a given number of seconds based on the Origin status code.\n(e.g. { '200-299': 86400, '404': 1, '500-599': 0 })" + "returns": { + "name": "Promise", + "args": [ + { + "name": "void" + } + ] + } } }, { - "name": "scrapeShield", + "name": "read", "type": { - "name": "boolean", - "optional": true + "params": [], + "returns": { + "name": "Promise", + "args": [ + { + "name": "ReadableStreamReadResult", + "args": [ + { + "name": "any" + } + ] + } + ] + } } }, { - "name": "apps", + "name": "releaseLock", "type": { - "name": "boolean", - "optional": true + "params": [], + "returns": { + "name": "void" + } } - }, + } + ], + "kind": "class" + }, + "ReadableStreamGetReaderOptions": { + "name": "ReadableStreamGetReaderOptions", + "members": [ { - "name": "image", + "name": "mode", "type": { - "name": "RequestInitCfPropertiesImage", - "optional": true + "name": "string" } - }, - { - "name": "minify", - "type": { - "name": "RequestInitCfPropertiesImageMinify", - "optional": true + } + ], + "kind": "struct" + }, + "ReadableStreamPipeToOptions": { + "name": "ReadableStreamPipeToOptions", + "type": { + "name": "PipeToOptions" + }, + "comment": { + "text": "Back-compat alias.", + "deprecated": "Use StreamPipeOptions" + }, + "kind": "typedef" + }, + "ReadableStreamReadResult": { + "name": "ReadableStreamReadResult", + "type": { + "name": "|", + "args": [ + { + "members": [ + { + "name": "done", + "type": { + "name": "true" + } + }, + { + "name": "value", + "type": { + "name": "undefined" + } + } + ] + }, + { + "members": [ + { + "name": "done", + "type": { + "name": "false" + } + }, + { + "name": "value", + "type": { + "name": "T" + } + } + ] } - }, + ] + }, + "typeparams": [ { - "name": "mirage", - "type": { - "name": "boolean", - "optional": true + "name": "T", + "default": { + "name": "any" } - }, + } + ], + "kind": "typedef" + }, + "ReadableStreamReadableStreamBYOBReader": { + "name": "ReadableStreamReadableStreamBYOBReader", + "type": { + "name": "ReadableStreamBYOBReader" + }, + "comment": { + "text": "Back-compat alias.", + "deprecated": "Use ReadableStreamBYOBReader" + }, + "kind": "typedef" + }, + "ReadableStreamReadableStreamDefaultReader": { + "name": "ReadableStreamReadableStreamDefaultReader", + "type": { + "name": "ReadableStreamDefaultReader" + }, + "comment": { + "text": "Back-compat alias.", + "deprecated": "Use ReadableStreamDefaultReader" + }, + "kind": "typedef" + }, + "ReadableStreamTransform": { + "name": "ReadableStreamTransform", + "members": [ { - "name": "polish", + "name": "writable", "type": { - "name": "|", - "args": [ - { - "name": "\"lossy\"" - }, - { - "name": "\"lossless\"" - }, - { - "name": "\"off\"" - } - ], - "optional": true + "name": "WritableStream" } }, { - "name": "resolveOverride", + "name": "readable", "type": { - "name": "string", - "optional": true - }, - "comment": { - "text": "Redirects the request to an alternate origin server. You can use this,\nfor example, to implement load balancing across several origins.\n(e.g.us-east.example.com)\n\nNote - For security reasons, the hostname set in resolveOverride must\nbe proxied on the same Cloudflare zone of the incoming request.\nOtherwise, the setting is ignored. CNAME hosts are allowed, so to\nresolve to a host under a different domain or a DNS only domain first\ndeclare a CNAME record within your own zone\u2019s DNS mapping to the\nexternal hostname, set proxy on Cloudflare, then set resolveOverride\nto point to that CNAME record." + "name": "ReadableStream" } } ], - "comment": { - "text": "In addition to the properties you can set in the RequestInit dict\nthat you pass as an argument to the Request constructor, you can\nset certain properties of a `cf` object to control how Cloudflare\nfeatures are applied to that new Request.\n\nNote: Currently, these properties cannot be tested in the\nplayground." - }, "kind": "struct" }, - "RequestInitCfPropertiesImage": { - "name": "RequestInitCfPropertiesImage", + "ReadableStreamValuesOptions": { + "name": "ReadableStreamValuesOptions", "members": [ { - "name": "dpr", + "name": "preventCancel", "type": { - "name": "number", + "name": "boolean", "optional": true - }, - "comment": { - "text": "Device Pixel Ratio. Default 1. Multiplier for width/height that makes it\neasier to specify higher-DPI sizes in ." } - }, + } + ], + "kind": "struct" + }, + "Request": { + "name": "Request", + "members": [ { - "name": "trim", + "name": "constructor", "type": { - "members": [ - { - "name": "left", - "type": { - "name": "number", - "optional": true - } - }, - { - "name": "top", - "type": { - "name": "number", - "optional": true - } - }, + "params": [ { - "name": "right", + "name": "input", "type": { - "name": "number", - "optional": true + "name": "|", + "args": [ + { + "name": "Request" + }, + { + "name": "string" + } + ] } }, { - "name": "bottom", + "name": "init", "type": { - "name": "number", + "name": "|", + "args": [ + { + "name": "RequestInit" + }, + { + "name": "Request" + } + ], "optional": true } } - ], - "optional": true - }, - "comment": { - "text": "An object with four properties {left, top, right, bottom} that specify\na number of pixels to cut off on each side. Allows removal of borders\nor cutting out a specific fragment of an image. Trimming is performed\nbefore resizing or rotation. Takes dpr into account." + ] } }, { - "name": "quality", + "name": "clone", "type": { - "name": "number", - "optional": true - }, - "comment": { - "text": "Quality setting from 1-100 (useful values are in 60-90 range). Lower values\nmake images look worse, but load faster. The default is 85. It applies only\nto JPEG and WebP images. It doesn\u2019t have any effect on PNG." + "params": [], + "returns": { + "name": "Request" + } } }, { - "name": "format", + "name": "method", "type": { - "name": "|", - "args": [ - { - "name": "\"avif\"" - }, - { - "name": "\"webp\"" - }, - { - "name": "\"json\"" - }, - { - "name": "\"jpeg\"" - }, - { - "name": "\"png\"" - } - ], - "optional": true + "name": "string" }, - "comment": { - "text": "Output format to generate. It can be:\n - avif: generate images in AVIF format.\n - webp: generate images in Google WebP format. Set quality to 100 to get\n the WebP-lossless format.\n - json: instead of generating an image, outputs information about the\n image, in JSON format. The JSON object will contain image size\n (before and after resizing), source image\u2019s MIME type, file size, etc.\n- jpeg: generate images in JPEG format.\n- png: generate images in PNG format." - } + "readonly": true }, { - "name": "anim", + "name": "url", "type": { - "name": "boolean", - "optional": true + "name": "string" }, - "comment": { - "text": "Whether to preserve animation frames from input files. Default is true.\nSetting it to false reduces animations to still images. This setting is\nrecommended when enlarging images or processing arbitrary user content,\nbecause large GIF animations can weigh tens or even hundreds of megabytes.\nIt is also useful to set anim:false when using format:\"json\" to get the\nresponse quicker without the number of frames." - } + "readonly": true }, { - "name": "metadata", + "name": "headers", "type": { - "name": "|", - "args": [ - { - "name": "\"keep\"" - }, - { - "name": "\"copyright\"" - }, - { - "name": "\"none\"" - } - ], - "optional": true + "name": "Headers" }, - "comment": { - "text": "What EXIF data should be preserved in the output image. Note that EXIF\nrotation and embedded color profiles are always applied (\"baked in\" into\nthe image), and aren't affected by this option. Note that if the Polish\nfeature is enabled, all metadata may have been removed already and this\noption may have no effect.\n - keep: Preserve most of EXIF metadata, including GPS location if there's\n any.\n - copyright: Only keep the copyright tag, and discard everything else.\n This is the default behavior for JPEG files.\n - none: Discard all invisible EXIF metadata. Currently WebP and PNG\n output formats always discard metadata." - } + "readonly": true }, { - "name": "sharpen", + "name": "redirect", "type": { - "name": "number", - "optional": true + "name": "string" }, - "comment": { - "text": "Strength of sharpening filter to apply to the image. Floating-point\nnumber between 0 (no sharpening, default) and 10 (maximum). 1.0 is a\nrecommended value for downscaled images." - } + "readonly": true }, { - "name": "blur", + "name": "fetcher", "type": { - "name": "number", - "optional": true + "name": "|", + "args": [ + { + "name": "Fetcher" + }, + { + "name": "null" + } + ] }, - "comment": { - "text": "Radius of a blur filter (approximate gaussian). Maximum supported radius\nis 250." - } + "readonly": true }, { - "name": "draw", + "name": "signal", "type": { - "name": "[]", - "args": [ - { - "name": "RequestInitCfPropertiesImageDraw" - } - ], - "optional": true + "name": "AbortSignal" }, - "comment": { - "text": "Overlays are drawn in the order they appear in the array (last array\nentry is the topmost layer)." - } + "readonly": true }, { - "name": "\"origin-auth\"", + "name": "cf", "type": { - "name": "\"share-publicly\"", + "name": "IncomingRequestCfProperties", "optional": true }, + "readonly": true, "comment": { - "text": "Fetching image from authenticated origin. Setting this property will\npass authentication headers (Authorization, Cookie, etc.) through to\nthe origin." + "text": "In addition to the properties on the standard `Request` object,\nthe `cf` object contains extra information about the request provided\nby Cloudflare's edge.\n\nReturns undefined when accessed in the playground." } } ], "extends": [ { - "name": "BasicImageTransformations" + "name": "Body" } ], - "kind": "struct" + "kind": "class" }, - "RequestInitCfPropertiesImageDraw": { - "name": "RequestInitCfPropertiesImageDraw", + "RequestInit": { + "name": "RequestInit", "members": [ { - "name": "url", + "name": "method", "type": { - "name": "string" - }, - "comment": { - "text": "Absolute URL of the image file to use for the drawing. It can be any of\nthe supported file formats. For drawing of watermarks or non-rectangular\noverlays we recommend using PNG or WebP images." + "name": "string", + "optional": true } }, { - "name": "opacity", + "name": "headers", "type": { - "name": "number", + "name": "HeadersInit", "optional": true - }, - "comment": { - "text": "Floating-point number between 0 (transparent) and 1 (opaque).\nFor example, opacity: 0.5 makes overlay semitransparent." } }, { - "name": "repeat", + "name": "body", "type": { "name": "|", "args": [ { - "name": "true" - }, - { - "name": "\"x\"" + "name": "BodyInit" }, { - "name": "\"y\"" + "name": "null" } ], "optional": true - }, - "comment": { - "text": "- If set to true, the overlay image will be tiled to cover the entire\n area. This is useful for stock-photo-like watermarks.\n- If set to \"x\", the overlay image will be tiled horizontally only\n (form a line).\n- If set to \"y\", the overlay image will be tiled vertically only\n (form a line)." - } - }, - { - "name": "top", - "type": { - "name": "number", - "optional": true - }, - "comment": { - "text": "Position of the overlay image relative to a given edge. Each property is\nan offset in pixels. 0 aligns exactly to the edge. For example, left: 10\npositions left side of the overlay 10 pixels from the left edge of the\nimage it's drawn over. bottom: 0 aligns bottom of the overlay with bottom\nof the background image.\n\nSetting both left & right, or both top & bottom is an error.\n\nIf no position is specified, the image will be centered." - } - }, - { - "name": "left", - "type": { - "name": "number", - "optional": true } }, { - "name": "bottom", + "name": "redirect", "type": { - "name": "number", + "name": "string", "optional": true } }, { - "name": "right", - "type": { - "name": "number", - "optional": true - } - } - ], - "extends": [ - { - "name": "BasicImageTransformations" - } - ], - "kind": "struct" - }, - "RequestInitCfPropertiesImageMinify": { - "name": "RequestInitCfPropertiesImageMinify", - "members": [ - { - "name": "javascript", + "name": "fetcher", "type": { - "name": "boolean", + "name": "|", + "args": [ + { + "name": "Fetcher" + }, + { + "name": "null" + } + ], "optional": true } }, { - "name": "css", + "name": "cf", "type": { - "name": "boolean", + "name": "|", + "args": [ + { + "name": "IncomingRequestCfProperties" + }, + { + "name": "RequestInitCfProperties" + } + ], "optional": true + }, + "comment": { + "text": "cf is a union of these two types because there are multiple\nscenarios in which it might be one or the other.\n\nIncomingRequestCfProperties is required to allow\n new Request(someUrl, event.request)\n\nRequestInitCfProperties is required to allow\n new Request(event.request, {cf: { ... } })\n fetch(someUrl, {cf: { ... } })" } }, { - "name": "html", + "name": "signal", "type": { - "name": "boolean", + "name": "|", + "args": [ + { + "name": "AbortSignal" + }, + { + "name": "null" + } + ], "optional": true } }