@cloudflare/workers-types 4.20241127.0 → 4.20241205.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2021-11-03/index.d.ts +11 -9
- package/2021-11-03/index.ts +7 -7
- package/2022-01-31/index.d.ts +11 -9
- package/2022-01-31/index.ts +7 -7
- package/2022-03-21/index.d.ts +13 -10
- package/2022-03-21/index.ts +9 -8
- package/2022-08-04/index.d.ts +13 -10
- package/2022-08-04/index.ts +9 -8
- package/2022-10-31/index.d.ts +13 -10
- package/2022-10-31/index.ts +9 -8
- package/2022-11-30/index.d.ts +13 -10
- package/2022-11-30/index.ts +9 -8
- package/2023-03-01/index.d.ts +13 -10
- package/2023-03-01/index.ts +9 -8
- package/2023-07-01/index.d.ts +13 -10
- package/2023-07-01/index.ts +9 -8
- package/experimental/index.d.ts +13 -10
- package/experimental/index.ts +9 -8
- package/index.d.ts +11 -9
- package/index.ts +7 -7
- package/oldest/index.d.ts +11 -9
- package/oldest/index.ts +7 -7
- package/package.json +1 -1
package/2022-10-31/index.ts
CHANGED
|
@@ -462,8 +462,9 @@ export declare abstract class Navigator {
|
|
|
462
462
|
| string
|
|
463
463
|
| (ArrayBuffer | ArrayBufferView)
|
|
464
464
|
| Blob
|
|
465
|
+
| FormData
|
|
465
466
|
| URLSearchParams
|
|
466
|
-
|
|
|
467
|
+
| URLSearchParams,
|
|
467
468
|
): boolean;
|
|
468
469
|
readonly userAgent: string;
|
|
469
470
|
readonly gpu: GPU;
|
|
@@ -957,7 +958,7 @@ export declare class Blob {
|
|
|
957
958
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
958
959
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
959
960
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
960
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
961
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
961
962
|
bytes(): Promise<Uint8Array>;
|
|
962
963
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
963
964
|
text(): Promise<string>;
|
|
@@ -1533,7 +1534,7 @@ export declare abstract class Body {
|
|
|
1533
1534
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1534
1535
|
get bodyUsed(): boolean;
|
|
1535
1536
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1536
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1537
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1537
1538
|
bytes(): Promise<Uint8Array>;
|
|
1538
1539
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1539
1540
|
text(): Promise<string>;
|
|
@@ -1932,7 +1933,7 @@ export declare abstract class R2Object {
|
|
|
1932
1933
|
export interface R2ObjectBody extends R2Object {
|
|
1933
1934
|
get body(): ReadableStream;
|
|
1934
1935
|
get bodyUsed(): boolean;
|
|
1935
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1936
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1936
1937
|
text(): Promise<string>;
|
|
1937
1938
|
json<T>(): Promise<T>;
|
|
1938
1939
|
blob(): Promise<Blob>;
|
|
@@ -5608,7 +5609,7 @@ export interface DispatchNamespace {
|
|
|
5608
5609
|
options?: DynamicDispatchOptions,
|
|
5609
5610
|
): Fetcher;
|
|
5610
5611
|
}
|
|
5611
|
-
export declare abstract class Workflow {
|
|
5612
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5612
5613
|
/**
|
|
5613
5614
|
* Get a handle to an existing instance of the Workflow.
|
|
5614
5615
|
* @param id Id for the instance of this Workflow
|
|
@@ -5621,10 +5622,10 @@ export declare abstract class Workflow {
|
|
|
5621
5622
|
* @returns A promise that resolves with a handle for the Instance
|
|
5622
5623
|
*/
|
|
5623
5624
|
public create(
|
|
5624
|
-
options?: WorkflowInstanceCreateOptions
|
|
5625
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5625
5626
|
): Promise<WorkflowInstance>;
|
|
5626
5627
|
}
|
|
5627
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5628
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5628
5629
|
/**
|
|
5629
5630
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5630
5631
|
*/
|
|
@@ -5632,7 +5633,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5632
5633
|
/**
|
|
5633
5634
|
* The event payload the Workflow instance is triggered with
|
|
5634
5635
|
*/
|
|
5635
|
-
params?:
|
|
5636
|
+
params?: PARAMS;
|
|
5636
5637
|
}
|
|
5637
5638
|
export type InstanceStatus = {
|
|
5638
5639
|
status:
|
package/2022-11-30/index.d.ts
CHANGED
|
@@ -462,8 +462,9 @@ declare abstract class Navigator {
|
|
|
462
462
|
| string
|
|
463
463
|
| (ArrayBuffer | ArrayBufferView)
|
|
464
464
|
| Blob
|
|
465
|
+
| FormData
|
|
465
466
|
| URLSearchParams
|
|
466
|
-
|
|
|
467
|
+
| URLSearchParams,
|
|
467
468
|
): boolean;
|
|
468
469
|
readonly userAgent: string;
|
|
469
470
|
readonly gpu: GPU;
|
|
@@ -957,7 +958,7 @@ declare class Blob {
|
|
|
957
958
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
958
959
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
959
960
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
960
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
961
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
961
962
|
bytes(): Promise<Uint8Array>;
|
|
962
963
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
963
964
|
text(): Promise<string>;
|
|
@@ -1533,7 +1534,7 @@ declare abstract class Body {
|
|
|
1533
1534
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1534
1535
|
get bodyUsed(): boolean;
|
|
1535
1536
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1536
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1537
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1537
1538
|
bytes(): Promise<Uint8Array>;
|
|
1538
1539
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1539
1540
|
text(): Promise<string>;
|
|
@@ -1928,7 +1929,7 @@ declare abstract class R2Object {
|
|
|
1928
1929
|
interface R2ObjectBody extends R2Object {
|
|
1929
1930
|
get body(): ReadableStream;
|
|
1930
1931
|
get bodyUsed(): boolean;
|
|
1931
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1932
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1932
1933
|
text(): Promise<string>;
|
|
1933
1934
|
json<T>(): Promise<T>;
|
|
1934
1935
|
blob(): Promise<Blob>;
|
|
@@ -5349,14 +5350,16 @@ declare module "cloudflare:workers" {
|
|
|
5349
5350
|
export type WorkflowSleepDuration =
|
|
5350
5351
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5351
5352
|
| number;
|
|
5353
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5354
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5352
5355
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5353
5356
|
export type WorkflowStepConfig = {
|
|
5354
5357
|
retries?: {
|
|
5355
5358
|
limit: number;
|
|
5356
|
-
delay:
|
|
5359
|
+
delay: WorkflowDelayDuration | number;
|
|
5357
5360
|
backoff?: WorkflowBackoff;
|
|
5358
5361
|
};
|
|
5359
|
-
timeout?:
|
|
5362
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5360
5363
|
};
|
|
5361
5364
|
export type WorkflowEvent<T> = {
|
|
5362
5365
|
payload: Readonly<T>;
|
|
@@ -5709,7 +5712,7 @@ declare module "cloudflare:workflows" {
|
|
|
5709
5712
|
public constructor(message: string, name?: string);
|
|
5710
5713
|
}
|
|
5711
5714
|
}
|
|
5712
|
-
declare abstract class Workflow {
|
|
5715
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5713
5716
|
/**
|
|
5714
5717
|
* Get a handle to an existing instance of the Workflow.
|
|
5715
5718
|
* @param id Id for the instance of this Workflow
|
|
@@ -5722,10 +5725,10 @@ declare abstract class Workflow {
|
|
|
5722
5725
|
* @returns A promise that resolves with a handle for the Instance
|
|
5723
5726
|
*/
|
|
5724
5727
|
public create(
|
|
5725
|
-
options?: WorkflowInstanceCreateOptions
|
|
5728
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5726
5729
|
): Promise<WorkflowInstance>;
|
|
5727
5730
|
}
|
|
5728
|
-
interface WorkflowInstanceCreateOptions {
|
|
5731
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5729
5732
|
/**
|
|
5730
5733
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5731
5734
|
*/
|
|
@@ -5733,7 +5736,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5733
5736
|
/**
|
|
5734
5737
|
* The event payload the Workflow instance is triggered with
|
|
5735
5738
|
*/
|
|
5736
|
-
params?:
|
|
5739
|
+
params?: PARAMS;
|
|
5737
5740
|
}
|
|
5738
5741
|
type InstanceStatus = {
|
|
5739
5742
|
status:
|
package/2022-11-30/index.ts
CHANGED
|
@@ -467,8 +467,9 @@ export declare abstract class Navigator {
|
|
|
467
467
|
| string
|
|
468
468
|
| (ArrayBuffer | ArrayBufferView)
|
|
469
469
|
| Blob
|
|
470
|
+
| FormData
|
|
470
471
|
| URLSearchParams
|
|
471
|
-
|
|
|
472
|
+
| URLSearchParams,
|
|
472
473
|
): boolean;
|
|
473
474
|
readonly userAgent: string;
|
|
474
475
|
readonly gpu: GPU;
|
|
@@ -962,7 +963,7 @@ export declare class Blob {
|
|
|
962
963
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
963
964
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
964
965
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
965
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
966
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
966
967
|
bytes(): Promise<Uint8Array>;
|
|
967
968
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
968
969
|
text(): Promise<string>;
|
|
@@ -1538,7 +1539,7 @@ export declare abstract class Body {
|
|
|
1538
1539
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1539
1540
|
get bodyUsed(): boolean;
|
|
1540
1541
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1541
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1542
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1542
1543
|
bytes(): Promise<Uint8Array>;
|
|
1543
1544
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1544
1545
|
text(): Promise<string>;
|
|
@@ -1937,7 +1938,7 @@ export declare abstract class R2Object {
|
|
|
1937
1938
|
export interface R2ObjectBody extends R2Object {
|
|
1938
1939
|
get body(): ReadableStream;
|
|
1939
1940
|
get bodyUsed(): boolean;
|
|
1940
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1941
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1941
1942
|
text(): Promise<string>;
|
|
1942
1943
|
json<T>(): Promise<T>;
|
|
1943
1944
|
blob(): Promise<Blob>;
|
|
@@ -5613,7 +5614,7 @@ export interface DispatchNamespace {
|
|
|
5613
5614
|
options?: DynamicDispatchOptions,
|
|
5614
5615
|
): Fetcher;
|
|
5615
5616
|
}
|
|
5616
|
-
export declare abstract class Workflow {
|
|
5617
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5617
5618
|
/**
|
|
5618
5619
|
* Get a handle to an existing instance of the Workflow.
|
|
5619
5620
|
* @param id Id for the instance of this Workflow
|
|
@@ -5626,10 +5627,10 @@ export declare abstract class Workflow {
|
|
|
5626
5627
|
* @returns A promise that resolves with a handle for the Instance
|
|
5627
5628
|
*/
|
|
5628
5629
|
public create(
|
|
5629
|
-
options?: WorkflowInstanceCreateOptions
|
|
5630
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5630
5631
|
): Promise<WorkflowInstance>;
|
|
5631
5632
|
}
|
|
5632
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5633
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5633
5634
|
/**
|
|
5634
5635
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5635
5636
|
*/
|
|
@@ -5637,7 +5638,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5637
5638
|
/**
|
|
5638
5639
|
* The event payload the Workflow instance is triggered with
|
|
5639
5640
|
*/
|
|
5640
|
-
params?:
|
|
5641
|
+
params?: PARAMS;
|
|
5641
5642
|
}
|
|
5642
5643
|
export type InstanceStatus = {
|
|
5643
5644
|
status:
|
package/2023-03-01/index.d.ts
CHANGED
|
@@ -462,8 +462,9 @@ declare abstract class Navigator {
|
|
|
462
462
|
| string
|
|
463
463
|
| (ArrayBuffer | ArrayBufferView)
|
|
464
464
|
| Blob
|
|
465
|
+
| FormData
|
|
465
466
|
| URLSearchParams
|
|
466
|
-
|
|
|
467
|
+
| URLSearchParams,
|
|
467
468
|
): boolean;
|
|
468
469
|
readonly userAgent: string;
|
|
469
470
|
readonly gpu: GPU;
|
|
@@ -957,7 +958,7 @@ declare class Blob {
|
|
|
957
958
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
958
959
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
959
960
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
960
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
961
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
961
962
|
bytes(): Promise<Uint8Array>;
|
|
962
963
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
963
964
|
text(): Promise<string>;
|
|
@@ -1535,7 +1536,7 @@ declare abstract class Body {
|
|
|
1535
1536
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1536
1537
|
get bodyUsed(): boolean;
|
|
1537
1538
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1538
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1539
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1539
1540
|
bytes(): Promise<Uint8Array>;
|
|
1540
1541
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1541
1542
|
text(): Promise<string>;
|
|
@@ -1930,7 +1931,7 @@ declare abstract class R2Object {
|
|
|
1930
1931
|
interface R2ObjectBody extends R2Object {
|
|
1931
1932
|
get body(): ReadableStream;
|
|
1932
1933
|
get bodyUsed(): boolean;
|
|
1933
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1934
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1934
1935
|
text(): Promise<string>;
|
|
1935
1936
|
json<T>(): Promise<T>;
|
|
1936
1937
|
blob(): Promise<Blob>;
|
|
@@ -5351,14 +5352,16 @@ declare module "cloudflare:workers" {
|
|
|
5351
5352
|
export type WorkflowSleepDuration =
|
|
5352
5353
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5353
5354
|
| number;
|
|
5355
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5356
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5354
5357
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5355
5358
|
export type WorkflowStepConfig = {
|
|
5356
5359
|
retries?: {
|
|
5357
5360
|
limit: number;
|
|
5358
|
-
delay:
|
|
5361
|
+
delay: WorkflowDelayDuration | number;
|
|
5359
5362
|
backoff?: WorkflowBackoff;
|
|
5360
5363
|
};
|
|
5361
|
-
timeout?:
|
|
5364
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5362
5365
|
};
|
|
5363
5366
|
export type WorkflowEvent<T> = {
|
|
5364
5367
|
payload: Readonly<T>;
|
|
@@ -5711,7 +5714,7 @@ declare module "cloudflare:workflows" {
|
|
|
5711
5714
|
public constructor(message: string, name?: string);
|
|
5712
5715
|
}
|
|
5713
5716
|
}
|
|
5714
|
-
declare abstract class Workflow {
|
|
5717
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5715
5718
|
/**
|
|
5716
5719
|
* Get a handle to an existing instance of the Workflow.
|
|
5717
5720
|
* @param id Id for the instance of this Workflow
|
|
@@ -5724,10 +5727,10 @@ declare abstract class Workflow {
|
|
|
5724
5727
|
* @returns A promise that resolves with a handle for the Instance
|
|
5725
5728
|
*/
|
|
5726
5729
|
public create(
|
|
5727
|
-
options?: WorkflowInstanceCreateOptions
|
|
5730
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5728
5731
|
): Promise<WorkflowInstance>;
|
|
5729
5732
|
}
|
|
5730
|
-
interface WorkflowInstanceCreateOptions {
|
|
5733
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5731
5734
|
/**
|
|
5732
5735
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5733
5736
|
*/
|
|
@@ -5735,7 +5738,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5735
5738
|
/**
|
|
5736
5739
|
* The event payload the Workflow instance is triggered with
|
|
5737
5740
|
*/
|
|
5738
|
-
params?:
|
|
5741
|
+
params?: PARAMS;
|
|
5739
5742
|
}
|
|
5740
5743
|
type InstanceStatus = {
|
|
5741
5744
|
status:
|
package/2023-03-01/index.ts
CHANGED
|
@@ -467,8 +467,9 @@ export declare abstract class Navigator {
|
|
|
467
467
|
| string
|
|
468
468
|
| (ArrayBuffer | ArrayBufferView)
|
|
469
469
|
| Blob
|
|
470
|
+
| FormData
|
|
470
471
|
| URLSearchParams
|
|
471
|
-
|
|
|
472
|
+
| URLSearchParams,
|
|
472
473
|
): boolean;
|
|
473
474
|
readonly userAgent: string;
|
|
474
475
|
readonly gpu: GPU;
|
|
@@ -962,7 +963,7 @@ export declare class Blob {
|
|
|
962
963
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
963
964
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
964
965
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
965
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
966
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
966
967
|
bytes(): Promise<Uint8Array>;
|
|
967
968
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
968
969
|
text(): Promise<string>;
|
|
@@ -1540,7 +1541,7 @@ export declare abstract class Body {
|
|
|
1540
1541
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1541
1542
|
get bodyUsed(): boolean;
|
|
1542
1543
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1543
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1544
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1544
1545
|
bytes(): Promise<Uint8Array>;
|
|
1545
1546
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1546
1547
|
text(): Promise<string>;
|
|
@@ -1939,7 +1940,7 @@ export declare abstract class R2Object {
|
|
|
1939
1940
|
export interface R2ObjectBody extends R2Object {
|
|
1940
1941
|
get body(): ReadableStream;
|
|
1941
1942
|
get bodyUsed(): boolean;
|
|
1942
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1943
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1943
1944
|
text(): Promise<string>;
|
|
1944
1945
|
json<T>(): Promise<T>;
|
|
1945
1946
|
blob(): Promise<Blob>;
|
|
@@ -5615,7 +5616,7 @@ export interface DispatchNamespace {
|
|
|
5615
5616
|
options?: DynamicDispatchOptions,
|
|
5616
5617
|
): Fetcher;
|
|
5617
5618
|
}
|
|
5618
|
-
export declare abstract class Workflow {
|
|
5619
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5619
5620
|
/**
|
|
5620
5621
|
* Get a handle to an existing instance of the Workflow.
|
|
5621
5622
|
* @param id Id for the instance of this Workflow
|
|
@@ -5628,10 +5629,10 @@ export declare abstract class Workflow {
|
|
|
5628
5629
|
* @returns A promise that resolves with a handle for the Instance
|
|
5629
5630
|
*/
|
|
5630
5631
|
public create(
|
|
5631
|
-
options?: WorkflowInstanceCreateOptions
|
|
5632
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5632
5633
|
): Promise<WorkflowInstance>;
|
|
5633
5634
|
}
|
|
5634
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5635
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5635
5636
|
/**
|
|
5636
5637
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5637
5638
|
*/
|
|
@@ -5639,7 +5640,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5639
5640
|
/**
|
|
5640
5641
|
* The event payload the Workflow instance is triggered with
|
|
5641
5642
|
*/
|
|
5642
|
-
params?:
|
|
5643
|
+
params?: PARAMS;
|
|
5643
5644
|
}
|
|
5644
5645
|
export type InstanceStatus = {
|
|
5645
5646
|
status:
|
package/2023-07-01/index.d.ts
CHANGED
|
@@ -462,8 +462,9 @@ declare abstract class Navigator {
|
|
|
462
462
|
| string
|
|
463
463
|
| (ArrayBuffer | ArrayBufferView)
|
|
464
464
|
| Blob
|
|
465
|
+
| FormData
|
|
465
466
|
| URLSearchParams
|
|
466
|
-
|
|
|
467
|
+
| URLSearchParams,
|
|
467
468
|
): boolean;
|
|
468
469
|
readonly userAgent: string;
|
|
469
470
|
readonly gpu: GPU;
|
|
@@ -957,7 +958,7 @@ declare class Blob {
|
|
|
957
958
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
958
959
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
959
960
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
960
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
961
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
961
962
|
bytes(): Promise<Uint8Array>;
|
|
962
963
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
963
964
|
text(): Promise<string>;
|
|
@@ -1535,7 +1536,7 @@ declare abstract class Body {
|
|
|
1535
1536
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1536
1537
|
get bodyUsed(): boolean;
|
|
1537
1538
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1538
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1539
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1539
1540
|
bytes(): Promise<Uint8Array>;
|
|
1540
1541
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1541
1542
|
text(): Promise<string>;
|
|
@@ -1930,7 +1931,7 @@ declare abstract class R2Object {
|
|
|
1930
1931
|
interface R2ObjectBody extends R2Object {
|
|
1931
1932
|
get body(): ReadableStream;
|
|
1932
1933
|
get bodyUsed(): boolean;
|
|
1933
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1934
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1934
1935
|
text(): Promise<string>;
|
|
1935
1936
|
json<T>(): Promise<T>;
|
|
1936
1937
|
blob(): Promise<Blob>;
|
|
@@ -5351,14 +5352,16 @@ declare module "cloudflare:workers" {
|
|
|
5351
5352
|
export type WorkflowSleepDuration =
|
|
5352
5353
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5353
5354
|
| number;
|
|
5355
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5356
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5354
5357
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5355
5358
|
export type WorkflowStepConfig = {
|
|
5356
5359
|
retries?: {
|
|
5357
5360
|
limit: number;
|
|
5358
|
-
delay:
|
|
5361
|
+
delay: WorkflowDelayDuration | number;
|
|
5359
5362
|
backoff?: WorkflowBackoff;
|
|
5360
5363
|
};
|
|
5361
|
-
timeout?:
|
|
5364
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5362
5365
|
};
|
|
5363
5366
|
export type WorkflowEvent<T> = {
|
|
5364
5367
|
payload: Readonly<T>;
|
|
@@ -5711,7 +5714,7 @@ declare module "cloudflare:workflows" {
|
|
|
5711
5714
|
public constructor(message: string, name?: string);
|
|
5712
5715
|
}
|
|
5713
5716
|
}
|
|
5714
|
-
declare abstract class Workflow {
|
|
5717
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5715
5718
|
/**
|
|
5716
5719
|
* Get a handle to an existing instance of the Workflow.
|
|
5717
5720
|
* @param id Id for the instance of this Workflow
|
|
@@ -5724,10 +5727,10 @@ declare abstract class Workflow {
|
|
|
5724
5727
|
* @returns A promise that resolves with a handle for the Instance
|
|
5725
5728
|
*/
|
|
5726
5729
|
public create(
|
|
5727
|
-
options?: WorkflowInstanceCreateOptions
|
|
5730
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5728
5731
|
): Promise<WorkflowInstance>;
|
|
5729
5732
|
}
|
|
5730
|
-
interface WorkflowInstanceCreateOptions {
|
|
5733
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5731
5734
|
/**
|
|
5732
5735
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5733
5736
|
*/
|
|
@@ -5735,7 +5738,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5735
5738
|
/**
|
|
5736
5739
|
* The event payload the Workflow instance is triggered with
|
|
5737
5740
|
*/
|
|
5738
|
-
params?:
|
|
5741
|
+
params?: PARAMS;
|
|
5739
5742
|
}
|
|
5740
5743
|
type InstanceStatus = {
|
|
5741
5744
|
status:
|
package/2023-07-01/index.ts
CHANGED
|
@@ -467,8 +467,9 @@ export declare abstract class Navigator {
|
|
|
467
467
|
| string
|
|
468
468
|
| (ArrayBuffer | ArrayBufferView)
|
|
469
469
|
| Blob
|
|
470
|
+
| FormData
|
|
470
471
|
| URLSearchParams
|
|
471
|
-
|
|
|
472
|
+
| URLSearchParams,
|
|
472
473
|
): boolean;
|
|
473
474
|
readonly userAgent: string;
|
|
474
475
|
readonly gpu: GPU;
|
|
@@ -962,7 +963,7 @@ export declare class Blob {
|
|
|
962
963
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
963
964
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
964
965
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
965
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
966
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
966
967
|
bytes(): Promise<Uint8Array>;
|
|
967
968
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
968
969
|
text(): Promise<string>;
|
|
@@ -1540,7 +1541,7 @@ export declare abstract class Body {
|
|
|
1540
1541
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1541
1542
|
get bodyUsed(): boolean;
|
|
1542
1543
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1543
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1544
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1544
1545
|
bytes(): Promise<Uint8Array>;
|
|
1545
1546
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1546
1547
|
text(): Promise<string>;
|
|
@@ -1939,7 +1940,7 @@ export declare abstract class R2Object {
|
|
|
1939
1940
|
export interface R2ObjectBody extends R2Object {
|
|
1940
1941
|
get body(): ReadableStream;
|
|
1941
1942
|
get bodyUsed(): boolean;
|
|
1942
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1943
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1943
1944
|
text(): Promise<string>;
|
|
1944
1945
|
json<T>(): Promise<T>;
|
|
1945
1946
|
blob(): Promise<Blob>;
|
|
@@ -5615,7 +5616,7 @@ export interface DispatchNamespace {
|
|
|
5615
5616
|
options?: DynamicDispatchOptions,
|
|
5616
5617
|
): Fetcher;
|
|
5617
5618
|
}
|
|
5618
|
-
export declare abstract class Workflow {
|
|
5619
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5619
5620
|
/**
|
|
5620
5621
|
* Get a handle to an existing instance of the Workflow.
|
|
5621
5622
|
* @param id Id for the instance of this Workflow
|
|
@@ -5628,10 +5629,10 @@ export declare abstract class Workflow {
|
|
|
5628
5629
|
* @returns A promise that resolves with a handle for the Instance
|
|
5629
5630
|
*/
|
|
5630
5631
|
public create(
|
|
5631
|
-
options?: WorkflowInstanceCreateOptions
|
|
5632
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5632
5633
|
): Promise<WorkflowInstance>;
|
|
5633
5634
|
}
|
|
5634
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5635
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5635
5636
|
/**
|
|
5636
5637
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5637
5638
|
*/
|
|
@@ -5639,7 +5640,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5639
5640
|
/**
|
|
5640
5641
|
* The event payload the Workflow instance is triggered with
|
|
5641
5642
|
*/
|
|
5642
|
-
params?:
|
|
5643
|
+
params?: PARAMS;
|
|
5643
5644
|
}
|
|
5644
5645
|
export type InstanceStatus = {
|
|
5645
5646
|
status:
|
package/experimental/index.d.ts
CHANGED
|
@@ -463,8 +463,9 @@ declare abstract class Navigator {
|
|
|
463
463
|
| string
|
|
464
464
|
| (ArrayBuffer | ArrayBufferView)
|
|
465
465
|
| Blob
|
|
466
|
+
| FormData
|
|
466
467
|
| URLSearchParams
|
|
467
|
-
|
|
|
468
|
+
| URLSearchParams,
|
|
468
469
|
): boolean;
|
|
469
470
|
readonly userAgent: string;
|
|
470
471
|
readonly gpu: GPU;
|
|
@@ -964,7 +965,7 @@ declare class Blob {
|
|
|
964
965
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
965
966
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
966
967
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
967
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
968
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
968
969
|
bytes(): Promise<Uint8Array>;
|
|
969
970
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
970
971
|
text(): Promise<string>;
|
|
@@ -1542,7 +1543,7 @@ declare abstract class Body {
|
|
|
1542
1543
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1543
1544
|
get bodyUsed(): boolean;
|
|
1544
1545
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1545
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1546
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1546
1547
|
bytes(): Promise<Uint8Array>;
|
|
1547
1548
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1548
1549
|
text(): Promise<string>;
|
|
@@ -1981,7 +1982,7 @@ declare abstract class R2Object {
|
|
|
1981
1982
|
interface R2ObjectBody extends R2Object {
|
|
1982
1983
|
get body(): ReadableStream;
|
|
1983
1984
|
get bodyUsed(): boolean;
|
|
1984
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1985
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1985
1986
|
text(): Promise<string>;
|
|
1986
1987
|
json<T>(): Promise<T>;
|
|
1987
1988
|
blob(): Promise<Blob>;
|
|
@@ -5416,14 +5417,16 @@ declare module "cloudflare:workers" {
|
|
|
5416
5417
|
export type WorkflowSleepDuration =
|
|
5417
5418
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5418
5419
|
| number;
|
|
5420
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5421
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5419
5422
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5420
5423
|
export type WorkflowStepConfig = {
|
|
5421
5424
|
retries?: {
|
|
5422
5425
|
limit: number;
|
|
5423
|
-
delay:
|
|
5426
|
+
delay: WorkflowDelayDuration | number;
|
|
5424
5427
|
backoff?: WorkflowBackoff;
|
|
5425
5428
|
};
|
|
5426
|
-
timeout?:
|
|
5429
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5427
5430
|
};
|
|
5428
5431
|
export type WorkflowEvent<T> = {
|
|
5429
5432
|
payload: Readonly<T>;
|
|
@@ -5776,7 +5779,7 @@ declare module "cloudflare:workflows" {
|
|
|
5776
5779
|
public constructor(message: string, name?: string);
|
|
5777
5780
|
}
|
|
5778
5781
|
}
|
|
5779
|
-
declare abstract class Workflow {
|
|
5782
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5780
5783
|
/**
|
|
5781
5784
|
* Get a handle to an existing instance of the Workflow.
|
|
5782
5785
|
* @param id Id for the instance of this Workflow
|
|
@@ -5789,10 +5792,10 @@ declare abstract class Workflow {
|
|
|
5789
5792
|
* @returns A promise that resolves with a handle for the Instance
|
|
5790
5793
|
*/
|
|
5791
5794
|
public create(
|
|
5792
|
-
options?: WorkflowInstanceCreateOptions
|
|
5795
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5793
5796
|
): Promise<WorkflowInstance>;
|
|
5794
5797
|
}
|
|
5795
|
-
interface WorkflowInstanceCreateOptions {
|
|
5798
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5796
5799
|
/**
|
|
5797
5800
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5798
5801
|
*/
|
|
@@ -5800,7 +5803,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5800
5803
|
/**
|
|
5801
5804
|
* The event payload the Workflow instance is triggered with
|
|
5802
5805
|
*/
|
|
5803
|
-
params?:
|
|
5806
|
+
params?: PARAMS;
|
|
5804
5807
|
}
|
|
5805
5808
|
type InstanceStatus = {
|
|
5806
5809
|
status:
|