@cloudflare/workers-types 4.20260624.1 → 4.20260625.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2021-11-03/index.d.ts +63 -0
- package/2021-11-03/index.ts +66 -0
- package/2022-01-31/index.d.ts +63 -0
- package/2022-01-31/index.ts +66 -0
- package/2022-03-21/index.d.ts +63 -0
- package/2022-03-21/index.ts +66 -0
- package/2022-08-04/index.d.ts +63 -0
- package/2022-08-04/index.ts +66 -0
- package/2022-10-31/index.d.ts +63 -0
- package/2022-10-31/index.ts +66 -0
- package/2022-11-30/index.d.ts +63 -0
- package/2022-11-30/index.ts +66 -0
- package/2023-03-01/index.d.ts +63 -0
- package/2023-03-01/index.ts +66 -0
- package/2023-07-01/index.d.ts +63 -0
- package/2023-07-01/index.ts +66 -0
- package/experimental/index.d.ts +64 -0
- package/experimental/index.ts +67 -0
- package/index.d.ts +63 -0
- package/index.ts +66 -0
- package/latest/index.d.ts +63 -0
- package/latest/index.ts +66 -0
- package/oldest/index.d.ts +63 -0
- package/oldest/index.ts +66 -0
- package/package.json +1 -1
package/2022-10-31/index.d.ts
CHANGED
|
@@ -12291,6 +12291,8 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12291
12291
|
* (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
|
|
12292
12292
|
*/
|
|
12293
12293
|
cacheTtlByStatus?: Record<string, number>;
|
|
12294
|
+
/** Controls how responses with a `Vary` header are cached for this request. */
|
|
12295
|
+
vary?: RequestInitCfPropertiesVary;
|
|
12294
12296
|
/**
|
|
12295
12297
|
* Explicit Cache-Control header value to set on the response stored in cache.
|
|
12296
12298
|
* This gives full control over cache directives (e.g. 'public, max-age=3600, s-maxage=86400').
|
|
@@ -12359,6 +12361,67 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12359
12361
|
*/
|
|
12360
12362
|
resolveOverride?: string;
|
|
12361
12363
|
}
|
|
12364
|
+
/**
|
|
12365
|
+
* Controls how Workers Standard Vary handles a request header listed by an
|
|
12366
|
+
* origin `Vary` response header:
|
|
12367
|
+
*
|
|
12368
|
+
* - `"normalize"`: normalize the request header value before it is used in the
|
|
12369
|
+
* cache variance key.
|
|
12370
|
+
* - `"passthrough"`: use the raw request header value in the cache variance
|
|
12371
|
+
* key.
|
|
12372
|
+
* - `"bypass"`: bypass cache when the header appears in the origin `Vary`
|
|
12373
|
+
* response header.
|
|
12374
|
+
*/
|
|
12375
|
+
type RequestInitCfPropertiesVaryAction = "normalize" | "passthrough" | "bypass";
|
|
12376
|
+
/** Configuration for Workers Standard Vary support. */
|
|
12377
|
+
interface RequestInitCfPropertiesVary {
|
|
12378
|
+
/** The fallback action for varied request headers not listed in `headers`. */
|
|
12379
|
+
default: RequestInitCfPropertiesVaryHeader;
|
|
12380
|
+
/**
|
|
12381
|
+
* Lowercase request header names and their Vary configuration.
|
|
12382
|
+
*
|
|
12383
|
+
* The `accept` header can include `media_types`, the `accept-language`
|
|
12384
|
+
* header can include `languages`, and other headers support only `action`.
|
|
12385
|
+
*/
|
|
12386
|
+
headers?: RequestInitCfPropertiesVaryHeaders;
|
|
12387
|
+
}
|
|
12388
|
+
/** Common Vary behavior for a single request header. */
|
|
12389
|
+
interface RequestInitCfPropertiesVaryHeader {
|
|
12390
|
+
/** How this request header contributes to cache variance. */
|
|
12391
|
+
action: RequestInitCfPropertiesVaryAction;
|
|
12392
|
+
}
|
|
12393
|
+
/** Vary behavior for the `accept` request header. */
|
|
12394
|
+
interface RequestInitCfPropertiesVaryAcceptHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12395
|
+
/**
|
|
12396
|
+
* Media types to keep when normalizing the `Accept` request header.
|
|
12397
|
+
*
|
|
12398
|
+
* Named `media_types` to match the serialized `cf.vary` configuration.
|
|
12399
|
+
*/
|
|
12400
|
+
media_types?: string[];
|
|
12401
|
+
}
|
|
12402
|
+
/** Vary behavior for the `accept-language` request header. */
|
|
12403
|
+
interface RequestInitCfPropertiesVaryAcceptLanguageHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12404
|
+
/**
|
|
12405
|
+
* Language tags to keep when normalizing the `Accept-Language` request
|
|
12406
|
+
* header.
|
|
12407
|
+
*/
|
|
12408
|
+
languages?: string[];
|
|
12409
|
+
}
|
|
12410
|
+
/**
|
|
12411
|
+
* Lowercase request header names and their Vary behavior.
|
|
12412
|
+
*
|
|
12413
|
+
* The index signature allows arbitrary custom request headers beyond the
|
|
12414
|
+
* well-known `accept` and `accept-language` specializations.
|
|
12415
|
+
*/
|
|
12416
|
+
interface RequestInitCfPropertiesVaryHeaders {
|
|
12417
|
+
accept?: RequestInitCfPropertiesVaryAcceptHeader;
|
|
12418
|
+
"accept-language"?: RequestInitCfPropertiesVaryAcceptLanguageHeader;
|
|
12419
|
+
[header: string]:
|
|
12420
|
+
| RequestInitCfPropertiesVaryHeader
|
|
12421
|
+
| RequestInitCfPropertiesVaryAcceptHeader
|
|
12422
|
+
| RequestInitCfPropertiesVaryAcceptLanguageHeader
|
|
12423
|
+
| undefined;
|
|
12424
|
+
}
|
|
12362
12425
|
interface BasicImageTransformations {
|
|
12363
12426
|
/**
|
|
12364
12427
|
* Maximum width in image pixels. The value must be an integer.
|
package/2022-10-31/index.ts
CHANGED
|
@@ -12303,6 +12303,8 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12303
12303
|
* (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
|
|
12304
12304
|
*/
|
|
12305
12305
|
cacheTtlByStatus?: Record<string, number>;
|
|
12306
|
+
/** Controls how responses with a `Vary` header are cached for this request. */
|
|
12307
|
+
vary?: RequestInitCfPropertiesVary;
|
|
12306
12308
|
/**
|
|
12307
12309
|
* Explicit Cache-Control header value to set on the response stored in cache.
|
|
12308
12310
|
* This gives full control over cache directives (e.g. 'public, max-age=3600, s-maxage=86400').
|
|
@@ -12371,6 +12373,70 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12371
12373
|
*/
|
|
12372
12374
|
resolveOverride?: string;
|
|
12373
12375
|
}
|
|
12376
|
+
/**
|
|
12377
|
+
* Controls how Workers Standard Vary handles a request header listed by an
|
|
12378
|
+
* origin `Vary` response header:
|
|
12379
|
+
*
|
|
12380
|
+
* - `"normalize"`: normalize the request header value before it is used in the
|
|
12381
|
+
* cache variance key.
|
|
12382
|
+
* - `"passthrough"`: use the raw request header value in the cache variance
|
|
12383
|
+
* key.
|
|
12384
|
+
* - `"bypass"`: bypass cache when the header appears in the origin `Vary`
|
|
12385
|
+
* response header.
|
|
12386
|
+
*/
|
|
12387
|
+
export type RequestInitCfPropertiesVaryAction =
|
|
12388
|
+
| "normalize"
|
|
12389
|
+
| "passthrough"
|
|
12390
|
+
| "bypass";
|
|
12391
|
+
/** Configuration for Workers Standard Vary support. */
|
|
12392
|
+
export interface RequestInitCfPropertiesVary {
|
|
12393
|
+
/** The fallback action for varied request headers not listed in `headers`. */
|
|
12394
|
+
default: RequestInitCfPropertiesVaryHeader;
|
|
12395
|
+
/**
|
|
12396
|
+
* Lowercase request header names and their Vary configuration.
|
|
12397
|
+
*
|
|
12398
|
+
* The `accept` header can include `media_types`, the `accept-language`
|
|
12399
|
+
* header can include `languages`, and other headers support only `action`.
|
|
12400
|
+
*/
|
|
12401
|
+
headers?: RequestInitCfPropertiesVaryHeaders;
|
|
12402
|
+
}
|
|
12403
|
+
/** Common Vary behavior for a single request header. */
|
|
12404
|
+
export interface RequestInitCfPropertiesVaryHeader {
|
|
12405
|
+
/** How this request header contributes to cache variance. */
|
|
12406
|
+
action: RequestInitCfPropertiesVaryAction;
|
|
12407
|
+
}
|
|
12408
|
+
/** Vary behavior for the `accept` request header. */
|
|
12409
|
+
export interface RequestInitCfPropertiesVaryAcceptHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12410
|
+
/**
|
|
12411
|
+
* Media types to keep when normalizing the `Accept` request header.
|
|
12412
|
+
*
|
|
12413
|
+
* Named `media_types` to match the serialized `cf.vary` configuration.
|
|
12414
|
+
*/
|
|
12415
|
+
media_types?: string[];
|
|
12416
|
+
}
|
|
12417
|
+
/** Vary behavior for the `accept-language` request header. */
|
|
12418
|
+
export interface RequestInitCfPropertiesVaryAcceptLanguageHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12419
|
+
/**
|
|
12420
|
+
* Language tags to keep when normalizing the `Accept-Language` request
|
|
12421
|
+
* header.
|
|
12422
|
+
*/
|
|
12423
|
+
languages?: string[];
|
|
12424
|
+
}
|
|
12425
|
+
/**
|
|
12426
|
+
* Lowercase request header names and their Vary behavior.
|
|
12427
|
+
*
|
|
12428
|
+
* The index signature allows arbitrary custom request headers beyond the
|
|
12429
|
+
* well-known `accept` and `accept-language` specializations.
|
|
12430
|
+
*/
|
|
12431
|
+
export interface RequestInitCfPropertiesVaryHeaders {
|
|
12432
|
+
accept?: RequestInitCfPropertiesVaryAcceptHeader;
|
|
12433
|
+
"accept-language"?: RequestInitCfPropertiesVaryAcceptLanguageHeader;
|
|
12434
|
+
[header: string]:
|
|
12435
|
+
| RequestInitCfPropertiesVaryHeader
|
|
12436
|
+
| RequestInitCfPropertiesVaryAcceptHeader
|
|
12437
|
+
| RequestInitCfPropertiesVaryAcceptLanguageHeader
|
|
12438
|
+
| undefined;
|
|
12439
|
+
}
|
|
12374
12440
|
export interface BasicImageTransformations {
|
|
12375
12441
|
/**
|
|
12376
12442
|
* Maximum width in image pixels. The value must be an integer.
|
package/2022-11-30/index.d.ts
CHANGED
|
@@ -12296,6 +12296,8 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12296
12296
|
* (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
|
|
12297
12297
|
*/
|
|
12298
12298
|
cacheTtlByStatus?: Record<string, number>;
|
|
12299
|
+
/** Controls how responses with a `Vary` header are cached for this request. */
|
|
12300
|
+
vary?: RequestInitCfPropertiesVary;
|
|
12299
12301
|
/**
|
|
12300
12302
|
* Explicit Cache-Control header value to set on the response stored in cache.
|
|
12301
12303
|
* This gives full control over cache directives (e.g. 'public, max-age=3600, s-maxage=86400').
|
|
@@ -12364,6 +12366,67 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12364
12366
|
*/
|
|
12365
12367
|
resolveOverride?: string;
|
|
12366
12368
|
}
|
|
12369
|
+
/**
|
|
12370
|
+
* Controls how Workers Standard Vary handles a request header listed by an
|
|
12371
|
+
* origin `Vary` response header:
|
|
12372
|
+
*
|
|
12373
|
+
* - `"normalize"`: normalize the request header value before it is used in the
|
|
12374
|
+
* cache variance key.
|
|
12375
|
+
* - `"passthrough"`: use the raw request header value in the cache variance
|
|
12376
|
+
* key.
|
|
12377
|
+
* - `"bypass"`: bypass cache when the header appears in the origin `Vary`
|
|
12378
|
+
* response header.
|
|
12379
|
+
*/
|
|
12380
|
+
type RequestInitCfPropertiesVaryAction = "normalize" | "passthrough" | "bypass";
|
|
12381
|
+
/** Configuration for Workers Standard Vary support. */
|
|
12382
|
+
interface RequestInitCfPropertiesVary {
|
|
12383
|
+
/** The fallback action for varied request headers not listed in `headers`. */
|
|
12384
|
+
default: RequestInitCfPropertiesVaryHeader;
|
|
12385
|
+
/**
|
|
12386
|
+
* Lowercase request header names and their Vary configuration.
|
|
12387
|
+
*
|
|
12388
|
+
* The `accept` header can include `media_types`, the `accept-language`
|
|
12389
|
+
* header can include `languages`, and other headers support only `action`.
|
|
12390
|
+
*/
|
|
12391
|
+
headers?: RequestInitCfPropertiesVaryHeaders;
|
|
12392
|
+
}
|
|
12393
|
+
/** Common Vary behavior for a single request header. */
|
|
12394
|
+
interface RequestInitCfPropertiesVaryHeader {
|
|
12395
|
+
/** How this request header contributes to cache variance. */
|
|
12396
|
+
action: RequestInitCfPropertiesVaryAction;
|
|
12397
|
+
}
|
|
12398
|
+
/** Vary behavior for the `accept` request header. */
|
|
12399
|
+
interface RequestInitCfPropertiesVaryAcceptHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12400
|
+
/**
|
|
12401
|
+
* Media types to keep when normalizing the `Accept` request header.
|
|
12402
|
+
*
|
|
12403
|
+
* Named `media_types` to match the serialized `cf.vary` configuration.
|
|
12404
|
+
*/
|
|
12405
|
+
media_types?: string[];
|
|
12406
|
+
}
|
|
12407
|
+
/** Vary behavior for the `accept-language` request header. */
|
|
12408
|
+
interface RequestInitCfPropertiesVaryAcceptLanguageHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12409
|
+
/**
|
|
12410
|
+
* Language tags to keep when normalizing the `Accept-Language` request
|
|
12411
|
+
* header.
|
|
12412
|
+
*/
|
|
12413
|
+
languages?: string[];
|
|
12414
|
+
}
|
|
12415
|
+
/**
|
|
12416
|
+
* Lowercase request header names and their Vary behavior.
|
|
12417
|
+
*
|
|
12418
|
+
* The index signature allows arbitrary custom request headers beyond the
|
|
12419
|
+
* well-known `accept` and `accept-language` specializations.
|
|
12420
|
+
*/
|
|
12421
|
+
interface RequestInitCfPropertiesVaryHeaders {
|
|
12422
|
+
accept?: RequestInitCfPropertiesVaryAcceptHeader;
|
|
12423
|
+
"accept-language"?: RequestInitCfPropertiesVaryAcceptLanguageHeader;
|
|
12424
|
+
[header: string]:
|
|
12425
|
+
| RequestInitCfPropertiesVaryHeader
|
|
12426
|
+
| RequestInitCfPropertiesVaryAcceptHeader
|
|
12427
|
+
| RequestInitCfPropertiesVaryAcceptLanguageHeader
|
|
12428
|
+
| undefined;
|
|
12429
|
+
}
|
|
12367
12430
|
interface BasicImageTransformations {
|
|
12368
12431
|
/**
|
|
12369
12432
|
* Maximum width in image pixels. The value must be an integer.
|
package/2022-11-30/index.ts
CHANGED
|
@@ -12308,6 +12308,8 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12308
12308
|
* (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
|
|
12309
12309
|
*/
|
|
12310
12310
|
cacheTtlByStatus?: Record<string, number>;
|
|
12311
|
+
/** Controls how responses with a `Vary` header are cached for this request. */
|
|
12312
|
+
vary?: RequestInitCfPropertiesVary;
|
|
12311
12313
|
/**
|
|
12312
12314
|
* Explicit Cache-Control header value to set on the response stored in cache.
|
|
12313
12315
|
* This gives full control over cache directives (e.g. 'public, max-age=3600, s-maxage=86400').
|
|
@@ -12376,6 +12378,70 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12376
12378
|
*/
|
|
12377
12379
|
resolveOverride?: string;
|
|
12378
12380
|
}
|
|
12381
|
+
/**
|
|
12382
|
+
* Controls how Workers Standard Vary handles a request header listed by an
|
|
12383
|
+
* origin `Vary` response header:
|
|
12384
|
+
*
|
|
12385
|
+
* - `"normalize"`: normalize the request header value before it is used in the
|
|
12386
|
+
* cache variance key.
|
|
12387
|
+
* - `"passthrough"`: use the raw request header value in the cache variance
|
|
12388
|
+
* key.
|
|
12389
|
+
* - `"bypass"`: bypass cache when the header appears in the origin `Vary`
|
|
12390
|
+
* response header.
|
|
12391
|
+
*/
|
|
12392
|
+
export type RequestInitCfPropertiesVaryAction =
|
|
12393
|
+
| "normalize"
|
|
12394
|
+
| "passthrough"
|
|
12395
|
+
| "bypass";
|
|
12396
|
+
/** Configuration for Workers Standard Vary support. */
|
|
12397
|
+
export interface RequestInitCfPropertiesVary {
|
|
12398
|
+
/** The fallback action for varied request headers not listed in `headers`. */
|
|
12399
|
+
default: RequestInitCfPropertiesVaryHeader;
|
|
12400
|
+
/**
|
|
12401
|
+
* Lowercase request header names and their Vary configuration.
|
|
12402
|
+
*
|
|
12403
|
+
* The `accept` header can include `media_types`, the `accept-language`
|
|
12404
|
+
* header can include `languages`, and other headers support only `action`.
|
|
12405
|
+
*/
|
|
12406
|
+
headers?: RequestInitCfPropertiesVaryHeaders;
|
|
12407
|
+
}
|
|
12408
|
+
/** Common Vary behavior for a single request header. */
|
|
12409
|
+
export interface RequestInitCfPropertiesVaryHeader {
|
|
12410
|
+
/** How this request header contributes to cache variance. */
|
|
12411
|
+
action: RequestInitCfPropertiesVaryAction;
|
|
12412
|
+
}
|
|
12413
|
+
/** Vary behavior for the `accept` request header. */
|
|
12414
|
+
export interface RequestInitCfPropertiesVaryAcceptHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12415
|
+
/**
|
|
12416
|
+
* Media types to keep when normalizing the `Accept` request header.
|
|
12417
|
+
*
|
|
12418
|
+
* Named `media_types` to match the serialized `cf.vary` configuration.
|
|
12419
|
+
*/
|
|
12420
|
+
media_types?: string[];
|
|
12421
|
+
}
|
|
12422
|
+
/** Vary behavior for the `accept-language` request header. */
|
|
12423
|
+
export interface RequestInitCfPropertiesVaryAcceptLanguageHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12424
|
+
/**
|
|
12425
|
+
* Language tags to keep when normalizing the `Accept-Language` request
|
|
12426
|
+
* header.
|
|
12427
|
+
*/
|
|
12428
|
+
languages?: string[];
|
|
12429
|
+
}
|
|
12430
|
+
/**
|
|
12431
|
+
* Lowercase request header names and their Vary behavior.
|
|
12432
|
+
*
|
|
12433
|
+
* The index signature allows arbitrary custom request headers beyond the
|
|
12434
|
+
* well-known `accept` and `accept-language` specializations.
|
|
12435
|
+
*/
|
|
12436
|
+
export interface RequestInitCfPropertiesVaryHeaders {
|
|
12437
|
+
accept?: RequestInitCfPropertiesVaryAcceptHeader;
|
|
12438
|
+
"accept-language"?: RequestInitCfPropertiesVaryAcceptLanguageHeader;
|
|
12439
|
+
[header: string]:
|
|
12440
|
+
| RequestInitCfPropertiesVaryHeader
|
|
12441
|
+
| RequestInitCfPropertiesVaryAcceptHeader
|
|
12442
|
+
| RequestInitCfPropertiesVaryAcceptLanguageHeader
|
|
12443
|
+
| undefined;
|
|
12444
|
+
}
|
|
12379
12445
|
export interface BasicImageTransformations {
|
|
12380
12446
|
/**
|
|
12381
12447
|
* Maximum width in image pixels. The value must be an integer.
|
package/2023-03-01/index.d.ts
CHANGED
|
@@ -12302,6 +12302,8 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12302
12302
|
* (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
|
|
12303
12303
|
*/
|
|
12304
12304
|
cacheTtlByStatus?: Record<string, number>;
|
|
12305
|
+
/** Controls how responses with a `Vary` header are cached for this request. */
|
|
12306
|
+
vary?: RequestInitCfPropertiesVary;
|
|
12305
12307
|
/**
|
|
12306
12308
|
* Explicit Cache-Control header value to set on the response stored in cache.
|
|
12307
12309
|
* This gives full control over cache directives (e.g. 'public, max-age=3600, s-maxage=86400').
|
|
@@ -12370,6 +12372,67 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12370
12372
|
*/
|
|
12371
12373
|
resolveOverride?: string;
|
|
12372
12374
|
}
|
|
12375
|
+
/**
|
|
12376
|
+
* Controls how Workers Standard Vary handles a request header listed by an
|
|
12377
|
+
* origin `Vary` response header:
|
|
12378
|
+
*
|
|
12379
|
+
* - `"normalize"`: normalize the request header value before it is used in the
|
|
12380
|
+
* cache variance key.
|
|
12381
|
+
* - `"passthrough"`: use the raw request header value in the cache variance
|
|
12382
|
+
* key.
|
|
12383
|
+
* - `"bypass"`: bypass cache when the header appears in the origin `Vary`
|
|
12384
|
+
* response header.
|
|
12385
|
+
*/
|
|
12386
|
+
type RequestInitCfPropertiesVaryAction = "normalize" | "passthrough" | "bypass";
|
|
12387
|
+
/** Configuration for Workers Standard Vary support. */
|
|
12388
|
+
interface RequestInitCfPropertiesVary {
|
|
12389
|
+
/** The fallback action for varied request headers not listed in `headers`. */
|
|
12390
|
+
default: RequestInitCfPropertiesVaryHeader;
|
|
12391
|
+
/**
|
|
12392
|
+
* Lowercase request header names and their Vary configuration.
|
|
12393
|
+
*
|
|
12394
|
+
* The `accept` header can include `media_types`, the `accept-language`
|
|
12395
|
+
* header can include `languages`, and other headers support only `action`.
|
|
12396
|
+
*/
|
|
12397
|
+
headers?: RequestInitCfPropertiesVaryHeaders;
|
|
12398
|
+
}
|
|
12399
|
+
/** Common Vary behavior for a single request header. */
|
|
12400
|
+
interface RequestInitCfPropertiesVaryHeader {
|
|
12401
|
+
/** How this request header contributes to cache variance. */
|
|
12402
|
+
action: RequestInitCfPropertiesVaryAction;
|
|
12403
|
+
}
|
|
12404
|
+
/** Vary behavior for the `accept` request header. */
|
|
12405
|
+
interface RequestInitCfPropertiesVaryAcceptHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12406
|
+
/**
|
|
12407
|
+
* Media types to keep when normalizing the `Accept` request header.
|
|
12408
|
+
*
|
|
12409
|
+
* Named `media_types` to match the serialized `cf.vary` configuration.
|
|
12410
|
+
*/
|
|
12411
|
+
media_types?: string[];
|
|
12412
|
+
}
|
|
12413
|
+
/** Vary behavior for the `accept-language` request header. */
|
|
12414
|
+
interface RequestInitCfPropertiesVaryAcceptLanguageHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12415
|
+
/**
|
|
12416
|
+
* Language tags to keep when normalizing the `Accept-Language` request
|
|
12417
|
+
* header.
|
|
12418
|
+
*/
|
|
12419
|
+
languages?: string[];
|
|
12420
|
+
}
|
|
12421
|
+
/**
|
|
12422
|
+
* Lowercase request header names and their Vary behavior.
|
|
12423
|
+
*
|
|
12424
|
+
* The index signature allows arbitrary custom request headers beyond the
|
|
12425
|
+
* well-known `accept` and `accept-language` specializations.
|
|
12426
|
+
*/
|
|
12427
|
+
interface RequestInitCfPropertiesVaryHeaders {
|
|
12428
|
+
accept?: RequestInitCfPropertiesVaryAcceptHeader;
|
|
12429
|
+
"accept-language"?: RequestInitCfPropertiesVaryAcceptLanguageHeader;
|
|
12430
|
+
[header: string]:
|
|
12431
|
+
| RequestInitCfPropertiesVaryHeader
|
|
12432
|
+
| RequestInitCfPropertiesVaryAcceptHeader
|
|
12433
|
+
| RequestInitCfPropertiesVaryAcceptLanguageHeader
|
|
12434
|
+
| undefined;
|
|
12435
|
+
}
|
|
12373
12436
|
interface BasicImageTransformations {
|
|
12374
12437
|
/**
|
|
12375
12438
|
* Maximum width in image pixels. The value must be an integer.
|
package/2023-03-01/index.ts
CHANGED
|
@@ -12314,6 +12314,8 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12314
12314
|
* (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
|
|
12315
12315
|
*/
|
|
12316
12316
|
cacheTtlByStatus?: Record<string, number>;
|
|
12317
|
+
/** Controls how responses with a `Vary` header are cached for this request. */
|
|
12318
|
+
vary?: RequestInitCfPropertiesVary;
|
|
12317
12319
|
/**
|
|
12318
12320
|
* Explicit Cache-Control header value to set on the response stored in cache.
|
|
12319
12321
|
* This gives full control over cache directives (e.g. 'public, max-age=3600, s-maxage=86400').
|
|
@@ -12382,6 +12384,70 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12382
12384
|
*/
|
|
12383
12385
|
resolveOverride?: string;
|
|
12384
12386
|
}
|
|
12387
|
+
/**
|
|
12388
|
+
* Controls how Workers Standard Vary handles a request header listed by an
|
|
12389
|
+
* origin `Vary` response header:
|
|
12390
|
+
*
|
|
12391
|
+
* - `"normalize"`: normalize the request header value before it is used in the
|
|
12392
|
+
* cache variance key.
|
|
12393
|
+
* - `"passthrough"`: use the raw request header value in the cache variance
|
|
12394
|
+
* key.
|
|
12395
|
+
* - `"bypass"`: bypass cache when the header appears in the origin `Vary`
|
|
12396
|
+
* response header.
|
|
12397
|
+
*/
|
|
12398
|
+
export type RequestInitCfPropertiesVaryAction =
|
|
12399
|
+
| "normalize"
|
|
12400
|
+
| "passthrough"
|
|
12401
|
+
| "bypass";
|
|
12402
|
+
/** Configuration for Workers Standard Vary support. */
|
|
12403
|
+
export interface RequestInitCfPropertiesVary {
|
|
12404
|
+
/** The fallback action for varied request headers not listed in `headers`. */
|
|
12405
|
+
default: RequestInitCfPropertiesVaryHeader;
|
|
12406
|
+
/**
|
|
12407
|
+
* Lowercase request header names and their Vary configuration.
|
|
12408
|
+
*
|
|
12409
|
+
* The `accept` header can include `media_types`, the `accept-language`
|
|
12410
|
+
* header can include `languages`, and other headers support only `action`.
|
|
12411
|
+
*/
|
|
12412
|
+
headers?: RequestInitCfPropertiesVaryHeaders;
|
|
12413
|
+
}
|
|
12414
|
+
/** Common Vary behavior for a single request header. */
|
|
12415
|
+
export interface RequestInitCfPropertiesVaryHeader {
|
|
12416
|
+
/** How this request header contributes to cache variance. */
|
|
12417
|
+
action: RequestInitCfPropertiesVaryAction;
|
|
12418
|
+
}
|
|
12419
|
+
/** Vary behavior for the `accept` request header. */
|
|
12420
|
+
export interface RequestInitCfPropertiesVaryAcceptHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12421
|
+
/**
|
|
12422
|
+
* Media types to keep when normalizing the `Accept` request header.
|
|
12423
|
+
*
|
|
12424
|
+
* Named `media_types` to match the serialized `cf.vary` configuration.
|
|
12425
|
+
*/
|
|
12426
|
+
media_types?: string[];
|
|
12427
|
+
}
|
|
12428
|
+
/** Vary behavior for the `accept-language` request header. */
|
|
12429
|
+
export interface RequestInitCfPropertiesVaryAcceptLanguageHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12430
|
+
/**
|
|
12431
|
+
* Language tags to keep when normalizing the `Accept-Language` request
|
|
12432
|
+
* header.
|
|
12433
|
+
*/
|
|
12434
|
+
languages?: string[];
|
|
12435
|
+
}
|
|
12436
|
+
/**
|
|
12437
|
+
* Lowercase request header names and their Vary behavior.
|
|
12438
|
+
*
|
|
12439
|
+
* The index signature allows arbitrary custom request headers beyond the
|
|
12440
|
+
* well-known `accept` and `accept-language` specializations.
|
|
12441
|
+
*/
|
|
12442
|
+
export interface RequestInitCfPropertiesVaryHeaders {
|
|
12443
|
+
accept?: RequestInitCfPropertiesVaryAcceptHeader;
|
|
12444
|
+
"accept-language"?: RequestInitCfPropertiesVaryAcceptLanguageHeader;
|
|
12445
|
+
[header: string]:
|
|
12446
|
+
| RequestInitCfPropertiesVaryHeader
|
|
12447
|
+
| RequestInitCfPropertiesVaryAcceptHeader
|
|
12448
|
+
| RequestInitCfPropertiesVaryAcceptLanguageHeader
|
|
12449
|
+
| undefined;
|
|
12450
|
+
}
|
|
12385
12451
|
export interface BasicImageTransformations {
|
|
12386
12452
|
/**
|
|
12387
12453
|
* Maximum width in image pixels. The value must be an integer.
|
package/2023-07-01/index.d.ts
CHANGED
|
@@ -12302,6 +12302,8 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12302
12302
|
* (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
|
|
12303
12303
|
*/
|
|
12304
12304
|
cacheTtlByStatus?: Record<string, number>;
|
|
12305
|
+
/** Controls how responses with a `Vary` header are cached for this request. */
|
|
12306
|
+
vary?: RequestInitCfPropertiesVary;
|
|
12305
12307
|
/**
|
|
12306
12308
|
* Explicit Cache-Control header value to set on the response stored in cache.
|
|
12307
12309
|
* This gives full control over cache directives (e.g. 'public, max-age=3600, s-maxage=86400').
|
|
@@ -12370,6 +12372,67 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12370
12372
|
*/
|
|
12371
12373
|
resolveOverride?: string;
|
|
12372
12374
|
}
|
|
12375
|
+
/**
|
|
12376
|
+
* Controls how Workers Standard Vary handles a request header listed by an
|
|
12377
|
+
* origin `Vary` response header:
|
|
12378
|
+
*
|
|
12379
|
+
* - `"normalize"`: normalize the request header value before it is used in the
|
|
12380
|
+
* cache variance key.
|
|
12381
|
+
* - `"passthrough"`: use the raw request header value in the cache variance
|
|
12382
|
+
* key.
|
|
12383
|
+
* - `"bypass"`: bypass cache when the header appears in the origin `Vary`
|
|
12384
|
+
* response header.
|
|
12385
|
+
*/
|
|
12386
|
+
type RequestInitCfPropertiesVaryAction = "normalize" | "passthrough" | "bypass";
|
|
12387
|
+
/** Configuration for Workers Standard Vary support. */
|
|
12388
|
+
interface RequestInitCfPropertiesVary {
|
|
12389
|
+
/** The fallback action for varied request headers not listed in `headers`. */
|
|
12390
|
+
default: RequestInitCfPropertiesVaryHeader;
|
|
12391
|
+
/**
|
|
12392
|
+
* Lowercase request header names and their Vary configuration.
|
|
12393
|
+
*
|
|
12394
|
+
* The `accept` header can include `media_types`, the `accept-language`
|
|
12395
|
+
* header can include `languages`, and other headers support only `action`.
|
|
12396
|
+
*/
|
|
12397
|
+
headers?: RequestInitCfPropertiesVaryHeaders;
|
|
12398
|
+
}
|
|
12399
|
+
/** Common Vary behavior for a single request header. */
|
|
12400
|
+
interface RequestInitCfPropertiesVaryHeader {
|
|
12401
|
+
/** How this request header contributes to cache variance. */
|
|
12402
|
+
action: RequestInitCfPropertiesVaryAction;
|
|
12403
|
+
}
|
|
12404
|
+
/** Vary behavior for the `accept` request header. */
|
|
12405
|
+
interface RequestInitCfPropertiesVaryAcceptHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12406
|
+
/**
|
|
12407
|
+
* Media types to keep when normalizing the `Accept` request header.
|
|
12408
|
+
*
|
|
12409
|
+
* Named `media_types` to match the serialized `cf.vary` configuration.
|
|
12410
|
+
*/
|
|
12411
|
+
media_types?: string[];
|
|
12412
|
+
}
|
|
12413
|
+
/** Vary behavior for the `accept-language` request header. */
|
|
12414
|
+
interface RequestInitCfPropertiesVaryAcceptLanguageHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12415
|
+
/**
|
|
12416
|
+
* Language tags to keep when normalizing the `Accept-Language` request
|
|
12417
|
+
* header.
|
|
12418
|
+
*/
|
|
12419
|
+
languages?: string[];
|
|
12420
|
+
}
|
|
12421
|
+
/**
|
|
12422
|
+
* Lowercase request header names and their Vary behavior.
|
|
12423
|
+
*
|
|
12424
|
+
* The index signature allows arbitrary custom request headers beyond the
|
|
12425
|
+
* well-known `accept` and `accept-language` specializations.
|
|
12426
|
+
*/
|
|
12427
|
+
interface RequestInitCfPropertiesVaryHeaders {
|
|
12428
|
+
accept?: RequestInitCfPropertiesVaryAcceptHeader;
|
|
12429
|
+
"accept-language"?: RequestInitCfPropertiesVaryAcceptLanguageHeader;
|
|
12430
|
+
[header: string]:
|
|
12431
|
+
| RequestInitCfPropertiesVaryHeader
|
|
12432
|
+
| RequestInitCfPropertiesVaryAcceptHeader
|
|
12433
|
+
| RequestInitCfPropertiesVaryAcceptLanguageHeader
|
|
12434
|
+
| undefined;
|
|
12435
|
+
}
|
|
12373
12436
|
interface BasicImageTransformations {
|
|
12374
12437
|
/**
|
|
12375
12438
|
* Maximum width in image pixels. The value must be an integer.
|
package/2023-07-01/index.ts
CHANGED
|
@@ -12314,6 +12314,8 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12314
12314
|
* (e.g. { '200-299': 86400, '404': 1, '500-599': 0 })
|
|
12315
12315
|
*/
|
|
12316
12316
|
cacheTtlByStatus?: Record<string, number>;
|
|
12317
|
+
/** Controls how responses with a `Vary` header are cached for this request. */
|
|
12318
|
+
vary?: RequestInitCfPropertiesVary;
|
|
12317
12319
|
/**
|
|
12318
12320
|
* Explicit Cache-Control header value to set on the response stored in cache.
|
|
12319
12321
|
* This gives full control over cache directives (e.g. 'public, max-age=3600, s-maxage=86400').
|
|
@@ -12382,6 +12384,70 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12382
12384
|
*/
|
|
12383
12385
|
resolveOverride?: string;
|
|
12384
12386
|
}
|
|
12387
|
+
/**
|
|
12388
|
+
* Controls how Workers Standard Vary handles a request header listed by an
|
|
12389
|
+
* origin `Vary` response header:
|
|
12390
|
+
*
|
|
12391
|
+
* - `"normalize"`: normalize the request header value before it is used in the
|
|
12392
|
+
* cache variance key.
|
|
12393
|
+
* - `"passthrough"`: use the raw request header value in the cache variance
|
|
12394
|
+
* key.
|
|
12395
|
+
* - `"bypass"`: bypass cache when the header appears in the origin `Vary`
|
|
12396
|
+
* response header.
|
|
12397
|
+
*/
|
|
12398
|
+
export type RequestInitCfPropertiesVaryAction =
|
|
12399
|
+
| "normalize"
|
|
12400
|
+
| "passthrough"
|
|
12401
|
+
| "bypass";
|
|
12402
|
+
/** Configuration for Workers Standard Vary support. */
|
|
12403
|
+
export interface RequestInitCfPropertiesVary {
|
|
12404
|
+
/** The fallback action for varied request headers not listed in `headers`. */
|
|
12405
|
+
default: RequestInitCfPropertiesVaryHeader;
|
|
12406
|
+
/**
|
|
12407
|
+
* Lowercase request header names and their Vary configuration.
|
|
12408
|
+
*
|
|
12409
|
+
* The `accept` header can include `media_types`, the `accept-language`
|
|
12410
|
+
* header can include `languages`, and other headers support only `action`.
|
|
12411
|
+
*/
|
|
12412
|
+
headers?: RequestInitCfPropertiesVaryHeaders;
|
|
12413
|
+
}
|
|
12414
|
+
/** Common Vary behavior for a single request header. */
|
|
12415
|
+
export interface RequestInitCfPropertiesVaryHeader {
|
|
12416
|
+
/** How this request header contributes to cache variance. */
|
|
12417
|
+
action: RequestInitCfPropertiesVaryAction;
|
|
12418
|
+
}
|
|
12419
|
+
/** Vary behavior for the `accept` request header. */
|
|
12420
|
+
export interface RequestInitCfPropertiesVaryAcceptHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12421
|
+
/**
|
|
12422
|
+
* Media types to keep when normalizing the `Accept` request header.
|
|
12423
|
+
*
|
|
12424
|
+
* Named `media_types` to match the serialized `cf.vary` configuration.
|
|
12425
|
+
*/
|
|
12426
|
+
media_types?: string[];
|
|
12427
|
+
}
|
|
12428
|
+
/** Vary behavior for the `accept-language` request header. */
|
|
12429
|
+
export interface RequestInitCfPropertiesVaryAcceptLanguageHeader extends RequestInitCfPropertiesVaryHeader {
|
|
12430
|
+
/**
|
|
12431
|
+
* Language tags to keep when normalizing the `Accept-Language` request
|
|
12432
|
+
* header.
|
|
12433
|
+
*/
|
|
12434
|
+
languages?: string[];
|
|
12435
|
+
}
|
|
12436
|
+
/**
|
|
12437
|
+
* Lowercase request header names and their Vary behavior.
|
|
12438
|
+
*
|
|
12439
|
+
* The index signature allows arbitrary custom request headers beyond the
|
|
12440
|
+
* well-known `accept` and `accept-language` specializations.
|
|
12441
|
+
*/
|
|
12442
|
+
export interface RequestInitCfPropertiesVaryHeaders {
|
|
12443
|
+
accept?: RequestInitCfPropertiesVaryAcceptHeader;
|
|
12444
|
+
"accept-language"?: RequestInitCfPropertiesVaryAcceptLanguageHeader;
|
|
12445
|
+
[header: string]:
|
|
12446
|
+
| RequestInitCfPropertiesVaryHeader
|
|
12447
|
+
| RequestInitCfPropertiesVaryAcceptHeader
|
|
12448
|
+
| RequestInitCfPropertiesVaryAcceptLanguageHeader
|
|
12449
|
+
| undefined;
|
|
12450
|
+
}
|
|
12385
12451
|
export interface BasicImageTransformations {
|
|
12386
12452
|
/**
|
|
12387
12453
|
* Maximum width in image pixels. The value must be an integer.
|